Showing
1 changed file
with
3 additions
and
11 deletions
| @@ -182,7 +182,7 @@ | @@ -182,7 +182,7 @@ | ||
| 182 | </div> | 182 | </div> |
| 183 | </template> | 183 | </template> |
| 184 | <script lang="ts"> | 184 | <script lang="ts"> |
| 185 | - import { defineComponent, reactive, unref, h, onMounted } from 'vue'; | 185 | + import { defineComponent, reactive, unref, onMounted } from 'vue'; |
| 186 | import { | 186 | import { |
| 187 | DeviceModel, | 187 | DeviceModel, |
| 188 | DeviceRecord, | 188 | DeviceRecord, |
| @@ -195,7 +195,6 @@ | @@ -195,7 +195,6 @@ | ||
| 195 | import { | 195 | import { |
| 196 | deleteDevice, | 196 | deleteDevice, |
| 197 | devicePage, | 197 | devicePage, |
| 198 | - checkDeviceOccupied, | ||
| 199 | cancelDispatchCustomer, | 198 | cancelDispatchCustomer, |
| 200 | getGATEWAY, | 199 | getGATEWAY, |
| 201 | privateDevice, | 200 | privateDevice, |
| @@ -331,15 +330,8 @@ | @@ -331,15 +330,8 @@ | ||
| 331 | async function handleCancelDispatchCustomer(record: Recordable) { | 330 | async function handleCancelDispatchCustomer(record: Recordable) { |
| 332 | try { | 331 | try { |
| 333 | // 该设备是否正在被场景联动使用中? | 332 | // 该设备是否正在被场景联动使用中? |
| 334 | - const isEnabled = await checkDeviceOccupied(record.id); | ||
| 335 | - if (!isEnabled.data) { | ||
| 336 | - const props = { style: { maxWidth: '600' + 'px' } }; | ||
| 337 | - const small = h('small', ''); | ||
| 338 | - createMessage.warn(h('h2', props, [`${isEnabled.message}`, small])); | ||
| 339 | - } else { | ||
| 340 | - await cancelDispatchCustomer(record); | ||
| 341 | - handleReload(); | ||
| 342 | - } | 333 | + await cancelDispatchCustomer(record); |
| 334 | + handleReload(); | ||
| 343 | } catch {} | 335 | } catch {} |
| 344 | } | 336 | } |
| 345 | 337 |