From ae8d9d380854076d0b2da145576ae08f14a8f835 Mon Sep 17 00:00:00 2001
From: web <candymxq888@outlook.com>
Date: 星期三, 19 三月 2025 17:26:47 +0800
Subject: [PATCH] feat: 添加生态流量页面&做大屏分辨率适配

---
 src/views/facility/facilityList/index.vue |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/src/views/facility/facilityList/index.vue b/src/views/facility/facilityList/index.vue
index 096d421..b54b6a9 100644
--- a/src/views/facility/facilityList/index.vue
+++ b/src/views/facility/facilityList/index.vue
@@ -7,6 +7,7 @@
 import waterFacilityParameter from "@/api/facility/parameter.js";
 import {PREURL} from '@/config/index'
 import setPostParams from "@/utils/searchParams.js";
+import {onMounted} from "vue";
 const route = useRoute();
 const preUrl = ref(PREURL);
 const {proxy} = getCurrentInstance();
@@ -85,16 +86,7 @@
         pointList.value = res.data.list
     })
 }
-getPoint()
-//查询供应商
-const supplierList = ref();
-const getSupplier = async () => {
-    await supplierApi().search({limit: 100, page: 1}).then((res) => {
-        console.log("供应商" + res.data.list);
-        supplierList.value = res.data.list
-    })
-}
-getSupplier()
+
 //查询设备类型
 const facilityTypeList = ref();
 const getFacilityTypeList = async () => {
@@ -102,7 +94,7 @@
         facilityTypeList.value = res.data.list
     })
 }
-getFacilityTypeList()
+
 //获取参数列表数据
 //设备参数table
 const tableParamData = ref([]);
@@ -133,13 +125,11 @@
     open.value = true;
     isDetail.value = false;
     title.value = "新增";
-    console.log('form',form.value)
 }
 
 /** 修改按钮操作 */
 async function handleUpdate(row) {
     reset();
-    // form.value = Object.assign({},row)
     Object.keys(row).forEach(key => {
         if (form.value.hasOwnProperty(key)) {
             form.value[key] = row[key];
@@ -189,7 +179,6 @@
 //已选择设备参数
 const handleSelectionParams = (val) =>{
     multipleSelection.value = val
-    console.log('esele',val);
 }
 /**
  * 设备参数操作相关
@@ -271,12 +260,21 @@
     form.value = {
         facilityCode: '',
         facilityName: '',
+        facilityType: '',
+        pointId: '',
         facilityUrl: '',
+        remark:'',
+        installDate: ''
     };
     proxy.resetForm("facilityTypeRef");
 }
 
-getList();
+onMounted(() => {
+    getList();
+    getPoint()
+    getFacilityTypeList()
+})
+
 </script>
 <template>
     <div class="app-container">
@@ -322,7 +320,7 @@
                     </div>
                 </template>
             </el-table-column>
-            <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                 <template #default="scope">
                     <el-button link type="primary" icon="Edit" @click="handleband(scope.row)">参数绑定</el-button>
                     <el-button link type="primary" icon="Edit" v-has="['update',route]"
@@ -343,7 +341,7 @@
         />
         <!-- 添加/修改表单 -->
         <el-dialog :title="title" v-model="open" append-to-body center>
-            <el-form class="form-box" ref="facilityTypeRef" :model="form" :rules="rules" label-width='120' >
+            <el-form class="form-box" ref="facilityTypeRef" :model="form" :rules="rules" label-width='auto' >
                 <el-form-item :label="formLabel.facilityCode" prop="facilityCode">
                     <el-input v-model="form.facilityCode" :placeholder="inpTip+formLabel.facilityCode"/>
                 </el-form-item>
@@ -383,7 +381,7 @@
                 <el-form-item :label="formLabel.remark" prop="remark">
                     <el-input v-model="form.remark" :placeholder="inpTip+formLabel.remark" />
                 </el-form-item>
-                <el-form-item label="资料上传" prop="facilityUrl">
+                <el-form-item label="资料上传" prop="facilityUrl" style="flex: 1">
                     <upload-icons @uploadData="uploadData" :imageList="form.facilityUrl" :limit="1"
                                   :disabled='isDetail ? true : false'></upload-icons>
                     <span style="display: block;">(请上传1张设备图片)</span>

--
Gitblit v1.9.3