Showing
1 changed file
with
6 additions
and
4 deletions
... | ... | @@ -140,9 +140,10 @@ |
140 | 140 | confirmLoading: true, |
141 | 141 | }); |
142 | 142 | if (unref(isUpdate)) { |
143 | + const stepRecord = unref(stepState); | |
143 | 144 | const editData = { |
144 | - sn: 'XXXX', | |
145 | - ...unref(stepState), | |
145 | + ...stepRecord, | |
146 | + sn: stepRecord.name, | |
146 | 147 | customerId: currentDeviceData.customerId, |
147 | 148 | deviceInfo: { |
148 | 149 | avatar: DeviceStep1Ref.value?.devicePic, |
... | ... | @@ -151,9 +152,10 @@ |
151 | 152 | }; |
152 | 153 | await createOrEditDevice(editData); |
153 | 154 | } else { |
155 | + const stepRecord = unref(stepState); | |
154 | 156 | const createData = { |
155 | - sn: 'XXXX', | |
156 | - ...unref(stepState), | |
157 | + ...stepRecord, | |
158 | + sn: stepRecord.name, | |
157 | 159 | deviceInfo: { |
158 | 160 | avatar: DeviceStep1Ref.value?.devicePic, |
159 | 161 | ...DeviceStep1Ref.value?.positionState, | ... | ... |