101 lines
2.6 KiB
Vue
101 lines
2.6 KiB
Vue
import { FormSchema } from '/@/components/Form';
|
|
|
|
export const mcsDbConfigFormSchema: FormSchema[] = [
|
|
{ label: 'id', field: 'id', component: 'Input', show: false },
|
|
{ label: 'tenantId', field: 'tenantId', component: 'InputNumber', show: false },
|
|
{
|
|
label: '服务器地址',
|
|
field: 'serverHost',
|
|
component: 'Input',
|
|
required: true,
|
|
componentProps: { placeholder: 'IP 或域名,例如 192.168.1.10 或 xxx.vicp.fun' },
|
|
},
|
|
{
|
|
label: '端口',
|
|
field: 'serverPort',
|
|
component: 'InputNumber',
|
|
defaultValue: 1433,
|
|
required: true,
|
|
componentProps: { min: 1, max: 65535, style: { width: '100%' } },
|
|
},
|
|
{
|
|
label: '数据库名',
|
|
field: 'dbName',
|
|
component: 'Input',
|
|
defaultValue: 'MES_ShareDB',
|
|
required: true,
|
|
},
|
|
{
|
|
label: '用户名',
|
|
field: 'dbUsername',
|
|
component: 'Input',
|
|
required: true,
|
|
componentProps: { placeholder: '例如 sa' },
|
|
},
|
|
{
|
|
label: '密码',
|
|
field: 'dbPassword',
|
|
component: 'InputPassword',
|
|
componentProps: { placeholder: '编辑时留空表示不修改密码' },
|
|
},
|
|
{
|
|
label: '读取开关',
|
|
field: 'readEnabled',
|
|
component: 'Switch',
|
|
helpMessage: '关闭后所有中间表列表/详情查询将被拦截(含 MCS→MES 与 MES→MCS 方向)',
|
|
componentProps: {
|
|
checkedChildren: '开启',
|
|
checkedValue: 1,
|
|
unCheckedChildren: '关闭',
|
|
unCheckedValue: 0,
|
|
},
|
|
defaultValue: 1,
|
|
},
|
|
{
|
|
label: '写入开关',
|
|
field: 'writeEnabled',
|
|
component: 'Switch',
|
|
helpMessage: '关闭后 MES→MCS 方向的增删改将被拦截(不影响列表查询,查询由读取开关控制)',
|
|
componentProps: {
|
|
checkedChildren: '开启',
|
|
checkedValue: 1,
|
|
unCheckedChildren: '关闭',
|
|
unCheckedValue: 0,
|
|
},
|
|
defaultValue: 1,
|
|
},
|
|
{
|
|
label: '启用连接',
|
|
field: 'status',
|
|
component: 'Switch',
|
|
helpMessage: '开启后立即连接中间库并热刷新数据源,无需重启后端',
|
|
componentProps: {
|
|
checkedChildren: '启用',
|
|
checkedValue: 1,
|
|
unCheckedChildren: '停用',
|
|
unCheckedValue: 0,
|
|
},
|
|
defaultValue: 0,
|
|
},
|
|
{
|
|
label: '登录超时(秒)',
|
|
field: 'loginTimeout',
|
|
component: 'InputNumber',
|
|
defaultValue: 120,
|
|
componentProps: { min: 10, max: 600, style: { width: '100%' } },
|
|
},
|
|
{
|
|
label: '连接超时(毫秒)',
|
|
field: 'connectTimeout',
|
|
component: 'InputNumber',
|
|
defaultValue: 120000,
|
|
componentProps: { min: 5000, max: 600000, style: { width: '100%' } },
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
component: 'InputTextArea',
|
|
componentProps: { rows: 2 },
|
|
},
|
|
];
|