@jdlinker/linker
Version:
jdLinker 系统模块
246 lines (245 loc) • 5.05 kB
text/typescript
import { BasicColumn, FormSchema, render } from '@jdlinker/ui';
//列表数据
export const columns: BasicColumn[] = [
{
title: '名称',
align: 'center',
dataIndex: 'name'
},
{
title: '设备编号',
align: 'center',
dataIndex: 'deviceId'
},
{
title: '地址',
align: 'center',
dataIndex: 'hostAddress'
},
{
title: '厂家',
align: 'center',
dataIndex: 'manufacturer'
},
{
title: '流传输模式',
align: 'center',
dataIndex: 'streamMode'
},
{
title: '通道数',
align: 'center',
dataIndex: 'channelCount'
},
{
title: '状态',
align: 'center',
dataIndex: 'online',
customRender: ({ text }) => {
let str = '';
let color = 'grey';
if (text === 1) {
str = '在线';
color = 'green';
} else {
str = '离线';
color = 'grey';
}
return render.renderTag(str, color);
}
},
{
title: '注册时间',
align: 'center',
dataIndex: 'registerTime'
},
{
title: '最近心跳',
align: 'center',
dataIndex: 'keepaliveTime'
}
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: '设备编号',
field: 'deviceId',
component: 'Input',
colProps: { span: 6 }
},
{
label: '名称',
field: 'name',
component: 'Input',
colProps: { span: 6 }
},
{
label: '生产厂商',
field: 'manufacturer',
component: 'Input',
colProps: { span: 6 }
}
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '设备国标编号',
field: 'deviceId',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入设备国标编号!' }];
}
},
{
label: '名称',
field: 'name',
component: 'Input'
},
{
label: '生产厂商',
field: 'manufacturer',
component: 'Input'
},
{
label: '型号',
field: 'model',
component: 'Input'
},
{
label: '固件版本',
field: 'firmware',
component: 'Input'
},
{
label: '传输协议(UDP/TCP)',
field: 'transport',
component: 'Input'
},
{
label: '数据流传输模式',
field: 'streamMode',
component: 'Input'
},
{
label: '是否在线,1为在线,0为离线',
field: 'online',
component: 'Input'
},
{
label: '注册时间',
field: 'registerTime',
component: 'Input'
},
{
label: '心跳时间',
field: 'keepaliveTime',
component: 'Input'
},
{
label: 'IP',
field: 'ip',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入IP!' }];
}
},
{
label: '创建时间',
field: 'createTime',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入创建时间!' }];
}
},
{
label: '修改时间',
field: 'updateTime',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入修改时间!' }];
}
},
{
label: '端口',
field: 'port',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入端口!' }];
}
},
{
label: '注册有效期',
field: 'expires',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入注册有效期!' }];
}
},
{
label: '目录订阅周期,0为不订阅',
field: 'subscribeCycleForCatalog',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入目录订阅周期,0为不订阅!' }];
}
},
{
label: 'wan地址',
field: 'hostAddress',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入wan地址!' }];
}
},
{
label: '字符集',
field: 'charset',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入字符集!' }];
}
},
{
label: '移动设备位置订阅周期,0为不订阅',
field: 'mobilePosition',
component: 'Input'
},
{
label: '移动设备位置信息上报时间间隔',
field: 'submissionInterval',
component: 'Input'
},
{
label: '报警订阅周期,0为不订阅',
field: 'subscribeCycleForAlarm',
component: 'Input'
},
{
label: '是否开启ssrc校验,默认关闭,开启可以防止串流',
field: 'ssrcCheck',
component: 'Input'
},
{
label: '地理坐标系',
field: 'geoCoordSys',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入地理坐标系!' }];
}
},
{
label: '树类型',
field: 'treeType',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入树类型!' }];
}
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
}
];