Merge remote-tracking branch 'origin/main'

main
liutao 3 days ago
commit 0fead876fe

@ -1,14 +1,14 @@
import request from '@/config/axios' import request from '@/config/axios'
export interface DeviceLineVO { export interface DeviceLineVO {
id: number id: string | number
code: string code: string
isCode?: boolean isCode?: boolean
qrcodeUrl?: string qrcodeUrl?: string
name: string name: string
remark: string remark: string
sort: number sort: number
parentId: number parentId: string | number
parentChain: string parentChain: string
createTime?: string createTime?: string
} }

@ -2,12 +2,12 @@ import request from '@/config/axios'
// 设备类型 VO // 设备类型 VO
export interface DeviceTypeVO { export interface DeviceTypeVO {
id: number // id id: string | number // id
code: string // 编码 code: string // 编码
name: string // 名称 name: string // 名称
remark: string // 备注 remark: string // 备注
sort: number // 排序 sort: number // 排序
parentId?: number parentId?: string | number
parentChain?: string parentChain?: string
createTime?: string createTime?: string
} }

@ -909,8 +909,8 @@ const initFormData = () => ({
deviceSpec: undefined, deviceSpec: undefined,
isScheduled: 0, isScheduled: 0,
ratedCapacity: undefined, ratedCapacity: undefined,
deviceType: undefined as number | undefined, deviceType: undefined as string | undefined,
deviceLine: undefined as number | undefined, deviceLine: undefined as string | undefined,
supplier: undefined, supplier: undefined,
workshop: undefined, workshop: undefined,
deviceLocation: undefined, deviceLocation: undefined,
@ -926,7 +926,7 @@ const initFormData = () => ({
qrcodeUrl: undefined, qrcodeUrl: undefined,
templateJson: undefined, templateJson: undefined,
sort: undefined, sort: undefined,
dvId: undefined as number | undefined dvId: undefined as string | undefined
}) })
const formData = ref({ const formData = ref({
@ -1274,9 +1274,9 @@ const ensureOptionsLoaded = async () => {
/** 鎵撳紑寮圭獥 */ /** 鎵撳紑寮圭獥 */
const open = async ( const open = async (
type: string, type: string,
id?: number, id?: string,
defaultDeviceTypeId?: number, defaultDeviceTypeId?: string,
defaultDeviceLineId?: number defaultDeviceLineId?: string
) => { ) => {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
@ -1304,8 +1304,8 @@ const open = async (
isScheduled: isScheduled:
normalizeNumberish((detail as any)?.isScheduled ?? (detail as any)?.isScheduled) ?? 0, normalizeNumberish((detail as any)?.isScheduled ?? (detail as any)?.isScheduled) ?? 0,
ratedCapacity: normalizeNumberish((detail as any)?.ratedCapacity), ratedCapacity: normalizeNumberish((detail as any)?.ratedCapacity),
deviceType: normalizeNumberish((detail as any)?.deviceType), deviceType: (detail as any)?.deviceType ?? undefined,
deviceLine: normalizeNumberish((detail as any)?.deviceLine), deviceLine: (detail as any)?.deviceLine ?? undefined,
deviceManagerIds: parseIdsValue((detail as any)?.deviceManager), deviceManagerIds: parseIdsValue((detail as any)?.deviceManager),
productionDate: normalizeYmd((detail as any)?.productionDate), productionDate: normalizeYmd((detail as any)?.productionDate),
outgoingTime: normalizeYmd((detail as any)?.outgoingTime), outgoingTime: normalizeYmd((detail as any)?.outgoingTime),
@ -1553,8 +1553,8 @@ const submitForm = async () => {
...(formData.value as any), ...(formData.value as any),
isScheduled: normalizeNumberish((formData.value as any).isScheduled) ?? 0, isScheduled: normalizeNumberish((formData.value as any).isScheduled) ?? 0,
ratedCapacity: normalizeNumberish((formData.value as any).ratedCapacity), ratedCapacity: normalizeNumberish((formData.value as any).ratedCapacity),
deviceType: normalizeNumberish(formData.value.deviceType), deviceType: (formData.value as any).deviceType ?? undefined,
deviceLine: normalizeNumberish((formData.value as any).deviceLine), deviceLine: (formData.value as any).deviceLine ?? undefined,
productionDate: normalizeYmd(formData.value.productionDate), productionDate: normalizeYmd(formData.value.productionDate),
outgoingTime: normalizeYmd((formData.value as any).outgoingTime), outgoingTime: normalizeYmd((formData.value as any).outgoingTime),
factoryEntryDate: normalizeYmd(formData.value.factoryEntryDate), factoryEntryDate: normalizeYmd(formData.value.factoryEntryDate),

@ -847,7 +847,7 @@ const { delView } = useTagsViewStore()
const { currentRoute } = useRouter() const { currentRoute } = useRouter()
const router = useRouter() const router = useRouter()
const appStore = useAppStore() const appStore = useAppStore()
const deviceId = computed(() => Number(route.params.id)) const deviceId = computed(() => String(route.params.id || ''))
const detailLoading = ref(false) const detailLoading = ref(false)
const tableLoading = ref(false) const tableLoading = ref(false)
const detailData = ref<DeviceLedgerVO | undefined>() const detailData = ref<DeviceLedgerVO | undefined>()
@ -1185,8 +1185,8 @@ const initFormData = () => ({
deviceSpec: undefined, deviceSpec: undefined,
isScheduled: 0, isScheduled: 0,
ratedCapacity: undefined, ratedCapacity: undefined,
deviceType: undefined as number | undefined, deviceType: undefined as string | undefined,
deviceLine: undefined as number | undefined, deviceLine: undefined as string | undefined,
supplier: undefined, supplier: undefined,
workshop: undefined, workshop: undefined,
deviceLocation: undefined, deviceLocation: undefined,
@ -1633,8 +1633,8 @@ const bindFormData = async (detail: DeviceLedgerVO) => {
isCode: (detail as any)?.isCode ?? false, isCode: (detail as any)?.isCode ?? false,
isScheduled: normalizeNumberish((detail as any)?.isScheduled) ?? 0, isScheduled: normalizeNumberish((detail as any)?.isScheduled) ?? 0,
ratedCapacity: normalizeNumberish((detail as any)?.ratedCapacity), ratedCapacity: normalizeNumberish((detail as any)?.ratedCapacity),
deviceType: normalizeNumberish((detail as any)?.deviceType), deviceType: (detail as any)?.deviceType ?? undefined,
deviceLine: normalizeNumberish((detail as any)?.deviceLine), deviceLine: (detail as any)?.deviceLine ?? undefined,
deviceManagerIds: parseIdsValue((detail as any)?.deviceManager), deviceManagerIds: parseIdsValue((detail as any)?.deviceManager),
productionDate: normalizeYmd((detail as any)?.productionDate), productionDate: normalizeYmd((detail as any)?.productionDate),
outgoingTime: normalizeYmd((detail as any)?.outgoingTime), outgoingTime: normalizeYmd((detail as any)?.outgoingTime),
@ -1675,8 +1675,8 @@ const buildSubmitData = () => {
...(formData.value as any), ...(formData.value as any),
isScheduled: normalizeNumberish((formData.value as any).isScheduled) ?? 0, isScheduled: normalizeNumberish((formData.value as any).isScheduled) ?? 0,
ratedCapacity: normalizeNumberish((formData.value as any).ratedCapacity), ratedCapacity: normalizeNumberish((formData.value as any).ratedCapacity),
deviceType: normalizeNumberish(formData.value.deviceType), deviceType: (formData.value as any).deviceType ?? undefined,
deviceLine: normalizeNumberish((formData.value as any).deviceLine), deviceLine: (formData.value as any).deviceLine ?? undefined,
productionDate: normalizeYmd(formData.value.productionDate), productionDate: normalizeYmd(formData.value.productionDate),
outgoingTime: normalizeYmd((formData.value as any).outgoingTime), outgoingTime: normalizeYmd((formData.value as any).outgoingTime),
factoryEntryDate: normalizeYmd(formData.value.factoryEntryDate), factoryEntryDate: normalizeYmd(formData.value.factoryEntryDate),

@ -517,28 +517,28 @@ type DeviceLedgerDetailVO = DeviceLedgerVO & {
outgoingTime?: string | number | Date outgoingTime?: string | number | Date
} }
const deviceId = computed(() => Number(route.params.id)) const deviceId = computed(() => String(route.params.id || ''))
const detailLoading = ref(false) const detailLoading = ref(false)
const tableLoading = ref(false) const tableLoading = ref(false)
const detailData = ref<DeviceLedgerDetailVO | undefined>() const detailData = ref<DeviceLedgerDetailVO | undefined>()
const detailActiveTab = ref('check') const detailActiveTab = ref('check')
const deviceTypeNameMap = ref<Record<number, string>>({}) const deviceTypeNameMap = ref<Record<string, string>>({})
const buildDeviceTypeNameMap = (nodes: DeviceTypeTreeVO[]) => { const buildDeviceTypeNameMap = (nodes: DeviceTypeTreeVO[]) => {
const map: Record<number, string> = {} const map: Record<string, string> = {}
const stack = [...nodes] const stack = [...nodes]
while (stack.length) { while (stack.length) {
const node = stack.pop()! const node = stack.pop()!
if (typeof node.id === 'number') map[node.id] = node.name if (node.id != null) map[String(node.id)] = node.name
if (Array.isArray(node.children) && node.children.length) stack.push(...node.children) if (Array.isArray(node.children) && node.children.length) stack.push(...node.children)
} }
deviceTypeNameMap.value = map deviceTypeNameMap.value = map
} }
const getDeviceTypeName = (value: any) => { const getDeviceTypeName = (value: any) => {
const id = typeof value === 'number' ? value : Number(value) const id = String(value ?? '')
if (!Number.isNaN(id) && deviceTypeNameMap.value[id]) return deviceTypeNameMap.value[id] if (deviceTypeNameMap.value[id]) return deviceTypeNameMap.value[id]
return value ?? '' return value ?? ''
} }

@ -350,7 +350,7 @@
> >
<template #default="scope"> <template #default="scope">
<el-tag effect="light"> <el-tag effect="light">
{{ getDeviceTypeName(scope.row.deviceTypeName ?? scope.row.deviceType) }} {{ getDeviceTypeName(scope.row.typeName ?? scope.row.deviceType) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -677,7 +677,7 @@ const { t } = useI18n() // 国际化
const loading = ref(true) // const loading = ref(true) //
const list = ref<DeviceLedgerVO[]>([]) // const list = ref<DeviceLedgerVO[]>([]) //
const total = ref(0) // const total = ref(0) //
const selectedDeviceLineId = ref<number | undefined>(undefined) const selectedDeviceLineId = ref<string | undefined>(undefined)
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -687,8 +687,8 @@ const queryParams = reactive({
deviceBrand: undefined, deviceBrand: undefined,
sn: undefined, sn: undefined,
outgoingTime: undefined, outgoingTime: undefined,
deviceType: undefined as number | undefined, deviceType: undefined as string | undefined,
deviceLine: undefined as number | undefined deviceLine: undefined as string | undefined
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const exportLoading = ref(false) const exportLoading = ref(false)
@ -705,7 +705,7 @@ const updatePlanTableMaxHeight = async () => {
const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap
planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight))) planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight)))
} }
const selectedIds = ref<number[]>([]) const selectedIds = ref<string[]>([])
const handleSelectionChange = (rows: any[]) => { const handleSelectionChange = (rows: any[]) => {
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? [] selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? []
} }
@ -735,15 +735,15 @@ const typeTreeProps = { label: 'name', children: 'children' }
const treeSelectProps = { label: 'name', children: 'children' } const treeSelectProps = { label: 'name', children: 'children' }
const typeTreeExpandedKeys = ref<number[]>([]) const typeTreeExpandedKeys = ref<number[]>([])
const deviceTypeTree = ref<DeviceTypeTreeVO[]>([]) const deviceTypeTree = ref<DeviceTypeTreeVO[]>([])
const deviceTypeNameMap = ref<Record<number, string>>({}) const deviceTypeNameMap = ref<Record<string, string>>({})
const ALL_TYPE_NODE_ID = -1 const ALL_TYPE_NODE_ID = -1
const buildDeviceTypeNameMap = (nodes: DeviceTypeTreeVO[]) => { const buildDeviceTypeNameMap = (nodes: DeviceTypeTreeVO[]) => {
const map: Record<number, string> = {} const map: Record<string, string> = {}
const stack = [...nodes] const stack = [...nodes]
while (stack.length) { while (stack.length) {
const node = stack.pop()! const node = stack.pop()!
if (typeof node.id === 'number') map[node.id] = node.name if (node.id != null) map[String(node.id)] = node.name
if (Array.isArray(node.children) && node.children.length) stack.push(...node.children) if (Array.isArray(node.children) && node.children.length) stack.push(...node.children)
} }
deviceTypeNameMap.value = map deviceTypeNameMap.value = map
@ -809,7 +809,7 @@ const treeFormLoading = ref(false)
const treeFormMode = ref<'create' | 'update'>('create') const treeFormMode = ref<'create' | 'update'>('create')
const treeFormRef = ref() const treeFormRef = ref()
const treeFormData = ref({ const treeFormData = ref({
id: undefined as number | undefined, id: undefined as string | undefined,
code: '', code: '',
isCode: true, isCode: true,
name: '', name: '',
@ -973,8 +973,8 @@ const buildTreeQrcodePrintData = () => {
} }
const getDeviceTypeName = (value: any) => { const getDeviceTypeName = (value: any) => {
const id = typeof value === 'number' ? value : Number(value) const id = String(value ?? '')
if (!Number.isNaN(id) && deviceTypeNameMap.value[id]) return deviceTypeNameMap.value[id] if (deviceTypeNameMap.value[id]) return deviceTypeNameMap.value[id]
return value ?? '' return value ?? ''
} }
@ -1012,7 +1012,7 @@ const handleDetail = (id: number) => {
router.push({ name: 'MesDeviceLedgerDetail', params: { id } }) router.push({ name: 'MesDeviceLedgerDetail', params: { id } })
} }
const handleEditDetail = (id: number) => { const handleEditDetail = (id: string) => {
router.push({ name: 'MesDeviceLedgerEditDetail', params: { id } }) router.push({ name: 'MesDeviceLedgerEditDetail', params: { id } })
} }
/** 查询列表 */ /** 查询列表 */
@ -1054,18 +1054,18 @@ const resetQuery = () => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const formVisible = ref(false) const formVisible = ref(false)
const openForm = async (type: string, id?: number) => { const openForm = async (type: string, id?: string) => {
formVisible.value = true formVisible.value = true
await nextTick() await nextTick()
formRef.value.open(type, id, queryParams.deviceType, selectedDeviceLineId.value) formRef.value.open(type, id, queryParams.deviceType, selectedDeviceLineId.value)
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
const buildIdsParam = (ids: number | number[]) => { const buildIdsParam = (ids: string | string[]) => {
return Array.isArray(ids) ? ids.join(',') : String(ids) return Array.isArray(ids) ? ids.join(',') : String(ids)
} }
const handleDelete = async (ids: number | number[]) => { const handleDelete = async (ids: string | string[]) => {
try { try {
// //
await message.delConfirm() await message.delConfirm()

@ -506,7 +506,7 @@ defineOptions({ name: 'DvRepairForm' })
type RepairFormType = 'create' | 'update' | 'repair' | 'detail' | '' type RepairFormType = 'create' | 'update' | 'repair' | 'detail' | ''
interface DvRepairFormData extends Partial<DvRepairVO> { interface DvRepairFormData extends Partial<DvRepairVO> {
deviceId?: number deviceId?: string
componentId?: number componentId?: number
isShutdown?: boolean isShutdown?: boolean
isCode?: boolean isCode?: boolean
@ -607,13 +607,13 @@ const showComponentSelect = computed(() => formData.value.machineryTypeId === 2)
const selectedDeviceText = computed(() => { const selectedDeviceText = computed(() => {
const deviceId = formData.value.deviceId const deviceId = formData.value.deviceId
if (typeof deviceId !== 'number') return '' if (deviceId == null || deviceId === '') return ''
const option = deviceOptions.value.find((item) => item.value === deviceId) const option = deviceOptions.value.find((item) => String(item.value) === String(deviceId))
return option?.label || `ID:${deviceId}` return option?.label || `ID:${deviceId}`
}) })
const deviceLoading = ref(false) const deviceLoading = ref(false)
const deviceOptions = ref<{ label: string; value: number; raw?: DeviceLedgerVO }[]>([]) const deviceOptions = ref<{ label: string; value: string | number; raw?: DeviceLedgerVO }[]>([])
const deviceOptionsLoaded = ref(false) const deviceOptionsLoaded = ref(false)
const deviceDialogVisible = ref(false) const deviceDialogVisible = ref(false)
@ -697,7 +697,7 @@ const toComponentOption = (item: any) => {
return { label, value: id } return { label, value: id }
} }
const loadComponentOptionsByDeviceId = async (deviceId: number) => { const loadComponentOptionsByDeviceId = async (deviceId: string) => {
componentLoading.value = true componentLoading.value = true
try { try {
const data = await RepairItemsApi.getComponentList(deviceId) const data = await RepairItemsApi.getComponentList(deviceId)
@ -810,7 +810,7 @@ const confirmDeviceSelection = (row?: DeviceLedgerVO) => {
return return
} }
const id = Number(selected.id) const id = String(selected.id)
const label = `${selected.deviceCode ?? ''} ${selected.deviceName ?? ''}`.trim() const label = `${selected.deviceCode ?? ''} ${selected.deviceName ?? ''}`.trim()
deviceOptions.value = upsertDeviceOption(deviceOptions.value, { label, value: id, raw: selected }) deviceOptions.value = upsertDeviceOption(deviceOptions.value, { label, value: id, raw: selected })
formData.value.deviceId = id formData.value.deviceId = id
@ -854,12 +854,12 @@ watch(
if (isHydrating.value) return if (isHydrating.value) return
formData.value.componentId = undefined formData.value.componentId = undefined
componentOptions.value = [] componentOptions.value = []
if (typeof deviceId !== 'number') { if (deviceId == null || deviceId === '') {
setLineRows([]) setLineRows([])
return return
} }
const option = deviceOptions.value.find((item) => item.value === deviceId) const option = deviceOptions.value.find((item) => String(item.value) === String(deviceId))
if (option?.raw) { if (option?.raw) {
formData.value.machineryCode = option.raw.deviceCode formData.value.machineryCode = option.raw.deviceCode
formData.value.machineryName = option.raw.deviceName formData.value.machineryName = option.raw.deviceName
@ -883,7 +883,7 @@ watch(
if (isHydrating.value) return if (isHydrating.value) return
if (formData.value.machineryTypeId !== 2) return if (formData.value.machineryTypeId !== 2) return
const deviceId = formData.value.deviceId const deviceId = formData.value.deviceId
if (typeof deviceId !== 'number' || typeof componentId !== 'number') { if (deviceId == null || deviceId === '' || typeof componentId !== 'number') {
setLineRows([]) setLineRows([])
return return
} }
@ -1103,14 +1103,14 @@ const open = async (type: string, id?: number) => {
formData.value.machineryTypeId = Number.isNaN(typeId) ? formData.value.machineryTypeId : typeId formData.value.machineryTypeId = Number.isNaN(typeId) ? formData.value.machineryTypeId : typeId
const deviceId = formData.value.deviceId const deviceId = formData.value.deviceId
const resolvedDeviceId = typeof deviceId === 'number' ? deviceId : formData.value.machineryId const resolvedDeviceId = (deviceId != null && deviceId !== '') ? deviceId : formData.value.machineryId
if (typeof resolvedDeviceId === 'number') { if (resolvedDeviceId != null && resolvedDeviceId !== '') {
formData.value.deviceId = resolvedDeviceId formData.value.deviceId = resolvedDeviceId
const label = `${formData.value.machineryCode ?? ''} ${formData.value.machineryName ?? ''}`.trim() || `ID:${resolvedDeviceId}` const label = `${formData.value.machineryCode ?? ''} ${formData.value.machineryName ?? ''}`.trim() || `ID:${resolvedDeviceId}`
deviceOptions.value = upsertDeviceOption(deviceOptions.value, { label, value: resolvedDeviceId }) deviceOptions.value = upsertDeviceOption(deviceOptions.value, { label, value: resolvedDeviceId })
} }
if (formData.value.machineryTypeId === 2 && typeof formData.value.deviceId === 'number') { if (formData.value.machineryTypeId === 2 && formData.value.deviceId != null && formData.value.deviceId !== '') {
await loadComponentOptionsByDeviceId(formData.value.deviceId) await loadComponentOptionsByDeviceId(formData.value.deviceId)
const componentId = typeof formData.value.componentId === 'number' const componentId = typeof formData.value.componentId === 'number'
? formData.value.componentId ? formData.value.componentId

@ -416,7 +416,7 @@ const formData = ref({
name: undefined as string | undefined, name: undefined as string | undefined,
taskType: undefined as number | undefined, taskType: undefined as number | undefined,
deviceList: [] as string[], deviceList: [] as string[],
projectForm: undefined as number | undefined, projectForm: undefined as string | undefined,
dateRange: [] as string[], dateRange: [] as string[],
cronExpression: undefined as string | undefined, cronExpression: undefined as string | undefined,
operableUsers: [] as string[], operableUsers: [] as string[],
@ -492,8 +492,7 @@ const open = async (type: string, row?: TaskManagementVO) => {
formData.value.deviceList = parseIdsValue((row as any).deviceList) formData.value.deviceList = parseIdsValue((row as any).deviceList)
const projectFormIds = parseIdsValue((row as any).projectForm) const projectFormIds = parseIdsValue((row as any).projectForm)
if (projectFormIds.length) { if (projectFormIds.length) {
const n = Number(projectFormIds[0]) formData.value.projectForm = projectFormIds[0] || undefined
formData.value.projectForm = Number.isFinite(n) ? n : undefined
const projectFormName = String((row as any).projectFormName ?? '').trim() const projectFormName = String((row as any).projectFormName ?? '').trim()
if (formData.value.projectForm !== undefined && projectFormName) { if (formData.value.projectForm !== undefined && projectFormName) {
planSelectionCache.value[String(formData.value.projectForm)] = { planSelectionCache.value[String(formData.value.projectForm)] = {
@ -664,8 +663,8 @@ const confirmPlanSelection = (row?: PlanOption) => {
return return
} }
const id = Number(selected.id) const id = String(selected.id)
formData.value.projectForm = Number.isFinite(id) ? id : undefined formData.value.projectForm = id || undefined
cachePlanRows([selected]) cachePlanRows([selected])
planDialogVisible.value = false planDialogVisible.value = false
formRef.value?.clearValidate?.('projectForm') formRef.value?.clearValidate?.('projectForm')

@ -301,7 +301,7 @@ type PlanOption = {
} }
const planOptions = ref<PlanOption[]>([]) const planOptions = ref<PlanOption[]>([])
const deviceOptions = ref<{ id: number; label: string; raw?: DeviceLedgerVO }[]>([]) const deviceOptions = ref<{ id: string | number; label: string; raw?: DeviceLedgerVO }[]>([])
const users = ref<UserVO[]>([]) const users = ref<UserVO[]>([])
const queryParams = reactive({ const queryParams = reactive({
@ -339,7 +339,7 @@ const ensureDeviceOptionsLoaded = async () => {
const deviceRes = await DeviceLedgerApi.getDeviceLedgerList() const deviceRes = await DeviceLedgerApi.getDeviceLedgerList()
const rows = (Array.isArray(deviceRes) ? deviceRes : deviceRes?.list ?? deviceRes?.data ?? []) as DeviceLedgerVO[] const rows = (Array.isArray(deviceRes) ? deviceRes : deviceRes?.list ?? deviceRes?.data ?? []) as DeviceLedgerVO[]
deviceOptions.value = rows deviceOptions.value = rows
.filter((item) => typeof item?.id === 'number') .filter((item) => item?.id != null)
.map((item) => ({ .map((item) => ({
id: item.id, id: item.id,
label: `${item.deviceCode ?? ''} ${item.deviceName ?? ''}`.trim() || String(item.id), label: `${item.deviceCode ?? ''} ${item.deviceName ?? ''}`.trim() || String(item.id),

Loading…
Cancel
Save