SafetyAlertSystem-ui/src/views/base/device/config.js

39 lines
1.3 KiB
JavaScript
Raw Normal View History

2024-09-19 10:03:52 +08:00
import {
queryDeviceTypeApi
} from '@/api/base/device'
export const queryDeviceTypes = () => {
2024-09-19 16:08:25 +08:00
queryDeviceTypeApi({'dictType':'dev_type'}).then(res => {
2024-09-19 10:03:52 +08:00
formLabel[0].f_selList = res.data.map(item => {
return {
2024-09-19 16:08:25 +08:00
label: item.dictLabel,
value: item.dictCode
2024-09-19 10:03:52 +08:00
}
})
}).catch(err => {})
}
export const formLabel = [
2024-09-19 10:03:52 +08:00
{ f_label: '设备类型', f_model: 'devType', f_type: 'sel',f_selList: [] },
{ f_label: '设备名称', f_model: 'devName', f_type: 'ipt' },
{ f_label: '设备编码', f_model: 'devCode', f_type: 'ipt' },
2024-09-19 10:03:52 +08:00
{ f_label: '设备状态', f_model: 'devStatus', f_type: 'sel',f_selList: [
2024-09-19 16:08:25 +08:00
{ label: '在线', value: '1' },
{ label: '离线', value: '0' },
2024-09-19 10:03:52 +08:00
] },
]
export const columnsList = [
2024-09-19 16:08:25 +08:00
{ t_props: 'devTypeName', t_label: '设备类型', },
{ t_props: 'devCode', t_label: '设备编码' },
{ t_props: 'devName', t_label: '设备名称' },
2024-09-19 16:08:25 +08:00
{ t_props: 'bdName', t_label: '所属边代设备', },
{ t_props: 'configName', t_label: '预警配置',t_slot: 'configName' },
{ t_props: 'devStatusName', t_label: '设备状态', t_slot: 'devStatusName'},
]
export const dialogConfig = {
2024-09-19 16:08:25 +08:00
outerWidth: '40%',
outerTitle: '',
outerVisible: false,
}