diff --git a/src/views/data/device/pageAdd.vue b/src/views/data/device/pageAdd.vue index 65e22d9..e923948 100644 --- a/src/views/data/device/pageAdd.vue +++ b/src/views/data/device/pageAdd.vue @@ -17,6 +17,7 @@ ptn: '', // 所属分区 stat: '', // 状态 monitorObj: '', // 监测对象 + deviceClassify: '', facilityArea: '', // 设施面积 }) // 表单 @@ -34,6 +35,7 @@ ptn: [{ required: true, message: '所属分区不能为空', trigger: ['blur', 'change'] }], stat: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }], monitorObj: [{ required: true, message: '监测对象不能为空', trigger: ['blur', 'change'] }], + deviceClassify: [{ required: true, message: '监测对象分类不能为空', trigger: ['blur', 'change'] }], facilityArea: [{ required: true, message: '设施面积不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 @@ -49,6 +51,7 @@ stat: '', // 状态 monitorObj: '', // 监测对象 facilityArea: '', // 设施面积 + deviceClassify: '', } } const ptnList = ref([]) @@ -67,6 +70,14 @@ }) } fetchMonitorObj() +// 获取监测分类列表 +const monitorObjTypeList = ref([]) +const fetchMonitorType = () => { + getDictByCode('device_classify').then((res) => { + monitorObjTypeList.value = res.data + }) +} +fetchMonitorType() const deviceTypeList = ref([]) // 获取设备类型列表 const fetchDeviceType = () => { @@ -231,7 +242,7 @@ - + - + + + + + + + + diff --git a/src/views/data/device/pageAdd.vue b/src/views/data/device/pageAdd.vue index 65e22d9..e923948 100644 --- a/src/views/data/device/pageAdd.vue +++ b/src/views/data/device/pageAdd.vue @@ -17,6 +17,7 @@ ptn: '', // 所属分区 stat: '', // 状态 monitorObj: '', // 监测对象 + deviceClassify: '', facilityArea: '', // 设施面积 }) // 表单 @@ -34,6 +35,7 @@ ptn: [{ required: true, message: '所属分区不能为空', trigger: ['blur', 'change'] }], stat: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }], monitorObj: [{ required: true, message: '监测对象不能为空', trigger: ['blur', 'change'] }], + deviceClassify: [{ required: true, message: '监测对象分类不能为空', trigger: ['blur', 'change'] }], facilityArea: [{ required: true, message: '设施面积不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 @@ -49,6 +51,7 @@ stat: '', // 状态 monitorObj: '', // 监测对象 facilityArea: '', // 设施面积 + deviceClassify: '', } } const ptnList = ref([]) @@ -67,6 +70,14 @@ }) } fetchMonitorObj() +// 获取监测分类列表 +const monitorObjTypeList = ref([]) +const fetchMonitorType = () => { + getDictByCode('device_classify').then((res) => { + monitorObjTypeList.value = res.data + }) +} +fetchMonitorType() const deviceTypeList = ref([]) // 获取设备类型列表 const fetchDeviceType = () => { @@ -231,7 +242,7 @@ - + - + + + + + + + + diff --git a/src/views/data/environment/page.vue b/src/views/data/environment/page.vue index 9b51751..6ad5c77 100644 --- a/src/views/data/environment/page.vue +++ b/src/views/data/environment/page.vue @@ -161,11 +161,11 @@