完善按钮和详情权限
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 2m29s

This commit is contained in:
sexygoat
2026-02-28 11:04:32 +08:00
parent 4470a4ef04
commit ce1032c7f9
23 changed files with 984 additions and 760 deletions

View File

@@ -47,7 +47,8 @@
hasAuth('iot_card:batch_recharge') ||
hasAuth('iot_card:network_distribution') ||
hasAuth('iot_card:network_recycle') ||
hasAuth('iot_card:change_package')
hasAuth('iot_card:change_package') ||
hasAuth('iot_card:batch_download')
"
type="info"
@contextmenu.prevent="showMoreMenu"
@@ -1502,10 +1503,12 @@
})
}
items.push({
key: 'download',
label: '批量下载'
})
if (hasAuth('iot_card:batch_download')) {
items.push({
key: 'download',
label: '批量下载'
})
}
if (hasAuth('iot_card:change_package')) {
items.push({
@@ -1518,32 +1521,53 @@
})
// 卡操作菜单项配置
const cardOperationMenuItems = computed((): MenuItemType[] => [
{
key: 'query-flow',
label: '查询流量'
},
{
key: 'realname-status',
label: '查询实名状态'
},
{
key: 'card-status',
label: '查询卡状态'
},
{
key: 'realname-link',
label: '获取实名链接'
},
{
key: 'start-card',
label: '启用卡片'
},
{
key: 'stop-card',
label: '停用卡片'
const cardOperationMenuItems = computed((): MenuItemType[] => {
const items: MenuItemType[] = []
if (hasAuth('iot_card:query_flow')) {
items.push({
key: 'query-flow',
label: '查询流量'
})
}
])
if (hasAuth('iot_card:query_realname_status')) {
items.push({
key: 'realname-status',
label: '查询实名状态'
})
}
if (hasAuth('iot_card:query_card_status')) {
items.push({
key: 'card-status',
label: '查询卡状态'
})
}
if (hasAuth('iot_card:get_realname_link')) {
items.push({
key: 'realname-link',
label: '获取实名链接'
})
}
if (hasAuth('iot_card:start_card')) {
items.push({
key: 'start-card',
label: '启用卡片'
})
}
if (hasAuth('iot_card:stop_card')) {
items.push({
key: 'stop-card',
label: '停用卡片'
})
}
return items
})
// 显示更多操作菜单
const showMoreMenu = (e: MouseEvent) => {