|
@@ -48,6 +48,18 @@
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ field: 'cameraSnCode',
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ label: '相机sn',
|
|
|
+ componentProps: {
|
|
|
+ maxLength: 50,
|
|
|
+ },
|
|
|
+ colProps: {
|
|
|
+ span: 20,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
field: 'rtkType',
|
|
|
component: 'Select',
|
|
|
label: '板卡类型',
|
|
@@ -73,6 +85,9 @@
|
|
|
key: 2,
|
|
|
},
|
|
|
],
|
|
|
+ onChange: (value) => {
|
|
|
+ handlertkType(value);
|
|
|
+ },
|
|
|
},
|
|
|
// required: true,
|
|
|
},
|
|
@@ -152,7 +167,7 @@
|
|
|
componentProps: {
|
|
|
maxLength: 50,
|
|
|
// readonly:preventAutoFill.value,
|
|
|
- placeholder:"请输入数字、字母大小写组合"
|
|
|
+ placeholder: '请输入数字、字母大小写组合',
|
|
|
},
|
|
|
colProps: { span: 20 },
|
|
|
},
|
|
@@ -175,7 +190,7 @@
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
- const [registerForm, { validate, resetFields, setFieldsValue }] = useForm({
|
|
|
+ const [registerForm, { validate, resetFields, setFieldsValue, updateSchema }] = useForm({
|
|
|
labelWidth: 120,
|
|
|
schemas,
|
|
|
showActionButtonGroup: false,
|
|
@@ -195,6 +210,19 @@
|
|
|
console.log('data', data);
|
|
|
setFieldsValue(data);
|
|
|
}
|
|
|
+ function handlertkType(val) {
|
|
|
+ console.log('val', val);
|
|
|
+ let ifShow = val == 0;
|
|
|
+ updateSchema([
|
|
|
+ { field: 'ipAddr', ifShow },
|
|
|
+ { field: 'mountPoint', ifShow },
|
|
|
+ { field: 'port', ifShow },
|
|
|
+ { field: 'userName', ifShow },
|
|
|
+ { field: 'password', ifShow },
|
|
|
+ { field: 'operator', ifShow },
|
|
|
+ { field: 'cameraSnCode', ifShow },
|
|
|
+ ]);
|
|
|
+ }
|
|
|
const handleSubmit = async () => {
|
|
|
try {
|
|
|
const params = await validate();
|