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 +