feat:Configuration、Performance、MML权限按钮添加
This commit is contained in:
@@ -625,6 +625,7 @@ onMounted(() => {
|
|||||||
size="small"
|
size="small"
|
||||||
@click.prevent="fnCleanFrom"
|
@click.prevent="fnCleanFrom"
|
||||||
v-if="!!state.mmlSelect.param"
|
v-if="!!state.mmlSelect.param"
|
||||||
|
v-perms:has="['mmlManage:neOperate:reset']"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<ClearOutlined />
|
<ClearOutlined />
|
||||||
@@ -636,6 +637,7 @@ onMounted(() => {
|
|||||||
size="small"
|
size="small"
|
||||||
:loading="state.from.sendLoading"
|
:loading="state.from.sendLoading"
|
||||||
@click.prevent="fnSendMML"
|
@click.prevent="fnSendMML"
|
||||||
|
v-perms:has="['mmlManage:neOperate:execute']"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SendOutlined />
|
<SendOutlined />
|
||||||
|
|||||||
@@ -592,6 +592,7 @@ onMounted(() => {
|
|||||||
size="small"
|
size="small"
|
||||||
@click.prevent="fnCleanFrom"
|
@click.prevent="fnCleanFrom"
|
||||||
v-if="!!state.mmlSelect.param"
|
v-if="!!state.mmlSelect.param"
|
||||||
|
v-perms:has="['mmlManage:udmOperate:reset']"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<ClearOutlined />
|
<ClearOutlined />
|
||||||
@@ -603,6 +604,7 @@ onMounted(() => {
|
|||||||
size="small"
|
size="small"
|
||||||
:loading="state.from.sendLoading"
|
:loading="state.from.sendLoading"
|
||||||
@click.prevent="fnSendMML"
|
@click.prevent="fnSendMML"
|
||||||
|
v-perms:has="['mmlManage:udmOperate:execute']"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SendOutlined />
|
<SendOutlined />
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ onMounted(() => {
|
|||||||
<PageContainer>
|
<PageContainer>
|
||||||
<template #content> </template>
|
<template #content> </template>
|
||||||
<template #contentExtra>
|
<template #contentExtra>
|
||||||
<a-button type="primary" @click="fnBaseOpen">
|
<a-button type="primary" @click="fnBaseOpen" v-perms:has="['ne:neConfig:edit']">
|
||||||
Quickly Modify PLMN
|
Quickly Modify PLMN
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -640,6 +640,7 @@ onMounted(() => {
|
|||||||
!listState.confirmLoading &&
|
!listState.confirmLoading &&
|
||||||
!['read-only', 'read', 'ro'].includes(record.access)
|
!['read-only', 'read', 'ro'].includes(record.access)
|
||||||
"
|
"
|
||||||
|
v-perms:has="['ne:neConfig:edit']"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, onMounted, toRaw, defineAsyncComponent, ref } from 'vue';
|
import { reactive, onMounted, toRaw, defineAsyncComponent, ref, computed } from 'vue';
|
||||||
import { PageContainer } from 'antdv-pro-layout';
|
import { PageContainer } from 'antdv-pro-layout';
|
||||||
import { message, Modal } from 'ant-design-vue/es';
|
import { message, Modal } from 'ant-design-vue/es';
|
||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
@@ -12,6 +12,7 @@ import { listNeInfo, delNeInfo, stateNeInfo } from '@/api/ne/neInfo';
|
|||||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useNeOptions from './hooks/useNeOptions';
|
import useNeOptions from './hooks/useNeOptions';
|
||||||
|
import { hasPermissions } from '@/plugins/auth-user';
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { fnNeStart, fnNeRestart, fnNeStop, fnNeReload, fnNeLogFile } =
|
const { fnNeStart, fnNeRestart, fnNeStop, fnNeReload, fnNeLogFile } =
|
||||||
@@ -28,7 +29,15 @@ const BackConfModal = defineAsyncComponent(
|
|||||||
() => import('./components/BackConfModal.vue')
|
() => import('./components/BackConfModal.vue')
|
||||||
);
|
);
|
||||||
const backConf = ref(); // 引用句柄,取导出函数
|
const backConf = ref(); // 引用句柄,取导出函数
|
||||||
|
// 计算是否至少拥有一个批量操作权限
|
||||||
|
const hasAnyBatchPermission = computed(() => {
|
||||||
|
return hasPermissions(['ne:neInfo:logs']) ||
|
||||||
|
hasPermissions(['ne:neInfo:start']) ||
|
||||||
|
hasPermissions(['ne:neInfo:stop'])||
|
||||||
|
hasPermissions(['ne:neInfo:delete'])||
|
||||||
|
hasPermissions(['ne:neInfo:export'])||
|
||||||
|
hasPermissions(['ne:neInfo:import']);
|
||||||
|
});
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
let dict: {
|
let dict: {
|
||||||
/**网元信息状态 */
|
/**网元信息状态 */
|
||||||
@@ -498,7 +507,7 @@ onMounted(() => {
|
|||||||
<!-- 插槽-卡片左侧侧 -->
|
<!-- 插槽-卡片左侧侧 -->
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['ne:neInfo:add']">
|
||||||
<template #icon><PlusOutlined /></template>
|
<template #icon><PlusOutlined /></template>
|
||||||
{{ t('common.addText') }}
|
{{ t('common.addText') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -508,6 +517,7 @@ onMounted(() => {
|
|||||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||||
:loading="modalState.confirmLoading"
|
:loading="modalState.confirmLoading"
|
||||||
@click.prevent="fnRecordDelete('0')"
|
@click.prevent="fnRecordDelete('0')"
|
||||||
|
v-perms:has="['ne:neInfo:delete']"
|
||||||
>
|
>
|
||||||
<template #icon><DeleteOutlined /></template>
|
<template #icon><DeleteOutlined /></template>
|
||||||
{{ t('common.deleteText') }}
|
{{ t('common.deleteText') }}
|
||||||
@@ -588,6 +598,7 @@ onMounted(() => {
|
|||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnModalVisibleByEdit(record)"
|
@click.prevent="fnModalVisibleByEdit(record)"
|
||||||
|
v-perms:has="['ne:neInfo:edit']"
|
||||||
>
|
>
|
||||||
<template #icon><FormOutlined /></template>
|
<template #icon><FormOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -599,27 +610,28 @@ onMounted(() => {
|
|||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnRecordMore('restart', record)"
|
@click.prevent="fnRecordMore('restart', record)"
|
||||||
|
v-perms:has="['ne:neInfo:restart']"
|
||||||
>
|
>
|
||||||
<template #icon><UndoOutlined /></template>
|
<template #icon><UndoOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip placement="left">
|
<a-tooltip placement="left">
|
||||||
<template #title>{{ t('common.moreText') }}</template>
|
<template #title>{{ t('common.moreText') }}</template>
|
||||||
<a-dropdown placement="bottomRight" trigger="click">
|
<a-dropdown placement="bottomRight" trigger="click" v-if="hasAnyBatchPermission">
|
||||||
<a-button type="link">
|
<a-button type="link">
|
||||||
<template #icon><EllipsisOutlined /> </template>
|
<template #icon><EllipsisOutlined /> </template>
|
||||||
</a-button>
|
</a-button>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu @click="({ key }:any) => fnRecordMore(key, record)">
|
<a-menu @click="({ key }:any) => fnRecordMore(key, record)">
|
||||||
<a-menu-item key="log">
|
<a-menu-item key="log" v-if="hasPermissions(['ne:neInfo:logs'])">
|
||||||
<FileTextOutlined />
|
<FileTextOutlined />
|
||||||
{{ t('views.ne.common.log') }}
|
{{ t('views.ne.common.log') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="start">
|
<a-menu-item key="start" v-if="hasPermissions(['ne:neInfo:start'])">
|
||||||
<ThunderboltOutlined />
|
<ThunderboltOutlined />
|
||||||
{{ t('views.ne.common.start') }}
|
{{ t('views.ne.common.start') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="stop">
|
<a-menu-item key="stop" v-if="hasPermissions(['ne:neInfo:stop'])">
|
||||||
<CloseSquareOutlined />
|
<CloseSquareOutlined />
|
||||||
{{ t('views.ne.common.stop') }}
|
{{ t('views.ne.common.stop') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
@@ -632,7 +644,7 @@ onMounted(() => {
|
|||||||
<SyncOutlined />
|
<SyncOutlined />
|
||||||
{{ t('views.ne.common.reload') }}
|
{{ t('views.ne.common.reload') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="delete">
|
<a-menu-item key="delete" v-if="hasPermissions(['ne:neInfo:delete'])">
|
||||||
<DeleteOutlined />
|
<DeleteOutlined />
|
||||||
{{ t('common.deleteText') }}
|
{{ t('common.deleteText') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
@@ -644,11 +656,11 @@ onMounted(() => {
|
|||||||
{{ t('views.ne.common.oam') }}
|
{{ t('views.ne.common.oam') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<!-- 配置备份 -->
|
<!-- 配置备份 -->
|
||||||
<a-menu-item key="backConfExport">
|
<a-menu-item key="backConfExport" v-if="hasPermissions(['ne:neInfo:export'])">
|
||||||
<ExportOutlined />
|
<ExportOutlined />
|
||||||
{{ t('views.ne.neInfo.backConf.export') }}
|
{{ t('views.ne.neInfo.backConf.export') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="backConfImport">
|
<a-menu-item key="backConfImport" v-if="hasPermissions(['ne:neInfo:import'])">
|
||||||
<ImportOutlined />
|
<ImportOutlined />
|
||||||
{{ t('views.ne.neInfo.backConf.import') }}
|
{{ t('views.ne.neInfo.backConf.import') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|||||||
@@ -445,6 +445,7 @@ onMounted(() => {
|
|||||||
type="default"
|
type="default"
|
||||||
:loading="modalState.confirmLoading"
|
:loading="modalState.confirmLoading"
|
||||||
@click.prevent="fnRecordStateReload()"
|
@click.prevent="fnRecordStateReload()"
|
||||||
|
v-perms:has="['ne:neLicense:refresh']"
|
||||||
>
|
>
|
||||||
<template #icon><SyncOutlined /></template>
|
<template #icon><SyncOutlined /></template>
|
||||||
{{ t('views.ne.neLicense.reloadBatch') }}
|
{{ t('views.ne.neLicense.reloadBatch') }}
|
||||||
@@ -519,7 +520,7 @@ onMounted(() => {
|
|||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-tooltip placement="topRight">
|
<a-tooltip placement="topRight">
|
||||||
<template #title>{{ t('views.ne.neLicense.reload') }}</template>
|
<template #title>{{ t('views.ne.neLicense.reload') }}</template>
|
||||||
<a-button type="link" @click.prevent="fnRecordState(record)">
|
<a-button type="link" @click.prevent="fnRecordState(record)" v-perms:has="['ne:neLicense:refresh']">
|
||||||
<template #icon><SyncOutlined /> </template>
|
<template #icon><SyncOutlined /> </template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
@@ -528,6 +529,7 @@ onMounted(() => {
|
|||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnModalVisibleByEdit(record.id)"
|
@click.prevent="fnModalVisibleByEdit(record.id)"
|
||||||
|
v-perms:has="['ne:neLicense:edit']"
|
||||||
>
|
>
|
||||||
<template #icon><UploadOutlined /> </template>
|
<template #icon><UploadOutlined /> </template>
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@ onMounted(() => {
|
|||||||
@click.prevent="
|
@click.prevent="
|
||||||
() => (modalState.openByEdit = !modalState.openByEdit)
|
() => (modalState.openByEdit = !modalState.openByEdit)
|
||||||
"
|
"
|
||||||
|
v-perms:has="['ne:neVersion:upload']"
|
||||||
>
|
>
|
||||||
<template #icon><UploadOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
{{ t('views.ne.neSoftware.upload') }}
|
{{ t('views.ne.neSoftware.upload') }}
|
||||||
@@ -530,6 +531,7 @@ onMounted(() => {
|
|||||||
@click.prevent="
|
@click.prevent="
|
||||||
() => (modalState.openByMoreFile = !modalState.openByMoreFile)
|
() => (modalState.openByMoreFile = !modalState.openByMoreFile)
|
||||||
"
|
"
|
||||||
|
v-perms:has="['ne:neVersion:upload']"
|
||||||
>
|
>
|
||||||
<template #icon><UploadOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
<template v-if="tableState.selectedRowOne.neType">
|
<template v-if="tableState.selectedRowOne.neType">
|
||||||
@@ -546,6 +548,7 @@ onMounted(() => {
|
|||||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||||
:loading="modalState.confirmLoading"
|
:loading="modalState.confirmLoading"
|
||||||
@click.prevent="fnRecordUpgradeConfirm()"
|
@click.prevent="fnRecordUpgradeConfirm()"
|
||||||
|
v-perms:has="['ne:neVersion:upgrade']"
|
||||||
>
|
>
|
||||||
<template #icon><ThunderboltOutlined /></template>
|
<template #icon><ThunderboltOutlined /></template>
|
||||||
{{ t('views.ne.neVersion.upgradeBatch') }}
|
{{ t('views.ne.neVersion.upgradeBatch') }}
|
||||||
@@ -659,6 +662,7 @@ onMounted(() => {
|
|||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnRecordVersion('upgrade', record)"
|
@click.prevent="fnRecordVersion('upgrade', record)"
|
||||||
|
v-perms:has="['ne:neVersion:upgrade']"
|
||||||
>
|
>
|
||||||
<template #icon><ThunderboltOutlined /></template>
|
<template #icon><ThunderboltOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -670,6 +674,7 @@ onMounted(() => {
|
|||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnRecordVersion('rollback', record)"
|
@click.prevent="fnRecordVersion('rollback', record)"
|
||||||
|
v-perms:has="['ne:neVersion:previous']"
|
||||||
>
|
>
|
||||||
<template #icon><RollbackOutlined /></template>
|
<template #icon><RollbackOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ onMounted(() => {
|
|||||||
<a-card :bordered="false" :body-style="{ padding: '0px' }">
|
<a-card :bordered="false" :body-style="{ padding: '0px' }">
|
||||||
<!-- 插槽-卡片左侧侧 -->
|
<!-- 插槽-卡片左侧侧 -->
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['perfManage:customTarget:add']">
|
||||||
<template #icon><PlusOutlined /></template>
|
<template #icon><PlusOutlined /></template>
|
||||||
{{ t('common.addText') }}
|
{{ t('common.addText') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -604,13 +604,14 @@ onMounted(() => {
|
|||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnModalVisibleByEdit(record, record.id)"
|
@click.prevent="fnModalVisibleByEdit(record, record.id)"
|
||||||
|
v-perms:has="['perfManage:customTarget:edit']"
|
||||||
>
|
>
|
||||||
<template #icon><FormOutlined /></template>
|
<template #icon><FormOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>{{ t('common.deleteText') }}</template>
|
<template #title>{{ t('common.deleteText') }}</template>
|
||||||
<a-button type="link" @click.prevent="fnRecordDelete(record)">
|
<a-button type="link" @click.prevent="fnRecordDelete(record)" v-perms:has="['perfManage:customTarget:delete']">
|
||||||
<template #icon><DeleteOutlined /></template>
|
<template #icon><DeleteOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
|||||||
Reference in New Issue
Block a user