From a3ff86d0726ce9bdbb7fa7167e01a3037137e7d7 Mon Sep 17 00:00:00 2001
From: 13937891274 <kxc0822>
Date: 星期三, 10 八月 2022 15:47:52 +0800
Subject: [PATCH] 对接

---
 src/views/facilityManagement/keyEquipment/index.vue |   37 ++++++++++++++++++++++---------------
 1 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/src/views/facilityManagement/keyEquipment/index.vue b/src/views/facilityManagement/keyEquipment/index.vue
index 52374a7..d6cb0cb 100644
--- a/src/views/facilityManagement/keyEquipment/index.vue
+++ b/src/views/facilityManagement/keyEquipment/index.vue
@@ -4,7 +4,7 @@
 			<el-row>
 				<el-col :span="4">
 					<el-form-item size="default">
-						<el-input v-model="ruleForm.searchParams.qName" placeholder="装置/部位名称" />
+						<el-input v-model="ruleForm.qName" placeholder="装置/部位名称" />
 					</el-form-item>
 				</el-col>
 				<el-col :span="4">
@@ -26,8 +26,8 @@
 			<el-col :span="20">
 				<div class="btns">
 					<div>
-						<el-button size="default" type="primary" :icon="Plus" @click="openD">新建</el-button>
-						<el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen">修改</el-button>
+						<el-button size="default" type="primary" :icon="Plus" @click="openD('新建')">新建</el-button>
+<!--						<el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen">修改</el-button>-->
 						<el-button size="default" :disabled="danger" type="danger" :icon="Delete" @click="onDeleteAll" plain>删除</el-button>
 					</div>
 					<div>
@@ -83,11 +83,16 @@
 							</template>
 						</el-table-column>
 						<el-table-column property="equipmentTypeId" align="center" label="类型/类别外键" sortable />
-						<el-table-column property="qName" align="center" label="装置/部位名称" sortable />
+						<el-table-column property="name" align="center" label="装置/部位名称" sortable />
 						<el-table-column property="departmentId" label="所属部门" align="center" sortable show-overflow-tooltip />
 						<el-table-column property="position" label="具体位置" align="center" sortable show-overflow-tooltip />
 						<el-table-column property="leadingPersonName" label="负责人姓名" align="center" sortable show-overflow-tooltip />
-						<el-table-column property="connectPersonId" label="装置部位分类" align="center" sortable show-overflow-tooltip />
+						<el-table-column property="connectPersonId" label="装置部位分类" align="center" sortable show-overflow-tooltip>
+              <template #default="scope">
+                <span v-if="scope.row.type == 1">关键装置</span>
+                <span v-if="scope.row.type == 2">重点部位</span>
+              </template>
+            </el-table-column>
 						<el-table-column label="操作" align="center" width="250">
 							<template #default="scope">
 								<el-button link type="primary" size="default" :icon="View" @click="openD('查看', scope.row.id)">查看</el-button>
@@ -136,18 +141,20 @@
 			pageSize: 10,
 			pageIndex: 1,
 			searchParams: {
-				equipmentTypeId: '', ////类型/类别外键
-        qName: '', ////装置/部位名称
+				// equipmentTypeId: '', ////类型/类别外键
+        // qName: '', ////装置/部位名称
 				// departmentId: '',////所属部门
 				// position: '', ////具体位置
 				// leadingPersonName: '', ////负责人姓名
 				// connectPersonId: '',////装置部位分类
-				infoTpe: 0, ////具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施  3:重点监管装置/设备
+				// infoTpe: 0, ////具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施  3:重点监管装置/设备
+        equipmentTypeId:''
 			},
 		});
 		// 重置
 		const resetForm = () => {
-			ruleForm.searchParams.qName = '';
+			ruleForm.qName = '';
+      ruleForm.searchParams.equipmentTypeId = '';
 			listApi();
 		};
 		const listApi = () => {
@@ -217,7 +224,7 @@
 		};
 		const handleNodeClick = (data: Tree) => {
       console.log(data)
-			ruleForm.searchParams.qName = data.typeName;
+			ruleForm.searchParams.equipmentTypeId = data.id;
 
 			listApi();
 		};
@@ -257,7 +264,7 @@
 				});
 		};
 		// 批量删除
-		const warning = ref(true);
+		// const warning = ref(true);
 		const danger = ref(true);
 		const deletAll = ref();
 		const handleSelectionChange = (val: any) => {
@@ -268,13 +275,13 @@
 			}
 			deletAll.value = arr;
 			if (val.length == 1) {
-				warning.value = false;
+				// warning.value = false;
 				danger.value = false;
 			} else if (val.length == 0) {
-				warning.value = true;
+				// warning.value = true;
 				danger.value = true;
 			} else {
-				warning.value = true;
+				// warning.value = true;
 				danger.value = false;
 			}
 		};
@@ -354,7 +361,7 @@
 			currentPage4,
 			pageSize4,
 			onDelete,
-			warning,
+			// warning,
 			handleSelectionChange,
 			onDeleteAll,
 			handleNodeClick,

--
Gitblit v1.9.2