bug修改

This commit is contained in:
yyy 2025-03-24 16:03:09 +08:00
commit 4dfb6056b9
3 changed files with 25 additions and 6 deletions

View File

@ -4,9 +4,9 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
# VITE_BASE_URL='http://192.168.0.74:48080'
VITE_BASE_URL='http://192.168.0.74:48080'
# VITE_BASE_URL='http://192.168.0.226:48080'
VITE_BASE_URL='http://192.168.0.45:48080'
# VITE_BASE_URL='http://192.168.0.45:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server

View File

@ -36,4 +36,8 @@ export const deviceNumber = async (params) => {
// 获取设备列表 新不分页
export const deviceGetInformationList = async (params) => {
return await request.get({ url: `/system/device/information/getInformationList`, params })
}
}
// 获取设备列表
export const getMapDeviceImageUrl = async (params) => {
return await request.get({ url: `/system/device/information/getMapImageUrl`, params })
}

View File

@ -2,7 +2,7 @@
<Dialog v-model="dialogVisible" :title="title" width="545" style="padding: 0;">
<el-form :model="formData" label-width="auto" ref="formRef" :rules="formRules">
<el-form-item label="设备类型" prop="deviceType" >
<el-select v-model="formData.deviceType" clearable placeholder="请选择设备类型">
<el-select v-model="formData.deviceType" clearable placeholder="请选择设备类型" @change="deviceTypeChange">
<el-option
v-for="dict in getDictOptions(DICT_TYPE.DEVICE_TYPE)"
:key="dict.value"
@ -117,7 +117,14 @@ const open = async (type, id) => {
title.value = '编辑'
const data = await DeviceApi.deviceInformationGet({ id })
formData.value = data
if(!formData.value.mapImageUrl){
DeviceApi.getMapDeviceImageUrl({
deviceType: formData.value.deviceType
}).then(res=>{
// console.log(res)
formData.value.mapImageUrl = res?res:undefined
})
}
console.log(data)
} else {
title.value = '新建'
@ -153,7 +160,15 @@ const submitForm = async () => {
formLoading.value = false
}
}
//
const deviceTypeChange = (e) => {
DeviceApi.getMapDeviceImageUrl({
deviceType: e
}).then(res=>{
// console.log(res)
formData.value.mapImageUrl = res?res:undefined
})
}
//
const { push } = useRouter()
const taskManagement = () => {