feat: UE添加导入模板下载功能

This commit is contained in:
TsMask
2025-04-29 11:40:55 +08:00
parent a86e9aa219
commit 52e22cd3a9
6 changed files with 40 additions and 34 deletions

View File

@@ -721,18 +721,18 @@ function fnModalUploadImportUpload(file: File) {
function fnModalDownloadImportTemplate() {
const hide = message.loading(t('common.loading'), 0);
const blob = new Blob(
[
[
'001011100001157,1234567890ABCDEF1234567890ABCDEF,0,8000',
'001011100001158,1234567890ABCDEF1234567890ABCDEF,0,8000',
].join('\r\n'),
],
{
type: 'text/plain',
}
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_auth_template.txt`,
`import_udmauth_template_${Date.now()}.txt`
);
saveAs(blob, `import_authdata_template_${Date.now()}.txt`);
hide();
}