UNPKG

@jdlinker/linker

Version:

jdLinker 系统模块

155 lines (154 loc) 2.79 kB
import { BasicColumn, FormSchema, render } from '@jdlinker/ui'; //列表数据 export const columns: BasicColumn[] = [ { title: '节点ID', align: 'center', dataIndex: 'id' }, { title: 'IP', align: 'center', dataIndex: 'ip' }, { title: '状态', align: 'center', dataIndex: 'status', customRender: ({ text }) => { let str = '在线'; let color = 'grey'; if (text) { str = '在线'; color = 'green'; } else { str = '离线'; color = 'grey'; } return render.renderTag(str, color); } }, { title: '是否默认', align: 'center', dataIndex: 'defaultServer', customRender: ({ text }) => { let str = '默认'; if (!text) { str = '非默认'; } return str; } }, { title: '注册时间', align: 'center', dataIndex: 'createTime' } ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: '节点ID', field: 'id', component: 'Input' } ]; //表单数据 export const formSchema: FormSchema[] = [ { label: 'IP', field: 'ip', component: 'Input', dynamicRules: () => { return [{ required: true, message: '请输入设备国标编号!' }]; } }, { label: 'RTMP PORT', field: 'defaultServer', component: 'Input' }, { label: 'HTTP端口', field: 'httpPort', component: 'Input' }, { label: 'RTMPS PORT', field: 'rtmpSSlPort', component: 'Input' }, { label: 'SECRET', field: 'secret', component: 'Input' }, { label: '自动配置媒体服务', field: 'autoConfig', component: 'Input' }, { label: 'HOOK IP', field: 'hookIp', component: 'Input' }, { label: '收流端口模式', field: 'rtpEnable', component: 'Input' }, { label: 'SDP IP', field: 'sdpIp', component: 'Input' }, { label: '收流端口', field: 'rtpPortRange', component: 'Input' }, { label: '流IP', field: 'streamIp', component: 'Input' }, { label: '推流端口', field: 'sendRtpPortRange', component: 'Input' }, { label: 'HTTPS PORT', field: 'httpSSlPort', component: 'Input' }, { label: '无人观看多久后停止拉流', field: 'streamNoneReaderDelayMS', component: 'Input' }, { label: 'RTSP PORT', field: 'rtspPort', component: 'Input' }, { label: '录像管理服务端口', field: 'recordAssistPort', component: 'Input' }, { label: 'RTSPS PORT', field: 'rtspSSLPort', component: 'Input' }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false } ];