Commit f2af135d311d269025a7e67f2fd3441404d58d12
1 parent
15330ffc
perf: add a deviceProfileId filed on create device in device list page
Showing
1 changed file
with
12 additions
and
3 deletions
... | ... | @@ -49,6 +49,12 @@ export const step1Schemas: FormSchema[] = [ |
49 | 49 | show: false, |
50 | 50 | }, |
51 | 51 | { |
52 | + field: 'deviceProfileId', | |
53 | + label: '', | |
54 | + component: 'Input', | |
55 | + show: false, | |
56 | + }, | |
57 | + { | |
52 | 58 | field: 'profileId', |
53 | 59 | label: '所属产品', |
54 | 60 | required: true, |
... | ... | @@ -59,9 +65,12 @@ export const step1Schemas: FormSchema[] = [ |
59 | 65 | api: deviceProfile, |
60 | 66 | labelField: 'name', |
61 | 67 | valueField: 'tbProfileId', |
62 | - onChange(_value: string, option: { deviceType: string; transportType: string }) { | |
63 | - const { deviceType, transportType } = option; | |
64 | - setFieldsValue({ deviceType: deviceType, transportType }); | |
68 | + onChange( | |
69 | + _value: string, | |
70 | + option: { deviceType: string; transportType: string; id: string } | |
71 | + ) { | |
72 | + const { deviceType, transportType, id } = option; | |
73 | + setFieldsValue({ deviceType: deviceType, transportType, deviceProfileId: id }); | |
65 | 74 | }, |
66 | 75 | }; |
67 | 76 | }, | ... | ... |