完善按钮和详情权限
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

@@ -21,14 +21,14 @@
type="primary"
@click="handleBatchAllocate"
:disabled="!selectedDevices.length"
v-permission="'devices:batch_allocation'"
v-permission="'device:batch_allocate'"
>
批量分配
</ElButton>
<ElButton
@click="handleBatchRecall"
:disabled="!selectedDevices.length"
v-permission="'devices:batch_recycle'"
v-permission="'device:batch_recall'"
>
批量回收
</ElButton>
@@ -36,7 +36,7 @@
type="info"
@click="handleBatchSetSeries"
:disabled="!selectedDevices.length"
v-permission="'devices:batch_setting'"
v-permission="'device:batch_set_series'"
>
批量设置套餐系列
</ElButton>
@@ -1625,37 +1625,49 @@
const items: MenuItemType[] = []
// 添加查看卡片到菜单最前面
if (hasAuth('devices:look_binding')) {
if (hasAuth('device:view_cards')) {
items.push({
key: 'view-cards',
label: '查看卡片'
})
}
items.push(
{
if (hasAuth('device:reboot')) {
items.push({
key: 'reboot',
label: '重启设备'
},
{
})
}
if (hasAuth('device:factory_reset')) {
items.push({
key: 'reset',
label: '恢复出厂'
},
{
})
}
if (hasAuth('device:set_speed_limit')) {
items.push({
key: 'speed-limit',
label: '设置限速'
},
{
})
}
if (hasAuth('device:switch_sim')) {
items.push({
key: 'switch-card',
label: '切换SIM卡'
},
{
})
}
if (hasAuth('device:set_wifi')) {
items.push({
key: 'set-wifi',
label: '设置WiFi'
}
)
})
}
if (hasAuth('devices:delete')) {
if (hasAuth('device:delete')) {
items.push({
key: 'delete',
label: '删除设备'