feat: UE添加导入模板下载功能
This commit is contained in:
2
public/neDataImput/pcf_template.txt
Normal file
2
public/neDataImput/pcf_template.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
imsi,msisdn,sess_rules,pcc_rules,hdr_enrich,rfsp,sar,qos_audio,qos_video,online,offline
|
||||||
|
460996650000580,86755900103,internet|ims_sig,internet|ims_sig,dnn,1,def_sar,qos_audio,qos_video,0,0
|
||||||
2
public/neDataImput/udm_auth_template.txt
Normal file
2
public/neDataImput/udm_auth_template.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
460996650000580,1234567890ABCDEF1234567890ABCDEF,0,8000
|
||||||
|
460996650000581,1234567890ABCDEF1234567890ABCDEF,0,8000
|
||||||
2
public/neDataImput/udm_sub_template.txt
Normal file
2
public/neDataImput/udm_sub_template.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
460996650000580,62357000583,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&content&ims,1,64,24,65,def_eps,1,010200000000,-
|
||||||
|
460996650000581,62357000585,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&content&ims,1,64,24,65,def_eps,1,010200000000,-
|
||||||
@@ -716,6 +716,9 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
neData: {
|
neData: {
|
||||||
|
common: {
|
||||||
|
importTemplate: 'Download Template',
|
||||||
|
},
|
||||||
baseStation: {
|
baseStation: {
|
||||||
list: "List",
|
list: "List",
|
||||||
topology: "Topology",
|
topology: "Topology",
|
||||||
|
|||||||
@@ -716,6 +716,9 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
neData: {
|
neData: {
|
||||||
|
common: {
|
||||||
|
importTemplate: '导入模板',
|
||||||
|
},
|
||||||
baseStation: {
|
baseStation: {
|
||||||
list: "列表",
|
list: "列表",
|
||||||
topology: "拓扑图",
|
topology: "拓扑图",
|
||||||
|
|||||||
@@ -717,6 +717,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_auth_template.txt`,
|
||||||
|
`import_udmauth_template_${Date.now()}.txt`
|
||||||
|
);
|
||||||
|
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
@@ -1230,11 +1250,24 @@ onMounted(() => {
|
|||||||
:size="10"
|
:size="10"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
|
<a-row justify="space-between" align="middle">
|
||||||
|
<a-col :span="12">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
v-model:value="uploadImportState.from.typeVal"
|
v-model:value="uploadImportState.from.typeVal"
|
||||||
:options="uploadImportState.typeOptions"
|
:options="uploadImportState.typeOptions"
|
||||||
@change="fnModalUploadImportTypeChange"
|
@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
|
<a-input-password
|
||||||
v-if="uploadImportState.from.typeVal === 'k4'"
|
v-if="uploadImportState.from.typeVal === 'k4'"
|
||||||
v-model:value="uploadImportState.from.typeData"
|
v-model:value="uploadImportState.from.typeData"
|
||||||
|
|||||||
@@ -637,6 +637,26 @@ function filterOption(value: any, option: any) {
|
|||||||
return option.value.toUpperCase().indexOf(value.toUpperCase()) >= 0;
|
return option.value.toUpperCase().indexOf(value.toUpperCase()) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**对话框表格信息导入模板 */
|
||||||
|
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}/pcf_template.txt`,
|
||||||
|
`import_pcfrule_template_${Date.now()}.txt`
|
||||||
|
);
|
||||||
|
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
@@ -1158,6 +1178,18 @@ onMounted(() => {
|
|||||||
:ext="['.txt']"
|
:ext="['.txt']"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
|
<a-row justify="space-between" align="middle">
|
||||||
|
<a-col :span="12"> </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-textarea
|
<a-textarea
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:hidden="!uploadImportState.msg"
|
:hidden="!uploadImportState.msg"
|
||||||
|
|||||||
@@ -1108,6 +1108,26 @@ function delBigRow(bigIndex: any) {
|
|||||||
bigRows.value.splice(bigIndex, 1);
|
bigRows.value.splice(bigIndex, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**对话框表格信息导入模板 */
|
||||||
|
async 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_sub_template.txt`,
|
||||||
|
`import_udmsub_template_${Date.now()}.txt`
|
||||||
|
);
|
||||||
|
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
@@ -2107,6 +2127,18 @@ onMounted(() => {
|
|||||||
:size="10"
|
:size="10"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
|
<a-row justify="space-between" align="middle">
|
||||||
|
<a-col :span="12"> </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-alert
|
<a-alert
|
||||||
:message="uploadImportState.msg"
|
:message="uploadImportState.msg"
|
||||||
:type="uploadImportState.hasFail ? 'warning' : 'info'"
|
:type="uploadImportState.hasFail ? 'warning' : 'info'"
|
||||||
|
|||||||
Reference in New Issue
Block a user