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

---
 src/views/goalManagement/performanceAppraisal/index.vue |   49 ++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/src/views/goalManagement/performanceAppraisal/index.vue b/src/views/goalManagement/performanceAppraisal/index.vue
index cfe1191..6d756d8 100644
--- a/src/views/goalManagement/performanceAppraisal/index.vue
+++ b/src/views/goalManagement/performanceAppraisal/index.vue
@@ -7,10 +7,7 @@
 						<el-row>
 							<el-col :span="4">
 								<el-form-item size="default">
-									<el-select v-model="ruleForm.searchParams.examineDepartmentId" style="width: 100%" placeholder="请选择考核部门">
-										<el-option label="Zone one" value="shanghai" />
-										<el-option label="Zone two" value="beijing" />
-									</el-select>
+									<el-tree-select v-model="ruleForm.searchParams.examineDepartmentId" :data="data" check-strictly="true" class="w100" :props="propse" placeholder="请选择" />
 								</el-form-item>
 							</el-col>
 							<el-col :span="4">
@@ -135,8 +132,8 @@
 				</el-tab-pane>
 			</el-tabs>
 		</div>
-		<DailogAq ref="ShowAdd" @navAddorUpdata="onAddorUpdata"></DailogAq>
-		<DailogKh ref="ShowAdds" @navAddorUpdata="onAddorUpdatas"></DailogKh>
+		<DailogAq ref="openAdd" @navAddorUpdata="onAddorUpdata"></DailogAq>
+		<DailogKh ref="openAdds" @navAddorUpdata="onAddorUpdatas"></DailogKh>
 	</div>
 </template>
 <script lang="ts">
@@ -151,7 +148,7 @@
 	setup() {
 		// 搜索条件 安全考核管理
 		const ruleForm = reactive({
-			pageSize: 2,
+			pageSize: 10,
 			pageIndex: 1,
 			searchParams: {
 				examineDepartmentId: '',
@@ -204,6 +201,8 @@
 		};
 		// 删除
 		const onDelete = (id: number) => {
+			let arr=[]
+			arr.push(id)
 			ElMessageBox.confirm('确定删除所选项吗?', 'Warning', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
@@ -211,7 +210,7 @@
 			})
 				.then(() => {
 					goalManagementApi()
-						.getexamineMngDelete(id)
+						.getexamineMngDelete(arr)
 						.then((res) => {
 							if (res.data.code == 200) {
 								ElMessage({
@@ -241,7 +240,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;
@@ -318,6 +317,7 @@
 		};
 		onMounted(() => {
 			listApis();
+			department()
 		});
 		const onAddorUpdatas = () => {
 			listApis();
@@ -344,6 +344,8 @@
 		};
 		// 删除
 		const onDeletes = (id: number) => {
+			let arr=[]
+			arr.push(id)
 			ElMessageBox.confirm('确定删除所选项吗?', 'Warning', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
@@ -351,14 +353,14 @@
 			})
 				.then(() => {
 					goalManagementApi()
-						.getexamineTemplateDelete(id)
+						.getexamineTemplateDelete(arr)
 						.then((res) => {
 							if (res.data.code == 200) {
 								ElMessage({
 									message: res.data.msg,
 									type: 'success',
 								});
-								listApi();
+								listApis();
 							} else {
 								ElMessage.error(res.data.msg);
 							}
@@ -381,7 +383,7 @@
 			for (let i = 0; i < valId.length; i++) {
 				arr.push(valId[i].id);
 			}
-			deletAlls.value = arr.toString();
+			deletAlls.value = arr;
 			if (val.length == 1) {
 				warnings.value = false;
 				dangers.value = false;
@@ -408,7 +410,7 @@
 									message: res.data.msg,
 									type: 'success',
 								});
-								listApi();
+								listApis();
 							} else {
 								ElMessage.error(res.data.msg);
 							}
@@ -421,7 +423,28 @@
 					// });
 				});
 		};
+			//部门树
+		const department = () => {
+			goalManagementApi()
+				.getTreedepartment()
+				.then((res) => {
+					if (res.data.code == 200) {
+						data.value = res.data.data;
+					} else {
+						ElMessage.error(res.data.msg);
+					}
+				});
+		};
+		const propse = {
+			label: 'depName',
+			children: 'children',
+			value: 'depId',
+		};
+		const data = ref();
 		return {
+			department,
+			propse,
+			data,
 			activeName,
 			ruleForm,
 			resetForm,

--
Gitblit v1.9.2