feat: UDM-auth数据导出按钮权限定义
This commit is contained in:
@@ -140,3 +140,17 @@ export function exportUDMAuth(data: Record<string, any>) {
|
|||||||
timeout: 180_000,
|
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,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import {
|
|||||||
importUDMAuth,
|
importUDMAuth,
|
||||||
resetUDMAuth,
|
resetUDMAuth,
|
||||||
listUDMAuth,
|
listUDMAuth,
|
||||||
|
exportUDMDecAuth,
|
||||||
} from '@/api/neData/udm_auth';
|
} from '@/api/neData/udm_auth';
|
||||||
import { uploadFile } from '@/api/tool/file';
|
import { uploadFile } from '@/api/tool/file';
|
||||||
import { getNeViewFile } from '@/api/tool/neFile';
|
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() {
|
function fnLoadData() {
|
||||||
const neId = queryParams.neId;
|
const neId = queryParams.neId;
|
||||||
@@ -812,7 +832,7 @@ onMounted(() => {
|
|||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-space :size="8">
|
<a-space :size="8">
|
||||||
<a-button type="primary" @click.prevent="fnGetList(1)" >
|
<a-button type="primary" @click.prevent="fnGetList(1)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SearchOutlined />
|
<SearchOutlined />
|
||||||
</template>
|
</template>
|
||||||
@@ -835,7 +855,11 @@ onMounted(() => {
|
|||||||
<!-- 插槽-卡片左侧侧 -->
|
<!-- 插槽-卡片左侧侧 -->
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-flex wrap="wrap" gap="small">
|
<a-flex wrap="wrap" gap="small">
|
||||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neUser:auth:add']">
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
@click.prevent="fnModalVisibleByEdit()"
|
||||||
|
v-perms:has="['neUser:auth:add']"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusOutlined />
|
<PlusOutlined />
|
||||||
</template>
|
</template>
|
||||||
@@ -874,7 +898,11 @@ onMounted(() => {
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
|
||||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neUser:auth:import']">
|
<a-button
|
||||||
|
type="dashed"
|
||||||
|
@click.prevent="fnModalUploadImportOpen"
|
||||||
|
v-perms:has="['neUser:auth:import']"
|
||||||
|
>
|
||||||
<template #icon><ImportOutlined /></template>
|
<template #icon><ImportOutlined /></template>
|
||||||
{{ t('views.neUser.auth.import') }}
|
{{ t('views.neUser.auth.import') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -891,6 +919,14 @@ onMounted(() => {
|
|||||||
{{ t('views.neUser.auth.export') }}
|
{{ t('views.neUser.auth.export') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
<a-button
|
||||||
|
type="dashed"
|
||||||
|
@click="fnExportDec()"
|
||||||
|
v-perms:has="['neUser:auth:export-dec']"
|
||||||
|
>
|
||||||
|
<template #icon><ExportOutlined /></template>
|
||||||
|
{{ t('views.neUser.auth.export') }} DecAuth
|
||||||
|
</a-button>
|
||||||
|
|
||||||
<a-button
|
<a-button
|
||||||
type="default"
|
type="default"
|
||||||
@@ -904,7 +940,7 @@ onMounted(() => {
|
|||||||
{{ t('views.neUser.auth.checkDel') }}
|
{{ t('views.neUser.auth.checkDel') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
<!-- <a-popconfirm
|
<a-popconfirm
|
||||||
:title="t('views.neUser.auth.checkExportConfirm')"
|
:title="t('views.neUser.auth.checkExportConfirm')"
|
||||||
placement="topRight"
|
placement="topRight"
|
||||||
ok-text="TXT"
|
ok-text="TXT"
|
||||||
@@ -915,11 +951,12 @@ onMounted(() => {
|
|||||||
<a-button
|
<a-button
|
||||||
type="default"
|
type="default"
|
||||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||||
|
v-perms:has="['neUser:auth:export']"
|
||||||
>
|
>
|
||||||
<template #icon><ExportOutlined /></template>
|
<template #icon><ExportOutlined /></template>
|
||||||
{{ t('views.neUser.auth.checkExport') }}
|
{{ t('views.neUser.auth.checkExport') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm> -->
|
</a-popconfirm>
|
||||||
</a-flex>
|
</a-flex>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user