feat: 根据网元显示特有菜单
This commit is contained in:
@@ -244,7 +244,7 @@ export default {
|
||||
},
|
||||
error: {
|
||||
err403: {
|
||||
ttile: 'No access',
|
||||
ttile: 'No Access',
|
||||
subTitle:'Please do not perform illegal operations, you can go back to the main page or return to the',
|
||||
backHome: 'Back to Home',
|
||||
back: 'Back',
|
||||
@@ -1902,7 +1902,7 @@ export default {
|
||||
pathTip:`The accessed routing address, such as: user, /auth 1. If the network address requires internal access, start with http(s):// Menu behavior (root node): The current window opens the menu behavior, (non-root node) :Embedded window. 2. If the network address requires external access, set the internal address option to No. Menu behavior: Open a new tab 3. If the embedded subpage needs to hide the page, set the display status option to Hide address splicing to embed routing. address`,
|
||||
sonPage:'Subpage address',
|
||||
componentTip:' The component path accessed by views in the page component directory, such as: system/user/index Note: The routing address without the .vue file suffix is the network address and can be filled in as a link',
|
||||
perms:`Permission identification example: monitor:server:query Permission identification is used in the back-end controller, such as:['monitor:server:query'] Permission identification is used in the front-end Vue page, such as: v-perms:has="['monitor:server:query']"`
|
||||
perms:"Example of privilege identification:monitor:server:query If network element specific udm#service:query or udm+ims#service:query",
|
||||
},
|
||||
dict:{
|
||||
dictInfo:'Dictionary Type Information',
|
||||
|
||||
@@ -1902,7 +1902,7 @@ export default {
|
||||
pathTip:`访问的路由地址,如:user、/auth 1. 如网络地址需内部访问 则以 http(s):// 开头菜单行为(根节点):当前窗口打开 菜单行为,(非根节点):内嵌窗口.2. 如网络地址需外部访问则将内部地址选项设为否菜单行为:打开新标签3. 如内嵌子页面需要隐藏页面则将显示状态选项设为隐藏地址拼接以内嵌路由地址`,
|
||||
sonPage:'子页面地址',
|
||||
componentTip:' 页面组件目录 views 访问的组件路径,如:system/user/index 注意:不带 .vue 文件后缀路由地址是网络地址可填入链接',
|
||||
perms:`权限标识示例:monitor:server:query 后端控制器中使用权限标识,如:['monitor:server:query'] 前端vue页面中使用权限标识,如:v-perms:has="['monitor:server:query']"`
|
||||
perms:"权限标识示例:monitor:server:query 若是网元特有udm#service:query 或udm+ims#service:query",
|
||||
},
|
||||
dict:{
|
||||
dictInfo:'字典类型信息',
|
||||
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
import { useRouter } from 'vue-router';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -33,6 +34,7 @@ import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
const { proConfig, waterMarkContent } = useLayoutStore();
|
||||
const { t, currentLocale } = useI18n();
|
||||
const routerStore = useRouterStore();
|
||||
const neListStore = useNeListStore();
|
||||
const tabsStore = useTabsStore();
|
||||
const appStore = useAppStore();
|
||||
const router = useRouter();
|
||||
@@ -66,18 +68,36 @@ watch(
|
||||
);
|
||||
|
||||
// 动态路由添加到菜单面板
|
||||
const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||
if (rootRoute) {
|
||||
const children = routerStore.setRootRouterData(rootRoute.children);
|
||||
const buildRouterData = routerStore.buildRouterData;
|
||||
if (buildRouterData.length > 0) {
|
||||
rootRoute.children = children.concat(buildRouterData);
|
||||
} else {
|
||||
rootRoute.children = children;
|
||||
// const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||
// if (rootRoute) {
|
||||
// const children = routerStore.setRootRouterData(rootRoute.children);
|
||||
// const buildRouterData = routerStore.buildRouterData;
|
||||
// if (buildRouterData.length > 0) {
|
||||
// rootRoute.children = children.concat(buildRouterData);
|
||||
// } else {
|
||||
// rootRoute.children = children;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// const { menuData } = getMenuData(clearMenuItem(router.getRoutes()));
|
||||
//
|
||||
const menuData = computed(() => {
|
||||
const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||
if (rootRoute) {
|
||||
const children = routerStore.setRootRouterData(rootRoute.children);
|
||||
const buildRouterData = routerStore.buildRouterData;
|
||||
if (buildRouterData.length > 0) {
|
||||
rootRoute.children = children.concat(buildRouterData);
|
||||
} else {
|
||||
rootRoute.children = children;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const { menuData } = getMenuData(clearMenuItem(router.getRoutes()));
|
||||
const neTypes = neListStore.getNeSelectOtions.map(v => v.value);
|
||||
let routes = clearMenuItem(router.getRoutes());
|
||||
routes = routerStore.clearMenuItemByNeList(routes, neTypes);
|
||||
const { menuData } = getMenuData(routes);
|
||||
return menuData;
|
||||
});
|
||||
|
||||
/**面包屑数据对象,排除根节点和首页不显示 */
|
||||
const breadcrumb = computed(() => {
|
||||
|
||||
@@ -1,128 +1,21 @@
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
import {
|
||||
createRouter,
|
||||
createWebHistory,
|
||||
createWebHashHistory,
|
||||
RouteRecordRaw,
|
||||
} from 'vue-router';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
import BasicLayout from '../layouts/BasicLayout.vue';
|
||||
import BlankLayout from '../layouts/BlankLayout.vue';
|
||||
import { constantRoutes } from './routers';
|
||||
import { getAccessToken } from '@/plugins/auth-token';
|
||||
import { validHttp } from '@/utils/regular-utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
|
||||
// NProgress Configuration
|
||||
NProgress.configure({ showSpinner: false });
|
||||
|
||||
// import { MetaRecord, MenuDataItem } from 'antdv-pro-layout';
|
||||
// mate数据类型 MetaRecord
|
||||
// 根据/路径构建菜单列表,列表项类型 MenuDataItem
|
||||
// https://github.com/vueComponent/pro-components/blob/a19279f3a28190bf11e8c36f316c92dbd3387a6d/packages/pro-layout/src/typings.ts#L16
|
||||
// 菜单图标来源 https://ant.design/components/icon 自定义iconfont
|
||||
|
||||
/**公共路由 */
|
||||
const constantRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Root',
|
||||
component: BasicLayout,
|
||||
redirect: '/index',
|
||||
children: [
|
||||
{
|
||||
path: '/index',
|
||||
name: 'Index',
|
||||
meta: { title: 'router.index', icon: 'icon-pcduan' },
|
||||
component: () => import('@/views/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/account',
|
||||
name: 'Account',
|
||||
meta: {
|
||||
title: 'router.account.index',
|
||||
hideInMenu: true,
|
||||
},
|
||||
component: BlankLayout,
|
||||
redirect: '/account/settings',
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
name: 'Profile',
|
||||
meta: { title: 'router.account.profile', cache: true },
|
||||
component: () => import('@/views/account/profile.vue'),
|
||||
},
|
||||
{
|
||||
path: 'settings',
|
||||
name: 'Settings',
|
||||
meta: { title: 'router.account.settings', cache: true },
|
||||
component: () => import('@/views/account/settings.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
meta: { title: 'router.login' },
|
||||
component: () => import('@/views/login.vue'),
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
name: 'Register',
|
||||
meta: { title: 'router.register' },
|
||||
component: () => import('@/views/register.vue'),
|
||||
},
|
||||
{
|
||||
path: '/403',
|
||||
name: 'NotPermission',
|
||||
meta: { title: 'router.page403' },
|
||||
component: () => import('@/views/error/403.vue'),
|
||||
},
|
||||
{
|
||||
path: '/help',
|
||||
name: 'HelpDoc',
|
||||
meta: { title: 'router.helpDoc' },
|
||||
component: () => import('@/views/tool/help/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/trace-task-hlr',
|
||||
name: 'TraceTaskHLR',
|
||||
meta: { title: 'router.traceTaskHLR' },
|
||||
component: () => import('@/views/traceManage/task-hlr/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/quick-start',
|
||||
name: 'QuickStart',
|
||||
meta: { title: 'router.quickStart' },
|
||||
component: () => import('@/views/system/quick-start/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/lock-screen',
|
||||
name: 'LockScreen',
|
||||
meta: { title: 'router.lockScreen' },
|
||||
component: () => import('@/views/tool/lockScreen/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/redirect',
|
||||
name: 'Redirect',
|
||||
component: BasicLayout,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect/index.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
meta: { title: 'router.page404' },
|
||||
component: () => import('@/views/error/404.vue'),
|
||||
},
|
||||
];
|
||||
|
||||
// 根据.env配置获取是否带井号和基础路径
|
||||
const hasHash = import.meta.env.VITE_HISTORY_HASH;
|
||||
const bashUrl = import.meta.env.VITE_HISTORY_BASE_URL;
|
||||
@@ -202,14 +95,16 @@ router.beforeEach(async (to, from, next) => {
|
||||
|
||||
// 有Token
|
||||
if (token) {
|
||||
// 防止重复访问登录页面
|
||||
if (to.path === '/login') {
|
||||
// 防止重复访问登录页面
|
||||
next({ name: 'Index' });
|
||||
} else {
|
||||
// 判断当前用户是否有角色信息
|
||||
const user = useUserStore();
|
||||
if (user.roles && user.roles.length === 0) {
|
||||
try {
|
||||
// 获取网元信息
|
||||
await useNeListStore().fnNelist();
|
||||
// 获取用户信息
|
||||
await user.fnGetInfo();
|
||||
// 获取路由信息
|
||||
@@ -230,6 +125,12 @@ router.beforeEach(async (to, from, next) => {
|
||||
await user.fnLogOut();
|
||||
next({ name: 'Login' });
|
||||
}
|
||||
} else if (
|
||||
to.meta.neType &&
|
||||
to.meta.neType.length > 0 &&
|
||||
!useNeListStore().fnHasNe(to.meta.neType)
|
||||
) {
|
||||
next({ name: 'NotPermission' });
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
|
||||
111
src/router/routers.ts
Normal file
111
src/router/routers.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import BasicLayout from '../layouts/BasicLayout.vue';
|
||||
import BlankLayout from '../layouts/BlankLayout.vue';
|
||||
|
||||
// import { MetaRecord, MenuDataItem } from 'antdv-pro-layout';
|
||||
// mate数据类型 MetaRecord
|
||||
// 根据/路径构建菜单列表,列表项类型 MenuDataItem
|
||||
// https://github.com/vueComponent/pro-components/blob/a19279f3a28190bf11e8c36f316c92dbd3387a6d/packages/pro-layout/src/typings.ts#L16
|
||||
// 菜单图标来源 https://ant.design/components/icon 自定义iconfont
|
||||
|
||||
/**公共路由 */
|
||||
export const constantRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Root',
|
||||
component: BasicLayout,
|
||||
redirect: '/index',
|
||||
children: [
|
||||
{
|
||||
path: '/index',
|
||||
name: 'Index',
|
||||
meta: { title: 'router.index', icon: 'icon-pcduan' },
|
||||
component: () => import('@/views/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/account',
|
||||
name: 'Account',
|
||||
meta: {
|
||||
title: 'router.account.index',
|
||||
hideInMenu: true,
|
||||
},
|
||||
component: BlankLayout,
|
||||
redirect: '/account/settings',
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
name: 'Profile',
|
||||
meta: { title: 'router.account.profile', cache: true },
|
||||
component: () => import('@/views/account/profile.vue'),
|
||||
},
|
||||
{
|
||||
path: 'settings',
|
||||
name: 'Settings',
|
||||
meta: { title: 'router.account.settings', cache: true },
|
||||
component: () => import('@/views/account/settings.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: '/help',
|
||||
name: 'HelpDoc', // 帮助文档
|
||||
meta: { title: 'router.helpDoc' },
|
||||
component: () => import('@/views/tool/help/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/trace-task-hlr',
|
||||
name: 'TraceTaskHLR', // 跟踪任务HLR
|
||||
meta: { title: 'router.traceTaskHLR', neType: ['HLR'] },
|
||||
component: () => import('@/views/traceManage/task-hlr/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/quick-start',
|
||||
name: 'QuickStart', // 引导开站
|
||||
meta: { title: 'router.quickStart' },
|
||||
component: () => import('@/views/system/quick-start/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/lock-screen',
|
||||
name: 'LockScreen', // 锁屏
|
||||
meta: { title: 'router.lockScreen' },
|
||||
component: () => import('@/views/tool/lockScreen/index.vue'),
|
||||
},
|
||||
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login', // 登录页
|
||||
meta: { title: 'router.login' },
|
||||
component: () => import('@/views/login.vue'),
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
name: 'Register', // 注册页
|
||||
meta: { title: 'router.register' },
|
||||
component: () => import('@/views/register.vue'),
|
||||
},
|
||||
{
|
||||
path: '/403',
|
||||
name: 'NotPermission', // 无权限
|
||||
meta: { title: 'router.page403' },
|
||||
component: () => import('@/views/error/403.vue'),
|
||||
},
|
||||
{
|
||||
path: '/redirect',
|
||||
name: 'Redirect',
|
||||
component: BasicLayout,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect/index.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
meta: { title: 'router.page404' },
|
||||
component: () => import('@/views/error/404.vue'),
|
||||
},
|
||||
];
|
||||
@@ -1,29 +1,36 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import { listAllNeInfo } from '@/api/ne/neInfo';
|
||||
import { parseDataToOptions } from '@/utils/parse-tree-utils';
|
||||
import { getNePerformanceList } from '@/api/perfManage/taskManage';
|
||||
|
||||
/**网元信息类型 */
|
||||
type NeInfo = {
|
||||
/**网元列表信息类型 */
|
||||
type NeList = {
|
||||
/**网元列表 */
|
||||
neList: Record<string, any>[];
|
||||
/**级联options树结构 */
|
||||
neCascaderOptions: Record<string, any>[];
|
||||
/**选择器单级父类型 */
|
||||
neSelectOtions: Record<string, any>[];
|
||||
/**性能测量数据集 */
|
||||
perMeasurementList: Record<string, any>[];
|
||||
};
|
||||
|
||||
const useNeInfoStore = defineStore('neinfo', {
|
||||
state: (): NeInfo => ({
|
||||
const useNeListStore = defineStore('ne_list', {
|
||||
state: (): NeList => ({
|
||||
neList: [],
|
||||
neCascaderOptions: [],
|
||||
neSelectOtions: [],
|
||||
perMeasurementList: [],
|
||||
}),
|
||||
getters: {
|
||||
/**
|
||||
* 网元列表
|
||||
* @param state 内部属性不用传入
|
||||
* @returns 级联options
|
||||
*/
|
||||
getNeList(state) {
|
||||
return state.neList;
|
||||
},
|
||||
/**
|
||||
* 获取级联options树结构
|
||||
* @param state 内部属性不用传入
|
||||
@@ -35,7 +42,7 @@ const useNeInfoStore = defineStore('neinfo', {
|
||||
/**
|
||||
* 选择器单级父类型
|
||||
* @param state 内部属性不用传入
|
||||
* @returns 级联options
|
||||
* @returns 选择options
|
||||
*/
|
||||
getNeSelectOtions(state) {
|
||||
return state.neSelectOtions;
|
||||
@@ -43,19 +50,23 @@ const useNeInfoStore = defineStore('neinfo', {
|
||||
},
|
||||
actions: {
|
||||
// 刷新网元列表
|
||||
async fnRefreshNelist() {
|
||||
async fnNelistRefresh() {
|
||||
this.neList = [];
|
||||
const res = await this.fnNelist();
|
||||
return res;
|
||||
return await this.fnNelist();
|
||||
},
|
||||
// 获取网元列表
|
||||
async fnNelist() {
|
||||
// 有数据不请求
|
||||
if (this.neList.length > 0) {
|
||||
return { code: RESULT_CODE_SUCCESS, data: this.neList, msg: 'success' };
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS['en_US'],
|
||||
data: this.neList,
|
||||
};
|
||||
}
|
||||
const res = await listAllNeInfo({
|
||||
bandStatus: false,
|
||||
bandHost: false,
|
||||
});
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 原始列表
|
||||
@@ -71,23 +82,38 @@ const useNeInfoStore = defineStore('neinfo', {
|
||||
this.neCascaderOptions = options;
|
||||
|
||||
// 转选择器单级父类型
|
||||
this.neSelectOtions = options.map(item => item);
|
||||
this.neSelectOtions = options.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
};
|
||||
});
|
||||
}
|
||||
return res;
|
||||
},
|
||||
// 获取性能测量数据集列表
|
||||
async fnNeTaskPerformance() {
|
||||
// 有数据不请求
|
||||
if (this.perMeasurementList.length > 0) {
|
||||
return { code: RESULT_CODE_SUCCESS, data: this.perMeasurementList, msg: 'success' };
|
||||
// 含有网元
|
||||
fnHasNe(metaNeType: string[]) {
|
||||
if (this.neList.length > 0) {
|
||||
const neTypes = this.neSelectOtions.map(item => item.value);
|
||||
let match = false; // 匹配
|
||||
for (const netype of metaNeType) {
|
||||
if (netype.indexOf('+') > -1) {
|
||||
metaNeType = netype.split('+');
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match) {
|
||||
// 同时匹配
|
||||
return metaNeType.every(item => neTypes.includes(item));
|
||||
}
|
||||
// 有一种
|
||||
return metaNeType.some(item => neTypes.includes(item));
|
||||
}
|
||||
const res = await getNePerformanceList();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
this.perMeasurementList = res.data;
|
||||
}
|
||||
return res;
|
||||
return false;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default useNeInfoStore;
|
||||
export default useNeListStore;
|
||||
@@ -3,6 +3,7 @@ import type {
|
||||
RouteComponent,
|
||||
RouteLocationRaw,
|
||||
RouteMeta,
|
||||
RouteRecord,
|
||||
RouteRecordRaw,
|
||||
} from 'vue-router';
|
||||
import { getRouter } from '@/api/auth';
|
||||
@@ -54,6 +55,62 @@ const useRouterStore = defineStore('router', {
|
||||
}
|
||||
return [];
|
||||
},
|
||||
/**
|
||||
* 根据网元类型过滤菜单
|
||||
* @param routes 经过clearMenuItem(router.getRoutes())处理
|
||||
* @param neTypes 网元类型
|
||||
* @returns 过滤后的菜单
|
||||
*/
|
||||
clearMenuItemByNeList(
|
||||
routes: RouteRecord[] | RouteRecordRaw[],
|
||||
neTypes: string[]
|
||||
): RouteRecordRaw[] {
|
||||
return routes
|
||||
.map((item: RouteRecord | RouteRecordRaw) => {
|
||||
const finalItem = { ...item };
|
||||
// 过滤网元类型
|
||||
if (
|
||||
Array.isArray(finalItem.meta?.neType) &&
|
||||
finalItem.meta?.neType.length > 0
|
||||
) {
|
||||
let metaNeType: string[] = finalItem.meta.neType;
|
||||
let match = false; // 匹配
|
||||
for (const netype of metaNeType) {
|
||||
if (netype.indexOf('+') > -1) {
|
||||
metaNeType = netype.split('+');
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match && !metaNeType.every(item => neTypes.includes(item))) {
|
||||
// 同时匹配
|
||||
return null;
|
||||
} else if (!metaNeType.some(item => neTypes.includes(item))) {
|
||||
// 有一种
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 有子菜单进行递归
|
||||
if (finalItem.children && finalItem.children.length > 0) {
|
||||
const children = this.clearMenuItemByNeList(
|
||||
finalItem.children,
|
||||
neTypes
|
||||
);
|
||||
// 如果子菜单都被过滤掉了,就不显示
|
||||
if (children.length === 0) {
|
||||
return null;
|
||||
}
|
||||
finalItem.children = children;
|
||||
return finalItem;
|
||||
}
|
||||
|
||||
delete finalItem.children;
|
||||
return finalItem;
|
||||
})
|
||||
.filter(item => item) as RouteRecordRaw[];
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -77,7 +134,7 @@ type RecordRaws = {
|
||||
*/
|
||||
function buildRouters(recordRaws: RecordRaws[]): RouteRecordRaw[] {
|
||||
const routers: RouteRecordRaw[] = [];
|
||||
for (const item of recordRaws) {
|
||||
for (const item of recordRaws) {
|
||||
// 路由页面组件
|
||||
let component: RouteComponent = {};
|
||||
if (item.component) {
|
||||
|
||||
2
src/typings/router.d.ts
vendored
2
src/typings/router.d.ts
vendored
@@ -9,5 +9,7 @@ declare module 'vue-router' {
|
||||
permissions?: string[];
|
||||
/**角色 */
|
||||
roles?: string[];
|
||||
/**网元类型信息 */
|
||||
neType?: string[];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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')"
|
||||
/>
|
||||
|
||||
@@ -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')"
|
||||
/>
|
||||
|
||||
@@ -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')"
|
||||
/>
|
||||
|
||||
@@ -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
|
||||
/>
|
||||
|
||||
@@ -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
|
||||
/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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')"
|
||||
/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
<a-cascader
|
||||
v-model:value="neTypeSelect"
|
||||
:options="neInfoStore.getNeCascaderOptions"
|
||||
:options="neListStore.getNeCascaderOptions"
|
||||
@change="fnNeChange"
|
||||
:allow-clear="false"
|
||||
:placeholder="t('views.logManage.neFile.neTypePlease')"
|
||||
|
||||
@@ -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')"
|
||||
/>
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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保证唯一
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
@@ -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(() => {
|
||||
// 获取列表数据
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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')"
|
||||
|
||||
@@ -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')"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
/**钩子函数,界面关闭*/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
/**钩子函数,界面关闭*/
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
<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)"
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user