You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
1.8 KiB
100 lines
1.8 KiB
2 years ago
|
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: 'deviceNum'
|
||
|
},
|
||
|
{
|
||
|
title: '设备厂商',
|
||
|
align: "center",
|
||
|
// dataIndex: 'deviceComp'
|
||
|
dataIndex: 'deviceComp_dictText'
|
||
|
},
|
||
|
{
|
||
|
title: '设备名称',
|
||
|
align: "center",
|
||
|
dataIndex: 'deviceName'
|
||
|
},
|
||
|
|
||
|
{
|
||
|
title: '设备IP',
|
||
|
align: "center",
|
||
|
dataIndex: 'ip'
|
||
|
},
|
||
|
{
|
||
|
title: '监听通信端口',
|
||
|
align: "center",
|
||
|
dataIndex: 'port'
|
||
|
},
|
||
|
{
|
||
|
title: '设备状态',
|
||
|
align: "center",
|
||
|
dataIndex: 'state',
|
||
|
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: 'deviceNum',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '设备IP',
|
||
|
field: 'ip',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '监听/通信端口',
|
||
|
field: 'port',
|
||
|
component: 'InputNumber',
|
||
|
},
|
||
|
{
|
||
|
label: '启用状态',
|
||
|
field: 'state',
|
||
|
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,
|
||
|
},
|
||
|
];
|