From 855deb4dfb6458a1eed217363625b13d58143f58 Mon Sep 17 00:00:00 2001
From: web <candymxq888@outlook.com>
Date: 星期三, 30 四月 2025 15:33:32 +0800
Subject: [PATCH] fix:修改图片地址,路由懒加载

---
 src/views/facility/monitorList/index.vue |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/views/facility/monitorList/index.vue b/src/views/facility/monitorList/index.vue
index b414fe0..45c5957 100644
--- a/src/views/facility/monitorList/index.vue
+++ b/src/views/facility/monitorList/index.vue
@@ -20,7 +20,7 @@
  */
 /** 搜索按钮操作 */
 function handleQuery() {
-    getList({keywords: searchParams.value.keywords})
+    getList(searchParams.value)
 }
 
 /** 重置按钮操作 */
@@ -55,7 +55,7 @@
 async function getList(val) {
     loading.value = true;
     let postParam = setPostParams(val)
-    await pointApi().search({...postParam, ...searchParams.value}).then((res) => {
+    await pointApi().search(postParam).then((res) => {
         tableData.value = res.data.list
         pageParam.value.total = res.data.total
         pageParam.value.limit = res.data.limit
@@ -152,7 +152,7 @@
 
 //上传文件,添加图片地址信息
 const uploadData = (data) => {
-    form.value.imageUrl = imgBaseUrl + data.toString();
+    form.value.imageUrl = data.toString();
 }
 
 /** 提交按钮 */
@@ -211,7 +211,7 @@
 <template>
     <div class="app-container">
         <el-form :model="searchParams" ref="queryRef" :inline="true">
-            <el-form-item label="" prop="">
+            <el-form-item label="" prop="keywords">
                 <el-input
                     v-model="searchParams.keywords"
                     placeholder="请输入搜索信息"
@@ -238,7 +238,7 @@
             </el-col>
         </el-row>
         <!--表格及分页-->
-        <el-table v-loading="loading" :data="tableData">
+        <el-table v-loading="loading" :data="tableData" class="table">
             <el-table-column
                 v-for="(item, key, index) of tableHeader"
                 :prop="key.toString()"
@@ -248,7 +248,7 @@
             >
                 <template #default="scope">
                     <div v-if="key === 'imageUrl'">
-                        <img :src="imgBaseUrl + scope.row.headImg" class="table-headImg" alt="" />
+                        <img :src="imgBaseUrl + scope.row.imageUrl" class="table-headImg" alt="" />
                     </div>
                     <div v-else-if="key === 'pointType'">
                         {{ scope.row.pointType === 1 ? '水温监测点' : '生态流量监测点' }}
@@ -327,4 +327,10 @@
         flex-grow: 1;
     }
 }
+.table{
+    .table-headImg{
+        height: 50px;
+        margin: 0 auto;
+    }
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3