feat: UE添加导入模板下载功能
This commit is contained in:
@@ -717,6 +717,26 @@ function fnModalUploadImportUpload(file: File) {
|
||||
});
|
||||
}
|
||||
|
||||
/**对话框表格信息导入模板 */
|
||||
function fnModalDownloadImportTemplate() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
|
||||
const blob = new Blob(
|
||||
[
|
||||
[
|
||||
'560211100001157,1234567890ABCDEF1234567890ABCDEF,0,8000',
|
||||
'560211100001158,1234567890ABCDEF1234567890ABCDEF,0,8000',
|
||||
].join('\r\n'),
|
||||
],
|
||||
{
|
||||
type: 'text/plain',
|
||||
}
|
||||
);
|
||||
saveAs(blob, `import_authdata_template_${Date.now()}.txt`);
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
useNeInfoStore()
|
||||
@@ -1230,11 +1250,25 @@ onMounted(() => {
|
||||
:size="10"
|
||||
>
|
||||
<template #default>
|
||||
<a-radio-group
|
||||
v-model:value="uploadImportState.from.typeVal"
|
||||
:options="uploadImportState.typeOptions"
|
||||
@change="fnModalUploadImportTypeChange"
|
||||
/>
|
||||
<a-row justify="space-between" align="middle">
|
||||
<a-col :span="12">
|
||||
<a-radio-group
|
||||
v-model:value="uploadImportState.from.typeVal"
|
||||
:options="uploadImportState.typeOptions"
|
||||
@change="fnModalUploadImportTypeChange"
|
||||
/>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-button
|
||||
type="link"
|
||||
:title="t('views.neData.common.importTemplate')"
|
||||
@click.prevent="fnModalDownloadImportTemplate"
|
||||
>
|
||||
{{ t('views.neData.common.importTemplate') }}
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-input-password
|
||||
v-if="uploadImportState.from.typeVal === 'k4'"
|
||||
v-model:value="uploadImportState.from.typeData"
|
||||
|
||||
Reference in New Issue
Block a user