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,7 +28,7 @@ | ||
28 | import DeviceConfigurationStep from './step/DeviceConfigurationStep.vue'; | 28 | import DeviceConfigurationStep from './step/DeviceConfigurationStep.vue'; |
29 | import TransportConfigurationStep from './step/TransportConfigurationStep.vue'; | 29 | import TransportConfigurationStep from './step/TransportConfigurationStep.vue'; |
30 | import PhysicalModelManagementStep from './step/PhysicalModelManagementStep.vue'; | 30 | import PhysicalModelManagementStep from './step/PhysicalModelManagementStep.vue'; |
31 | - import { ref, unref } from 'vue'; | 31 | + import { nextTick, ref, unref } from 'vue'; |
32 | import { deviceConfigGetDetail } from '/@/api/device/deviceConfigApi'; | 32 | import { deviceConfigGetDetail } from '/@/api/device/deviceConfigApi'; |
33 | import { DeviceRecord } from '/@/api/device/model/deviceModel'; | 33 | import { DeviceRecord } from '/@/api/device/model/deviceModel'; |
34 | import TopicPanel from './step/TopicPanel.vue'; | 34 | import TopicPanel from './step/TopicPanel.vue'; |
@@ -49,6 +49,7 @@ | @@ -49,6 +49,7 @@ | ||
49 | unref(DevConStRef)?.setFormData(res); | 49 | unref(DevConStRef)?.setFormData(res); |
50 | }; | 50 | }; |
51 | const setTransConfFormData = async (res: Recordable) => { | 51 | const setTransConfFormData = async (res: Recordable) => { |
52 | + await nextTick(); | ||
52 | unref(TransConStRef)?.setFormData(res); | 53 | unref(TransConStRef)?.setFormData(res); |
53 | }; | 54 | }; |
54 | 55 |
@@ -78,11 +78,12 @@ | @@ -78,11 +78,12 @@ | ||
78 | submitOnReset: false, | 78 | submitOnReset: false, |
79 | showActionButtonGroup: props.ifShowBtn ? true : false, | 79 | showActionButtonGroup: props.ifShowBtn ? true : false, |
80 | }); | 80 | }); |
81 | - const setFormData = (v) => { | 81 | + const setFormData = async (v) => { |
82 | setFieldsValue({ | 82 | setFieldsValue({ |
83 | transportType: v?.profileData?.transportConfiguration?.type, | 83 | transportType: v?.profileData?.transportConfiguration?.type, |
84 | }); | 84 | }); |
85 | isMqttType.value = v?.profileData?.transportConfiguration?.type; | 85 | isMqttType.value = v?.profileData?.transportConfiguration?.type; |
86 | + await nextTick(); | ||
86 | mqttRef.value?.setFormData(v?.profileData?.transportConfiguration); | 87 | mqttRef.value?.setFormData(v?.profileData?.transportConfiguration); |
87 | coapRef.value?.setFormData(v?.profileData?.transportConfiguration); | 88 | coapRef.value?.setFormData(v?.profileData?.transportConfiguration); |
88 | lwm2mRef.value?.setFormData(v?.profileData?.transportConfiguration); | 89 | lwm2mRef.value?.setFormData(v?.profileData?.transportConfiguration); |