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

View File

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

View File

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

View File

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