This commit is contained in:
@@ -801,27 +801,14 @@
|
||||
remark: ''
|
||||
})
|
||||
|
||||
// 查看设备详情(通过弹窗)
|
||||
const goToDeviceSearchDetail = async (deviceNo: string) => {
|
||||
deviceDetailDialogVisible.value = true
|
||||
deviceDetailLoading.value = true
|
||||
currentDeviceDetail.value = null
|
||||
|
||||
try {
|
||||
const res = await DeviceService.getDeviceByImei(deviceNo)
|
||||
if (res.code === 0 && res.data) {
|
||||
currentDeviceDetail.value = res.data
|
||||
} else {
|
||||
ElMessage.error(res.message || '查询失败')
|
||||
deviceDetailDialogVisible.value = false
|
||||
// 跳转到设备详情页面
|
||||
const goToDeviceSearchDetail = (deviceNo: string) => {
|
||||
router.push({
|
||||
path: '/asset-management/device-detail',
|
||||
query: {
|
||||
device_no: deviceNo
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('查询设备详情失败:', error)
|
||||
ElMessage.error(error?.message || '查询失败,请检查设备号是否正确')
|
||||
deviceDetailDialogVisible.value = false
|
||||
} finally {
|
||||
deviceDetailLoading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查看设备绑定的卡片
|
||||
@@ -1012,8 +999,11 @@
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: { color: 'var(--el-color-primary)', cursor: 'pointer' },
|
||||
onClick: () => goToDeviceSearchDetail(row.device_no)
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
goToDeviceSearchDetail(row.device_no)
|
||||
}
|
||||
},
|
||||
row.device_no
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user