From 4bb5a99b37287c3a63155e7782273b6fa8fb5a6e Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Sun, 28 Sep 2025 18:16:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20UDM-auth=E6=95=B0=E6=8D=AE=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/neData/udm_auth.ts | 14 ++++++++++ src/views/neUser/auth/index.vue | 47 +++++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/src/api/neData/udm_auth.ts b/src/api/neData/udm_auth.ts index 17faa266..14b50f59 100644 --- a/src/api/neData/udm_auth.ts +++ b/src/api/neData/udm_auth.ts @@ -140,3 +140,17 @@ export function exportUDMAuth(data: Record) { timeout: 180_000, }); } + +/** + * UDM鉴权用户导出DecAuth + * @param neId 网元ID + * @returns bolb + */ +export function exportUDMDecAuth(neId: string) { + return request({ + url: `/neData/udm/auth/export-dec?neId=${neId}`, + method: 'get', + responseType: 'blob', + timeout: 180_000, + }); +} diff --git a/src/views/neUser/auth/index.vue b/src/views/neUser/auth/index.vue index 22a6fbd1..210af728 100644 --- a/src/views/neUser/auth/index.vue +++ b/src/views/neUser/auth/index.vue @@ -23,6 +23,7 @@ import { importUDMAuth, resetUDMAuth, listUDMAuth, + exportUDMDecAuth, } from '@/api/neData/udm_auth'; import { uploadFile } from '@/api/tool/file'; import { getNeViewFile } from '@/api/tool/neFile'; @@ -530,6 +531,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; @@ -812,7 +832,7 @@ onMounted(() => { - + @@ -835,7 +855,11 @@ onMounted(() => {