From 8bd42ffbca0bcb0dc18ab17fa8858cd4b333104e Mon Sep 17 00:00:00 2001
From: web <candymxq888@outlook.com>
Date: 星期二, 18 三月 2025 17:03:07 +0800
Subject: [PATCH] fix:简化项目框架,终版,处理后台现有问题

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

diff --git a/src/views/facility/facilityList/index.vue b/src/views/facility/facilityList/index.vue
index 096d421..ea0f017 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">
@@ -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