fetch(modify):完善按钮权限
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m25s

This commit is contained in:
sexygoat
2026-02-03 17:20:50 +08:00
parent de9753f42d
commit 192c6f1d26
22 changed files with 885 additions and 232 deletions

View File

@@ -22,6 +22,7 @@
type="success"
:disabled="selectedCards.length === 0"
@click="showAllocateDialog"
v-permission="'iot_card:batch_allocation'"
>
批量分配
</ElButton>
@@ -29,6 +30,7 @@
type="warning"
:disabled="selectedCards.length === 0"
@click="showRecallDialog"
v-permission="'iot_card:batch_recycle'"
>
批量回收
</ElButton>
@@ -36,10 +38,17 @@
type="primary"
:disabled="selectedCards.length === 0"
@click="showSeriesBindingDialog"
v-permission="'iot_card:batch_setting'"
>
批量设置套餐系列
</ElButton>
<ElButton type="info" @contextmenu.prevent="showMoreMenu">更多操作</ElButton>
<ElButton
v-if="hasAuth('iot_card:batch_recharge') || hasAuth('iot_card:network_distribution') || hasAuth('iot_card:network_recycle') || hasAuth('iot_card:change_package')"
type="info"
@contextmenu.prevent="showMoreMenu"
>
更多操作
</ElButton>
</template>
</ArtTableHeader>
@@ -595,6 +604,7 @@
import QRCode from 'qrcode'
import type { SearchFormItem } from '@/types'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { useAuth } from '@/composables/useAuth'
import { formatDateTime } from '@/utils/business/format'
import ArtMenuRight from '@/components/core/others/ArtMenuRight.vue'
import type { MenuItemType } from '@/components/core/others/ArtMenuRight.vue'
@@ -611,6 +621,7 @@
defineOptions({ name: 'StandaloneCardList' })
const { hasAuth } = useAuth()
const router = useRouter()
const loading = ref(false)
const allocateDialogVisible = ref(false)
@@ -1513,28 +1524,44 @@
}
// 更多操作菜单项配置
const moreMenuItems = computed((): MenuItemType[] => [
{
key: 'distribution',
label: '网卡分销'
},
{
key: 'recharge',
label: '批量充值'
},
{
key: 'recycle',
label: '网卡回收'
},
{
const moreMenuItems = computed((): MenuItemType[] => {
const items: MenuItemType[] = []
if (hasAuth('iot_card:network_distribution')) {
items.push({
key: 'distribution',
label: '网卡分销'
})
}
if (hasAuth('iot_card:batch_recharge')) {
items.push({
key: 'recharge',
label: '批量充值'
})
}
if (hasAuth('iot_card:network_recycle')) {
items.push({
key: 'recycle',
label: '网卡回收'
})
}
items.push({
key: 'download',
label: '批量下载'
},
{
key: 'changePackage',
label: '变更套餐'
})
if (hasAuth('iot_card:change_package')) {
items.push({
key: 'changePackage',
label: '变更套餐'
})
}
])
return items
})
// 卡操作菜单项配置
const cardOperationMenuItems = computed((): MenuItemType[] => [