This commit is contained in:
@@ -282,12 +282,34 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 处理名称点击
|
||||
const handleNameClick = (row: IotCardImportTask) => {
|
||||
if (hasAuth('iot_card_task:view_detail')) {
|
||||
viewDetail(row)
|
||||
} else {
|
||||
ElMessage.warning('您没有查看详情的权限')
|
||||
}
|
||||
}
|
||||
|
||||
// 动态列配置
|
||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||
{
|
||||
prop: 'task_no',
|
||||
label: '任务编号',
|
||||
width: 180
|
||||
width: 180,
|
||||
formatter: (row: IotCardImportTask) => {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||
onClick: (e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
handleNameClick(row)
|
||||
}
|
||||
},
|
||||
row.task_no
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
@@ -666,10 +688,6 @@
|
||||
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('iot_card_task:view_detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
if (currentRow.value.fail_count > 0 && hasAuth('iot_card_task:download_fail_data')) {
|
||||
items.push({ key: 'failData', label: '失败数据' })
|
||||
}
|
||||
@@ -690,9 +708,6 @@
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
case 'detail':
|
||||
viewDetail(currentRow.value)
|
||||
break
|
||||
case 'failData':
|
||||
downloadFailDataByRow(currentRow.value)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user