Merge branch 'main-v2' into lite-ba

This commit is contained in:
TsMask
2025-09-28 20:18:28 +08:00
10 changed files with 220 additions and 59 deletions

View File

@@ -23,9 +23,11 @@ import {
importUDMAuth,
resetUDMAuth,
listUDMAuth,
exportUDMDecAuth,
} from '@/api/neData/udm_auth';
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
@@ -117,6 +119,16 @@ let tableColumns = ref<ColumnsType>([
align: 'center',
width: 100,
},
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{
title: t('common.operate'),
key: 'imsi',
@@ -521,6 +533,25 @@ function fnExportList(type: string) {
});
}
/** UDM鉴权用户导出DecAuth */
function fnExportDec() {
const neId = queryParams.neId;
if (!neId) return;
const hide = message.loading(t('common.loading'), 0);
exportUDMDecAuth(neId)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success(t('common.msgSuccess', { msg: t('common.export') }), 3);
saveAs(res.data, `UDMAuth_dec_${Date.now()}.txt`);
} else {
message.error(`${res.msg}`, 3);
}
})
.finally(() => {
hide();
});
}
/**重新加载数据 */
function fnLoadData() {
const neId = queryParams.neId;
@@ -883,6 +914,14 @@ onMounted(() => {
{{ t('views.neUser.auth.export') }}
</a-button>
</a-popconfirm>
<a-button
type="dashed"
@click="fnExportDec()"
v-perms:has="['neData:udm-auth:export-dec']"
>
<template #icon><ExportOutlined /></template>
Export DecData
</a-button>
<a-button
type="default"

View File

@@ -27,6 +27,7 @@ import {
import { getNeConfigData, addNeConfigData } from '@/api/ne/neConfig';
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
@@ -159,6 +160,16 @@ let tableColumns = ref<ColumnsType>([
minWidth: 150,
maxWidth: 500,
},
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{
title: t('common.operate'),
key: 'imsi',
@@ -1331,7 +1342,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-flex wrap="wrap" gap="small">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neData:udm-sub:add']">
<a-button
type="primary"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['neData:udm-sub:add']"
>
<template #icon>
<PlusOutlined />
</template>
@@ -1372,7 +1387,11 @@ onMounted(() => {
</a-button>
</a-popconfirm>
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-sub:import']">
<a-button
type="dashed"
@click.prevent="fnModalUploadImportOpen"
v-perms:has="['neData:udm-sub:import']"
>
<template #icon>
<ImportOutlined />
</template>

View File

@@ -29,6 +29,7 @@ import { saveAs } from 'file-saver';
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
import { hasPermissions } from '@/plugins/auth-user';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
@@ -51,9 +52,10 @@ let queryParams = reactive({
});
const hasAnyBatchPermission = computed(() => {
return hasPermissions(['neData:udm-voip:add']) ||
hasPermissions(['neData:udm-voip:delete']) ;
return (
hasPermissions(['neData:udm-voip:add']) ||
hasPermissions(['neData:udm-voip:delete'])
);
});
/**查询参数重置 */
@@ -101,6 +103,16 @@ let tableColumns = ref<TableColumnsType>([
minWidth: 100,
maxWidth: 300,
},
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{
title: t('common.operate'),
key: 'id',
@@ -668,7 +680,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neData:udm-voip:add']">
<a-button
type="primary"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['neData:udm-voip:add']"
>
<template #icon>
<PlusOutlined />
</template>
@@ -694,11 +710,17 @@ onMounted(() => {
</a-button>
<template #overlay>
<a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)">
<a-menu-item key="add" v-if="hasPermissions(['neData:udm-voip: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" v-if="hasPermissions(['neData:udm-voip:delete'])">
<a-menu-item
key="delete"
v-if="hasPermissions(['neData:udm-voip:delete'])"
>
<DeleteOutlined />
{{ t('views.neData.common.batchDelText') }}
</a-menu-item>
@@ -726,7 +748,11 @@ onMounted(() => {
</a-button>
</a-popconfirm>
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-voip:import']">
<a-button
type="dashed"
@click.prevent="fnModalUploadImportOpen"
v-perms:has="['neData:udm-voip:import']"
>
<template #icon><ImportOutlined /></template>
{{ t('common.import') }}
</a-button>

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { reactive, ref, onMounted, toRaw ,computed} from 'vue';
import { reactive, ref, onMounted, toRaw, computed } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import { ProModal } from 'antdv-pro-modal';
import {
@@ -29,11 +29,14 @@ import {
resetUDMVolteIMS,
} from '@/api/neData/udm_volte_ims';
import { hasPermissions } from '@/plugins/auth-user';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
const hasAnyBatchPermission = computed(() => {
return hasPermissions(['neData:udm-volte:add']) ||
hasPermissions(['neData:udm-volte:delete']) ;
return (
hasPermissions(['neData:udm-volte:add']) ||
hasPermissions(['neData:udm-volte:delete'])
);
});
/**字典数据 */
let dict: {
@@ -150,6 +153,16 @@ let tableColumns = ref<TableColumnsType>([
minWidth: 250,
maxWidth: 400,
},
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{
title: t('common.operate'),
key: 'id',
@@ -762,7 +775,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neData:udm-volte:add']">
<a-button
type="primary"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['neData:udm-volte:add']"
>
<template #icon>
<PlusOutlined />
</template>
@@ -788,11 +805,17 @@ onMounted(() => {
</a-button>
<template #overlay>
<a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)">
<a-menu-item key="add" v-if="hasPermissions(['neData:udm-volte: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" v-if="hasPermissions(['neData:udm-volte:delete'])">
<a-menu-item
key="delete"
v-if="hasPermissions(['neData:udm-volte:delete'])"
>
<DeleteOutlined />
{{ t('views.neData.common.batchDelText') }}
</a-menu-item>
@@ -820,7 +843,11 @@ onMounted(() => {
</a-button>
</a-popconfirm>
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-volte:import']">
<a-button
type="dashed"
@click.prevent="fnModalUploadImportOpen"
v-perms:has="['neData:udm-volte:import']"
>
<template #icon><ImportOutlined /></template>
{{ t('common.import') }}
</a-button>