UNPKG

@jdlinker/linker

Version:

jdLinker 系统模块

247 lines (246 loc) 5.15 kB
import { BasicColumn, FormSchema } from '@jdlinker/ui'; import { h } from '@vue/runtime-core'; import { Tag } from 'ant-design-vue'; //列表数据 export const columns: BasicColumn[] = [ { title: '通道编号', align: 'center', dataIndex: 'channelId' }, { title: '设备编号', align: 'center', dataIndex: 'deviceId' }, { title: '通道名称', align: 'center', dataIndex: 'name' }, { title: '快照', align: 'center', dataIndex: 'deviceId' }, { title: '子节点数', align: 'center', dataIndex: 'subCount' }, { title: '厂家', align: 'center', dataIndex: 'manufacture' }, { title: '位置信息', align: 'center', dataIndex: 'longitude' }, { title: '云台类型', align: 'center', dataIndex: 'ptztypeText' }, { title: '开启音频', align: 'center', dataIndex: 'hasAudio' }, { title: '状态', align: 'center', dataIndex: 'status', customRender: ({ text }) => { const enable = text === 1; const color = enable ? 'green' : 'grey'; const text1 = enable ? '在线' : '离线'; return h(Tag, { color: color }, () => text1); } } ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: '关键字', field: 'searchSrt', component: 'Input', colProps: { span: 6 } }, { label: '通道类型', field: 'channelType', component: 'Input', colProps: { span: 6 } }, { label: '在线状态', field: 'online', 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 } ];