+
{
return {
- label: item.devName,
- value: item.devId
+ label: item.dictLabel,
+ value: item.dictCode+''
}
})
+ console.log(this.deviceTypeRange)
// 获取所属边带下拉选
let bdIdRes = await queryBdIdApi()
this.bdIdRange = bdIdRes.data.map(item => {
return {
- label: item.bdName,
- value: item.bdId
+ label: item.devName,
+ value: item.id
}
})
// 获取预警配置下拉选
- let configRes = await queryConfigApi()
+ let configRes = await queryConfigApi(paramsTwo)
+ console.log(configRes)
this.configRange = configRes.data.map(item => {
return {
- label: item.configName,
- value: item.configId,
+ label: item.configName+" "+item.typeName,
+ value: item.id,
}
})
+ console.log(this.configRange)
},
/** 改变树结构 */
changeTree(leaf) {
diff --git a/src/views/base/device/config.js b/src/views/base/device/config.js
index 7a89ea5..e2a0d1f 100644
--- a/src/views/base/device/config.js
+++ b/src/views/base/device/config.js
@@ -3,11 +3,11 @@ import {
} from '@/api/base/device'
export const queryDeviceTypes = () => {
- queryDeviceTypeApi().then(res => {
+ queryDeviceTypeApi({'dictType':'dev_type'}).then(res => {
formLabel[0].f_selList = res.data.map(item => {
return {
- label: item.deviceName,
- value: item.deviceId
+ label: item.dictLabel,
+ value: item.dictCode
}
})
}).catch(err => {})
@@ -17,22 +17,22 @@ export const formLabel = [
{ f_label: '设备名称', f_model: 'devName', f_type: 'ipt' },
{ f_label: '设备编码', f_model: 'devCode', f_type: 'ipt' },
{ f_label: '设备状态', f_model: 'devStatus', f_type: 'sel',f_selList: [
- { label: '在用', value: '0' },
- { label: '未用', value: '1' },
+ { label: '在线', value: '1' },
+ { label: '离线', value: '0' },
] },
]
export const columnsList = [
- { t_props: 'devType', t_label: '设备类型', },
+ { t_props: 'devTypeName', t_label: '设备类型', },
{ t_props: 'devCode', t_label: '设备编码' },
{ t_props: 'devName', t_label: '设备名称' },
- { t_props: 'bdId', t_label: '所属边代设备', },
- { t_props: 'configId', t_label: '预警配置',t_slot: 'configId' },
- { t_props: 'devStatus', t_label: '设备状态', t_slot: 'devStatus'},
+ { t_props: 'bdName', t_label: '所属边代设备', },
+ { t_props: 'configName', t_label: '预警配置',t_slot: 'configName' },
+ { t_props: 'devStatusName', t_label: '设备状态', t_slot: 'devStatusName'},
]
export const dialogConfig = {
- outerWidth: '60%',
+ outerWidth: '40%',
outerTitle: '',
outerVisible: false,
}
diff --git a/src/views/base/device/index.vue b/src/views/base/device/index.vue
index 79f73dd..6c19542 100644
--- a/src/views/base/device/index.vue
+++ b/src/views/base/device/index.vue
@@ -42,26 +42,30 @@
-
+
{{ data.configId }}
+ >{{ data.configName }}
-
+
{{ data.configId }}
+ >{{ data.configName }}
-
+
{{ '在用' }}
+ >{{ data.devStatusName }}
{{ '未用' }}
+ >{{ data.devStatusName }}
+ {{ data.devStatusName }}
@@ -78,6 +82,7 @@
/>
+
diff --git a/src/views/base/edgeDeviceManage/config.js b/src/views/base/edgeDeviceManage/config.js
index 5574b12..fdb0c81 100644
--- a/src/views/base/edgeDeviceManage/config.js
+++ b/src/views/base/edgeDeviceManage/config.js
@@ -1,18 +1,16 @@
export const formLabel = [
{ f_label: '工程名称', f_model: 'proName', f_type: 'ipt' },
{ f_label: '项目部名称', f_model: 'departName', f_type: 'ipt' },
- { f_label: '边带名称', f_model: 'edgeName', f_type: 'ipt' },
- { f_label: '边带编码', f_model: 'edgeCode', f_type: 'ipt' },
+ { f_label: '边带名称', f_model: 'devName', f_type: 'ipt' },
+ { f_label: '边带编码', f_model: 'devCode', f_type: 'ipt' },
]
export const columnsList = [
- { t_props: 'proName', t_label: '工程名称', },
{ t_props: 'departName', t_label: '项目部名称' },
- { t_props: 'proNow', t_label: '在用工程' },
- { t_props: 'region', t_label: '所用区域', },
- { t_props: 'edgeName', t_label: '边带名称', },
- { t_props: 'edgeCode', t_label: '边带编码', },
- { t_props: 'edgeIp', t_label: '边带IP', },
- { t_props: 'head', t_label: '负责人', },
- { t_props: 'phone', t_label: '负责人电话', },
+ { t_props: 'proName', t_label: '在用工程', },
+ { t_props: 'areaName', t_label: '所用区域', },
+ { t_props: 'devName', t_label: '边带名称', },
+ { t_props: 'devCode', t_label: '边带编码', },
+ { t_props: 'devUser', t_label: '负责人', },
+ { t_props: 'devUserPhone', t_label: '负责人电话'},
]