弹窗改为跳转链接
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

@@ -610,6 +610,7 @@
BatchSetCardSeriesBindingResponse
} from '@/types/api/card'
import type { PackageSeriesResponse } from '@/types/api'
import { RoutesAlias } from '@/router/routesAlias'
defineOptions({ name: 'StandaloneCardList' })
@@ -909,26 +910,17 @@
}
}
// 打开卡详情弹窗
const goToCardDetail = async (iccid: string) => {
cardDetailDialogVisible.value = true
cardDetailLoading.value = true
currentCardDetail.value = null
try {
const res = await CardService.getIotCardDetailByIccid(iccid)
if (res.code === 0 && res.data) {
currentCardDetail.value = res.data
} else {
ElMessage.error(res.message || '查询失败')
cardDetailDialogVisible.value = false
}
} catch (error: any) {
console.error('查询卡片详情失败:', error)
ElMessage.error(error?.message || '查询失败请检查ICCID是否正确')
cardDetailDialogVisible.value = false
} finally {
cardDetailLoading.value = false
// 跳转到IoT卡详情页面
const goToCardDetail = (iccid: string) => {
if (hasAuth('iot_card:view_detail')) {
router.push({
path: RoutesAlias.StandaloneCardList + '/detail',
query: {
iccid: iccid
}
})
} else {
ElMessage.warning('您没有查看详情的权限')
}
}
@@ -985,8 +977,11 @@
return h(
'span',
{
style: { color: 'var(--el-color-primary)', cursor: 'pointer' },
onClick: () => goToCardDetail(row.iccid)
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
onClick: (e: MouseEvent) => {
e.stopPropagation()
goToCardDetail(row.iccid)
}
},
row.iccid
)