From c1e2ec17485606ba8d2d6de9520396e55248ff6d Mon Sep 17 00:00:00 2001
From: web <candymxq888@outlook.com>
Date: 星期二, 25 三月 2025 17:10:50 +0800
Subject: [PATCH] feat:添加界面,接入设备数据

---
 src/views/facility/facilityList/index.vue |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/views/facility/facilityList/index.vue b/src/views/facility/facilityList/index.vue
index b54b6a9..03e6ce3 100644
--- a/src/views/facility/facilityList/index.vue
+++ b/src/views/facility/facilityList/index.vue
@@ -81,9 +81,10 @@
 });
 //查询监控点
 const pointList = ref();
+const cascaderOption = { label: 'pointName', value: 'id', children: 'childrenList', checkStrictly: true, expandTrigger: 'hover', emitPath: false }; //级联选择器配置
 const getPoint = async () => {
-    await pointApi().search({limit: 100, page: 1}).then((res) => {
-        pointList.value = res.data.list
+    await pointApi().getParentPoint().then((res) => {
+        pointList.value = res.data
     })
 }
 
@@ -359,14 +360,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="选择监控点" prop="pointId">
-                    <el-select v-model="form.pointId" :placeholder="inpTip+formLabel.pointId">
-                        <el-option
-                                v-for="(item,index) in pointList"
-                                :label="item.pointName"
-                                :value="item.id"
-                                :key="index"
-                        ></el-option>
-                    </el-select>
+                    <el-cascader v-model="form.pointId" :options="pointList" :show-all-levels="false" :props="cascaderOption" />
                 </el-form-item>
                 <el-form-item label="安装日期" prop="installDate">
                     <el-date-picker
@@ -424,6 +418,9 @@
 }
 .form-box{
     justify-content: normal;
+    :deep(.el-cascader){
+        flex-grow: 1;
+    }
 }
 </style>
  
\ No newline at end of file

--
Gitblit v1.9.3