feat: 移除掉一些权限标识
This commit is contained in:
@@ -524,7 +524,7 @@ function fnSyncFileToFTP(row: Record<string, any>) {
|
||||
<template #title>
|
||||
{{ t('views.ne.neConfigBackup.backupModal.pushFileOper') }}
|
||||
</template>
|
||||
<a-button type="link" @click.prevent="fnSyncFileToFTP(record)" v-perms:has="['ne:neConfigBackup:cloud']">
|
||||
<a-button type="link" @click.prevent="fnSyncFileToFTP(record)" v-perms:has="['ne:neConfigBackup:ftpSync']">
|
||||
<template #icon><CloudServerOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, onMounted, toRaw, defineAsyncComponent, ref, computed } from 'vue';
|
||||
import {
|
||||
reactive,
|
||||
onMounted,
|
||||
toRaw,
|
||||
defineAsyncComponent,
|
||||
ref,
|
||||
computed,
|
||||
} from 'vue';
|
||||
import { PageContainer } from 'antdv-pro-layout';
|
||||
import { message, Modal } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
@@ -40,15 +47,6 @@ const QuickOAMModal = defineAsyncComponent(
|
||||
);
|
||||
const backConf = ref(); // 引用句柄,取导出函数
|
||||
|
||||
const hasAnyBatchPermission = computed(() => {
|
||||
return hasPermissions(['ne:neInfo:log']) ||
|
||||
hasPermissions(['ne:neInfo:start']) ||
|
||||
hasPermissions(['ne:neInfo:stop'])||
|
||||
hasPermissions(['ne:neInfo:delete'])||
|
||||
hasPermissions(['ne:neInfo:export'])||
|
||||
hasPermissions(['ne:neInfo:oam'])||
|
||||
hasPermissions(['ne:neInfo:import']);
|
||||
});
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
/**网元信息状态 */
|
||||
@@ -484,7 +482,11 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-space :size="8" align="center">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['ne:neInfo:add']">
|
||||
<a-button
|
||||
type="primary"
|
||||
@click.prevent="fnModalVisibleByEdit()"
|
||||
v-perms:has="['ne:neInfo:add']"
|
||||
>
|
||||
<template #icon><PlusOutlined /></template>
|
||||
{{ t('common.addText') }}
|
||||
</a-button>
|
||||
@@ -603,45 +605,63 @@ onMounted(() => {
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="left">
|
||||
<template #title>{{ t('common.moreText') }}</template>
|
||||
<a-dropdown placement="bottomRight" trigger="click" v-if="hasAnyBatchPermission">
|
||||
<a-dropdown placement="bottomRight" trigger="click">
|
||||
<a-button type="link">
|
||||
<template #icon><EllipsisOutlined /> </template>
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu @click="({ key }:any) => fnRecordMore(key, record)">
|
||||
<a-menu-item key="log" v-if="hasPermissions(['ne:neInfo:log'])">
|
||||
<a-menu-item key="log">
|
||||
<FileTextOutlined />
|
||||
{{ t('views.ne.common.log') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="start" v-if="hasPermissions(['ne:neInfo:start'])">
|
||||
<a-menu-item
|
||||
key="start"
|
||||
v-if="hasPermissions(['ne:neInfo:start'])"
|
||||
>
|
||||
<ThunderboltOutlined />
|
||||
{{ t('views.ne.common.start') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="stop" v-if="hasPermissions(['ne:neInfo:stop'])">
|
||||
<a-menu-item
|
||||
key="stop"
|
||||
v-if="hasPermissions(['ne:neInfo:stop'])"
|
||||
>
|
||||
<CloseSquareOutlined />
|
||||
{{ t('views.ne.common.stop') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="reload" v-if="false" >
|
||||
<a-menu-item key="reload" v-if="false">
|
||||
<SyncOutlined />
|
||||
{{ t('views.ne.common.reload') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="delete" v-if="hasPermissions(['ne:neInfo:delete'])">
|
||||
<a-menu-item
|
||||
key="delete"
|
||||
v-if="hasPermissions(['ne:neInfo:delete'])"
|
||||
>
|
||||
<DeleteOutlined />
|
||||
{{ t('common.deleteText') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item
|
||||
key="oam"
|
||||
v-if="!['OMC'].includes(record.neType) || hasPermissions(['ne:neInfo:oam'])"
|
||||
v-if="
|
||||
!['OMC'].includes(record.neType) ||
|
||||
hasPermissions(['ne:neInfo:oam'])
|
||||
"
|
||||
>
|
||||
<FileTextOutlined />
|
||||
{{ t('views.ne.common.oam') }}
|
||||
</a-menu-item>
|
||||
<!-- 配置备份 -->
|
||||
<a-menu-item key="backConfExport" v-if="hasPermissions(['ne:neInfo:export'])">
|
||||
<a-menu-item
|
||||
key="backConfExport"
|
||||
v-if="hasPermissions(['ne:neInfo:export'])"
|
||||
>
|
||||
<ExportOutlined />
|
||||
{{ t('views.ne.neInfo.backConf.export') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="backConfImport" v-if="hasPermissions(['ne:neInfo:import'])">
|
||||
<a-menu-item
|
||||
key="backConfImport"
|
||||
v-if="hasPermissions(['ne:neInfo:import'])"
|
||||
>
|
||||
<ImportOutlined />
|
||||
{{ t('views.ne.neInfo.backConf.import') }}
|
||||
</a-menu-item>
|
||||
|
||||
@@ -387,7 +387,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnSyncFileToFTP(record.fileName)"
|
||||
v-perms:has="['ne-data:backup-data:cloud']"
|
||||
v-perms:has="['ne-data:backup-data:ftpSync']"
|
||||
>
|
||||
<template #icon><CloudServerOutlined /></template>
|
||||
</a-button>
|
||||
|
||||
@@ -819,7 +819,11 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-flex wrap="wrap" gap="small">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neData:udm-auth:add']">
|
||||
<a-button
|
||||
type="primary"
|
||||
@click.prevent="fnModalVisibleByEdit()"
|
||||
v-perms:has="['neData:udm-auth:add']"
|
||||
>
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -858,7 +862,11 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-auth:import']">
|
||||
<a-button
|
||||
type="dashed"
|
||||
@click.prevent="fnModalUploadImportOpen"
|
||||
v-perms:has="['neData:udm-auth:import']"
|
||||
>
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.neUser.auth.import') }}
|
||||
</a-button>
|
||||
@@ -869,7 +877,6 @@ onMounted(() => {
|
||||
ok-text="TXT"
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
v-if="false"
|
||||
>
|
||||
<a-button type="dashed" v-perms:has="['neData:udm-auth:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
@@ -896,7 +903,6 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnRecordExport('txt')"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
v-if="false"
|
||||
>
|
||||
<a-button
|
||||
type="default"
|
||||
|
||||
@@ -719,7 +719,6 @@ onMounted(() => {
|
||||
ghost
|
||||
size="small"
|
||||
@click.prevent="fnModalVisibleByVive(record.id)"
|
||||
v-perms:has="['traceManage:pcap:textlog']"
|
||||
>
|
||||
<template #icon><FileTextOutlined /> </template>
|
||||
</a-button>
|
||||
|
||||
@@ -62,9 +62,9 @@ function fnUpload(up: UploadRequestOption) {
|
||||
:before-upload="fnBeforeUpload"
|
||||
:custom-request="fnUpload"
|
||||
>
|
||||
<a-button type="primary" v-perms:has="['traceManage:tshark:edit']"> Upload </a-button>
|
||||
<a-button type="primary"> Upload </a-button>
|
||||
</a-upload>
|
||||
<a-button @click="handleLoadExample()" v-perms:has="['traceManage:tshark:example']">Example</a-button>
|
||||
<a-button @click="handleLoadExample()">Example</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
<!-- 插槽-卡片右侧 -->
|
||||
|
||||
Reference in New Issue
Block a user