Merge branch 'main' into multi-tenant
This commit is contained in:
@@ -316,8 +316,8 @@ function fnModalOk() {
|
||||
.then(e => {
|
||||
modalState.confirmLoading = true;
|
||||
const from = toRaw(modalState.from);
|
||||
from.neId = queryParams.neId || '-';
|
||||
from.algoIndex = `${from.algoIndex}`;
|
||||
from.neId = queryParams.neId || '-';
|
||||
const result = from.id
|
||||
? updateUDMAuth(from)
|
||||
: from.num === 1
|
||||
@@ -517,7 +517,7 @@ function fnExportList(type: string) {
|
||||
if (!neId) return;
|
||||
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
exportUDMAuth({ ...queryParams, ...{ type } })
|
||||
exportUDMAuth(Object.assign({ type: type }, queryParams))
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success(t('common.msgSuccess', { msg: t('common.export') }), 3);
|
||||
@@ -555,6 +555,9 @@ function fnLoadData() {
|
||||
fnQueryReset();
|
||||
}, timerS * 1000);
|
||||
} else {
|
||||
modalState.loadDataLoading = false;
|
||||
tableState.loading = false; // 表格loading
|
||||
fnQueryReset();
|
||||
message.error({
|
||||
content: t('common.getInfoFail'),
|
||||
duration: 3,
|
||||
@@ -734,6 +737,7 @@ onMounted(() => {
|
||||
v-model:value="queryParams.neId"
|
||||
:options="neOtions"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
@change="fnGetList(1)"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -814,8 +818,8 @@ onMounted(() => {
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.neUser.auth.import') }}
|
||||
</a-button>
|
||||
<!--
|
||||
<a-popconfirm
|
||||
|
||||
<!-- <a-popconfirm
|
||||
:title="t('views.neUser.auth.exportConfirm')"
|
||||
placement="topRight"
|
||||
ok-text="TXT"
|
||||
|
||||
@@ -29,12 +29,12 @@ const { t } = useI18n();
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
/**表单中多选的OPTION */
|
||||
const pcfRuleOption = reactive({
|
||||
pccOpt: [],
|
||||
sessOpt: [],
|
||||
qosOpt: [],
|
||||
headerOpt: [],
|
||||
sarOpt: [],
|
||||
const pcfRuleOption = ref<Record<string, any[]>>({
|
||||
pccRules: [],
|
||||
sessionRules: [],
|
||||
qosTemplate: [],
|
||||
headerEnrichTemplate: [],
|
||||
serviceAreaRestriction: [],
|
||||
});
|
||||
|
||||
/**查询参数 */
|
||||
@@ -103,7 +103,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
title: 'SAR',
|
||||
dataIndex: 'sar',
|
||||
align: 'left',
|
||||
width: 50,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: 'RFSP',
|
||||
@@ -121,34 +121,54 @@ let tableColumns = ref<TableColumnsType>([
|
||||
title: 'QoS Audio',
|
||||
dataIndex: 'qosAudio',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'Online Billing', // 在线计费
|
||||
dataIndex: 'online',
|
||||
align: 'left',
|
||||
width: 120,
|
||||
customRender(opt) {
|
||||
const status = +opt.value;
|
||||
return status ? 'Enable' : 'Disable';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Offline Billing', // 离线计费
|
||||
dataIndex: 'offline',
|
||||
align: 'left',
|
||||
width: 120,
|
||||
customRender(opt) {
|
||||
const status = +opt.value;
|
||||
return status ? 'Enable' : 'Disable';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'PCC Rules',
|
||||
dataIndex: 'pccRules',
|
||||
align: 'left',
|
||||
resizable: true,
|
||||
width: 150,
|
||||
minWidth: 100,
|
||||
maxWidth: 300,
|
||||
},
|
||||
{
|
||||
title: 'PCC Rules',
|
||||
dataIndex: 'pccRules',
|
||||
align: 'left',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: 'SESS Rules',
|
||||
dataIndex: 'sessRules',
|
||||
align: 'left',
|
||||
width: 120,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: 'HDR Enrich',
|
||||
dataIndex: 'hdrEnrich',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: 'UE Policy',
|
||||
dataIndex: 'uePolicy',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
@@ -258,12 +278,8 @@ const modalStateFrom = Form.useForm(
|
||||
*/
|
||||
function fnModalVisibleByEdit(row?: Record<string, any>) {
|
||||
getPCCRule(queryParams.neId)
|
||||
.then((res: any) => {
|
||||
pcfRuleOption.pccOpt = res.pccJson;
|
||||
pcfRuleOption.sessOpt = res.sessJson;
|
||||
pcfRuleOption.qosOpt = res.qosJson;
|
||||
pcfRuleOption.headerOpt = res.headerJson;
|
||||
pcfRuleOption.sarOpt = res.sarJson;
|
||||
.then((data: any) => {
|
||||
pcfRuleOption.value = data;
|
||||
})
|
||||
.finally(() => {
|
||||
modalState.isBatch = false;
|
||||
@@ -438,12 +454,9 @@ function fnModalCancel() {
|
||||
*/
|
||||
function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') {
|
||||
getPCCRule(queryParams.neId)
|
||||
.then((res: any) => {
|
||||
pcfRuleOption.pccOpt = res.pccJson;
|
||||
pcfRuleOption.sessOpt = res.sessJson;
|
||||
pcfRuleOption.qosOpt = res.qosJson;
|
||||
pcfRuleOption.headerOpt = res.headerJson;
|
||||
pcfRuleOption.sarOpt = res.sarJson;
|
||||
.then((data: any) => {
|
||||
pcfRuleOption.value = data;
|
||||
console.log(data);
|
||||
})
|
||||
.finally(() => {
|
||||
modalStateFrom.resetFields(); //重置表单
|
||||
@@ -1021,7 +1034,7 @@ onMounted(() => {
|
||||
v-model:value="modalState.from.pccRules"
|
||||
allow-clear
|
||||
mode="tags"
|
||||
:options="pcfRuleOption.pccOpt"
|
||||
:options="pcfRuleOption.pccRules"
|
||||
:title="t('views.neUser.pcf.pccRuleTip')"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -1032,7 +1045,7 @@ onMounted(() => {
|
||||
v-model:value="modalState.from.sessRules"
|
||||
allow-clear
|
||||
mode="tags"
|
||||
:options="pcfRuleOption.sessOpt"
|
||||
:options="pcfRuleOption.sessionRules"
|
||||
:title="t('views.neUser.pcf.sessRuleTip')"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -1045,7 +1058,7 @@ onMounted(() => {
|
||||
<a-auto-complete
|
||||
v-model:value="modalState.from.qosAudio"
|
||||
allow-clear
|
||||
:options="pcfRuleOption.qosOpt"
|
||||
:options="pcfRuleOption.qosTemplate"
|
||||
:filter-option="filterOption"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -1055,7 +1068,7 @@ onMounted(() => {
|
||||
<a-auto-complete
|
||||
v-model:value="modalState.from.qosVideo"
|
||||
allow-clear
|
||||
:options="pcfRuleOption.qosOpt"
|
||||
:options="pcfRuleOption.qosTemplate"
|
||||
:filter-option="filterOption"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -1068,7 +1081,7 @@ onMounted(() => {
|
||||
<a-auto-complete
|
||||
v-model:value="modalState.from.hdrEnrich"
|
||||
allow-clear
|
||||
:options="pcfRuleOption.headerOpt"
|
||||
:options="pcfRuleOption.headerEnrichTemplate"
|
||||
:filter-option="filterOption"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -1099,7 +1112,7 @@ onMounted(() => {
|
||||
<a-auto-complete
|
||||
v-model:value="modalState.from.sar"
|
||||
allow-clear
|
||||
:options="pcfRuleOption.sarOpt"
|
||||
:options="pcfRuleOption.serviceAreaRestriction"
|
||||
:filter-option="filterOption"
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
@@ -125,12 +125,6 @@ let tableColumns = ref<ColumnsType>([
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'RAT',
|
||||
dataIndex: 'rat',
|
||||
align: 'center',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: 'Forbidden Areas',
|
||||
dataIndex: 'arfb',
|
||||
@@ -267,19 +261,24 @@ let modalState: ModalStateType = reactive({
|
||||
title: 'UDM签约用户',
|
||||
from: {
|
||||
id: undefined,
|
||||
num: 1,
|
||||
msisdn: '',
|
||||
neId: '',
|
||||
imsi: '',
|
||||
msisdn: '',
|
||||
// amDat
|
||||
ambr: 'def_ambr',
|
||||
nssai: 'def_nssai',
|
||||
rat: '0',
|
||||
rat: '0', // 0x00:VIRTUAL 0x01:WLAN 0x02:EUTRA 0x03:NR
|
||||
arfb: 'def_arfb',
|
||||
sar: 'def_sar',
|
||||
cn: '3',
|
||||
smData: '',
|
||||
smfSel: 'def_snssai',
|
||||
epsDat: '',
|
||||
neId: '',
|
||||
cnType: '3', // 0x00:EPC和5GC 0x01:5GC 0x02:EPC 0x03:EPC+5GC
|
||||
rfspIndex: 1,
|
||||
regTimer: 12000,
|
||||
ueUsageType: 1,
|
||||
activeTime: 1000,
|
||||
mico: '0',
|
||||
odbPs: '1',
|
||||
groupId: '-',
|
||||
// epsDat
|
||||
epsFlag: '1',
|
||||
epsOdb: [2],
|
||||
hplmnOdb: [3, 4],
|
||||
@@ -288,9 +287,12 @@ let modalState: ModalStateType = reactive({
|
||||
contextId: '1',
|
||||
apnContext: [1, 2, 0, 0, 0, 0],
|
||||
staticIp: '-',
|
||||
rfsp: 1,
|
||||
ueType: 1,
|
||||
//
|
||||
smData: '',
|
||||
smfSel: 'def_snssai',
|
||||
cag: 'def_cag',
|
||||
// 非字段
|
||||
num: 1,
|
||||
remark: '',
|
||||
},
|
||||
BatchDelForm: {
|
||||
@@ -644,6 +646,10 @@ function fnModalOk() {
|
||||
.map((item: number) => `${item}`.padStart(2, '0'))
|
||||
.join('');
|
||||
|
||||
from.activeTime = `${from.activeTime}`;
|
||||
from.rfspIndex = `${from.rfspIndex}`;
|
||||
from.regTimer = `${from.regTimer}`;
|
||||
from.ueUsageType = `${from.ueUsageType}`;
|
||||
from.neId = queryParams.neId || '-';
|
||||
const result = from.id
|
||||
? updateUDMSub(from)
|
||||
@@ -849,46 +855,27 @@ function fnRecordDelete(imsi: string) {
|
||||
function fnRecordExport(type: string = 'txt') {
|
||||
const selectLen = tableState.selectedRowKeys.length;
|
||||
if (selectLen <= 0) return;
|
||||
const rows: Record<string, any>[] = tableState.data.filter(
|
||||
(row: Record<string, any>) =>
|
||||
tableState.selectedRowKeys.indexOf(row.imsi) >= 0
|
||||
);
|
||||
|
||||
let content = '';
|
||||
if (type == 'txt') {
|
||||
for (const row of rows) {
|
||||
const epsDat = [
|
||||
row.epsFlag,
|
||||
row.epsOdb,
|
||||
row.hplmnOdb,
|
||||
row.ard,
|
||||
row.epstpl,
|
||||
row.contextId,
|
||||
row.apnContext,
|
||||
row.staticIp,
|
||||
].join(',');
|
||||
content += `${row.imsi},${row.msisdn},${row.ambr},${row.nssai},${row.arfb},${row.sar},${row.rat},${row.cn},${row.smfSel},${row.smData},${epsDat},${row.tenantName}\r\n`;
|
||||
}
|
||||
}
|
||||
if (type == 'csv') {
|
||||
content = `imsi,msisdn,ambr,nssai,arfb,sar,rat,cn,smf_sel,sm_dat,eps_dat\r\n`;
|
||||
for (const row of rows) {
|
||||
const epsDat = [
|
||||
row.epsFlag,
|
||||
row.epsOdb,
|
||||
row.hplmnOdb,
|
||||
row.ard,
|
||||
row.epstpl,
|
||||
row.contextId,
|
||||
row.apnContext,
|
||||
row.staticIp,
|
||||
].join(',');
|
||||
content += `${row.imsi},${row.msisdn},${row.ambr},${row.nssai},${row.arfb},${row.sar},${row.rat},${row.cn},${row.smfSel},${row.smData},${epsDat}\r\n`;
|
||||
}
|
||||
}
|
||||
|
||||
const blob = new Blob([content], { type: 'text/plain;charset=utf-8' });
|
||||
saveAs(blob, `UDMSub_${Date.now()}.${type}`);
|
||||
const neId = queryParams.neId;
|
||||
if (!neId) return;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
exportUDMSub({ type: type, neId: neId, imsis: tableState.selectedRowKeys })
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('common.msgSuccess', { msg: t('common.export') }),
|
||||
duration: 2,
|
||||
});
|
||||
saveAs(res.data, `UDMSub_select_${Date.now()}.${type}`);
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
hide();
|
||||
});
|
||||
}
|
||||
|
||||
/**列表导出 */
|
||||
@@ -902,7 +889,12 @@ function fnExportList(type: string) {
|
||||
if (!neId) return;
|
||||
const key = 'exportSub';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
exportUDMSub({ ...queryParams, ...{ type, imsi: realImsi } }).then(res => {
|
||||
|
||||
exportUDMSub({
|
||||
...queryParams,
|
||||
imsi: realImsi,
|
||||
type: type,
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('common.msgSuccess', { msg: t('common.export') }),
|
||||
@@ -944,6 +936,9 @@ function fnLoadData() {
|
||||
fnQueryReset();
|
||||
}, timerS * 1000);
|
||||
} else {
|
||||
modalState.loadDataLoading = false;
|
||||
tableState.loading = false; // 表格loading
|
||||
fnQueryReset();
|
||||
message.error({
|
||||
content: t('common.getInfoFail'),
|
||||
duration: 3,
|
||||
@@ -976,7 +971,10 @@ function fnGetList(pageNum?: number) {
|
||||
pageSize: queryParams.pageSize,
|
||||
};
|
||||
|
||||
listUDMSub(toBack).then(res => {
|
||||
listUDMSub({
|
||||
...queryParams,
|
||||
imsi: imsiMatchRule[queryParams.imsiMatch],
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
@@ -1175,6 +1173,7 @@ onMounted(() => {
|
||||
v-model:value="queryParams.neId"
|
||||
:options="neOtions"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
@change="fnGetList(1)"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -1336,9 +1335,6 @@ onMounted(() => {
|
||||
ok-text="TXT"
|
||||
ok-type="default"
|
||||
@confirm="fnRecordExport('txt')"
|
||||
:show-cancel="false"
|
||||
cancel-text="CSV"
|
||||
@cancel="fnRecordExport('csv')"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
>
|
||||
<a-button
|
||||
@@ -1423,7 +1419,7 @@ onMounted(() => {
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'cnFlag'">
|
||||
{{
|
||||
record.cn === '3'
|
||||
['1', '3'].includes(record.cnType)
|
||||
? t('views.neUser.sub.enable')
|
||||
: t('views.neUser.sub.disable')
|
||||
}}
|
||||
@@ -1689,7 +1685,7 @@ onMounted(() => {
|
||||
name="cnFlag"
|
||||
:help="t('views.neUser.sub.cnFlag')"
|
||||
>
|
||||
<a-select v-model:value="modalState.from.cn">
|
||||
<a-select v-model:value="modalState.from.cnType">
|
||||
<a-select-option value="3">
|
||||
{{ t('views.neUser.sub.enable') }}
|
||||
</a-select-option>
|
||||
@@ -1843,7 +1839,7 @@ onMounted(() => {
|
||||
name="mico"
|
||||
:help="t('views.neUser.sub.micoTip')"
|
||||
>
|
||||
<a-select value="1">
|
||||
<a-select v-model:value="modalState.from.mico">
|
||||
<a-select-option value="1">
|
||||
{{ t('views.neUser.sub.enable') }}
|
||||
</a-select-option>
|
||||
@@ -1854,9 +1850,19 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
<a-form-item label="5G UE Usage Type" name="ueType">
|
||||
<a-form-item label="5G RAT Mode" name="rat">
|
||||
<a-select v-model:value="modalState.from.rat">
|
||||
<a-select-option value="0">VIRTUAL</a-select-option>
|
||||
<a-select-option value="1">WLAN</a-select-option>
|
||||
<a-select-option value="2">EUTRA</a-select-option>
|
||||
<a-select-option value="3">NR</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
<a-form-item label="5G UE Usage Type" name="ueUsageType">
|
||||
<a-input-number
|
||||
v-model:value="modalState.from.ueType"
|
||||
v-model:value="modalState.from.ueUsageType"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
:max="127"
|
||||
@@ -1876,9 +1882,9 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
<a-form-item label="5G RFSP Index" name="rfsp">
|
||||
<a-form-item label="5G RFSP Index" name="rfspIndex">
|
||||
<a-input-number
|
||||
v-model:value="modalState.from.rfsp"
|
||||
v-model:value="modalState.from.rfspIndex"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
:max="127"
|
||||
|
||||
Reference in New Issue
Block a user