feat: 根据网元显示特有菜单

This commit is contained in:
TsMask
2025-05-07 15:45:54 +08:00
parent 2c2ca82442
commit d3efefe7c5
58 changed files with 1110 additions and 1377 deletions

View File

@@ -11,7 +11,7 @@ import {
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { listAMFDataUE, delAMFDataUE, exportAMFDataUE } from '@/api/neData/amf';
import { parseDateToStr } from '@/utils/date-utils';
import { OptionsType, WS } from '@/plugins/ws-websocket';
@@ -22,6 +22,7 @@ import { useClipboard } from '@vueuse/core';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
/**网元可选 */
@@ -463,36 +464,29 @@ onMounted(() => {
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'AMF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'AMF') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
// 获取列表数据
fnGetList();
});
onBeforeUnmount(() => {
@@ -564,7 +558,7 @@ onBeforeUnmount(() => {
:label="t('views.dashboard.cdr.time')"
name="queryRangePicker"
>
<a-range-picker
<a-range-picker
v-model:value="queryRangePicker"
:presets="rangePickerPresets"
:bordered="true"

View File

@@ -11,7 +11,7 @@ import {
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import {
delIMSDataCDR,
exportIMSDataCDR,
@@ -26,6 +26,7 @@ import dayjs, { type Dayjs } from 'dayjs';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
@@ -525,34 +526,31 @@ onMounted(() => {
dict.cdrSipCodeCause = resArr[2].value;
}
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'IMS') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'IMS') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
// 获取列表数据
fnGetList();
});
onBeforeUnmount(() => {

View File

@@ -12,7 +12,7 @@ import {
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { listMMEDataUE, delMMEDataUE, exportMMEDataUE } from '@/api/neData/mme';
import { parseDateToStr } from '@/utils/date-utils';
import { OptionsType, WS } from '@/plugins/ws-websocket';
@@ -22,6 +22,7 @@ import { useClipboard } from '@vueuse/core';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
@@ -471,36 +472,29 @@ onMounted(() => {
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'MME') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'MME') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
// 获取列表数据
fnGetList();
});
onBeforeUnmount(() => {

View File

@@ -27,13 +27,13 @@ import useWS from './hooks/useWS';
import useAppStore from '@/store/modules/app';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { useRouter } from 'vue-router';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { message } from 'ant-design-vue';
import { upfWhoId } from './hooks/useWS';
const neInfoStore = useNeInfoStore();
const router = useRouter();
const appStore = useAppStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const { wsSend, userActivitySend, upfTFSend, reSendUPF } = useWS();
@@ -289,63 +289,39 @@ const getPopupContainer = () => {
};
onMounted(() => {
neInfoStore
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// UPF
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'UPF') {
arr.push({ value: v.neId, label: v.neName, rmUid: v.rmUid });
}
});
neOtions.value = arr;
if (arr.length > 0) {
//queryParams.neRealId = arr[0].value;
fnSelectNe(arr[0].value, arr[0]);
}
// UDM
let arr1: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'UDM') {
arr1.push({ value: v.neId, label: v.neName, rmUid: v.rmUid });
}
});
udmOtions.value = arr1;
if (arr1.length > 0) {
fnSelectUDM({ key: arr1[0].value });
}
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
(item: any) => {
return ['UDM', 'SMF', 'IMS', 'AMF', 'MME'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
initFlag = true;
fnGetSkim().then(() => {
loadData();
});
// 获取网元网元列表
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'UPF') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
if (item.value === 'UDM') {
udmOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length > 0) {
fnSelectNe(neOtions.value[0].value, neOtions.value[0]);
}
if (udmOtions.value.length > 0) {
fnSelectUDM({ key: udmOtions.value[0].value });
}
// 过滤不可用的网元
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
(item: any) => {
return ['UDM', 'SMF', 'IMS', 'AMF', 'MME'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
initFlag = true;
fnGetSkim().then(() => {
loadData();
});
});
onBeforeUnmount(() => {
@@ -399,7 +375,11 @@ onBeforeUnmount(() => {
</div>
<template #overlay>
<a-menu @click="fnSelectUDM">
<a-menu-item v-for="v in udmOtions" :key="v.value" :disabled="udmNeId === v.value">
<a-menu-item
v-for="v in udmOtions"
:key="v.value"
:disabled="udmNeId === v.value"
>
{{ v.label }}
</a-menu-item>
</a-menu>

View File

@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import {
RESULT_CODE_ERROR,
@@ -23,6 +23,7 @@ import saveAs from 'file-saver';
import { useClipboard } from '@vueuse/core';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
const neListStore = useNeListStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
@@ -480,36 +481,29 @@ function wsMessage(res: Record<string, any>) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'SGWC') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'SGWC') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
// 获取列表数据
fnGetList();
});
onBeforeUnmount(() => {

View File

@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import {
RESULT_CODE_ERROR,
@@ -23,6 +23,7 @@ import dayjs, { type Dayjs } from 'dayjs';
import { useClipboard } from '@vueuse/core';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
const neListStore = useNeListStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
@@ -507,33 +508,29 @@ function wsMessage(res: Record<string, any>) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'SMF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'SMF') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
// 获取列表数据
fnGetList();
});
onBeforeUnmount(() => {

View File

@@ -35,9 +35,10 @@ import {
} from '@/constants/result-constants';
import { parseSizeFromByte } from '@/utils/parse-utils';
import { message } from 'ant-design-vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import dayjs, { Dayjs } from 'dayjs';
const { t, currentLocale } = useI18n();
const neListStore = useNeListStore();
const ws = new WS();
/**图DOM节点实例对象 */
@@ -558,33 +559,30 @@ function fnRealTime() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'SMF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
fnRanderChart();
fnRealTime();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'SMF') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
// 绘图
fnRanderChart();
fnRealTime();
});
onBeforeUnmount(() => {

View File

@@ -11,7 +11,7 @@ import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import {
delSMSCDataCDR,
exportSMSCDataCDR,
@@ -26,6 +26,7 @@ import { hasPermissions } from '@/plugins/auth-user';
import dayjs, { type Dayjs } from 'dayjs';
const { copy } = useClipboard({ legacy: true });
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
@@ -479,37 +480,31 @@ onMounted(() => {
dict.cdrCauseCode = resArr[0].value;
}
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'SMSC') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'SMSC') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
// 获取列表数据
fnGetList();
});
onBeforeUnmount(() => {

View File

@@ -17,7 +17,7 @@ import {
exportAlarm,
} from '@/api/faultManage/actAlarm';
import useI18n from '@/hooks/useI18n';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useDictStore from '@/store/modules/dict';
import saveAs from 'file-saver';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
@@ -26,7 +26,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { readLoalXlsx } from '@/utils/execl-utils';
import { parseDateToStr } from '@/utils/date-utils';
import dayjs, { type Dayjs } from 'dayjs';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { getDict } = useDictStore();
const { t, currentLocale } = useI18n();
@@ -841,12 +841,8 @@ onMounted(() => {
dict.activeAlarmSeverity = resArr[3].value;
}
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.finally(() => {
fnGetList();
});
// 获取列表
fnGetList();
});
</script>
@@ -864,7 +860,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType">
<a-auto-complete
v-model:value="queryParams.neType"
:options="neInfoStore.getNeSelectOtions"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('views.ne.common.neTypePlease')"
/>
@@ -1365,7 +1361,7 @@ onMounted(() => {
>
<a-auto-complete
v-model:value="modalState.showSetFrom.ne_type"
:options="neInfoStore.getNeSelectOtions"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('common.inputPlease')"
/>

View File

@@ -8,14 +8,14 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { listAct, exportAll } from '@/api/faultManage/eventAlarm';
import useI18n from '@/hooks/useI18n';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import saveAs from 'file-saver';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { writeSheet } from '@/utils/execl-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { parseDateToStr } from '@/utils/date-utils';
import dayjs, { type Dayjs } from 'dayjs';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
/**表格字段列排序 */
@@ -434,12 +434,8 @@ function fnGetList(pageNum?: number) {
}
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.finally(() => {
fnGetList();
});
// 获取列表
fnGetList();
});
</script>
@@ -457,7 +453,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType">
<a-auto-complete
v-model:value="queryParams.neType"
:options="neInfoStore.getNeSelectOtions"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('views.ne.common.neTypePlease')"
/>

View File

@@ -14,13 +14,13 @@ import {
import { listAct, exportAlarm } from '@/api/faultManage/actAlarm';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import saveAs from 'file-saver';
import { writeSheet } from '@/utils/execl-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { parseDateToStr } from '@/utils/date-utils';
import dayjs, { type Dayjs } from 'dayjs';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { getDict } = useDictStore();
const { t } = useI18n();
@@ -641,8 +641,7 @@ onMounted(() => {
dict.activeAlarmSeverity = resArr[3].value;
}
});
// 获取网元网元列表
useNeInfoStore().fnNelist();
// 获取列表
fnGetList();
});
</script>
@@ -661,7 +660,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType">
<a-auto-complete
v-model:value="queryParams.neType"
:options="neInfoStore.getNeSelectOtions"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('views.ne.common.neTypePlease')"
/>

View File

@@ -7,13 +7,13 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listAlarm } from '@/api/logManage/alarm';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n';
import dayjs, { type Dayjs } from 'dayjs';
const { getDict } = useDictStore();
const { t } = useI18n();
const neListStore = useNeListStore();
/**字典数据 */
let dict: {
/**告警状态 */
@@ -278,13 +278,9 @@ onMounted(() => {
dict.activeAlarmSeverity = resArr[2].value;
}
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.finally(() => {
// 获取列表数据
fnGetList();
});
// 获取列表数据
fnGetList();
});
</script>
@@ -302,7 +298,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType">
<a-auto-complete
v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions"
:options="neListStore.getNeSelectOtions"
:placeholder="t('views.ne.common.neTypePlease')"
allow-clear
/>

View File

@@ -7,13 +7,13 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listForwarding } from '@/api/logManage/forwarding';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n';
import dayjs, { type Dayjs } from 'dayjs';
const { getDict } = useDictStore();
const { t } = useI18n();
const neListStore = useNeListStore();
/**字典数据 */
let dict: {
/**告警状态 */
@@ -293,13 +293,8 @@ onMounted(() => {
dict.activeAlarmSeverity = resArr[2].value;
}
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.finally(() => {
// 获取列表数据
fnGetList();
});
// 获取列表数据
fnGetList();
});
</script>
@@ -317,7 +312,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType">
<a-auto-complete
v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions"
:options="neListStore.getNeSelectOtions"
:placeholder="t('views.ne.common.neTypePlease')"
allow-clear
/>

View File

@@ -4,13 +4,13 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, message } from 'ant-design-vue/es';
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import useI18n from '@/hooks/useI18n';
import { getMMLByNE, sendMMlByNE } from '@/api/mmlManage/neOperate';
import { uploadFileToNE } from '@/api/tool/file';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
/**网元参数 */
@@ -538,40 +538,30 @@ function fnAutoCompleteKeydown(evt: any) {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
(item: any) => {
return !['OMC'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
const info = item.children[0];
state.neType = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
state.neType = [info.neType, info.neId];
}
fnGetList();
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
(item: any) => {
return !['OMC'].includes(item.value); // 过滤不可用的网元
}
});
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
const info = item.children[0];
state.neType = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
state.neType = [info.neType, info.neId];
}
// 列表
fnGetList();
});
</script>

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, message } from 'ant-design-vue/es';
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import useI18n from '@/hooks/useI18n';
import { getMMLByOMC, sendMMlByOMC } from '@/api/mmlManage/omcOperate';
import { uploadFileToNE } from '@/api/tool/file';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOptions = ref<Record<string, any>[]>([]);
@@ -505,37 +505,24 @@ function fnAutoCompleteKeydown(evt: any) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 获取可用OMC
const omcArr = useNeInfoStore().getNeSelectOtions.find(
item => item.value === 'OMC'
);
if (omcArr) {
neOptions.value = omcArr.children;
}
// 是否有可选项
if (neOptions.value.length > 0) {
state.neId = neOptions.value[0].value;
// 获取列表数据
fnGetList();
}
} else {
message.warning({
content: t('views.mmlManage.omcOperate.noOMC'),
duration: 5,
});
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'OMC') {
neOptions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOptions.value.length > 0) {
state.neId = neOptions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, message } from 'ant-design-vue/es';
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import useI18n from '@/hooks/useI18n';
import { getMMLByUDM, sendMMlByUDM } from '@/api/mmlManage/udmOperate';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
import { uploadFileToNE } from '@/api/tool/file';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOptions = ref<Record<string, any>[]>([]);
@@ -505,42 +505,24 @@ function fnAutoCompleteKeydown(evt: any) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 获取可用UDM
const udmArr = useNeInfoStore().getNeSelectOtions.find(
item => item.value === 'UDM'
);
if (udmArr) {
neOptions.value = udmArr.children;
}
// 是否有可选项
if (neOptions.value.length > 0) {
state.neId = neOptions.value[0].value;
// 获取列表数据
fnGetList();
} else {
message.warning({
content: t('views.mmlManage.udmOpesrate.noUDM'),
duration: 5,
});
}
} else {
message.warning({
content: t('views.mmlManage.udmOpesrate.noUDM'),
duration: 5,
});
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'UDM') {
neOptions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOptions.value.length > 0) {
state.neId = neOptions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
import useI18n from '@/hooks/useI18n';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useOptions from './hooks/useOptions';
import useConfigList from './hooks/useConfigList';
import useConfigArray from './hooks/useConfigArray';
import useConfigArrayChild from './hooks/useConfigArrayChild';
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
t,
@@ -364,40 +364,28 @@ const {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
const info = item.children[0];
neTypeSelect.value = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
neTypeSelect.value = [info.neType, info.neId];
}
fnGetNeConfig();
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
}
});
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
const info = item.children[0];
neTypeSelect.value = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
neTypeSelect.value = [info.neType, info.neId];
}
fnGetNeConfig();
});
</script>

View File

@@ -6,10 +6,9 @@ import { Form, Modal, TableColumnsType, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import BackupModal from './components/BackupModal.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { parseDateToStr } from '@/utils/date-utils';
import {
@@ -22,13 +21,11 @@ import { pushBackupFTP } from '@/api/neData/backup';
import saveAs from 'file-saver';
const { t } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
/**字典数据-状态 */
let dictStatus = ref<DictType[]>([]);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -368,23 +365,8 @@ onMounted(() => {
getDict('ne_license_status').then(res => {
dictStatus.value = res;
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
});
// 获取列表数据
fnGetList();
});
/**打开FTP配置窗口 */
@@ -422,7 +404,7 @@ function fnSyncFileToFTP(row: Record<string, any>) {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
:options="neListStore.getNeSelectOtions"
:allow-clear="true"
:placeholder="t('common.inputPlease')"
/>

View File

@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
import useI18n from '@/hooks/useI18n';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useOptions from './hooks/useOptions';
import useConfigList from './hooks/useConfigList';
import useConfigArray from './hooks/useConfigArray';
import useConfigArrayChild from './hooks/useConfigArrayChild';
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
t,
@@ -536,41 +536,25 @@ const {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
fnSelectNeType(null, item);
// const info = item.children[0];
// neTypeSelect.value = [info.neType, info.neId];
} else {
fnSelectNeType(null, neCascaderOptions.value[0]);
// const info = neCascaderOptions.value[0].children[0];
// neTypeSelect.value = [info.neType, info.neId];
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
neCascaderOptions.value = neListStore.getNeSelectOtions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
}
});
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
fnSelectNeType(null, item);
} else {
fnSelectNeType(null, neCascaderOptions.value[0]);
}
});
</script>

View File

@@ -7,13 +7,13 @@ import { Modal, message } from 'ant-design-vue/es';
import { parseDateToStr } from '@/utils/date-utils';
import { getNeFile, listNeFiles } from '@/api/tool/neFile';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import ViewDrawer from './components/ViewDrawer.vue';
import saveAs from 'file-saver';
import { useRoute } from 'vue-router';
import { parseSizeFromFile } from '@/utils/parse-utils';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const route = useRoute();
@@ -283,20 +283,10 @@ function fnDrawerOpen(row: Record<string, any>) {
}
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
} else if (routeParams.neType) {
neTypeSelect.value = [routeParams.neType, routeParams.neId];
fnNeChange(neTypeSelect.value, undefined);
}
}
});
if (routeParams.neType) {
neTypeSelect.value = [routeParams.neType, routeParams.neId];
fnNeChange(neTypeSelect.value, undefined);
}
});
</script>
@@ -310,7 +300,7 @@ onMounted(() => {
<span>{{ t('views.logManage.neFile.neType') }}:</span>&nbsp;
<a-cascader
v-model:value="neTypeSelect"
:options="neInfoStore.getNeCascaderOptions"
:options="neListStore.getNeCascaderOptions"
@change="fnNeChange"
:allow-clear="false"
:placeholder="t('views.logManage.neFile.neTypePlease')"

View File

@@ -7,12 +7,12 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { listNeInfo, delNeInfo, stateNeInfo } from '@/api/ne/neInfo';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import useDictStore from '@/store/modules/dict';
import useNeOptions from './hooks/useNeOptions';
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const {
fnNeStart,
@@ -262,7 +262,7 @@ function reloadRowInfo(row: Record<string, any>) {
}
})
.finally(() => {
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh();
});
}
@@ -308,7 +308,7 @@ function fnRecordDelete(id: string) {
}
});
// 刷新缓存
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh();
} else {
message.error({
content: `${res.msg}`,
@@ -404,7 +404,7 @@ function fnGetList(pageNum?: number) {
})
.finally(() => {
// 刷新缓存的网元信息
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh();
});
}
@@ -435,7 +435,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('common.inputPlease')"
/>

View File

@@ -4,15 +4,15 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNeLicense, stateNeLicense } from '@/api/ne/neLicense';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const EditModal = defineAsyncComponent(
() => import('./components/EditModal.vue')
);
@@ -20,9 +20,6 @@ const EditModal = defineAsyncComponent(
/**字典数据-状态 */
let dictStatus = ref<DictType[]>([]);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -340,21 +337,9 @@ function fnRecordStateBatch() {
onMounted(() => {
// 初始字典数据
getDict('ne_license_status').then(res => {
dictStatus.value = res;
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
getDict('ne_license_status')
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
dictStatus.value = res;
})
.finally(() => {
// 获取列表数据
@@ -377,7 +362,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
:options="neListStore.getNeSelectOtions"
:allow-clear="true"
:placeholder="t('common.inputPlease')"
/>
@@ -492,7 +477,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 120 }"
:scroll="{ x: tableColumns.length * 140 }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
:row-selection="{
type: 'checkbox',

View File

@@ -8,8 +8,9 @@ import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const { t } = useI18n();
/**字典数据 */
@@ -199,8 +200,8 @@ function fnModalOk() {
content: `${t('common.operateOk')}`,
duration: 3,
});
// 刷新缓存的网元信息
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh(); // 刷新缓存的网元信息
stepState.neInfo = from; // 保存网元信息
modalState.stepNext = true; // 开启下一步
} else {
@@ -368,7 +369,7 @@ onMounted(() => {
<template #title>
{{ t('views.ne.common.neTypeTip') }}
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -392,7 +393,7 @@ onMounted(() => {
<template #title>
{{ t('views.ne.common.neIdTip') }}
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -422,7 +423,7 @@ onMounted(() => {
{{ t('views.ne.common.ipAddrTip') }}
</div>
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -447,7 +448,7 @@ onMounted(() => {
<template #title>
<div>{{ t('views.ne.common.portTip') }}</div>
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input-number>

View File

@@ -1,7 +1,8 @@
import { reactive, toRaw } from 'vue';
import { getPara5GFilee, savePara5GFile, updateNeInfo } from '@/api/ne/neInfo';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
const neListStore = useNeListStore();
/**对象信息信息状态类型 */
type StateType = {
@@ -37,7 +38,7 @@ export function usePara5G() {
/**载入数据*/
function fnReloadData() {
state.confirmLoading = true;
Promise.all([getPara5GFilee(), useNeInfoStore().fnRefreshNelist()]).then(
Promise.all([getPara5GFilee(), neListStore.fnNelistRefresh()]).then(
resArr => {
// 已保存的配置
if (resArr[0].code === RESULT_CODE_SUCCESS) {

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNeSoftware, delNeSoftware } from '@/api/ne/neSoftware';
import { parseDateToStr } from '@/utils/date-utils';
import { downloadFile } from '@/api/tool/file';
import { saveAs } from 'file-saver';
const neListStore = useNeListStore();
const { t } = useI18n();
// 异步加载组件
@@ -22,9 +22,6 @@ const UploadMoreFile = defineAsyncComponent(
() => import('./components/UploadMoreFile.vue')
);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -127,7 +124,7 @@ let tableColumns = ref<TableColumnsType>([
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 150,
width: 200,
},
{
title: t('common.operate'),
@@ -191,7 +188,7 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeSoftware(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
@@ -335,23 +332,8 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
}
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
});
// 获取列表数据
fnGetList();
});
</script>
@@ -369,7 +351,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('common.inputPlease')"
/>
@@ -505,7 +487,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 150 }"
:scroll="{ x: tableColumns.length * 180 }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
:row-selection="{
type: 'checkbox',

View File

@@ -10,8 +10,7 @@ import {
} from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import useNeInfoStore from '@/store/modules/neinfo';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import useNeListStore from '@/store/modules/ne_list';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
import { parseDateToStr } from '@/utils/date-utils';
@@ -19,6 +18,7 @@ import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useMaskStore from '@/store/modules/mask';
const maskStore = useMaskStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const { getDict } = useDictStore();
@@ -33,9 +33,6 @@ const UploadMoreFile = defineAsyncComponent(
/**字典数据-状态 */
let dictStatus = ref<DictType[]>([]);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -151,7 +148,7 @@ let tableColumns = ref<TableColumnsType>([
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 150,
width: 200,
},
{
title: t('common.operate'),
@@ -441,21 +438,9 @@ async function fnRecordUpgrade() {
onMounted(() => {
// 初始字典数据
getDict('ne_version_status').then(res => {
dictStatus.value = res;
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
getDict('ne_version_status')
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
dictStatus.value = res;
})
.finally(() => {
// 获取列表数据
@@ -478,7 +463,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('common.inputPlease')"
/>
@@ -607,7 +592,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 120 }"
:scroll="{ x: tableColumns.length * 150 }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
:row-selection="{
type: 'checkbox',

View File

@@ -6,11 +6,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { useRoute } from 'vue-router';
import { listAMFNblist } from '@/api/neData/amf';
import { listMMENblist } from '@/api/neData/mme';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const route = useRoute();
const { t } = useI18n();
@@ -264,57 +264,40 @@ function fnGetList(pageNum?: number) {
onMounted(() => {
// 获取网元网元列表
neInfoStore
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
for (const item of neInfoStore.getNeCascaderOptions) {
if (!['AMF', 'MME'].includes(item.value)) continue;
const v = JSON.parse(JSON.stringify(item));
for (const item of neListStore.getNeCascaderOptions) {
// 过滤不可用的网元
if (!['AMF', 'MME'].includes(item.value)) continue;
const v = JSON.parse(JSON.stringify(item));
if (v.label === 'AMF') {
v.label = '5G';
}
if (v.label === 'MME') {
v.label = '4G';
}
neCascaderOptions.value.push(v);
}
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 无查询参数neType时 默认选择AMF
const queryNeType = (route.query.neType as string) || '5G';
const item = neCascaderOptions.value.find(
s => s.value === queryNeType
);
if (item && item.children) {
const info = item.children[0];
queryParams.neType = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
queryParams.neType = [info.neType, info.neId];
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
if (v.label === 'AMF') {
v.label = '5G';
}
if (v.label === 'MME') {
v.label = '4G';
}
neCascaderOptions.value.push(v);
}
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 无查询参数neType时 默认选择AMF
const queryNeType = (route.query.neType as string) || '5G';
const item = neCascaderOptions.value.find(s => s.value === queryNeType);
if (item && item.children) {
const info = item.children[0];
queryParams.neType = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
queryParams.neType = [info.neType, info.neId];
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -12,7 +12,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { ColumnsType } from 'ant-design-vue/es/table';
import { ProModal } from 'antdv-pro-modal';
import UploadModal from '@/components/UploadModal/index.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
const { t, currentLocale } = useI18n();
import {
@@ -32,6 +32,8 @@ import saveAs from 'file-saver';
import { readSheet, writeSheet } from '@/utils/execl-utils';
import { useRoute } from 'vue-router';
const route = useRoute();
const neListStore = useNeListStore();
// 异步加载组件
const HistoryModal = defineAsyncComponent(
() => import('./components/history.vue')
@@ -655,40 +657,32 @@ async function fnModalImportTemplate() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
useNeInfoStore().neCascaderOptions.forEach(item => {
if (['AMF', 'MME'].includes(item.value)) {
arr.push(JSON.parse(JSON.stringify(item)));
}
});
neCascaderOptions.value = arr;
// 无查询参数neType时 默认选择AMF
const queryNeType = (route.query.neType as string) || 'AMF';
const item = arr.find(s => s.value === queryNeType);
if (item && item.children) {
const info = item.children[0];
neTypeAndId.value = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
neTypeAndId.value = [info.neType, info.neId];
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (['AMF', 'MME'].includes(item.value)) {
neCascaderOptions.value.push(JSON.parse(JSON.stringify(item)));
}
});
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 无查询参数neType时 默认选择AMF
const queryNeType = (route.query.neType as string) || 'AMF';
const item = neCascaderOptions.value.find(s => s.value === queryNeType);
if (item && item.children) {
const info = item.children[0];
neTypeAndId.value = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
neTypeAndId.value = [info.neType, info.neId];
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -5,7 +5,7 @@ import { listAMFNbStatelist } from '@/api/neData/amf';
import { parseBasePath } from '@/plugins/file-static-url';
import { edgeLineAnimateState } from '@/views/monitor/topologyBuild/hooks/registerEdge';
import { nodeImageAnimateState } from '@/views/monitor/topologyBuild/hooks/registerNode';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { stateNeInfo } from '@/api/ne/neInfo';
@@ -13,6 +13,7 @@ import { parseDateToStr } from '@/utils/date-utils';
import { useFullscreen } from '@vueuse/core';
import { listMMENbStatelist } from '@/api/neData/mme';
const { t } = useI18n();
const neListStore = useNeListStore();
/**图DOM节点实例对象 */
const graphG6Dom = useTemplateRef('graphG6Dom');
@@ -358,9 +359,7 @@ function handleRanderGraph(container: HTMLElement | null, data: GraphData) {
/**
* 获取图组数据渲染到画布
*/
async function fnGraphDataLoad() {
// 加载基础网元
await useNeInfoStore().fnNelist();
async function fnGraphDataLoad() {
const dataNe = await fnGraphDataBase();
Object.assign(graphData, dataNe);
graphG6.value = handleRanderGraph(graphG6Dom.value, dataNe);
@@ -381,7 +380,7 @@ async function fnGraphDataBase() {
edges: [],
};
// 添加基础网元
for (const item of useNeInfoStore().getNeSelectOtions) {
for (const item of neListStore.getNeSelectOtions) {
if ('OMC' === item.value) {
if (item.children?.length === 0) continue;
// 是否存在OMC保证唯一

View File

@@ -5,11 +5,12 @@ import { message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listIMSSessionList } from '@/api/neData/ims';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -147,13 +148,13 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listIMSSessionList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tablePagination.total = res.data.length;
tableState.data = res.data;
tablePagination.total = res.data.length;
tableState.data = res.data;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -172,33 +173,24 @@ function fnGetList(pageNum?: number) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'IMS') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'IMS') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>
@@ -223,7 +215,11 @@ onMounted(() => {
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="IMSI" name="imsi">
<a-input v-model:value="queryParams.imsi" allow-clear :maxlength="15"></a-input>
<a-input
v-model:value="queryParams.imsi"
allow-clear
:maxlength="15"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">

View File

@@ -6,7 +6,7 @@ import { message, Modal, Form, TableColumnsType } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import UploadModal from '@/components/UploadModal/index.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import {
addPCFRule,
@@ -21,7 +21,7 @@ import { uploadFileToNE } from '@/api/tool/file';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { saveAs } from 'file-saver';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -693,33 +693,24 @@ function fnModalDownloadImportTemplate() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'PCF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'PCF') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -7,11 +7,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { listSMFSubList } from '@/api/neData/smf';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -225,7 +225,7 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listSMFSubList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
@@ -247,33 +247,24 @@ function fnGetList(pageNum?: number) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'SMF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'SMF') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import UploadModal from '@/components/UploadModal/index.vue';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { saveAs } from 'file-saver';
@@ -27,7 +27,7 @@ import {
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -739,33 +739,24 @@ function fnModalDownloadImportTemplate() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'UDM') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'UDM') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import UploadModal from '@/components/UploadModal/index.vue';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import saveAs from 'file-saver';
@@ -27,7 +27,7 @@ import {
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -1130,33 +1130,24 @@ async function fnModalDownloadImportTemplate() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'UDM') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'UDM') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -22,14 +22,13 @@ import {
listUDMVOIP,
resetUDMVOIP,
} from '@/api/neData/udm_voip';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { saveAs } from 'file-saver';
import { uploadFileToNE } from '@/api/tool/file';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -540,31 +539,24 @@ function fnModalDownloadImportTemplate() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && res.data?.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'UDM') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'UDM') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -12,17 +12,7 @@ import {
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import UploadModal from '@/components/UploadModal/index.vue';
import {
addUDMVOIP,
batchAddUDMVOIP,
batchDelUDMVOIP,
delUDMVOIP,
exportUDMVOIP,
importUDMVOIP,
listUDMVOIP,
resetUDMVOIP,
} from '@/api/neData/udm_voip';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { saveAs } from 'file-saver';
@@ -33,12 +23,12 @@ import {
batchDelUDMVolteIMS,
delUDMVolteIMS,
exportUDMVolteIMS,
importUDMVolteIMS,
listUDMVolteIMS,
resetUDMVolteIMS,
} from '@/api/neData/udm_volte_ims';
const { t } = useI18n();
const neListStore = useNeListStore();
/**字典数据 */
let dict: {
/**Tag标签类型 0=VoIP, 1=VoLTE */
@@ -554,7 +544,7 @@ function fnModalUploadImportUpload(file: File) {
uploadFileToNE('UDM', neID, file, 5)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
return importUDMVOIP({
return importUDMVolteIMS({
neId: neID,
uploadPath: res.data,
});
@@ -601,31 +591,24 @@ function fnModalDownloadImportTemplate() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && res.data?.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'UDM') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'UDM') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -6,11 +6,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { listN3iwf } from '@/api/neUser/n3iwf';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -104,33 +104,24 @@ function fnGetList() {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'N3IWF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'N3IWF') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>

View File

@@ -1,19 +1,14 @@
<script setup lang="ts">
import { reactive, ref, onMounted, toRaw } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import { message } from 'ant-design-vue/es';
import { reactive, ref, onMounted } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { listNSSF } from '@/api/neUser/nssf';
import useNeInfoStore from '@/store/modules/neinfo';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
const { t } = useI18n();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**表格状态类型 */
type TabeStateType = {
/**加载等待 */
@@ -69,12 +64,12 @@ function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
listNSSF().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
const { total, rows } = res.data;
const { total, rows } = res.data;
tableState.data = rows;
} else {
tableState.data = [];

View File

@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import {
addCustom,
delCustom,
@@ -19,7 +19,7 @@ import { getKPITitle } from '@/api/perfManage/goldTarget';
import useDictStore from '@/store/modules/dict';
const { t, currentLocale } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
/**字典数据 */
let dict: {
/**状态 */
@@ -461,37 +461,30 @@ function fnChangeUnit(value: any) {
/**网元参数 */
let neCascaderOptions = ref<Record<string, any>[]>([]);
onMounted(() => {
// 过滤不可用的网元
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
(item: any) => {
return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes(
item.value
);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
Promise.allSettled([
// 获取网元网元列表
getDict('sys_normal_disable'),
useNeInfoStore().fnNelist(),
])
.then(resArr => {
if (resArr[0].status === 'fulfilled') {
dict.sysNormalDisable = resArr[0].value;
}
if (
resArr[1].status === 'fulfilled' &&
Array.isArray(resArr[1].value.data)
) {
if (resArr[1].value.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value =
useNeInfoStore().getNeCascaderOptions.filter((item: any) => {
return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes(
item.value
);
});
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
}
}
})
.finally(() => {
// 获取列表数据

View File

@@ -35,7 +35,7 @@ import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { getKPITitle, listKPIData } from '@/api/perfManage/goldTarget';
import { parseDateToStr } from '@/utils/date-utils';
@@ -47,7 +47,7 @@ import { useRoute } from 'vue-router';
import { LineOutlined } from '@ant-design/icons-vue';
import useLayoutStore from '@/store/modules/layout';
const layoutStore = useLayoutStore();
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const route = useRoute();
const { t, currentLocale } = useI18n();
const ws = new WS();
@@ -825,50 +825,39 @@ watch(
onMounted(() => {
// 目前支持的 AMF AUSF MME MOCNGW NSSF SMF UDM UPF PCF
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
(item: any) => {
return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes(
item.value
);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 无查询参数neType时 默认选择UPF
const queryNeType = (route.query.neType as string) || 'UPF';
const item = neCascaderOptions.value.find(s => s.value === queryNeType);
if (item && item.children) {
const info = item.children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
} else {
const info = neCascaderOptions.value[0].children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
}
fnGetListTitle();
// 绘图
fnRanderChart();
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
(item: any) => {
// 过滤不可用的网元
return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes(
item.value
);
}
});
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 无查询参数neType时 默认选择UPF
const queryNeType = (route.query.neType as string) || 'UPF';
const item = neCascaderOptions.value.find(s => s.value === queryNeType);
if (item && item.children) {
const info = item.children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
} else {
const info = neCascaderOptions.value[0].children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
}
fnGetListTitle();
// 绘图
fnRanderChart();
});
onBeforeUnmount(() => {

View File

@@ -34,7 +34,7 @@ import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { listCustom } from '@/api/perfManage/customTarget';
import { listCustomData } from '@/api/perfManage/customData';
@@ -45,10 +45,10 @@ import { generateColorRGBA } from '@/utils/generate-utils';
import { OptionsType, WS } from '@/plugins/ws-websocket';
import { LineOutlined } from '@ant-design/icons-vue';
import { useRoute } from 'vue-router';
import dayjs, { Dayjs } from 'dayjs';
import dayjs from 'dayjs';
import useLayoutStore from '@/store/modules/layout';
const layoutStore = useLayoutStore();
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const route = useRoute();
const { t, currentLocale } = useI18n();
const ws = new WS();
@@ -893,61 +893,48 @@ onMounted(() => {
typeArr.push(item.neType);
});
typeArr = Array.from(new Set(typeArr));
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
(item: any) => {
return typeArr.includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 无查询参数neType时 默认选择UPF
const queryNeType = (route.query.neType as string) || 'UPF';
const item = neCascaderOptions.value.find(
s => s.value === queryNeType
);
if (item && item.children) {
const info = item.children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
} else {
const info = neCascaderOptions.value[0].children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
}
// 查询当前小时
const now = new Date();
now.setMinutes(0, 0, 0);
// 设置起始时间为整点前一小时
const startTime = new Date(now);
startTime.setHours(now.getHours() - 1);
queryRangePicker.value[0] = `${startTime.getTime()}`;
// 设置结束时间为整点
const endTime = new Date(now);
endTime.setMinutes(59, 59, 59);
queryRangePicker.value[1] = `${endTime.getTime()}`;
fnGetListTitle();
// 绘图
fnRanderChart();
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
// 过滤不可用的网元
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
(item: any) => {
return typeArr.includes(item.value);
}
});
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 无查询参数neType时 默认选择UPF
const queryNeType = (route.query.neType as string) || 'UPF';
const item = neCascaderOptions.value.find(s => s.value === queryNeType);
if (item && item.children) {
const info = item.children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
} else {
const info = neCascaderOptions.value[0].children[0];
state.neType = [info.neType, info.neId];
queryParams.neType = info.neType;
queryParams.neId = info.neId;
}
// 查询当前小时
const now = new Date();
now.setMinutes(0, 0, 0);
// 设置起始时间为整点前一小时
const startTime = new Date(now);
startTime.setHours(now.getHours() - 1);
queryRangePicker.value[0] = `${startTime.getTime()}`;
// 设置结束时间为整点
const endTime = new Date(now);
endTime.setMinutes(59, 59, 59);
queryRangePicker.value[1] = `${endTime.getTime()}`;
fnGetListTitle();
// 绘图
fnRanderChart();
}
});
});

View File

@@ -19,8 +19,8 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { listKPIData, getKPITitle } from '@/api/perfManage/goldTarget';
import useI18n from '@/hooks/useI18n';
import { parseDateToStr } from '@/utils/date-utils';
import dayjs, { Dayjs } from 'dayjs';
import useNeInfoStore from '@/store/modules/neinfo';
import dayjs from 'dayjs';
import useNeListStore from '@/store/modules/ne_list';
import { message } from 'ant-design-vue';
import { generateColorRGBA } from '@/utils/generate-utils';
import { LineSeriesOption } from 'echarts/charts';
@@ -30,9 +30,7 @@ import { useDebounceFn } from '@vueuse/core';
import { LineOutlined } from '@ant-design/icons-vue';
import { TableColumnType } from 'ant-design-vue';
const { t, currentLocale } = useI18n();
//test
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
//日期快捷选择
const ranges = ref([
{
@@ -72,12 +70,13 @@ const ALL_NE_TYPES = [
'cbc',
] as const;
type AllChartType = (typeof ALL_NE_TYPES)[number] & string;
console.log( neInfoStore.getNeCascaderOptions)
// 在 ALL_NE_TYPES 定义之后添加 小写转大写
const neTypeOptions = neInfoStore.getNeCascaderOptions.map(v => ({
label: v.value,
value: v.label,
}));
const neTypeOptions = neListStore.getNeCascaderOptions
.filter(v => ALL_NE_TYPES.includes(v.value.toLowerCase()))
.map(v => ({
label: v.label,
value: v.value.toLowerCase(),
}));
// 使用 ref 来使 networkElementTypes 变为响应式,并使用 ALL_NE_TYPES 初始化
const networkElementTypes = ref<AllChartType[]>([...ALL_NE_TYPES]);
@@ -300,7 +299,7 @@ const chartStates: Record<
> = Object.fromEntries(
networkElementTypes.value.map(type => [type, createChartState(type)])
) as Record<AllChartType, ReturnType<typeof createChartState>>;
// 日期选择器状态
const rangePicker = reactive({
...(Object.fromEntries(
@@ -821,7 +820,7 @@ const fetchKPITitle = async (type: AllChartType) => {
return dayjs(Number(text)).format('YYYY-MM-DD HH:mm:ss');
},
},
...res.data.map((item:any) => {
...res.data.map((item: any) => {
const kpiId = item.kpiId;
// 如果没有现有的颜色,生成新的颜色
if (!existingColors.has(kpiId)) {
@@ -1032,7 +1031,6 @@ const themeObserver = new MutationObserver(() => {
// 在 onMounted 中添加题观察器
onMounted(async () => {
ws.value = new WS();
await neInfoStore.fnNelist();
// 从本地存储中读取选中的网元类型
const savedSelectedNeTypes = localStorage.getItem('selectedNeTypes');
@@ -1342,7 +1340,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
<a-tooltip placement="bottom">
<template #title>
<span>
{{ t('views.perfManage.kpiOverView.totalValueTip') }}
{{
t('views.perfManage.kpiOverView.totalValueTip')
}}
</span>
</template>
<InfoCircleOutlined />
@@ -1355,7 +1355,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
<a-tooltip placement="bottom">
<template #title>
<span>
{{ t('views.perfManage.kpiOverView.avgValueTip') }}
{{
t('views.perfManage.kpiOverView.avgValueTip')
}}
</span>
</template>
<InfoCircleOutlined />
@@ -1368,7 +1370,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
<a-tooltip placement="bottom">
<template #title>
<span>
{{ t('views.perfManage.kpiOverView.maxValueTip') }}
{{
t('views.perfManage.kpiOverView.maxValueTip')
}}
</span>
</template>
<InfoCircleOutlined />
@@ -1381,7 +1385,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
<a-tooltip placement="bottom">
<template #title>
<span>
{{ t('views.perfManage.kpiOverView.minValueTip') }}
{{
t('views.perfManage.kpiOverView.minValueTip')
}}
</span>
</template>
<InfoCircleOutlined />

View File

@@ -7,7 +7,7 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listperfData } from '@/api/perfManage/perfData';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n';
const { getDict } = useDictStore();
@@ -223,7 +223,7 @@ onMounted(() => {
}
});
// 获取网元网元列表
useNeInfoStore().fnNelist();
useNeListStore().fnNelist();
// 获取列表数据
fnGetList();
});
@@ -246,7 +246,7 @@ onMounted(() => {
>
<a-auto-complete
v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions"
:options="useNeListStore().getNeSelectOtions"
allow-clear
/>
</a-form-item>

View File

@@ -9,7 +9,7 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import {
addPerfThre,
delPerfThre,
@@ -268,9 +268,10 @@ const modalStateFrom = Form.useForm(
/**性能测量数据集选择初始 */
function fnSelectPerformanceInit(value: any) {
//console.logg(currentLocale.value); //当前语言
const performance = useNeInfoStore().perMeasurementList.filter(
i => i.neType === value
);
const performance: any = [];
// const performance = useNeListStore().perMeasurementList.filter(
// i => i.neType === value
// );
//进行分组选择
const groupedData = performance.reduce((groups: any, item: any) => {
const { kpiCode, ...rest } = item;
@@ -491,9 +492,10 @@ onMounted(() => {
Promise.allSettled([
// 获取网元网元列表
useNeInfoStore().fnNelist(),
useNeListStore().fnNelist(),
// 获取性能测量集列表
useNeInfoStore().fnNeTaskPerformance(),
// useNeListStore().fnNeTaskPerformance(),
// getNePerformanceList(),
]).finally(() => {
// 获取列表数据
fnGetList();
@@ -515,7 +517,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions"
:options="useNeListStore().getNeSelectOtions"
allow-clear
:placeholder="t('views.ne.common.neTypePlease')"
/>
@@ -689,7 +691,7 @@ onMounted(() => {
>
<a-select
v-model:value="modalState.from.neType"
:options="useNeInfoStore().getNeSelectOtions"
:options="useNeListStore().getNeSelectOtions"
@change="fnSelectPerformanceInit"
:allow-clear="false"
:placeholder="t('views.ne.common.neTypePlease')"

View File

@@ -10,7 +10,7 @@ import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import useUserStore from '@/store/modules/user';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import {
addPerfTask,
delPerfTask,
@@ -20,7 +20,7 @@ import {
taskStop,
taskRun,
} from '@/api/perfManage/taskManage';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t, currentLocale } = useI18n();
const generateOptions = (start: any, end: any) => {
@@ -222,7 +222,7 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listPerfTask(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
@@ -389,9 +389,10 @@ function fnSelectPer(s: any, option: any) {
/**性能测量数据集选择初始 */
function fnSelectPerformanceInit(neType: string) {
//console.logg(currentLocale.value); //当前语言
const performance = neInfoStore.perMeasurementList.filter(
i => i.neType === neType
);
const performance: any = [];
// const performance = neInfoStore.perMeasurementList.filter(
// i => i.neType === neType
// );
//进行分组选择
const groupedData = performance.reduce((groups: any, item: any) => {
const { kpiCode, ...rest } = item;
@@ -699,17 +700,8 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
}
onMounted(() => {
// 初始字典数据
Promise.allSettled([
// 获取网元网元列表
neInfoStore.fnNelist(),
// 获取性能测量集列表
neInfoStore.fnNeTaskPerformance(),
]).finally(() => {
// 获取列表数据
fnGetList();
});
// 获取列表数据
fnGetList();
});
</script>
@@ -727,7 +719,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="neInfoStore.getNeSelectOtions"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('views.ne.common.neTypePlease')"
/>
@@ -890,7 +882,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType">
<a-cascader
:value="modalState.neType"
:options="neInfoStore.getNeCascaderOptions"
:options="neListStore.getNeCascaderOptions"
disabled
/>
</a-form-item>
@@ -1007,7 +999,7 @@ onMounted(() => {
>
<a-cascader
v-model:value="modalState.neType"
:options="neInfoStore.getNeCascaderOptions"
:options="neListStore.getNeCascaderOptions"
@change="fnNeChange"
:allow-clear="false"
:placeholder="t('views.ne.common.neTypePlease')"

View File

@@ -8,9 +8,9 @@ import {
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import TerminalSSHView from '@/components/TerminalSSHView/index.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { iperfI, iperfV } from '@/api/tool/iperf';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
/**网元参数 */
@@ -66,7 +66,11 @@ async function fnIPerf() {
});
return;
}
if (state.dataType === 'options' && state.data.mode === 'client' && state.data.host === '') {
if (
state.dataType === 'options' &&
state.data.mode === 'client' &&
state.data.host === ''
) {
message.warning({
content: 'Please fill in the Host',
duration: 2,
@@ -229,29 +233,16 @@ function fnMessage(res: Record<string, any>) {
/**钩子函数,界面打开初始化*/
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
for (const item of neInfoStore.getNeCascaderOptions) {
neCascaderOptions.value.push(item);
}
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
});
for (const item of neListStore.getNeCascaderOptions) {
neCascaderOptions.value.push(item); // 过滤不可用的网元
}
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
});
/**钩子函数,界面关闭*/

View File

@@ -8,9 +8,9 @@ import {
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import TerminalSSHView from '@/components/TerminalSSHView/index.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { pingV } from '@/api/tool/ping';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
/**网元参数 */
@@ -187,29 +187,16 @@ function fnMessage(res: Record<string, any>) {
/**钩子函数,界面打开初始化*/
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
for (const item of neInfoStore.getNeCascaderOptions) {
neCascaderOptions.value.push(item);
}
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
});
for (const item of neListStore.getNeCascaderOptions) {
neCascaderOptions.value.push(item); // 过滤不可用的网元
}
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
});
/**钩子函数,界面关闭*/

View File

@@ -5,14 +5,16 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { Modal, message } from 'ant-design-vue/es';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { delNeHost, listNeHost } from '@/api/ne/neHost';
import useNeListStore from '@/store/modules/ne_list';
import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n';
const neListStore = useNeListStore();
const { getDict } = useDictStore();
const { t } = useI18n();
const EditModal = defineAsyncComponent(
() => import('@/views/ne/neHost/components/EditModal.vue')
);
const emit = defineEmits(['modal','link']);
const emit = defineEmits(['modal', 'link']);
/**字典数据 */
let dict: {
@@ -35,7 +37,7 @@ let queryParams = reactive({
/**分组 */
groupId: undefined,
/**名称 */
title: '',
title: 'OMC',
/**当前页数 */
pageNum: 1,
/**每页条数 */
@@ -144,7 +146,7 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeHost(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
@@ -185,7 +187,7 @@ let modalState: ModalStateType = reactive({
function fnModalVisibleByEdit(roleId?: undefined) {
modalState.id = roleId;
modalState.openByEdit = true;
emit('modal');
emit('modal');
}
/**
@@ -286,7 +288,17 @@ onMounted(() => {
</template>
<!-- 插槽-卡片右侧 -->
<template #extra> </template>
<template #extra>
<a-auto-complete
v-model:value="queryParams.title"
:options="neListStore.getNeSelectOtions"
allow-clear
size="small"
:placeholder="t('common.inputPlease')"
@change="fnGetList(1)"
style="width: 180px"
/>
</template>
<!-- 表格列表 -->
<a-table
@@ -325,10 +337,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip v-if="record.groupId !== '1'">
<template #title>{{ t('common.deleteText') }}</template>
<a-button
type="link"
@click.prevent="fnRecordDelete(record.id)"
>
<a-button type="link" @click.prevent="fnRecordDelete(record.id)">
<template #icon><DeleteOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -8,13 +8,13 @@ import { parseDateToStr } from '@/utils/date-utils';
import { getNeDirZip, getNeFile, listNeFiles } from '@/api/tool/neFile';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import ViewDrawer from '@/views/ne/neFile/components/ViewDrawer.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useTabsStore from '@/store/modules/tabs';
import useI18n from '@/hooks/useI18n';
import saveAs from 'file-saver';
import { useRoute, useRouter } from 'vue-router';
const tabsStore = useTabsStore();
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const route = useRoute();
const router = useRouter();
@@ -333,20 +333,10 @@ function fnDrawerOpen(row: Record<string, any>) {
}
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
} else if (routeParams.neType && routeParams.neId) {
neTypeSelect.value = [routeParams.neType, routeParams.neId];
fnNeChange(neTypeSelect.value, undefined);
}
}
});
if (routeParams.neType && routeParams.neId) {
neTypeSelect.value = [routeParams.neType, routeParams.neId];
fnNeChange(neTypeSelect.value, undefined);
}
});
</script>
@@ -366,7 +356,7 @@ onMounted(() => {
<span>{{ t('views.logManage.neFile.neType') }}:</span>&nbsp;
<a-cascader
v-model:value="neTypeSelect"
:options="neInfoStore.getNeCascaderOptions"
:options="neListStore.getNeCascaderOptions"
@change="fnNeChange"
:allow-clear="false"
:placeholder="t('views.logManage.neFile.neTypePlease')"
@@ -434,7 +424,7 @@ onMounted(() => {
<template #icon><DownloadOutlined /></template>
{{ t('common.downloadText') }}
</a-button>
<a-button
type="link"
@click.prevent="fnDrawerOpen(record)"

View File

@@ -11,7 +11,7 @@ import { parseDateToStr } from '@/utils/date-utils';
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import {
addTraceTask,
delTraceTask,
@@ -23,7 +23,7 @@ import useDictStore from '@/store/modules/dict';
import { regExpIPv4 } from '@/utils/regular-utils';
import dayjs, { Dayjs } from 'dayjs';
import { parseObjHumpToLine } from '@/utils/parse-utils';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { getDict } = useDictStore();
const { t } = useI18n();
const router = useRouter();
@@ -577,36 +577,20 @@ onMounted(() => {
);
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
(item: any) => {
return ['AMF', 'AUSF', 'SMF', 'UDM', 'PCF'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 3,
});
return;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 3,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neCascaderOptions.value = neListStore.getNeSelectOtions.filter(
(item: any) => {
return ['AMF', 'AUSF', 'SMF', 'UDM', 'PCF'].includes(item.value); // 过滤不可用的网元
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 3,
});
return;
}
// 获取列表数据
fnGetList();
});
</script>