import { BasicColumn } from '/@/components/Table'; import { initDictOptions } from '/@/utils/dict'; export const levelColumns: BasicColumn[] = [ { title: '上限', dataIndex: 'fmax', width: 100, editRow: true, editComponent: 'InputNumber', }, { title: '下限', width: 100, editRow: true, dataIndex: 'fmin', editComponent: 'InputNumber', }, { title: '持续时间(s)', dataIndex: 'timelength', editRow: true, width: 100, editComponent: 'InputNumber', }, { title: '报警等级', dataIndex: 'leveltype', editRow: true, editRule: true, width: 100, editComponent: 'ApiSelect', editComponentProps: { api: initDictOptions.bind(null, 'leveltype'), labelField: 'label', valueField: 'value', }, }, { title: '报警描述', width: 180, editRow: true, dataIndex: 'des', editComponent: 'Input', }, ]; export const warningColumns: BasicColumn[] = [ { title: '', dataIndex: 'id', ifShow: false, }, { title: '监测参数', dataIndex: 'monitorcode', width: 150, editRow: true, editRule: true, }, { title: '模拟最小值', width: 150, dataIndex: 'ftestmin', editRow: true, editComponent: 'InputNumber', }, { title: '模拟最大值', dataIndex: 'ftestmax', editRow: true, width: 150, editComponent: 'InputNumber', }, { title: '备注', dataIndex: 'des', editRow: true, width: 200, editComponent: 'Input', }, ]; export const deviceColumns: BasicColumn[] = [ { title: '名称', dataIndex: 'deviceName', align: 'center', width: 120, }, { title: '安装位置', dataIndex: 'devicePos', align: 'center', width: 100, }, { title: '设备类型', dataIndex: 'deviceType', align: 'center', width: 100, }, { title: '所属分站', width: 150, align: 'center', dataIndex: 'subStationName', }, ]; export const workFaceColumns: BasicColumn[] = [ { title: '安装位置', dataIndex: 'devicePos', width: 100, }, { title: '排序', width: 100, dataIndex: 'sort', edit: true, editComponent: 'InputNumber', }, { title: '是否在关键通风路线上', width: 100, dataIndex: 'pathflag', edit: true, editComponent: 'Switch', editValueMap: (value) => { return value ? '是' : '否'; }, }, { title: '传感器类型', width: 100, dataIndex: 'sensorType', edit: true, editComponent: 'Select', editComponentProps: { options: [ { label: '多参', value: '1', }, { label: '测风', value: '2', }, ], }, }, { title: '风向', width: 100, dataIndex: 'winddir', edit: true, editComponent: 'Select', editComponentProps: { options: [ { label: '多参', value: '1', }, { label: '测风', value: '2', }, ], }, }, { title: '是否参与计算风量', width: 100, dataIndex: 'windflag', edit: true, editComponent: 'Switch', editValueMap: (value) => { return value ? '是' : '否'; }, }, ];