fix: bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m52s

This commit is contained in:
sexygoat
2026-04-25 15:51:24 +08:00
parent 9247001643
commit a770984ef7
4 changed files with 31 additions and 14 deletions

View File

@@ -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) {