Commit 7b9625bfb6f0b0820116cb85ae37d6ca63cc00d6

Authored by ww
1 parent 8ab0c5ad

fix: device assign custom happend error

... ... @@ -62,6 +62,7 @@
62 62 const current = ref(0);
63 63 const isUpdate = ref<Boolean>(false);
64 64 const deviceInfo = ref({});
  65 + let currentDeviceData = {} as Recordable;
65 66 const getTitle = computed(() => (!unref(isUpdate) ? '新增设备' : '编辑设备'));
66 67 // 所有参数
67 68 let stepState = ref();
... ... @@ -71,6 +72,7 @@
71 72 isUpdate.value = data?.isUpdate;
72 73 if (unref(isUpdate)) {
73 74 const { record } = data;
  75 + currentDeviceData = record;
74 76 unref(DeviceStep1Ref)?.parentSetFieldsValue({
75 77 ...record,
76 78 profile: record.deviceProfile.name,
... ... @@ -138,8 +140,10 @@
138 140 confirmLoading: true,
139 141 });
140 142 if (unref(isUpdate)) {
  143 + console.log(currentDeviceData);
141 144 const editData = {
142 145 ...unref(stepState),
  146 + customerId: currentDeviceData.customerId,
143 147 deviceInfo: {
144 148 avatar: DeviceStep1Ref.value?.devicePic,
145 149 ...DeviceStep1Ref.value?.positionState,
... ...