sangwenwei 1 ano atrás
pai
commit
e1951a2720

+ 8 - 0
src/api/jy/EntryService.js

@@ -99,5 +99,13 @@ export default class EntryService{
 		})
 	}
 
+	getByPhone(mobilePhone){
+		return request({
+			url: prefix +'/employeeEntry/getByPhone',
+			method: 'get',
+			params: {mobilePhone: mobilePhone}
+		})
+	}
+
 
 }

+ 12 - 3
src/views/home/components/MyNotifyList2.vue

@@ -2,7 +2,9 @@
 	<el-card class="box-card">
 		<template #header>
 			<div class="card-header">
-				<span>公告</span>
+				<span>公告
+					<el-badge class="mark" v-if="notifylogCount !== 0" :value="notifylogCount" :max="99" style="line-height: 0;margin-top: 8px"/>
+				</span>
 				<div style="float:right;">
 					<el-button type="text" @click="refreshList()">刷新</el-button>
 					<el-button type="text" @click="toPendingList()">查看更多</el-button>
@@ -101,7 +103,7 @@
 				</vxe-column>
 				<vxe-column
 					title="发布者"
-					field="createBy.name"
+					field="createName"
 				></vxe-column>
 				<vxe-column
 					title="操作"
@@ -167,6 +169,11 @@
 				loading: false,
 			};
 		},
+		computed:{
+			notifylogCount(){
+				return this.$store.state.global.notifylogCount
+			},
+		},
 		mounted() {
 			this.refreshList();
 		},
@@ -182,16 +189,18 @@
 			refreshList() {
 				this.loading = true;
 				this.notifyService
-					.list({
+					.myNotifyList({
 						current: this.tablePage.currentPage,
 						size: this.tablePage.pageSize,
 						orders: this.tablePage.orders,
 						isSelf: true,
+						isClose: '0',
 						...this.searchForm,
 					})
 					.then((data) => {
 						this.dataList = data.records;
 						this.tablePage.total = data.total;
+						this.$store.state.global.notifylogCount = data.total
 						this.loading = false;
 					});
 			},

+ 7 - 0
src/views/jy/humanResources/EntryForm.vue

@@ -989,6 +989,13 @@
 					this.inputForm.mobilePhone = ''
 					throw new Error('”联系电话“填写不正确,请重新填写')
 				}
+				//根据联系电话进行判重
+				this.entryService.getByPhone(mobilePhone).then((data)=>{
+					if (data){
+						this.$message.error('”联系电话“已经存在,请重新填写')
+						this.inputForm.mobilePhone = ''
+					}
+				})
 
 			},
 			//验证邮箱

Diferenças do arquivo suprimidas por serem muito extensas
+ 101 - 0
src/views/jy/project/ProjectList.vue