Showing
1 changed file
with
3 additions
and
11 deletions
| ... | ... | @@ -182,7 +182,7 @@ |
| 182 | 182 | </div> |
| 183 | 183 | </template> |
| 184 | 184 | <script lang="ts"> |
| 185 | - import { defineComponent, reactive, unref, h, onMounted } from 'vue'; | |
| 185 | + import { defineComponent, reactive, unref, onMounted } from 'vue'; | |
| 186 | 186 | import { |
| 187 | 187 | DeviceModel, |
| 188 | 188 | DeviceRecord, |
| ... | ... | @@ -195,7 +195,6 @@ |
| 195 | 195 | import { |
| 196 | 196 | deleteDevice, |
| 197 | 197 | devicePage, |
| 198 | - checkDeviceOccupied, | |
| 199 | 198 | cancelDispatchCustomer, |
| 200 | 199 | getGATEWAY, |
| 201 | 200 | privateDevice, |
| ... | ... | @@ -331,15 +330,8 @@ |
| 331 | 330 | async function handleCancelDispatchCustomer(record: Recordable) { |
| 332 | 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 | 335 | } catch {} |
| 344 | 336 | } |
| 345 | 337 | ... | ... |