From 55373c6b400d879ba4a4cdae752fe5140c7b11f6 Mon Sep 17 00:00:00 2001 From: web <candymxq888@outlook.com> Date: 星期一, 28 四月 2025 17:29:15 +0800 Subject: [PATCH] fix:修改上传图片地址 --- src/views/facility/monitorList/index.vue | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/views/facility/monitorList/index.vue b/src/views/facility/monitorList/index.vue index 936c6ca..5363288 100644 --- a/src/views/facility/monitorList/index.vue +++ b/src/views/facility/monitorList/index.vue @@ -13,13 +13,14 @@ const route = useRoute(); const {proxy} = getCurrentInstance(); +const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL //图片前缀 /** * 搜索相关 */ /** 搜索按钮操作 */ function handleQuery() { - getList({keywords: searchParams.value.keywords}) + getList(searchParams.value) } /** 重置按钮操作 */ @@ -43,6 +44,7 @@ pointName: '监控点名称', pointCode: '监控点编号', pointType: '监控类型', + waterWidth: '水面宽度', address: '详细地址', createTimeView: '创建时间', imageUrl: '图片', @@ -53,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 @@ -70,6 +72,7 @@ pointCode: '监控点编号', pointType: '监控点类型', parentId: '父级监控点', + waterWidth: '水面宽度', address: '详细地址', imageUrl: '图片', remark: '备注' @@ -84,6 +87,7 @@ pointCode: '', pointType: '', parentId: '', + waterWidth: '', address: '', imageUrl: '', remark: '' @@ -191,6 +195,7 @@ pointName: '', pointCode: '', pointType: '', + waterWidth: '', address: '', imageUrl: '', remark: '' @@ -206,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="请输入搜索信息" @@ -243,7 +248,7 @@ > <template #default="scope"> <div v-if="key === 'imageUrl'"> - <img :src="scope.row.headImg" class="table-headImg"/> + <img :src="imgBaseUrl + scope.row.headImg" class="table-headImg" alt="" /> </div> <div v-else-if="key === 'pointType'"> {{ scope.row.pointType === 1 ? '水温监测点' : '生态流量监测点' }} @@ -296,7 +301,10 @@ <el-form-item :label="formLabel.remark" prop="address"> <el-input v-model="form.remark" :placeholder="'请输入'+formLabel.remark"/> </el-form-item> - <!-- <el-form-item></el-form-item>--> + <el-form-item :label="formLabel.waterWidth" prop="waterWidth"> + <el-input v-model="form.waterWidth" :placeholder="'请输入'+formLabel.waterWidth"/> + </el-form-item> + <el-form-item></el-form-item> <el-form-item label="图片" prop="imageUrl" style="flex: 1"> <upload-icons @uploadData="uploadData" :imageList="form.imageUrl" :limit="1"></upload-icons> <span style="display: block;">(请上传1张设备图片)</span> -- Gitblit v1.9.3