This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
v-model:filter="deviceSearchForm"
|
||||
:items="deviceSearchFormItems"
|
||||
label-width="85"
|
||||
:show-expand="false"
|
||||
@reset="handleDeviceSearchReset"
|
||||
@search="handleDeviceSearch"
|
||||
></ArtSearchBar>
|
||||
@@ -218,9 +219,7 @@
|
||||
import type {
|
||||
EnterpriseDeviceItem,
|
||||
AllocateDevicesResponse,
|
||||
RecallDevicesResponse,
|
||||
AuthorizedDeviceItem,
|
||||
FailedDeviceItem
|
||||
RecallDevicesResponse
|
||||
} from '@/types/api/enterpriseDevice'
|
||||
import type { EnterpriseItem } from '@/types/api'
|
||||
import type { Device, DeviceStatus } from '@/types/api/device'
|
||||
@@ -544,7 +543,10 @@
|
||||
1: { text: '在线', type: 'success' },
|
||||
2: { text: '离线', type: 'danger' }
|
||||
}
|
||||
const status = onlineStatusMap[(row as any).online_status ?? 0] || { text: '未知', type: 'info' }
|
||||
const status = onlineStatusMap[(row as any).online_status ?? 0] || {
|
||||
text: '未知',
|
||||
type: 'info'
|
||||
}
|
||||
return h(ElTag, { type: status.type }, () => status.text)
|
||||
}
|
||||
},
|
||||
@@ -908,9 +910,9 @@
|
||||
devicePagination.page = 1
|
||||
devicePagination.pageSize = 20
|
||||
// 预加载下拉选项
|
||||
handleSearchBatchNo('')
|
||||
searchShops('')
|
||||
searchSeries('')
|
||||
await handleSearchBatchNo('')
|
||||
await searchShops('')
|
||||
await searchSeries('')
|
||||
// 加载可用设备列表
|
||||
await getAvailableDevicesList()
|
||||
// 预选已授权的设备
|
||||
@@ -919,7 +921,7 @@
|
||||
)
|
||||
selectedAvailableDevices.value = preSelectedDevices
|
||||
// 等待表格渲染完成后,设置已选项
|
||||
nextTick(() => {
|
||||
await nextTick(() => {
|
||||
preSelectedDevices.forEach((device) => {
|
||||
const row = availableDevicesTableRef.value?.tableRef?.getRowByKey(device.id)
|
||||
if (row) {
|
||||
|
||||
Reference in New Issue
Block a user