Commit 09f45ebbbb98ffef37ee483efcb4775a0e28e8ca
1 parent
f8d13709
fix: DEFECT-916 device detail transform script echo data not true
Showing
2 changed files
with
4 additions
and
2 deletions
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | import DeviceConfigurationStep from './step/DeviceConfigurationStep.vue'; |
29 | 29 | import TransportConfigurationStep from './step/TransportConfigurationStep.vue'; |
30 | 30 | import PhysicalModelManagementStep from './step/PhysicalModelManagementStep.vue'; |
31 | - import { ref, unref } from 'vue'; | |
31 | + import { nextTick, ref, unref } from 'vue'; | |
32 | 32 | import { deviceConfigGetDetail } from '/@/api/device/deviceConfigApi'; |
33 | 33 | import { DeviceRecord } from '/@/api/device/model/deviceModel'; |
34 | 34 | import TopicPanel from './step/TopicPanel.vue'; |
... | ... | @@ -49,6 +49,7 @@ |
49 | 49 | unref(DevConStRef)?.setFormData(res); |
50 | 50 | }; |
51 | 51 | const setTransConfFormData = async (res: Recordable) => { |
52 | + await nextTick(); | |
52 | 53 | unref(TransConStRef)?.setFormData(res); |
53 | 54 | }; |
54 | 55 | ... | ... |
... | ... | @@ -78,11 +78,12 @@ |
78 | 78 | submitOnReset: false, |
79 | 79 | showActionButtonGroup: props.ifShowBtn ? true : false, |
80 | 80 | }); |
81 | - const setFormData = (v) => { | |
81 | + const setFormData = async (v) => { | |
82 | 82 | setFieldsValue({ |
83 | 83 | transportType: v?.profileData?.transportConfiguration?.type, |
84 | 84 | }); |
85 | 85 | isMqttType.value = v?.profileData?.transportConfiguration?.type; |
86 | + await nextTick(); | |
86 | 87 | mqttRef.value?.setFormData(v?.profileData?.transportConfiguration); |
87 | 88 | coapRef.value?.setFormData(v?.profileData?.transportConfiguration); |
88 | 89 | lwm2mRef.value?.setFormData(v?.profileData?.transportConfiguration); | ... | ... |