@jdlinker/linker
Version:
jdLinker 系统模块
114 lines (112 loc) • 2.02 kB
text/typescript
import { BasicColumn, FormSchema, render } from '@jdlinker/ui';
//列表数据
export const columns: BasicColumn[] = [
{
title: '网关ID',
align: 'center',
dataIndex: 'id'
},
{
title: '网关代理',
align: 'center',
dataIndex: 'provider'
},
{
title: '名称',
align: 'center',
dataIndex: 'name'
},
{
title: '状态',
align: 'center',
dataIndex: 'status',
customRender: ({ text }) => {
let str = '正常';
let color = 'green';
if (text == 'enabled') {
str = '正常';
color = 'green';
} else {
str = '禁用';
color = 'red';
}
return render.renderTag(str, color);
}
}
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: '网关代理',
field: 'provider',
component: 'Input'
},
{
label: '名称',
field: 'name',
component: 'Input'
}
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '网关代理',
field: 'provider',
component: 'Input',
dynamicRules: () => {
return [{ required: true, message: '请输入网关代理!' }];
}
},
{
label: '名称',
field: 'name',
component: 'Input'
},
{
label: '流媒体服务',
field: 'mediaServerId',
component: 'Input'
},
{
label: '产品ID',
field: 'productId',
component: 'Input'
},
{
label: '信令服务ID',
field: 'sipId',
component: 'Input'
},
{
label: '信令域',
field: 'domain',
component: 'Input'
},
{
label: '信令服务IP',
field: 'ip',
component: 'Input'
},
{
label: '信令端口',
field: 'port',
component: 'Input'
},
{
label: '密码',
field: 'password',
component: 'Input'
},
{
label: '描述',
field: 'description',
component: 'Input'
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
}
];