Merge remote-tracking branch 'origin/main' into lichang

This commit is contained in:
TsMask
2024-04-30 20:25:27 +08:00
11 changed files with 388 additions and 188 deletions

View File

@@ -80,6 +80,24 @@ let tableColumns: ColumnsType = [
align: 'center',
width: 3,
},
{
title: t('views.logManage.forwarding.alarmInter'),
dataIndex: 'interface',
align: 'center',
width: 5,
},
{
title: t('views.logManage.forwarding.alarmObj'),
dataIndex: 'toUser',
align: 'center',
width: 5,
},
{
title: t('views.logManage.forwarding.alarmInfo'),
dataIndex: 'operResult',
align: 'center',
width: 6,
},
{
title: t('views.logManage.forwarding.type'),
dataIndex: 'neType',
@@ -104,24 +122,12 @@ let tableColumns: ColumnsType = [
align: 'center',
width: 4,
},
{
title: t('views.logManage.forwarding.alarmObj'),
dataIndex: 'toUser',
align: 'center',
width: 5,
},
{
title: t('views.logManage.forwarding.alarmTitle'),
dataIndex: 'alarmTitle',
align: 'left',
align: 'center',
width: 5,
},
{
title: t('views.logManage.forwarding.alarmInfo'),
dataIndex: 'operResult',
align: 'left',
width: 6,
},
{
title: t('views.logManage.forwarding.eventTime'),
dataIndex: 'eventTime',

View File

@@ -17,6 +17,7 @@ import {
batchDelRule,
batchUpdateRule,
} from '@/api/neUser/pcf';
import { getPCCRule } from '@/api/configManage/configParam';
import useNeInfoStore from '@/store/modules/neinfo';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
@@ -27,6 +28,15 @@ const { t } = useI18n();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**表单中多选的OPTION */
const pcfRuleOption = reactive({
pccOpt: [],
sessOpt: [],
qosOpt: [],
headerOpt: [],
sarOpt: [],
});
/**查询参数 */
let queryParams = reactive({
/**网元ID */
@@ -102,13 +112,13 @@ let tableColumns = ref<TableColumnsType>([
width: 50,
},
{
title: 'QOS Video',
title: 'QoS Video',
dataIndex: 'qosVideo',
align: 'left',
width: 100,
},
{
title: 'QOS Audio',
title: 'QoS Audio',
dataIndex: 'qosAudio',
align: 'left',
resizable: true,
@@ -214,10 +224,10 @@ let modalState: ModalStateType = reactive({
imsi: '',
msisdn: '',
qosAudio: '',
pccRules: 'internet|ims_sig',
pccRules: undefined,
rfsp: 0,
uePolicy: '',
sessRules: 'internet|ims_sig',
sessRules: undefined,
sar: '',
hdrEnrich: '',
qosVideo: '',
@@ -247,35 +257,66 @@ const modalStateFrom = Form.useForm(
* @param noticeId 网元id, 不传为新增
*/
function fnModalVisibleByEdit(row?: Record<string, any>) {
modalState.isBatch = false;
if (!row) {
modalStateFrom.resetFields(); //重置表单
modalState.title = t('views.neUser.pcf.addTitle');
modalState.visibleByEdit = true;
modalState.type = 'add';
} else {
if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
const neID = queryParams.neId || '-';
getRule(neID, row.imsi)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
modalState.from = Object.assign(modalState.from, res.data);
modalState.title = t('views.neUser.pcf.updateTitle', {
imsi: row.imsi,
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;
})
.finally(() => {
modalState.isBatch = false;
if (!row) {
modalStateFrom.resetFields(); //重置表单
modalState.title = t('views.neUser.pcf.addTitle');
modalState.visibleByEdit = true;
modalState.type = 'add';
} else {
if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
const neID = queryParams.neId || '-';
getRule(neID, row.imsi)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(modalState.from, res.data);
let pccRules = res.data.pccRules;
if (!pccRules) {
pccRules = [];
} else if (pccRules.includes('|')) {
pccRules = pccRules.split('|');
} else {
pccRules = [pccRules];
}
modalState.from.pccRules = pccRules;
let sessRules = res.data.sessRules;
if (!sessRules) {
sessRules = [];
} else if (sessRules.includes('|')) {
sessRules = sessRules.split('|');
} else {
sessRules = [sessRules];
}
modalState.from.sessRules = sessRules;
console.log(modalState.from);
modalState.title = t('views.neUser.pcf.updateTitle', {
imsi: row.imsi,
});
modalState.visibleByEdit = true;
modalState.type = 'update';
} else {
message.error(t('common.getInfoFail'), 2);
}
})
.finally(() => {
hide();
modalState.confirmLoading = false;
});
modalState.visibleByEdit = true;
modalState.type = 'update';
} else {
message.error(t('common.getInfoFail'), 2);
}
})
.finally(() => {
hide();
modalState.confirmLoading = false;
});
}
}
});
}
/**
@@ -283,9 +324,25 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
* 进行表达规则校验
*/
function fnModalOk() {
const from = toRaw(modalState.from);
const from = JSON.parse(JSON.stringify(modalState.from));
from.neId = queryParams.neId || '-';
from.rfsp = Number(from.rfsp) || 0;
console.log(from);
let pccRules = modalState.from.pccRules;
if (Array.isArray(pccRules)) {
pccRules = pccRules.join('|');
} else {
pccRules = '';
}
from.pccRules = pccRules;
let sessRules = modalState.from.sessRules;
if (Array.isArray(sessRules)) {
sessRules = sessRules.join('|');
} else {
sessRules = '';
}
from.sessRules = sessRules;
let validateArr = ['imsi', 'msisdn'];
if (modalState.isBatch) {
@@ -382,21 +439,31 @@ function fnModalCancel() {
* @param type 类型
*/
function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') {
modalStateFrom.resetFields(); //重置表单
modalState.isBatch = true;
modalState.type = type;
if (type === 'add') {
modalState.title = t('views.neUser.pcf.batchAddText');
modalState.visibleByEdit = true;
}
if (type === 'update') {
modalState.title = t('views.neUser.pcf.batchUpdateText');
modalState.visibleByEdit = true;
}
if (type === 'delete') {
modalState.title = t('views.neUser.pcf.batchDelText');
modalState.visibleByEdit = true;
}
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;
})
.finally(() => {
modalStateFrom.resetFields(); //重置表单
modalState.isBatch = true;
modalState.type = type;
if (type === 'add') {
modalState.title = t('views.neUser.pcf.batchAddText');
modalState.visibleByEdit = true;
}
if (type === 'update') {
modalState.title = t('views.neUser.pcf.batchUpdateText');
modalState.visibleByEdit = true;
}
if (type === 'delete') {
modalState.title = t('views.neUser.pcf.batchDelText');
modalState.visibleByEdit = true;
}
});
}
/**
@@ -551,6 +618,11 @@ function fnModalUploadImportUpload(file: File) {
});
}
/**使其忽略大小写 */
function filterOption(value: any, option: any) {
return option.value.toUpperCase().indexOf(value.toUpperCase()) >= 0;
}
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
@@ -664,7 +736,7 @@ onMounted(() => {
{{ t('views.neUser.pcf.checkDel') }}
</a-button>
<a-dropdown>
<a-dropdown trigger="click">
<a-button>
{{ t('views.neUser.pcf.batchOper') }}
<DownOutlined />
@@ -945,77 +1017,47 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="PCC Rules" name="pccRules">
<a-input
<a-select
v-model:value="modalState.from.pccRules"
allow-clear
:maxlength="64"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.neUser.pcf.pccRuleTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
mode="tags"
:options="pcfRuleOption.pccOpt"
:title="t('views.neUser.pcf.pccRuleTip')"
/>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="SESS Rules" name="sessRules">
<a-input
<a-select
v-model:value="modalState.from.sessRules"
allow-clear
:maxlength="64"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.neUser.pcf.sessRuleTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
mode="tags"
:options="pcfRuleOption.sessOpt"
:title="t('views.neUser.pcf.sessRuleTip')"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="QOS Audio" name="qosAudio">
<a-input
<a-form-item label="QoS Audio" name="qosAudio">
<a-auto-complete
v-model:value="modalState.from.qosAudio"
allow-clear
:maxlength="64"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.neUser.pcf.qosAudioTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
:options="pcfRuleOption.qosOpt"
:filter-option="filterOption"
/>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="QOS Video" name="qosVideo">
<a-input
<a-form-item label="QoS Video" name="qosVideo">
<a-auto-complete
v-model:value="modalState.from.qosVideo"
allow-clear
:maxlength="64"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.neUser.pcf.qosVideoTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
:options="pcfRuleOption.qosOpt"
:filter-option="filterOption"
/>
</a-form-item>
</a-col>
</a-row>
@@ -1023,20 +1065,12 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="HDR Enrich" name="hdrEnrich">
<a-input
<a-auto-complete
v-model:value="modalState.from.hdrEnrich"
allow-clear
:maxlength="64"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.neUser.pcf.hdrTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
:options="pcfRuleOption.headerOpt"
:filter-option="filterOption"
/>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
@@ -1061,22 +1095,13 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="Sar" name="sar">
<a-input
<a-form-item label="SAR" name="sar">
<a-auto-complete
v-model:value="modalState.from.sar"
allow-clear
:maxlength="64"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.neUser.pcf.sarTip1') }}<br />
{{ t('views.neUser.pcf.sarTip2') }}<br />
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
:options="pcfRuleOption.sarOpt"
:filter-option="filterOption"
/>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">

View File

@@ -493,10 +493,7 @@ const modalStateFrom = Form.useForm(
*/
function transformData(data: any) {
let transformedData = data.map((item: any) => {
if (
!item.sst ||
!item.smallRows.every((smallRow: any) => smallRow.dnn)
) {
if (!item.sst || !item.smallRows.every((smallRow: any) => smallRow.dnn)) {
message.error({
content: `${t('views.neUser.sub.smDataArrTip')}`,
duration: 3,
@@ -504,7 +501,9 @@ function transformData(data: any) {
throw new Error('sst, sd, and all dnn are required fields');
}
let sstSd = item.sd?item.sst + '-' + item.sd:item.sst;
let sstSd = item.sd
? item.sst + '-' + item.sd.padStart(6, '0')
: item.sst + '-';
let smallRowData = item.smallRows
.map((smallRow: any) => {
let parts = [smallRow.dnn];
@@ -536,7 +535,9 @@ function transformFormData(data: any) {
let json: any = {
id: bigIDFlag++,
sst: item.split('&')[0].split('-')[0],
sd: item.split('&')[0].split('-')[1]?item.split('&')[0].split('-')[1]:'',
sd: item.split('&')[0].split('-')[1]
? item.split('&')[0].split('-')[1]
: '',
smallRows: [],
};
item
@@ -1543,17 +1544,21 @@ onMounted(() => {
name="row.sst"
:label-col="{ span: 5 }"
>
<a-input-group>
<a-row :gutter="8">
<a-col :span="10">
<a-input v-model:value="row.sst" />
</a-col>
<span style="margin-top: 5px">-</span>
<a-col :span="12">
<a-input v-model:value="row.sd" />
</a-col>
</a-row>
</a-input-group>
<div>
<a-input-number
v-model:value="row.sst"
:min="1"
:max="3"
:step="1"
style="width: 30%"
/>
<span style="padding: 0 8px">-</span>
<a-input
v-model:value="row.sd"
:maxlength="6"
style="width: 60%"
/>
</div>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
@@ -2068,17 +2073,21 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="SST-SD" name="row.sst">
<a-input-group>
<a-row :gutter="8">
<a-col :span="10">
<a-input v-model:value="row.sst" />
</a-col>
<span style="margin-top: 5px">-</span>
<a-col :span="12">
<a-input v-model:value="row.sd" />
</a-col>
</a-row>
</a-input-group>
<div>
<a-input-number
v-model:value="row.sst"
:min="1"
:max="3"
:step="1"
style="width: 30%"
/>
<span style="padding: 0 8px">-</span>
<a-input
v-model:value="row.sd"
:maxlength="6"
style="width: 60%"
/>
</div>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">

View File

@@ -59,7 +59,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: true,
seached: false,
data: [],
selectedRowKeys: [],
});
@@ -290,7 +290,7 @@ onMounted(() => {
<!-- 表格搜索栏 -->
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-col :lg="8" :md="12" :xs="24">
<a-form-item :label="t('views.neUser.ue.neType')" name="neId ">
<a-select
v-model:value="queryParams.neId"
@@ -299,17 +299,18 @@ onMounted(() => {
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-col :lg="8" :md="12" :xs="24">
<a-form-item label="IMSI" name="imsi">
<a-input v-model:value="queryParams.imsi" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-col :lg="8" :md="12" :xs="24">
<a-form-item label="MSISDN" name="msisdn">
<a-input v-model:value="queryParams.msisdn" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-col :lg="8" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList(1)">
@@ -440,24 +441,27 @@ onMounted(() => {
v-for="v in modalState.from.pduSessionInfo"
:key="v.dnn"
>
<a-descriptions-item label="PDU Session ID">
{{ v.pduSessionID }}
</a-descriptions-item>
<a-descriptions-item label="User Plane State">
{{ v.upState }}
</a-descriptions-item>
<a-descriptions-item label="IPV4">{{ v.ipv4 }}</a-descriptions-item>
<a-descriptions-item label="IPV6">{{ v.ipv6 }}</a-descriptions-item>
<a-descriptions-item label="TAI">{{ v.tai }}</a-descriptions-item>
<a-descriptions-item label="SST_SD">
<a-descriptions-item label="SST-SD">
{{ v.sstSD }}</a-descriptions-item
>
<a-descriptions-item label="UPF_N3_IP">
<a-descriptions-item label="UPF N3 IP">
{{ v.upfN3IP }}
</a-descriptions-item>
<a-descriptions-item label="RAN_N3_IP">
<a-descriptions-item label="RAN N3 IP">
{{ v.ranN3IP }}
</a-descriptions-item>
<a-descriptions-item label="ActiveTime">
<a-descriptions-item label="Create Time">
{{ v.activeTime }}
</a-descriptions-item>
<a-descriptions-item label="pduSessionId">
{{ v.pduSessionID }}
</a-descriptions-item>
</a-descriptions>
</a-form>
</DraggableModal>

View File

@@ -32,7 +32,20 @@ const { t } = useI18n();
const { getDict } = useDictStore();
/**字体图标可选择数据 */
let icons = reactive(iconFonts.map(item => ({ value: item, label: item })));
let icons = reactive(
iconFonts.map((item, i) => {
if (i === 0) {
return {
value: item,
label: item,
};
}
return {
value: item,
label: 'icon-' + `${i}`.padStart(3, '0'),
};
})
);
/**字典数据 */
let dict: {
@@ -1173,5 +1186,4 @@ onMounted(() => {
</PageContainer>
</template>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>