| | |
| | | const originalSharedIds = ref([]) // 原始已共享的设备ID集合 |
| | | const originalSharedMap = ref({}) // 原始已共享的设备ID与shareId的映射 |
| | | const currentDeptId = ref(null) // 当前操作的部门ID |
| | | const regionCode = ref(null) // 当前操作的部门code |
| | | const dictObj = ref({ |
| | | deviceType: [], // 设备类型 |
| | | }) |
| | |
| | | async function getDeviceList() { |
| | | loading.value = true |
| | | try { |
| | | const res = await nonDeptAreaDevicesApi({ loanToDeptId: currentDeptId.value }) |
| | | const res = await nonDeptAreaDevicesApi({ deptId: currentDeptId.value,regionCode: regionCode.value }) |
| | | deviceList.value = res?.data?.data ?? [] |
| | | // 记录原始已共享的设备ID和shareId映射 |
| | | const sharedDevices = deviceList.value.filter(item => item.isShared) |
| | |
| | | // 打开弹框 |
| | | async function open({ row } = {}) { |
| | | currentDeptId.value = row?.id |
| | | regionCode.value = row?.areaCode |
| | | selectedRows.value = [] |
| | | getDictList() |
| | | await getDeviceList() |