弹窗改为跳转链接
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m41s

This commit is contained in:
sexygoat
2026-03-07 11:41:15 +08:00
parent 8fbc321a5e
commit e73992d253
11 changed files with 1238 additions and 245 deletions

View File

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