From b1d0771d567241955f67a32e3ff118675916d7bf Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Sun, 28 Sep 2025 19:31:42 +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/neData/udm-auth/index.vue | 28 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/src/api/neData/udm_auth.ts b/src/api/neData/udm_auth.ts index 1f20dd42..93ed0b69 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/neData/udm-auth/index.vue b/src/views/neData/udm-auth/index.vue index fa70901e..cd5a63eb 100644 --- a/src/views/neData/udm-auth/index.vue +++ b/src/views/neData/udm-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'; @@ -532,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; @@ -894,6 +914,14 @@ onMounted(() => { {{ t('views.neUser.auth.export') }} + + + Export DecData +