feat: UE添加导入模板下载功能
This commit is contained in:
@@ -708,6 +708,9 @@ export default {
|
||||
},
|
||||
},
|
||||
neData: {
|
||||
common: {
|
||||
importTemplate: 'Download Template',
|
||||
},
|
||||
baseStation: {
|
||||
list: "List",
|
||||
topology: "Topology",
|
||||
|
||||
@@ -708,6 +708,9 @@ export default {
|
||||
},
|
||||
},
|
||||
neData: {
|
||||
common: {
|
||||
importTemplate: '导入模板',
|
||||
},
|
||||
baseStation: {
|
||||
list: "列表",
|
||||
topology: "拓扑图",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -637,6 +637,26 @@ function filterOption(value: any, option: any) {
|
||||
return option.value.toUpperCase().indexOf(value.toUpperCase()) >= 0;
|
||||
}
|
||||
|
||||
/**对话框表格信息导入模板 */
|
||||
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',
|
||||
'460002082101039,1234,internet|ims_sig,internet|ims_sig,321321,255,321312,32131,32131',
|
||||
].join('\r\n'),
|
||||
],
|
||||
{
|
||||
type: 'text/plain',
|
||||
}
|
||||
);
|
||||
saveAs(blob, `import_pcfrule_template_${Date.now()}.txt`);
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
useNeInfoStore()
|
||||
@@ -1158,6 +1178,19 @@ onMounted(() => {
|
||||
:ext="['.txt']"
|
||||
>
|
||||
<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
|
||||
:disabled="true"
|
||||
:hidden="!uploadImportState.msg"
|
||||
|
||||
@@ -939,7 +939,7 @@ function fnGetList(pageNum?: number) {
|
||||
tablePagination.current = pageNum;
|
||||
}
|
||||
listUDMSub(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
tableState.selectedRowKeys = [];
|
||||
@@ -1108,6 +1108,42 @@ function delBigRow(bigIndex: any) {
|
||||
bigRows.value.splice(bigIndex, 1);
|
||||
}
|
||||
|
||||
/**对话框表格信息导入模板 */
|
||||
function fnModalDownloadImportTemplate() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
|
||||
const blob = new Blob(
|
||||
[
|
||||
[
|
||||
'460996650000584,62357000583,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000585,62357000585,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000586,62357000586,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000587,62357000587,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000588,62357000588,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000589,62357000589,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000590,62357000590,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000596,62357000596,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000597,62357000597,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000598,62357000598,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000599,62357000599,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000600,62357000600,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000601,62357000601,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000602,62357000602,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000603,62357000603,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000604,62357000604,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000605,62357000605,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
'460996650000606,62357000606,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&cmnet&ims,1,64,24,65,def_eps,1,010200000000,-',
|
||||
].join('\r\n'),
|
||||
],
|
||||
{
|
||||
type: 'text/plain',
|
||||
}
|
||||
);
|
||||
saveAs(blob, `import_udmuser_template_${Date.now()}.txt`);
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
useNeInfoStore()
|
||||
@@ -2107,6 +2143,19 @@ onMounted(() => {
|
||||
:size="10"
|
||||
>
|
||||
<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
|
||||
:message="uploadImportState.msg"
|
||||
:type="uploadImportState.hasFail ? 'warning' : 'info'"
|
||||
|
||||
Reference in New Issue
Block a user