feat: 支持下载UDM Auth, UDM sub, User PCC导入模板
This commit is contained in:
@@ -770,6 +770,26 @@ function fnModalUploadImportUpload(file: File) {
|
||||
});
|
||||
}
|
||||
|
||||
/**对话框表格信息导入模板 */
|
||||
function fnModalDownloadImportTemplate() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
|
||||
const baseUrl = import.meta.env.VITE_HISTORY_BASE_URL;
|
||||
const templateUrl = `${
|
||||
baseUrl.length === 1 && baseUrl.indexOf('/') === 0
|
||||
? ''
|
||||
: baseUrl.indexOf('/') === -1
|
||||
? '/' + baseUrl
|
||||
: baseUrl
|
||||
}/neDataImput`;
|
||||
saveAs(
|
||||
`${templateUrl}/udm_volte_template.txt`,
|
||||
`import_udmvolte_template_${Date.now()}.txt`
|
||||
);
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
useNeInfoStore()
|
||||
@@ -1251,23 +1271,25 @@ onMounted(() => {
|
||||
:size="10"
|
||||
>
|
||||
<template #default>
|
||||
<a-alert
|
||||
:message="uploadImportState.msg"
|
||||
:type="uploadImportState.hasFail ? 'warning' : 'info'"
|
||||
v-show="uploadImportState.msg.length > 0"
|
||||
>
|
||||
<template #action>
|
||||
<a-row justify="space-between" align="middle">
|
||||
<a-col :span="12"> </a-col>
|
||||
<a-col>
|
||||
<a-button
|
||||
size="small"
|
||||
type="link"
|
||||
danger
|
||||
@click="fnModalUploadImportFailReason"
|
||||
v-if="uploadImportState.hasFail"
|
||||
:title="t('views.neData.common.importTemplate')"
|
||||
@click.prevent="fnModalDownloadImportTemplate"
|
||||
>
|
||||
{{ t('views.neUser.auth.importFail') }}
|
||||
{{ t('views.neData.common.importTemplate') }}
|
||||
</a-button>
|
||||
</template>
|
||||
</a-alert>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-textarea
|
||||
:disabled="true"
|
||||
:hidden="!uploadImportState.msg"
|
||||
:value="uploadImportState.msg"
|
||||
:auto-size="{ minRows: 2, maxRows: 8 }"
|
||||
style="background-color: transparent; color: rgba(0, 0, 0, 0.85)"
|
||||
/>
|
||||
</template>
|
||||
</UploadModal>
|
||||
</PageContainer>
|
||||
|
||||
Reference in New Issue
Block a user