Merge branch 'main' into multi-tenant
This commit is contained in:
@@ -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