bug修改
This commit is contained in:
commit
4dfb6056b9
@ -4,9 +4,9 @@ NODE_ENV=development
|
|||||||
VITE_DEV=true
|
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.226:48080'
|
||||||
VITE_BASE_URL='http://192.168.0.45:48080'
|
# VITE_BASE_URL='http://192.168.0.45:48080'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
|
@ -37,3 +37,7 @@ export const deviceNumber = async (params) => {
|
|||||||
export const deviceGetInformationList = async (params) => {
|
export const deviceGetInformationList = async (params) => {
|
||||||
return await request.get({ url: `/system/device/information/getInformationList`, 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 })
|
||||||
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<Dialog v-model="dialogVisible" :title="title" width="545" style="padding: 0;">
|
<Dialog v-model="dialogVisible" :title="title" width="545" style="padding: 0;">
|
||||||
<el-form :model="formData" label-width="auto" ref="formRef" :rules="formRules">
|
<el-form :model="formData" label-width="auto" ref="formRef" :rules="formRules">
|
||||||
<el-form-item label="设备类型" prop="deviceType" >
|
<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
|
<el-option
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.DEVICE_TYPE)"
|
v-for="dict in getDictOptions(DICT_TYPE.DEVICE_TYPE)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -117,7 +117,14 @@ const open = async (type, id) => {
|
|||||||
title.value = '编辑'
|
title.value = '编辑'
|
||||||
const data = await DeviceApi.deviceInformationGet({ id })
|
const data = await DeviceApi.deviceInformationGet({ id })
|
||||||
formData.value = data
|
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)
|
console.log(data)
|
||||||
} else {
|
} else {
|
||||||
title.value = '新建'
|
title.value = '新建'
|
||||||
@ -153,7 +160,15 @@ const submitForm = async () => {
|
|||||||
formLoading.value = false
|
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 { push } = useRouter()
|
||||||
const taskManagement = () => {
|
const taskManagement = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user