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