39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
import {
|
|
queryDeviceTypeApi
|
|
} from '@/api/base/device'
|
|
|
|
export const queryDeviceTypes = () => {
|
|
queryDeviceTypeApi({'dictType':'dev_type'}).then(res => {
|
|
formLabel[0].f_selList = res.data.map(item => {
|
|
return {
|
|
label: item.dictLabel,
|
|
value: item.dictCode
|
|
}
|
|
})
|
|
}).catch(err => {})
|
|
}
|
|
export const formLabel = [
|
|
{ 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' },
|
|
{ f_label: '设备状态', f_model: 'devStatus', f_type: 'sel',f_selList: [
|
|
{ label: '在线', value: '1' },
|
|
{ label: '离线', value: '0' },
|
|
] },
|
|
]
|
|
|
|
export const columnsList = [
|
|
{ t_props: 'devTypeName', t_label: '设备类型', },
|
|
{ t_props: 'devCode', t_label: '设备编码' },
|
|
{ t_props: 'devName', t_label: '设备名称' },
|
|
{ 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: '40%',
|
|
outerTitle: '',
|
|
outerVisible: false,
|
|
}
|