Merge remote-tracking branch 'origin/multi-tenant' into multi-tenant

This commit is contained in:
zhongzm
2025-06-27 16:57:03 +08:00
5 changed files with 46 additions and 50 deletions

View File

@@ -215,14 +215,14 @@ const supportMapper = {
name: 'guami', name: 'guami',
display: 'GUAMI List', display: 'GUAMI List',
key: ['plmnId'], key: ['plmnId'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
return { return {
index: index, index: index,
plmnId: plmn, plmnId: plmn,
pointer: 1, pointer: lastItem.pointer,
regionId: 1, regionId: lastItem.regionId,
setId: 1, setId: lastItem.setId,
}; };
}, },
}, },
@@ -231,7 +231,7 @@ const supportMapper = {
name: 'tai', name: 'tai',
display: 'TAI List', display: 'TAI List',
key: ['plmnId'], key: ['plmnId'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
return { return {
index: index, index: index,
@@ -245,12 +245,12 @@ const supportMapper = {
name: 'slice', name: 'slice',
display: 'Slice List', display: 'Slice List',
key: ['plmnId'], key: ['plmnId'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
return { return {
index: index, index: index,
plmnId: plmn, plmnId: plmn,
sd: param.snssai.sd, sd: parseInt(param.snssai.sd),
sst: param.snssai.sst, sst: param.snssai.sst,
}; };
}, },
@@ -262,9 +262,10 @@ const supportMapper = {
name: 'plmn', name: 'plmn',
display: 'PLMN List', display: 'PLMN List',
key: ['mcc', 'mnc'], key: ['mcc', 'mnc'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
const domain = `ims.mnc${param.plmnId.mnc}.mcc${param.plmnId.mcc}.3gppnetwork.org`; const mccDomain = param.plmnId.mcc.padStart(3, '0');
const domain = `ims.mnc${param.plmnId.mnc}.mcc${mccDomain}.3gppnetwork.org`;
return { return {
index: index, index: index,
domain: domain, domain: domain,
@@ -293,14 +294,12 @@ const supportMapper = {
name: 'gummei', name: 'gummei',
display: 'Gummei List', display: 'Gummei List',
key: ['plmnId'], key: ['plmnId'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
return { return Object.assign(lastItem, {
index: index, index: index,
plmnId: plmn, plmnId: plmn,
groupId: 1, });
code: 1,
};
}, },
}, },
{ {
@@ -308,7 +307,7 @@ const supportMapper = {
name: 'tai', name: 'tai',
display: 'TAI List', display: 'TAI List',
key: ['plmnId'], key: ['plmnId'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
return { return {
index: index, index: index,
@@ -322,16 +321,12 @@ const supportMapper = {
name: 'hss', name: 'hss',
display: 'HSS List', display: 'HSS List',
key: ['imsiPre'], key: ['imsiPre'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
const Hostname = `hss.ims.mnc${param.plmnId.mnc}.mcc${param.plmnId.mcc}.3gppnetwork.org`; return Object.assign(lastItem, {
return {
index: index, index: index,
hssHostname: Hostname,
hssPort: 3868,
imsiPre: plmn, imsiPre: plmn,
protocol: 'SCTP', });
};
}, },
}, },
{ {
@@ -339,14 +334,13 @@ const supportMapper = {
name: 'sgw', name: 'sgw',
display: 'SGW List', display: 'SGW List',
key: ['plmnId'], key: ['plmnId'],
item: (index, param) => { item: (index, param, lastItem) => {
const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`; const plmn = `${param.plmnId.mcc}${param.plmnId.mnc}`;
return { return Object.assign(lastItem, {
index: index, index: index,
plmnId: plmn, plmnId: plmn,
sgwIp: '172.16.5.150', tac: parseInt(param.tac),
tac: param.tac, });
};
}, },
}, },
], ],
@@ -441,7 +435,7 @@ async function toConfig(
continue; continue;
} }
const index = item.index; const index = item.index;
const updateItem = rule.item(index, param); const updateItem = rule.item(index, param, item);
// console.log('存在修改', rule.name, index, updateItem); // console.log('存在修改', rule.name, index, updateItem);
const resList = await editNeConfigData({ const resList = await editNeConfigData({
neType: ntType, neType: ntType,
@@ -454,14 +448,12 @@ async function toConfig(
resList.code != RESULT_CODE_SUCCESS ? 'failed' : 'success'; resList.code != RESULT_CODE_SUCCESS ? 'failed' : 'success';
errMsgArr.push(`${ntType}_${neId} ${rule.display} modify ${state}`); errMsgArr.push(`${ntType}_${neId} ${rule.display} modify ${state}`);
} else { } else {
const item = res.data.sort((a, b) => b.index - a.index); let lastIndex = 0;
if (!item) { const arr = res.data.sort((a, b) => b.index - a.index);
// console.log('没有找到', rule.name, index); if (arr.length != 0) {
errMsgArr.push(`${ntType}_${neId} ${rule.display} not found`); lastIndex = arr[0].index + 1;
continue;
} }
const lastIndex = item[0].index + 1; const addItem = rule.item(lastIndex, param, arr[0]);
const addItem = rule.item(lastIndex, param);
// console.log('不存在新增', rule.name, lastIndex, addItem); // console.log('不存在新增', rule.name, lastIndex, addItem);
const resList = await addNeConfigData({ const resList = await addNeConfigData({
neType: ntType, neType: ntType,

View File

@@ -866,7 +866,7 @@ onMounted(() => {
{{ t('views.neUser.auth.import') }} {{ t('views.neUser.auth.import') }}
</a-button> </a-button>
<a-popconfirm <!-- <a-popconfirm
:title="t('views.neUser.auth.exportConfirm')" :title="t('views.neUser.auth.exportConfirm')"
placement="topRight" placement="topRight"
ok-text="TXT" ok-text="TXT"
@@ -877,7 +877,7 @@ onMounted(() => {
<template #icon><ExportOutlined /></template> <template #icon><ExportOutlined /></template>
{{ t('views.neUser.auth.export') }} {{ t('views.neUser.auth.export') }}
</a-button> </a-button>
</a-popconfirm> </a-popconfirm> -->
<a-button <a-button
type="default" type="default"
@@ -890,7 +890,7 @@ onMounted(() => {
{{ t('views.neUser.auth.checkDel') }} {{ t('views.neUser.auth.checkDel') }}
</a-button> </a-button>
<a-popconfirm <!-- <a-popconfirm
:title="t('views.neUser.auth.checkExportConfirm')" :title="t('views.neUser.auth.checkExportConfirm')"
placement="topRight" placement="topRight"
ok-text="TXT" ok-text="TXT"
@@ -905,7 +905,7 @@ onMounted(() => {
<template #icon><ExportOutlined /></template> <template #icon><ExportOutlined /></template>
{{ t('views.neUser.auth.checkExport') }} {{ t('views.neUser.auth.checkExport') }}
</a-button> </a-button>
</a-popconfirm> </a-popconfirm> -->
</a-flex> </a-flex>
</template> </template>

View File

@@ -87,7 +87,7 @@ let queryRangePicker = ref<[string, string]>(['', '']);
const ranges = ref([ const ranges = ref([
{ {
label: t('views.perfManage.customTarget.toDay'), label: t('views.perfManage.customTarget.toDay'),
value: [dayjs().startOf('hour'), dayjs()], value: [dayjs().startOf('day'), dayjs()],
}, },
{ {
label: t('views.perfManage.customTarget.ago1Hour'), label: t('views.perfManage.customTarget.ago1Hour'),
@@ -336,7 +336,11 @@ function fnRecordExport() {
for (const key of keys) { for (const key of keys) {
if (tableColumnsKeyArr[i] === key) { if (tableColumnsKeyArr[i] === key) {
const title = tableColumnsTitleArr[i]; const title = tableColumnsTitleArr[i];
kpiData[title] = item[key]; if (key === 'timeGroup') {
kpiData[title] = parseDateToStr(item[key]);
} else {
kpiData[title] = item[key];
}
} }
} }
} }
@@ -1309,9 +1313,7 @@ function handleSearch() {
// 检查是否选择了网元类型和网元ID // 检查是否选择了网元类型和网元ID
if (!state.neType) { if (!state.neType) {
message.warning({ message.warning({
content: content: 'Please select the network element type first',
t('views.perfManage.goldTarget.selectNeTypeFirst') ||
'请先选择网元类型',
duration: 2, duration: 2,
}); });
return; return;
@@ -1319,9 +1321,7 @@ function handleSearch() {
if (state.neIds.length === 0) { if (state.neIds.length === 0) {
message.warning({ message.warning({
content: content: 'Please select at least one network element',
t('views.perfManage.goldTarget.selectNeIdsFirst') ||
'请选择至少一个网元',
duration: 2, duration: 2,
}); });
return; return;

View File

@@ -87,7 +87,7 @@ let queryRangePicker = ref<[string, string]>(['', '']);
const ranges = ref([ const ranges = ref([
{ {
label: t('views.perfManage.customTarget.toDay'), label: t('views.perfManage.customTarget.toDay'),
value: [dayjs().startOf('hour'), dayjs()], value: [dayjs().startOf('day'), dayjs()],
}, },
{ {
label: t('views.perfManage.customTarget.ago1Hour'), label: t('views.perfManage.customTarget.ago1Hour'),
@@ -334,7 +334,11 @@ function fnRecordExport() {
for (const key of keys) { for (const key of keys) {
if (tableColumnsKeyArr[i] === key) { if (tableColumnsKeyArr[i] === key) {
const title = tableColumnsTitleArr[i]; const title = tableColumnsTitleArr[i];
kpiData[title] = item[key]; if (key === 'timeGroup') {
kpiData[title] = parseDateToStr(item[key]);
} else {
kpiData[title] = item[key];
}
} }
} }
} }

View File

@@ -37,7 +37,7 @@ const neInfoStore = useNeInfoStore();
const ranges = ref([ const ranges = ref([
{ {
label: t('views.perfManage.customTarget.toDay'), label: t('views.perfManage.customTarget.toDay'),
value: [dayjs().startOf('hour'), dayjs()], value: [dayjs().startOf('day'), dayjs()],
}, },
{ {
label: t('views.perfManage.customTarget.ago1Hour'), label: t('views.perfManage.customTarget.ago1Hour'),