import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ { title: '设备编号', align: "center", dataIndex: 'deviceCode' }, // { // title: '设备厂商', // align: "center", // dataIndex: 'deviceComp_dictText' // }, { title: '设备名称', align: "center", dataIndex: 'deviceName' }, { title: '设备IP', align: "center", dataIndex: 'deviceIp' }, { title: '监听通信端口', align: "center", dataIndex: 'ipPort' }, { title: '设备状态', align: "center", dataIndex: 'deviceStatus', slots: { customRender: 'state' }, }, // { // title: '状态更新时间', // align: "center", // dataIndex: 'aliveTime' // }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ ]; //表单数据 export const formSchema: FormSchema[] = [ // { // label: '设备厂商', // field: 'deviceComp', // component: 'InputNumber', // }, { label: '设备名称', field: 'deviceName', component: 'Input', }, { label: '设备编号', field: 'deviceCode', component: 'Input', }, { label: '设备IP', field: 'deviceIp', component: 'Input', }, { label: '监听/通信端口', field: 'ipPort', component: 'InputNumber', }, { label: '设备状态', field: 'deviceStatus', component: 'InputNumber', }, // { // label: '心跳更新时间', // field: 'aliveTime', // component: 'DatePicker', // componentProps: { // showTime: true, // valueFormat: 'YYYY-MM-DD HH:mm:ss' // }, // }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false, }, ];