Merge branch 'main-v2' into lite-ba
This commit is contained in:
@@ -21,27 +21,27 @@ let sourceState = reactive({
|
||||
/**文件列表 */
|
||||
list: [
|
||||
{
|
||||
value: '/auth',
|
||||
value: '/udm/auth',
|
||||
label: t('views.neData.backupData.auth'),
|
||||
path: '/usr/local/omc/backup/udm_data',
|
||||
path: '/usr/local/omc/backup',
|
||||
neType: 'UDM',
|
||||
},
|
||||
{
|
||||
value: '/sub',
|
||||
value: '/udm/sub',
|
||||
label: t('views.neData.backupData.sub'),
|
||||
path: '/usr/local/omc/backup/udm_data',
|
||||
path: '/usr/local/omc/backup',
|
||||
neType: 'UDM',
|
||||
},
|
||||
{
|
||||
value: '/voip',
|
||||
value: '/udm/voip',
|
||||
label: t('views.neData.backupData.voip'),
|
||||
path: '/usr/local/omc/backup/udm_data',
|
||||
path: '/usr/local/omc/backup',
|
||||
neType: 'UDM',
|
||||
},
|
||||
{
|
||||
value: '/volte',
|
||||
value: '/udm/volte',
|
||||
label: t('views.neData.backupData.volte'),
|
||||
path: '/usr/local/omc/backup/udm_data',
|
||||
path: '/usr/local/omc/backup',
|
||||
neType: 'UDM+IMS',
|
||||
},
|
||||
],
|
||||
@@ -353,7 +353,11 @@ onMounted(() => {
|
||||
<template #title>
|
||||
{{ t('views.ne.neConfigBackup.backupModal.title') }}
|
||||
</template>
|
||||
<a-button type="text" @click.prevent="fnFTPModalOpen()">
|
||||
<a-button
|
||||
type="text"
|
||||
@click.prevent="fnFTPModalOpen()"
|
||||
v-perms:has="['ne-data:backup-data:ftp']"
|
||||
>
|
||||
<template #icon><DeliveredProcedureOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
@@ -387,6 +391,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnSyncFileToFTP(record.fileName)"
|
||||
v-perms:has="['ne-data:backup-data:ftpSync']"
|
||||
>
|
||||
<template #icon><CloudServerOutlined /></template>
|
||||
</a-button>
|
||||
@@ -397,6 +402,7 @@ onMounted(() => {
|
||||
type="link"
|
||||
:loading="downLoading"
|
||||
@click.prevent="fnDownloadFile(record)"
|
||||
v-perms:has="['ne-data:backup-data:download']"
|
||||
>
|
||||
<template #icon><DownloadOutlined /></template>
|
||||
</a-button>
|
||||
@@ -407,6 +413,7 @@ onMounted(() => {
|
||||
type="link"
|
||||
:loading="delLoading"
|
||||
@click.prevent="fnRecordDelete(record)"
|
||||
v-perms:has="['ne-data:backup-data:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
</a-button>
|
||||
|
||||
@@ -202,6 +202,8 @@ function fnExportList() {
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
const querys = toRaw(queryParams);
|
||||
querys.pageNum = 1;
|
||||
querys.pageSize = tablePagination.total;
|
||||
exportNBState(querys)
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
|
||||
@@ -505,6 +505,8 @@ function fnExportList(type: string) {
|
||||
const neId = queryParams.neId;
|
||||
if (!neId) return;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = tablePagination.total;
|
||||
exportUDMAuth(Object.assign({ type: type }, queryParams))
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
@@ -817,7 +819,11 @@ 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="['neData:udm-auth:add']"
|
||||
>
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -829,6 +835,7 @@ onMounted(() => {
|
||||
danger
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch()"
|
||||
v-perms:has="['neData:udm-auth:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -848,13 +855,18 @@ onMounted(() => {
|
||||
danger
|
||||
:disabled="modalState.loadDataLoading"
|
||||
:loading="modalState.loadDataLoading"
|
||||
v-perms:has="['neData:udm-auth:reload']"
|
||||
>
|
||||
<template #icon><SyncOutlined /></template>
|
||||
{{ t('views.neUser.auth.loadData') }}
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<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>
|
||||
@@ -865,9 +877,8 @@ onMounted(() => {
|
||||
ok-text="TXT"
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
v-if="false"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neData:udm-auth:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.neUser.auth.export') }}
|
||||
</a-button>
|
||||
@@ -879,6 +890,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.loadDataLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neData:udm-auth:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neUser.auth.checkDel') }}
|
||||
@@ -891,11 +903,11 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnRecordExport('txt')"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
v-if="false"
|
||||
>
|
||||
<a-button
|
||||
type="default"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
v-perms:has="['neData:udm-auth:export']"
|
||||
>
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.neUser.auth.checkExport') }}
|
||||
@@ -980,6 +992,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByEdit(record)"
|
||||
v-perms:has="['neData:udm-auth:edit']"
|
||||
>
|
||||
<template #icon>
|
||||
<FormOutlined />
|
||||
@@ -991,6 +1004,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.imsi)"
|
||||
v-perms:has="['neData:udm-auth:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
|
||||
@@ -986,6 +986,8 @@ function fnExportList(type: string) {
|
||||
const neId = queryParams.neId;
|
||||
if (!neId) return;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = tablePagination.total;
|
||||
exportUDMSub(Object.assign({ type: type }, queryParams))
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
@@ -1329,7 +1331,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="['neData:udm-sub:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -1341,6 +1343,7 @@ onMounted(() => {
|
||||
danger
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch()"
|
||||
v-perms:has="['neData:udm-sub:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -1360,6 +1363,7 @@ onMounted(() => {
|
||||
danger
|
||||
:disabled="modalState.loadDataLoading"
|
||||
:loading="modalState.loadDataLoading"
|
||||
v-perms:has="['neData:udm-sub:reload']"
|
||||
>
|
||||
<template #icon>
|
||||
<SyncOutlined />
|
||||
@@ -1368,7 +1372,7 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-sub:import']">
|
||||
<template #icon>
|
||||
<ImportOutlined />
|
||||
</template>
|
||||
@@ -1382,7 +1386,7 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neData:udm-sub:export']">
|
||||
<template #icon>
|
||||
<ExportOutlined />
|
||||
</template>
|
||||
@@ -1396,6 +1400,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.loadDataLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neData:udm-sub:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
@@ -1414,6 +1419,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="default"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
v-perms:has="['neData:udm-sub:export']"
|
||||
>
|
||||
<template #icon>
|
||||
<ExportOutlined />
|
||||
@@ -1519,6 +1525,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByEdit(record.imsi)"
|
||||
v-perms:has="['neData:udm-sub:edit']"
|
||||
>
|
||||
<template #icon>
|
||||
<FormOutlined />
|
||||
@@ -1530,6 +1537,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.imsi)"
|
||||
v-perms:has="['neData:udm-sub: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 {
|
||||
@@ -28,6 +28,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
import { getNeViewFile } from '@/api/tool/neFile';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
/**网元参数 */
|
||||
@@ -49,6 +50,12 @@ let queryParams = reactive({
|
||||
pageSize: 20,
|
||||
});
|
||||
|
||||
const hasAnyBatchPermission = computed(() => {
|
||||
return hasPermissions(['neData:udm-voip:add']) ||
|
||||
hasPermissions(['neData:udm-voip:delete']) ;
|
||||
|
||||
});
|
||||
|
||||
/**查询参数重置 */
|
||||
function fnQueryReset() {
|
||||
queryParams = Object.assign(queryParams, {
|
||||
@@ -363,6 +370,8 @@ function fnExportList(type: string) {
|
||||
const neId = queryParams.neId;
|
||||
if (!neId) return;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = tablePagination.total;
|
||||
exportUDMVOIP(Object.assign({ type: type }, queryParams))
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
@@ -659,7 +668,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:udm-voip:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -672,23 +681,24 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neData:udm-voip:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neData.common.checkDel') }}
|
||||
</a-button>
|
||||
|
||||
<a-dropdown trigger="click">
|
||||
<a-dropdown trigger="click" v-if="hasAnyBatchPermission">
|
||||
<a-button>
|
||||
{{ t('views.neData.common.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(['neData:udm-voip:add'])">
|
||||
<PlusOutlined />
|
||||
{{ t('views.neData.common.batchAddText') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="delete">
|
||||
<a-menu-item key="delete" v-if="hasPermissions(['neData:udm-voip:delete'])">
|
||||
<DeleteOutlined />
|
||||
{{ t('views.neData.common.batchDelText') }}
|
||||
</a-menu-item>
|
||||
@@ -709,13 +719,14 @@ onMounted(() => {
|
||||
danger
|
||||
:disabled="modalState.loadDataLoading"
|
||||
:loading="modalState.loadDataLoading"
|
||||
v-perms:has="['neData:udm-voip:reload']"
|
||||
>
|
||||
<template #icon><SyncOutlined /></template>
|
||||
{{ t('views.neData.common.loadData') }}
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-voip:import']">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('common.import') }}
|
||||
</a-button>
|
||||
@@ -726,7 +737,7 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neData:udm-voip:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('common.export') }}
|
||||
</a-button>
|
||||
@@ -816,6 +827,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.username)"
|
||||
v-perms:has="['neData:udm-voip: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 {
|
||||
@@ -28,8 +28,13 @@ import {
|
||||
listUDMVolteIMS,
|
||||
resetUDMVolteIMS,
|
||||
} from '@/api/neData/udm_volte_ims';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const hasAnyBatchPermission = computed(() => {
|
||||
return hasPermissions(['neData:udm-volte:add']) ||
|
||||
hasPermissions(['neData:udm-volte:delete']) ;
|
||||
});
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
/**Tag标签类型 0=VoIP, 1=VoLTE */
|
||||
@@ -442,6 +447,8 @@ function fnExportList(type: string) {
|
||||
const neId = queryParams.neId;
|
||||
if (!neId) return;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
queryParams.pageNum = 1;
|
||||
queryParams.pageSize = tablePagination.total;
|
||||
exportUDMVolteIMS(Object.assign({ type: type }, queryParams))
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
@@ -449,7 +456,7 @@ function fnExportList(type: string) {
|
||||
content: t('common.operateOk'),
|
||||
duration: 2,
|
||||
});
|
||||
saveAs(res.data, `UDM_VOLTE_${neId}_${Date.now()}.${type}`);
|
||||
saveAs(res.data, `UDM_VoLTE_${neId}_${Date.now()}.${type}`);
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
@@ -755,7 +762,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:udm-volte:add']">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -768,23 +775,24 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
v-perms:has="['neData:udm-volte:delete']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neData.common.checkDel') }}
|
||||
</a-button>
|
||||
|
||||
<a-dropdown trigger="click">
|
||||
<a-dropdown trigger="click" v-if="hasAnyBatchPermission">
|
||||
<a-button>
|
||||
{{ t('views.neData.common.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(['neData:udm-volte:add'])">
|
||||
<PlusOutlined />
|
||||
{{ t('views.neData.common.batchAddText') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="delete">
|
||||
<a-menu-item key="delete" v-if="hasPermissions(['neData:udm-volte:delete'])">
|
||||
<DeleteOutlined />
|
||||
{{ t('views.neData.common.batchDelText') }}
|
||||
</a-menu-item>
|
||||
@@ -805,13 +813,14 @@ onMounted(() => {
|
||||
danger
|
||||
:disabled="modalState.loadDataLoading"
|
||||
:loading="modalState.loadDataLoading"
|
||||
v-perms:has="['neData:udm-volte:reload']"
|
||||
>
|
||||
<template #icon><SyncOutlined /></template>
|
||||
{{ t('views.neData.common.loadData') }}
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-volte:import']">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('common.import') }}
|
||||
</a-button>
|
||||
@@ -822,7 +831,7 @@ onMounted(() => {
|
||||
ok-type="default"
|
||||
@confirm="fnExportList('txt')"
|
||||
>
|
||||
<a-button type="dashed">
|
||||
<a-button type="dashed" v-perms:has="['neData:udm-volte:export']">
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('common.export') }}
|
||||
</a-button>
|
||||
@@ -915,6 +924,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.id)"
|
||||
v-perms:has="['neData:udm-volte:delete']"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
|
||||
Reference in New Issue
Block a user