|
@@ -168,17 +168,27 @@ |
|
@@ -168,17 +168,27 @@ |
168
|
const devicePic = ref('');
|
168
|
const devicePic = ref('');
|
169
|
const loading = ref(false);
|
169
|
const loading = ref(false);
|
170
|
|
170
|
|
171
|
- const [register, { validate, resetFields, setFieldsValue, getFieldsValue, updateSchema }] =
|
|
|
172
|
- useForm({
|
|
|
173
|
- labelWidth: 140,
|
|
|
174
|
- schemas: step1Schemas,
|
|
|
175
|
- actionColOptions: {
|
|
|
176
|
- span: 14,
|
|
|
177
|
- },
|
|
|
178
|
- labelAlign: 'right',
|
|
|
179
|
- showResetButton: false,
|
|
|
180
|
- showSubmitButton: false,
|
|
|
181
|
- });
|
171
|
+ const [
|
|
|
172
|
+ register,
|
|
|
173
|
+ {
|
|
|
174
|
+ validate,
|
|
|
175
|
+ resetFields,
|
|
|
176
|
+ setFieldsValue,
|
|
|
177
|
+ getFieldsValue,
|
|
|
178
|
+ updateSchema,
|
|
|
179
|
+ clearValidate,
|
|
|
180
|
+ validateFields,
|
|
|
181
|
+ },
|
|
|
182
|
+ ] = useForm({
|
|
|
183
|
+ labelWidth: 140,
|
|
|
184
|
+ schemas: step1Schemas,
|
|
|
185
|
+ actionColOptions: {
|
|
|
186
|
+ span: 14,
|
|
|
187
|
+ },
|
|
|
188
|
+ labelAlign: 'right',
|
|
|
189
|
+ showResetButton: false,
|
|
|
190
|
+ showSubmitButton: false,
|
|
|
191
|
+ });
|
182
|
async function nextStep() {
|
192
|
async function nextStep() {
|
183
|
try {
|
193
|
try {
|
184
|
let values = await validate();
|
194
|
let values = await validate();
|
|
@@ -447,11 +457,11 @@ |
|
@@ -447,11 +457,11 @@ |
447
|
});
|
457
|
});
|
448
|
}
|
458
|
}
|
449
|
|
459
|
|
450
|
- const handleTreeOrg = () => {
|
|
|
451
|
- // const clearGatewayId = {
|
|
|
452
|
- // gatewayId: '',
|
|
|
453
|
- // };
|
|
|
454
|
- // setFieldsValue(clearGatewayId);
|
460
|
+ const handleTreeOrg = (option: string) => {
|
|
|
461
|
+ if (option) clearValidate('organizationId');
|
|
|
462
|
+ else {
|
|
|
463
|
+ validateFields(['organizationId']);
|
|
|
464
|
+ }
|
455
|
};
|
465
|
};
|
456
|
|
466
|
|
457
|
return {
|
467
|
return {
|