feat:BA UE部分按钮权限分配
This commit is contained in:
@@ -728,7 +728,7 @@ onMounted(() => {
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item>
|
||||
<a-space :size="8">
|
||||
<a-button type="primary" @click.prevent="fnGetList()">
|
||||
<a-button type="primary" @click.prevent="fnGetList()" v-perms:has="['nedata:basestation:search']">
|
||||
<template #icon><SearchOutlined /></template>
|
||||
{{ t('common.search') }}
|
||||
</a-button>
|
||||
@@ -747,7 +747,7 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-space :size="8" align="center">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['nedata:basestation:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -758,6 +758,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length != 1"
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnModalVisibleByEdit('0')"
|
||||
v-perms:has="['nedata:basestation:edit']"
|
||||
>
|
||||
<template #icon><FormOutlined /></template>
|
||||
{{ t('common.editText') }}
|
||||
@@ -768,19 +769,20 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['nedata:basestation:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('common.deleteText') }}
|
||||
</a-button>
|
||||
<a-button type="dashed" @click.prevent="fnModalImportOpen()">
|
||||
<a-button type="dashed" @click.prevent="fnModalImportOpen()" v-perms:has="['nedata:basestation:import']">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('common.import') }}
|
||||
</a-button>
|
||||
<a-button type="dashed" @click.prevent="fnExportList()">
|
||||
<a-button type="dashed" @click.prevent="fnExportList()" v-perms:has="['nedata:basestation:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('common.export') }}
|
||||
</a-button>
|
||||
<a-button type="default" @click.prevent="fnHistoryView()">
|
||||
<a-button type="default" @click.prevent="fnHistoryView()" v-perms:has="['nedata:basestation:history']">
|
||||
<template #icon><ContainerOutlined /></template>
|
||||
{{ t('views.neData.baseStation.history') }}
|
||||
</a-button>
|
||||
|
||||
@@ -812,7 +812,7 @@ onMounted(() => {
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item>
|
||||
<a-space :size="8">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)" >
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
@@ -835,7 +835,7 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-flex wrap="wrap" gap="small">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neUser:auth:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -847,6 +847,7 @@ onMounted(() => {
|
||||
danger
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch()"
|
||||
v-perms:has="['neUser:auth:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -872,7 +873,7 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neUser:auth:import']">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.neUser.auth.import') }}
|
||||
</a-button>
|
||||
@@ -896,6 +897,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.loadDataLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neUser:auth:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neUser.auth.checkDel') }}
|
||||
@@ -995,6 +997,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByEdit(record)"
|
||||
v-perms:has="['neUser:auth:edit']"
|
||||
>
|
||||
<template #icon>
|
||||
<FormOutlined />
|
||||
@@ -1006,6 +1009,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.imsi)"
|
||||
v-perms:has="['neUser:auth:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
|
||||
@@ -921,7 +921,7 @@ onMounted(() => {
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item>
|
||||
<a-space :size="8">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)" >
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
@@ -944,7 +944,7 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-flex wrap="wrap" gap="small">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neUser:imsUDM:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -956,6 +956,7 @@ onMounted(() => {
|
||||
danger
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch()"
|
||||
v-perms:has="['neUser:imsUDM:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -981,7 +982,7 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neUser:imsUDM:import']">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.neUser.auth.import') }}
|
||||
</a-button>
|
||||
@@ -993,7 +994,7 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neUser:imsUDM:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.neUser.auth.export') }}
|
||||
</a-button>
|
||||
@@ -1005,6 +1006,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.loadDataLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neUser:imsUDM:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neUser.auth.checkDel') }}
|
||||
@@ -1021,6 +1023,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="default"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
v-perms:has="['neUser:imsUDM:export']"
|
||||
>
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.neUser.auth.checkExport') }}
|
||||
@@ -1105,6 +1108,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.id)"
|
||||
v-perms:has="['neUser:imsUDM:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, toRaw } from 'vue';
|
||||
import { reactive, ref, onMounted, toRaw, computed } from 'vue';
|
||||
import { PageContainer } from 'antdv-pro-layout';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import { message, Modal, Form, TableColumnsType } from 'ant-design-vue/es';
|
||||
@@ -24,8 +24,16 @@ import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { uploadFileToNE } from '@/api/tool/file';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
const { t } = useI18n();
|
||||
|
||||
// 计算是否至少拥有一个批量操作权限
|
||||
const hasAnyBatchPermission = computed(() => {
|
||||
return hasPermissions(['neUser:pcf:add']) ||
|
||||
hasPermissions(['neUser:pcf:edit']) ||
|
||||
hasPermissions(['neUser:pcf:delete']);
|
||||
});
|
||||
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -727,7 +735,7 @@ onMounted(() => {
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item>
|
||||
<a-space :size="8">
|
||||
<a-button type="primary" @click.prevent="fnGetList()">
|
||||
<a-button type="primary" @click.prevent="fnGetList()" >
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
@@ -750,7 +758,7 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-space :size="8" align="center">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neUser:pcf:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -763,27 +771,28 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neUser:pcf:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neUser.pcf.checkDel') }}
|
||||
</a-button>
|
||||
|
||||
<a-dropdown trigger="click">
|
||||
<a-dropdown trigger="click" v-if="hasAnyBatchPermission">
|
||||
<a-button>
|
||||
{{ t('views.neUser.pcf.batchOper') }}
|
||||
<DownOutlined />
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)">
|
||||
<a-menu-item key="add">
|
||||
<a-menu-item key="add" v-if="hasPermissions(['neUser:pcf:add'])">
|
||||
<PlusOutlined />
|
||||
{{ t('views.neUser.pcf.batchAddText') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="update">
|
||||
<a-menu-item key="update" v-if="hasPermissions(['neUser:pcf:edit'])">
|
||||
<FormOutlined />
|
||||
{{ t('views.neUser.pcf.batchUpdateText') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="delete">
|
||||
<a-menu-item key="delete" v-if="hasPermissions(['neUser:pcf:delete'])">
|
||||
<DeleteOutlined />
|
||||
{{ t('views.neUser.pcf.batchDelText') }}
|
||||
</a-menu-item>
|
||||
@@ -791,7 +800,7 @@ onMounted(() => {
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neUser:pcf:import']">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.neUser.pcf.import') }}
|
||||
</a-button>
|
||||
@@ -802,7 +811,7 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neUser:pcf:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.neUser.pcf.export') }}
|
||||
</a-button>
|
||||
@@ -891,6 +900,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByEdit(record)"
|
||||
v-perms:has="['neUser:pcf:edit']"
|
||||
>
|
||||
<template #icon>
|
||||
<FormOutlined />
|
||||
@@ -902,6 +912,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.imsi)"
|
||||
v-perms:has="['neUser:pcf:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
|
||||
@@ -1300,7 +1300,7 @@ onMounted(() => {
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item>
|
||||
<a-space :size="8">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)" >
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
@@ -1323,7 +1323,7 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-flex wrap="wrap" gap="small">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neUser:sub:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -1335,6 +1335,7 @@ onMounted(() => {
|
||||
danger
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch()"
|
||||
v-perms:has="['neUser:sub:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -1362,7 +1363,7 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neUser:sub:import']">
|
||||
<template #icon>
|
||||
<ImportOutlined />
|
||||
</template>
|
||||
@@ -1376,7 +1377,7 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neUser:auth:export']">
|
||||
<template #icon>
|
||||
<ExportOutlined />
|
||||
</template>
|
||||
@@ -1390,6 +1391,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.loadDataLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neUser:sub:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -1408,6 +1410,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="default"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
v-perms:has="['neUser:sub:export']"
|
||||
>
|
||||
<template #icon>
|
||||
<ExportOutlined />
|
||||
@@ -1513,6 +1516,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByEdit(record.imsi)"
|
||||
v-perms:has="['neUser:sub:edit']"
|
||||
>
|
||||
<template #icon>
|
||||
<FormOutlined />
|
||||
@@ -1524,6 +1528,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.imsi)"
|
||||
v-perms:has="['neUser:aub:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
|
||||
@@ -737,7 +737,7 @@ onMounted(() => {
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item>
|
||||
<a-space :size="8">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)">
|
||||
<a-button type="primary" @click.prevent="fnGetList(1)" >
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
@@ -760,7 +760,7 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-flex wrap="wrap" gap="small">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neUser:voip:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -772,6 +772,7 @@ onMounted(() => {
|
||||
danger
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch()"
|
||||
v-perms:has="['neUser:voip:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -797,7 +798,7 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neUser:voip:import']">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.neUser.auth.import') }}
|
||||
</a-button>
|
||||
@@ -809,7 +810,7 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neUser:voip:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.neUser.auth.export') }}
|
||||
</a-button>
|
||||
@@ -821,6 +822,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.loadDataLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neUser:voip:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neUser.auth.checkDel') }}
|
||||
@@ -837,6 +839,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="default"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
v-perms:has="['neUser:voip:export']"
|
||||
>
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.neUser.auth.checkExport') }}
|
||||
@@ -921,6 +924,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.userName)"
|
||||
v-perms:has="['neUser:voip:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
|
||||
Reference in New Issue
Block a user