From 52e22cd3a9cc8a8117356fe37442b8d9b62fb1f8 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 29 Apr 2025 11:40:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20UE=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=8B=E8=BD=BD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/neDataImput/pcf_template.txt | 2 ++ public/neDataImput/udm_auth_template.txt | 2 ++ public/neDataImput/udm_sub_template.txt | 2 ++ src/views/neUser/auth/index.vue | 22 +++++++++++----------- src/views/neUser/pcf/index.vue | 22 +++++++++++----------- src/views/neUser/sub/index.vue | 24 ++++++++++++------------ 6 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 public/neDataImput/pcf_template.txt create mode 100644 public/neDataImput/udm_auth_template.txt create mode 100644 public/neDataImput/udm_sub_template.txt diff --git a/public/neDataImput/pcf_template.txt b/public/neDataImput/pcf_template.txt new file mode 100644 index 00000000..d6ee40e8 --- /dev/null +++ b/public/neDataImput/pcf_template.txt @@ -0,0 +1,2 @@ +imsi,msisdn,sess_rules,pcc_rules,hdr_enrich,rfsp,sar,qos_audio,qos_video +001012082101039,1234,internet|ims_sig,internet|ims_sig,321321,255,321312,32131,32131 \ No newline at end of file diff --git a/public/neDataImput/udm_auth_template.txt b/public/neDataImput/udm_auth_template.txt new file mode 100644 index 00000000..79c40d62 --- /dev/null +++ b/public/neDataImput/udm_auth_template.txt @@ -0,0 +1,2 @@ +001011100001157,1234567890ABCDEF1234567890ABCDEF,0,8000,11111111111111111111111111111111 +001011100001158,1234567890ABCDEF1234567890ABCDEF,0,8000,11111111111111111111111111111111 \ No newline at end of file diff --git a/public/neDataImput/udm_sub_template.txt b/public/neDataImput/udm_sub_template.txt new file mode 100644 index 00000000..0e42251e --- /dev/null +++ b/public/neDataImput/udm_sub_template.txt @@ -0,0 +1,2 @@ +001011100001157,62357000583,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&internet&ims,1,64,24,65,def_eps,1,010200000000,- +001011100001158,62357000585,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&internet&ims,1,64,24,65,def_eps,1,010200000000,- \ No newline at end of file diff --git a/src/views/neUser/auth/index.vue b/src/views/neUser/auth/index.vue index d207bfa3..dceb1192 100644 --- a/src/views/neUser/auth/index.vue +++ b/src/views/neUser/auth/index.vue @@ -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(); } diff --git a/src/views/neUser/pcf/index.vue b/src/views/neUser/pcf/index.vue index f43cbb2c..91595441 100644 --- a/src/views/neUser/pcf/index.vue +++ b/src/views/neUser/pcf/index.vue @@ -641,18 +641,18 @@ function filterOption(value: any, option: any) { function fnModalDownloadImportTemplate() { const hide = message.loading(t('common.loading'), 0); - const blob = new Blob( - [ - [ - 'imsi,msisdn,sess_rules,pcc_rules,hdr_enrich,rfsp,sar,qos_audio,qos_video', - '001012082101039,1234,internet|ims_sig,internet|ims_sig,321321,255,321312,32131,32131', - ].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}/pcf_template.txt`, + `import_pcfrule_template_${Date.now()}.txt` ); - saveAs(blob, `import_pcfrule_template_${Date.now()}.txt`); hide(); } diff --git a/src/views/neUser/sub/index.vue b/src/views/neUser/sub/index.vue index 4972f975..0b9da26b 100644 --- a/src/views/neUser/sub/index.vue +++ b/src/views/neUser/sub/index.vue @@ -1220,21 +1220,21 @@ function delBigRow(bigIndex: any) { } /**对话框表格信息导入模板 */ -function fnModalDownloadImportTemplate() { +async function fnModalDownloadImportTemplate() { const hide = message.loading(t('common.loading'), 0); - const blob = new Blob( - [ - [ - "001016650000584,62357000583,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&internet&ims,1,64,24,65,def_eps,1,010200000000,-", - "001016650000585,62357000585,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&internet&ims,1,64,24,65,def_eps,1,010200000000,-", - ].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_sub_template.txt`, + `import_udmsub_template_${Date.now()}.txt` ); - saveAs(blob, `import_udmuser_template_${Date.now()}.txt`); hide(); }