From f931c3a8fe0a7bf5c59c3cd75b9f3b017d1d84be Mon Sep 17 00:00:00 2001
From: 13937891274 <kxc0822>
Date: 星期三, 03 八月 2022 17:22:21 +0800
Subject: [PATCH] 数据对接

---
 src/views/goalManagement/IncentiveRecording/index.vue |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/views/goalManagement/IncentiveRecording/index.vue b/src/views/goalManagement/IncentiveRecording/index.vue
index 0a2f8d9..4d922b1 100644
--- a/src/views/goalManagement/IncentiveRecording/index.vue
+++ b/src/views/goalManagement/IncentiveRecording/index.vue
@@ -41,8 +41,8 @@
 				<el-table-column property="createTime" align="center" label="奖惩日期" sortable />
 				<el-table-column label="奖惩类型" align="center" sortable>
 					<template #default="scope">
-					<span v-if="scope.row.standardType==1">奖励</span>
-					<span v-if="scope.row.standardType==2">惩罚</span>
+						<span v-if="scope.row.standardType == 1">奖励</span>
+						<span v-if="scope.row.standardType == 2">惩罚</span>
 					</template>
 				</el-table-column>
 				<el-table-column property="personId" align="center" label="被奖惩者" sortable />
@@ -68,7 +68,7 @@
 				/>
 			</div>
 			<DailogAdd ref="openAdd" @navAddorUpdata="onAddorUpdata"></DailogAdd>
-			<DailogSearchUser ref="openUser"></DailogSearchUser>
+			<DailogSearchUser ref="openUser" @SearchUser="userId"></DailogSearchUser>
 		</div>
 	</div>
 </template>
@@ -87,7 +87,7 @@
 			pageSize: 10,
 			pageIndex: 1,
 			searchParams: {
-				personId: '1', ////员工
+				personId: '', ////员工
 			},
 		});
 		// 重置
@@ -143,6 +143,8 @@
 		};
 		// 删除
 		const onDelete = (id: number) => {
+			let arr=[]
+			arr.push(id)
 			ElMessageBox.confirm('确定删除所选项吗?', 'Warning', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
@@ -150,7 +152,7 @@
 			})
 				.then(() => {
 					goalManagementApi()
-						.getrewardPunishmentDelete(id)
+						.getrewardPunishmentDelete(arr)
 						.then((res) => {
 							if (res.data.code == 200) {
 								ElMessage({
@@ -180,7 +182,7 @@
 			for (let i = 0; i < valId.length; i++) {
 				arr.push(valId[i].id);
 			}
-			deletAll.value = arr.toString();
+			deletAll.value = arr
 			if (val.length == 1) {
 				warning.value = false;
 				danger.value = false;
@@ -220,12 +222,16 @@
 					// });
 				});
 		};
-		const openUser=ref()
-		const openSearch=()=>{
-			openUser.value.openDailog()
-		}
+		const openUser = ref();
+		const openSearch = () => {
+			openUser.value.openDailog();
+		};
+		const userId = (val: any) => {
+			ruleForm.searchParams.personId = val.uid;
+		};
 		return {
 			ruleForm,
+			userId,
 			resetForm,
 			listApi,
 			handleClick,

--
Gitblit v1.9.2