feat: 根据网元显示特有菜单
This commit is contained in:
@@ -244,7 +244,7 @@ export default {
|
|||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
err403: {
|
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',
|
subTitle:'Please do not perform illegal operations, you can go back to the main page or return to the',
|
||||||
backHome: 'Back to Home',
|
backHome: 'Back to Home',
|
||||||
back: 'Back',
|
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`,
|
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',
|
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',
|
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:{
|
dict:{
|
||||||
dictInfo:'Dictionary Type Information',
|
dictInfo:'Dictionary Type Information',
|
||||||
|
|||||||
@@ -1902,7 +1902,7 @@ export default {
|
|||||||
pathTip:`访问的路由地址,如:user、/auth 1. 如网络地址需内部访问 则以 http(s):// 开头菜单行为(根节点):当前窗口打开 菜单行为,(非根节点):内嵌窗口.2. 如网络地址需外部访问则将内部地址选项设为否菜单行为:打开新标签3. 如内嵌子页面需要隐藏页面则将显示状态选项设为隐藏地址拼接以内嵌路由地址`,
|
pathTip:`访问的路由地址,如:user、/auth 1. 如网络地址需内部访问 则以 http(s):// 开头菜单行为(根节点):当前窗口打开 菜单行为,(非根节点):内嵌窗口.2. 如网络地址需外部访问则将内部地址选项设为否菜单行为:打开新标签3. 如内嵌子页面需要隐藏页面则将显示状态选项设为隐藏地址拼接以内嵌路由地址`,
|
||||||
sonPage:'子页面地址',
|
sonPage:'子页面地址',
|
||||||
componentTip:' 页面组件目录 views 访问的组件路径,如:system/user/index 注意:不带 .vue 文件后缀路由地址是网络地址可填入链接',
|
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:{
|
dict:{
|
||||||
dictInfo:'字典类型信息',
|
dictInfo:'字典类型信息',
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import useLayoutStore from '@/store/modules/layout';
|
import useLayoutStore from '@/store/modules/layout';
|
||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import useRouterStore from '@/store/modules/router';
|
import useRouterStore from '@/store/modules/router';
|
||||||
import useTabsStore from '@/store/modules/tabs';
|
import useTabsStore from '@/store/modules/tabs';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
@@ -33,6 +34,7 @@ import { parseUrlPath } from '@/plugins/file-static-url';
|
|||||||
const { proConfig, waterMarkContent } = useLayoutStore();
|
const { proConfig, waterMarkContent } = useLayoutStore();
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
const routerStore = useRouterStore();
|
const routerStore = useRouterStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const tabsStore = useTabsStore();
|
const tabsStore = useTabsStore();
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -66,18 +68,36 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// 动态路由添加到菜单面板
|
// 动态路由添加到菜单面板
|
||||||
const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
// const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||||
if (rootRoute) {
|
// if (rootRoute) {
|
||||||
const children = routerStore.setRootRouterData(rootRoute.children);
|
// const children = routerStore.setRootRouterData(rootRoute.children);
|
||||||
const buildRouterData = routerStore.buildRouterData;
|
// const buildRouterData = routerStore.buildRouterData;
|
||||||
if (buildRouterData.length > 0) {
|
// if (buildRouterData.length > 0) {
|
||||||
rootRoute.children = children.concat(buildRouterData);
|
// rootRoute.children = children.concat(buildRouterData);
|
||||||
} else {
|
// } else {
|
||||||
rootRoute.children = children;
|
// 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 neTypes = neListStore.getNeSelectOtions.map(v => v.value);
|
||||||
|
let routes = clearMenuItem(router.getRoutes());
|
||||||
const { menuData } = getMenuData(clearMenuItem(router.getRoutes()));
|
routes = routerStore.clearMenuItemByNeList(routes, neTypes);
|
||||||
|
const { menuData } = getMenuData(routes);
|
||||||
|
return menuData;
|
||||||
|
});
|
||||||
|
|
||||||
/**面包屑数据对象,排除根节点和首页不显示 */
|
/**面包屑数据对象,排除根节点和首页不显示 */
|
||||||
const breadcrumb = computed(() => {
|
const breadcrumb = computed(() => {
|
||||||
|
|||||||
@@ -1,128 +1,21 @@
|
|||||||
|
import NProgress from 'nprogress';
|
||||||
|
import 'nprogress/nprogress.css';
|
||||||
import {
|
import {
|
||||||
createRouter,
|
createRouter,
|
||||||
createWebHistory,
|
createWebHistory,
|
||||||
createWebHashHistory,
|
createWebHashHistory,
|
||||||
RouteRecordRaw,
|
|
||||||
} from 'vue-router';
|
} from 'vue-router';
|
||||||
import NProgress from 'nprogress';
|
import { constantRoutes } from './routers';
|
||||||
import 'nprogress/nprogress.css';
|
|
||||||
import BasicLayout from '../layouts/BasicLayout.vue';
|
|
||||||
import BlankLayout from '../layouts/BlankLayout.vue';
|
|
||||||
import { getAccessToken } from '@/plugins/auth-token';
|
import { getAccessToken } from '@/plugins/auth-token';
|
||||||
import { validHttp } from '@/utils/regular-utils';
|
import { validHttp } from '@/utils/regular-utils';
|
||||||
import useUserStore from '@/store/modules/user';
|
import useUserStore from '@/store/modules/user';
|
||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import useRouterStore from '@/store/modules/router';
|
import useRouterStore from '@/store/modules/router';
|
||||||
|
|
||||||
// NProgress Configuration
|
// NProgress Configuration
|
||||||
NProgress.configure({ showSpinner: false });
|
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配置获取是否带井号和基础路径
|
// 根据.env配置获取是否带井号和基础路径
|
||||||
const hasHash = import.meta.env.VITE_HISTORY_HASH;
|
const hasHash = import.meta.env.VITE_HISTORY_HASH;
|
||||||
const bashUrl = import.meta.env.VITE_HISTORY_BASE_URL;
|
const bashUrl = import.meta.env.VITE_HISTORY_BASE_URL;
|
||||||
@@ -202,14 +95,16 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
|
|
||||||
// 有Token
|
// 有Token
|
||||||
if (token) {
|
if (token) {
|
||||||
// 防止重复访问登录页面
|
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
|
// 防止重复访问登录页面
|
||||||
next({ name: 'Index' });
|
next({ name: 'Index' });
|
||||||
} else {
|
} else {
|
||||||
// 判断当前用户是否有角色信息
|
// 判断当前用户是否有角色信息
|
||||||
const user = useUserStore();
|
const user = useUserStore();
|
||||||
if (user.roles && user.roles.length === 0) {
|
if (user.roles && user.roles.length === 0) {
|
||||||
try {
|
try {
|
||||||
|
// 获取网元信息
|
||||||
|
await useNeListStore().fnNelist();
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
await user.fnGetInfo();
|
await user.fnGetInfo();
|
||||||
// 获取路由信息
|
// 获取路由信息
|
||||||
@@ -230,6 +125,12 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
await user.fnLogOut();
|
await user.fnLogOut();
|
||||||
next({ name: 'Login' });
|
next({ name: 'Login' });
|
||||||
}
|
}
|
||||||
|
} else if (
|
||||||
|
to.meta.neType &&
|
||||||
|
to.meta.neType.length > 0 &&
|
||||||
|
!useNeListStore().fnHasNe(to.meta.neType)
|
||||||
|
) {
|
||||||
|
next({ name: 'NotPermission' });
|
||||||
} else {
|
} else {
|
||||||
next();
|
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 { 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 { listAllNeInfo } from '@/api/ne/neInfo';
|
||||||
import { parseDataToOptions } from '@/utils/parse-tree-utils';
|
import { parseDataToOptions } from '@/utils/parse-tree-utils';
|
||||||
import { getNePerformanceList } from '@/api/perfManage/taskManage';
|
|
||||||
|
|
||||||
/**网元信息类型 */
|
/**网元列表信息类型 */
|
||||||
type NeInfo = {
|
type NeList = {
|
||||||
/**网元列表 */
|
/**网元列表 */
|
||||||
neList: Record<string, any>[];
|
neList: Record<string, any>[];
|
||||||
/**级联options树结构 */
|
/**级联options树结构 */
|
||||||
neCascaderOptions: Record<string, any>[];
|
neCascaderOptions: Record<string, any>[];
|
||||||
/**选择器单级父类型 */
|
/**选择器单级父类型 */
|
||||||
neSelectOtions: Record<string, any>[];
|
neSelectOtions: Record<string, any>[];
|
||||||
/**性能测量数据集 */
|
|
||||||
perMeasurementList: Record<string, any>[];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const useNeInfoStore = defineStore('neinfo', {
|
const useNeListStore = defineStore('ne_list', {
|
||||||
state: (): NeInfo => ({
|
state: (): NeList => ({
|
||||||
neList: [],
|
neList: [],
|
||||||
neCascaderOptions: [],
|
neCascaderOptions: [],
|
||||||
neSelectOtions: [],
|
neSelectOtions: [],
|
||||||
perMeasurementList: [],
|
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
|
/**
|
||||||
|
* 网元列表
|
||||||
|
* @param state 内部属性不用传入
|
||||||
|
* @returns 级联options
|
||||||
|
*/
|
||||||
|
getNeList(state) {
|
||||||
|
return state.neList;
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取级联options树结构
|
* 获取级联options树结构
|
||||||
* @param state 内部属性不用传入
|
* @param state 内部属性不用传入
|
||||||
@@ -35,7 +42,7 @@ const useNeInfoStore = defineStore('neinfo', {
|
|||||||
/**
|
/**
|
||||||
* 选择器单级父类型
|
* 选择器单级父类型
|
||||||
* @param state 内部属性不用传入
|
* @param state 内部属性不用传入
|
||||||
* @returns 级联options
|
* @returns 选择options
|
||||||
*/
|
*/
|
||||||
getNeSelectOtions(state) {
|
getNeSelectOtions(state) {
|
||||||
return state.neSelectOtions;
|
return state.neSelectOtions;
|
||||||
@@ -43,19 +50,23 @@ const useNeInfoStore = defineStore('neinfo', {
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
// 刷新网元列表
|
// 刷新网元列表
|
||||||
async fnRefreshNelist() {
|
async fnNelistRefresh() {
|
||||||
this.neList = [];
|
this.neList = [];
|
||||||
const res = await this.fnNelist();
|
return await this.fnNelist();
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
// 获取网元列表
|
// 获取网元列表
|
||||||
async fnNelist() {
|
async fnNelist() {
|
||||||
// 有数据不请求
|
// 有数据不请求
|
||||||
if (this.neList.length > 0) {
|
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({
|
const res = await listAllNeInfo({
|
||||||
bandStatus: false,
|
bandStatus: false,
|
||||||
|
bandHost: false,
|
||||||
});
|
});
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
// 原始列表
|
// 原始列表
|
||||||
@@ -71,23 +82,38 @@ const useNeInfoStore = defineStore('neinfo', {
|
|||||||
this.neCascaderOptions = options;
|
this.neCascaderOptions = options;
|
||||||
|
|
||||||
// 转选择器单级父类型
|
// 转选择器单级父类型
|
||||||
this.neSelectOtions = options.map(item => item);
|
this.neSelectOtions = options.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.label,
|
||||||
|
value: item.value,
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
// 获取性能测量数据集列表
|
// 含有网元
|
||||||
async fnNeTaskPerformance() {
|
fnHasNe(metaNeType: string[]) {
|
||||||
// 有数据不请求
|
if (this.neList.length > 0) {
|
||||||
if (this.perMeasurementList.length > 0) {
|
const neTypes = this.neSelectOtions.map(item => item.value);
|
||||||
return { code: RESULT_CODE_SUCCESS, data: this.perMeasurementList, msg: 'success' };
|
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();
|
return false;
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
|
||||||
this.perMeasurementList = res.data;
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default useNeInfoStore;
|
export default useNeListStore;
|
||||||
@@ -3,6 +3,7 @@ import type {
|
|||||||
RouteComponent,
|
RouteComponent,
|
||||||
RouteLocationRaw,
|
RouteLocationRaw,
|
||||||
RouteMeta,
|
RouteMeta,
|
||||||
|
RouteRecord,
|
||||||
RouteRecordRaw,
|
RouteRecordRaw,
|
||||||
} from 'vue-router';
|
} from 'vue-router';
|
||||||
import { getRouter } from '@/api/auth';
|
import { getRouter } from '@/api/auth';
|
||||||
@@ -54,6 +55,62 @@ const useRouterStore = defineStore('router', {
|
|||||||
}
|
}
|
||||||
return [];
|
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[] {
|
function buildRouters(recordRaws: RecordRaws[]): RouteRecordRaw[] {
|
||||||
const routers: RouteRecordRaw[] = [];
|
const routers: RouteRecordRaw[] = [];
|
||||||
for (const item of recordRaws) {
|
for (const item of recordRaws) {
|
||||||
// 路由页面组件
|
// 路由页面组件
|
||||||
let component: RouteComponent = {};
|
let component: RouteComponent = {};
|
||||||
if (item.component) {
|
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[];
|
permissions?: string[];
|
||||||
/**角色 */
|
/**角色 */
|
||||||
roles?: string[];
|
roles?: string[];
|
||||||
|
/**网元类型信息 */
|
||||||
|
neType?: string[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import useDictStore from '@/store/modules/dict';
|
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 { listAMFDataUE, delAMFDataUE, exportAMFDataUE } from '@/api/neData/amf';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||||
@@ -22,6 +22,7 @@ import { useClipboard } from '@vueuse/core';
|
|||||||
const { copy } = useClipboard({ legacy: true });
|
const { copy } = useClipboard({ legacy: true });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||||
/**网元可选 */
|
/**网元可选 */
|
||||||
@@ -463,36 +464,29 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'AMF') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
}
|
||||||
let arr: Record<string, any>[] = [];
|
});
|
||||||
res.data.forEach((v: any) => {
|
if (neOtions.value.length === 0) {
|
||||||
if (v.neType === 'AMF') {
|
message.warning({
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
});
|
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
@@ -564,7 +558,7 @@ onBeforeUnmount(() => {
|
|||||||
:label="t('views.dashboard.cdr.time')"
|
:label="t('views.dashboard.cdr.time')"
|
||||||
name="queryRangePicker"
|
name="queryRangePicker"
|
||||||
>
|
>
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
v-model:value="queryRangePicker"
|
v-model:value="queryRangePicker"
|
||||||
:presets="rangePickerPresets"
|
:presets="rangePickerPresets"
|
||||||
:bordered="true"
|
:bordered="true"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import {
|
import {
|
||||||
delIMSDataCDR,
|
delIMSDataCDR,
|
||||||
exportIMSDataCDR,
|
exportIMSDataCDR,
|
||||||
@@ -26,6 +26,7 @@ import dayjs, { type Dayjs } from 'dayjs';
|
|||||||
const { copy } = useClipboard({ legacy: true });
|
const { copy } = useClipboard({ legacy: true });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||||
|
|
||||||
@@ -525,34 +526,31 @@ onMounted(() => {
|
|||||||
dict.cdrSipCodeCause = resArr[2].value;
|
dict.cdrSipCodeCause = resArr[2].value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'IMS') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'IMS') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import useDictStore from '@/store/modules/dict';
|
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 { listMMEDataUE, delMMEDataUE, exportMMEDataUE } from '@/api/neData/mme';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||||
@@ -22,6 +22,7 @@ import { useClipboard } from '@vueuse/core';
|
|||||||
const { copy } = useClipboard({ legacy: true });
|
const { copy } = useClipboard({ legacy: true });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||||
|
|
||||||
@@ -471,36 +472,29 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'MME') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
}
|
||||||
let arr: Record<string, any>[] = [];
|
});
|
||||||
res.data.forEach((v: any) => {
|
if (neOtions.value.length === 0) {
|
||||||
if (v.neType === 'MME') {
|
message.warning({
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
});
|
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ import useWS from './hooks/useWS';
|
|||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { useRouter } from 'vue-router';
|
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 { message } from 'ant-design-vue';
|
||||||
import { upfWhoId } from './hooks/useWS';
|
import { upfWhoId } from './hooks/useWS';
|
||||||
|
|
||||||
const neInfoStore = useNeInfoStore();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { wsSend, userActivitySend, upfTFSend, reSendUPF } = useWS();
|
const { wsSend, userActivitySend, upfTFSend, reSendUPF } = useWS();
|
||||||
|
|
||||||
@@ -289,63 +289,39 @@ const getPopupContainer = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
neInfoStore
|
// 获取网元网元列表
|
||||||
.fnNelist()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.then(res => {
|
if (item.value === 'UPF') {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.data.length > 0) {
|
}
|
||||||
// UPF
|
if (item.value === 'UDM') {
|
||||||
let arr: Record<string, any>[] = [];
|
udmOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
res.data.forEach((v: any) => {
|
}
|
||||||
if (v.neType === 'UPF') {
|
});
|
||||||
arr.push({ value: v.neId, label: v.neName, rmUid: v.rmUid });
|
if (neOtions.value.length > 0) {
|
||||||
}
|
fnSelectNe(neOtions.value[0].value, neOtions.value[0]);
|
||||||
});
|
}
|
||||||
neOtions.value = arr;
|
if (udmOtions.value.length > 0) {
|
||||||
if (arr.length > 0) {
|
fnSelectUDM({ key: udmOtions.value[0].value });
|
||||||
//queryParams.neRealId = arr[0].value;
|
}
|
||||||
fnSelectNe(arr[0].value, arr[0]);
|
// 过滤不可用的网元
|
||||||
}
|
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||||
|
(item: any) => {
|
||||||
// UDM
|
return ['UDM', 'SMF', 'IMS', 'AMF', 'MME'].includes(item.value);
|
||||||
let arr1: Record<string, any>[] = [];
|
}
|
||||||
res.data.forEach((v: any) => {
|
);
|
||||||
if (v.neType === 'UDM') {
|
if (neCascaderOptions.value.length === 0) {
|
||||||
arr1.push({ value: v.neId, label: v.neName, rmUid: v.rmUid });
|
message.warning({
|
||||||
}
|
content: t('common.noData'),
|
||||||
});
|
duration: 2,
|
||||||
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();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
initFlag = true;
|
||||||
|
fnGetSkim().then(() => {
|
||||||
|
loadData();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
@@ -399,7 +375,11 @@ onBeforeUnmount(() => {
|
|||||||
</div>
|
</div>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu @click="fnSelectUDM">
|
<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 }}
|
{{ v.label }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import {
|
import {
|
||||||
RESULT_CODE_ERROR,
|
RESULT_CODE_ERROR,
|
||||||
@@ -23,6 +23,7 @@ import saveAs from 'file-saver';
|
|||||||
import { useClipboard } from '@vueuse/core';
|
import { useClipboard } from '@vueuse/core';
|
||||||
const { copy } = useClipboard({ legacy: true });
|
const { copy } = useClipboard({ legacy: true });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||||
|
|
||||||
@@ -480,36 +481,29 @@ function wsMessage(res: Record<string, any>) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'SGWC') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
}
|
||||||
let arr: Record<string, any>[] = [];
|
});
|
||||||
res.data.forEach((v: any) => {
|
if (neOtions.value.length === 0) {
|
||||||
if (v.neType === 'SGWC') {
|
message.warning({
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
});
|
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import {
|
import {
|
||||||
RESULT_CODE_ERROR,
|
RESULT_CODE_ERROR,
|
||||||
@@ -23,6 +23,7 @@ import dayjs, { type Dayjs } from 'dayjs';
|
|||||||
import { useClipboard } from '@vueuse/core';
|
import { useClipboard } from '@vueuse/core';
|
||||||
const { copy } = useClipboard({ legacy: true });
|
const { copy } = useClipboard({ legacy: true });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||||
|
|
||||||
@@ -507,33 +508,29 @@ function wsMessage(res: Record<string, any>) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'SMF') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'SMF') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
@@ -35,9 +35,10 @@ import {
|
|||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import { parseSizeFromByte } from '@/utils/parse-utils';
|
import { parseSizeFromByte } from '@/utils/parse-utils';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import dayjs, { Dayjs } from 'dayjs';
|
import dayjs, { Dayjs } from 'dayjs';
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
|
|
||||||
/**图DOM节点实例对象 */
|
/**图DOM节点实例对象 */
|
||||||
@@ -558,33 +559,30 @@ function fnRealTime() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'SMF') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'SMF') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
fnRanderChart();
|
|
||||||
fnRealTime();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘图
|
||||||
|
fnRanderChart();
|
||||||
|
fnRealTime();
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
RESULT_CODE_ERROR,
|
RESULT_CODE_ERROR,
|
||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import {
|
import {
|
||||||
delSMSCDataCDR,
|
delSMSCDataCDR,
|
||||||
exportSMSCDataCDR,
|
exportSMSCDataCDR,
|
||||||
@@ -26,6 +26,7 @@ import { hasPermissions } from '@/plugins/auth-user';
|
|||||||
import dayjs, { type Dayjs } from 'dayjs';
|
import dayjs, { type Dayjs } from 'dayjs';
|
||||||
const { copy } = useClipboard({ legacy: true });
|
const { copy } = useClipboard({ legacy: true });
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||||
@@ -479,37 +480,31 @@ onMounted(() => {
|
|||||||
dict.cdrCauseCode = resArr[0].value;
|
dict.cdrCauseCode = resArr[0].value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'SMSC') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
}
|
||||||
let arr: Record<string, any>[] = [];
|
});
|
||||||
res.data.forEach((v: any) => {
|
if (neOtions.value.length === 0) {
|
||||||
if (v.neType === 'SMSC') {
|
message.warning({
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
});
|
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
exportAlarm,
|
exportAlarm,
|
||||||
} from '@/api/faultManage/actAlarm';
|
} from '@/api/faultManage/actAlarm';
|
||||||
import useI18n from '@/hooks/useI18n';
|
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 useDictStore from '@/store/modules/dict';
|
||||||
import saveAs from 'file-saver';
|
import saveAs from 'file-saver';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
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 { readLoalXlsx } from '@/utils/execl-utils';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import dayjs, { type Dayjs } from 'dayjs';
|
import dayjs, { type Dayjs } from 'dayjs';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
|
|
||||||
@@ -841,12 +841,8 @@ onMounted(() => {
|
|||||||
dict.activeAlarmSeverity = resArr[3].value;
|
dict.activeAlarmSeverity = resArr[3].value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 获取网元网元列表
|
// 获取列表
|
||||||
useNeInfoStore()
|
fnGetList();
|
||||||
.fnNelist()
|
|
||||||
.finally(() => {
|
|
||||||
fnGetList();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -864,7 +860,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="neInfoStore.getNeSelectOtions"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
:placeholder="t('views.ne.common.neTypePlease')"
|
||||||
/>
|
/>
|
||||||
@@ -1365,7 +1361,7 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="modalState.showSetFrom.ne_type"
|
v-model:value="modalState.showSetFrom.ne_type"
|
||||||
:options="neInfoStore.getNeSelectOtions"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('common.inputPlease')"
|
: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 { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { listAct, exportAll } from '@/api/faultManage/eventAlarm';
|
import { listAct, exportAll } from '@/api/faultManage/eventAlarm';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import saveAs from 'file-saver';
|
import saveAs from 'file-saver';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||||
import { writeSheet } from '@/utils/execl-utils';
|
import { writeSheet } from '@/utils/execl-utils';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import dayjs, { type Dayjs } from 'dayjs';
|
import dayjs, { type Dayjs } from 'dayjs';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**表格字段列排序 */
|
/**表格字段列排序 */
|
||||||
@@ -434,12 +434,8 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取列表
|
||||||
useNeInfoStore()
|
fnGetList();
|
||||||
.fnNelist()
|
|
||||||
.finally(() => {
|
|
||||||
fnGetList();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -457,7 +453,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="neInfoStore.getNeSelectOtions"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
:placeholder="t('views.ne.common.neTypePlease')"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import {
|
|||||||
import { listAct, exportAlarm } from '@/api/faultManage/actAlarm';
|
import { listAct, exportAlarm } from '@/api/faultManage/actAlarm';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import useDictStore from '@/store/modules/dict';
|
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 saveAs from 'file-saver';
|
||||||
import { writeSheet } from '@/utils/execl-utils';
|
import { writeSheet } from '@/utils/execl-utils';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import dayjs, { type Dayjs } from 'dayjs';
|
import dayjs, { type Dayjs } from 'dayjs';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
@@ -641,8 +641,7 @@ onMounted(() => {
|
|||||||
dict.activeAlarmSeverity = resArr[3].value;
|
dict.activeAlarmSeverity = resArr[3].value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 获取网元网元列表
|
// 获取列表
|
||||||
useNeInfoStore().fnNelist();
|
|
||||||
fnGetList();
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -661,7 +660,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="neInfoStore.getNeSelectOtions"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
: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 { parseDateToStr } from '@/utils/date-utils';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { listAlarm } from '@/api/logManage/alarm';
|
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 useDictStore from '@/store/modules/dict';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import dayjs, { type Dayjs } from 'dayjs';
|
import dayjs, { type Dayjs } from 'dayjs';
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
let dict: {
|
let dict: {
|
||||||
/**告警状态 */
|
/**告警状态 */
|
||||||
@@ -278,13 +278,9 @@ onMounted(() => {
|
|||||||
dict.activeAlarmSeverity = resArr[2].value;
|
dict.activeAlarmSeverity = resArr[2].value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 获取网元网元列表
|
|
||||||
useNeInfoStore()
|
// 获取列表数据
|
||||||
.fnNelist()
|
fnGetList();
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -302,7 +298,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="useNeInfoStore().getNeSelectOtions"
|
:options="neListStore.getNeSelectOtions"
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
:placeholder="t('views.ne.common.neTypePlease')"
|
||||||
allow-clear
|
allow-clear
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
|||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { listForwarding } from '@/api/logManage/forwarding';
|
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 useDictStore from '@/store/modules/dict';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import dayjs, { type Dayjs } from 'dayjs';
|
import dayjs, { type Dayjs } from 'dayjs';
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
let dict: {
|
let dict: {
|
||||||
/**告警状态 */
|
/**告警状态 */
|
||||||
@@ -293,13 +293,8 @@ onMounted(() => {
|
|||||||
dict.activeAlarmSeverity = resArr[2].value;
|
dict.activeAlarmSeverity = resArr[2].value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 获取网元网元列表
|
// 获取列表数据
|
||||||
useNeInfoStore()
|
fnGetList();
|
||||||
.fnNelist()
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -317,7 +312,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="useNeInfoStore().getNeSelectOtions"
|
:options="neListStore.getNeSelectOtions"
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
:placeholder="t('views.ne.common.neTypePlease')"
|
||||||
allow-clear
|
allow-clear
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import { PageContainer } from 'antdv-pro-layout';
|
|||||||
import { Modal, message } from 'ant-design-vue/es';
|
import { Modal, message } from 'ant-design-vue/es';
|
||||||
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { getMMLByNE, sendMMlByNE } from '@/api/mmlManage/neOperate';
|
import { getMMLByNE, sendMMlByNE } from '@/api/mmlManage/neOperate';
|
||||||
import { uploadFileToNE } from '@/api/tool/file';
|
import { uploadFileToNE } from '@/api/tool/file';
|
||||||
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
@@ -538,40 +538,30 @@ function fnAutoCompleteKeydown(evt: any) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore.fnNelist().then(res => {
|
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
(item: any) => {
|
||||||
if (res.data.length > 0) {
|
return !['OMC'].includes(item.value); // 过滤不可用的网元
|
||||||
// 过滤不可用的网元
|
|
||||||
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,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
|
|||||||
import { Modal, message } from 'ant-design-vue/es';
|
import { Modal, message } from 'ant-design-vue/es';
|
||||||
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { getMMLByOMC, sendMMlByOMC } from '@/api/mmlManage/omcOperate';
|
import { getMMLByOMC, sendMMlByOMC } from '@/api/mmlManage/omcOperate';
|
||||||
import { uploadFileToNE } from '@/api/tool/file';
|
import { uploadFileToNE } from '@/api/tool/file';
|
||||||
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOptions = ref<Record<string, any>[]>([]);
|
let neOptions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -505,37 +505,24 @@ function fnAutoCompleteKeydown(evt: any) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'OMC') {
|
||||||
.then(res => {
|
neOptions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
// 获取可用OMC
|
if (neOptions.value.length === 0) {
|
||||||
const omcArr = useNeInfoStore().getNeSelectOtions.find(
|
message.warning({
|
||||||
item => item.value === 'OMC'
|
content: t('common.noData'),
|
||||||
);
|
duration: 2,
|
||||||
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,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOptions.value.length > 0) {
|
||||||
|
state.neId = neOptions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
|
|||||||
import { Modal, message } from 'ant-design-vue/es';
|
import { Modal, message } from 'ant-design-vue/es';
|
||||||
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { getMMLByUDM, sendMMlByUDM } from '@/api/mmlManage/udmOperate';
|
import { getMMLByUDM, sendMMlByUDM } from '@/api/mmlManage/udmOperate';
|
||||||
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||||
import { uploadFileToNE } from '@/api/tool/file';
|
import { uploadFileToNE } from '@/api/tool/file';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOptions = ref<Record<string, any>[]>([]);
|
let neOptions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -505,42 +505,24 @@ function fnAutoCompleteKeydown(evt: any) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'UDM') {
|
||||||
.then(res => {
|
neOptions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
// 获取可用UDM
|
if (neOptions.value.length === 0) {
|
||||||
const udmArr = useNeInfoStore().getNeSelectOtions.find(
|
message.warning({
|
||||||
item => item.value === 'UDM'
|
content: t('common.noData'),
|
||||||
);
|
duration: 2,
|
||||||
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,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOptions.value.length > 0) {
|
||||||
|
state.neId = neOptions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
|
|||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 useOptions from './hooks/useOptions';
|
||||||
import useConfigList from './hooks/useConfigList';
|
import useConfigList from './hooks/useConfigList';
|
||||||
import useConfigArray from './hooks/useConfigArray';
|
import useConfigArray from './hooks/useConfigArray';
|
||||||
import useConfigArrayChild from './hooks/useConfigArrayChild';
|
import useConfigArrayChild from './hooks/useConfigArrayChild';
|
||||||
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
|
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
|
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
|
||||||
t,
|
t,
|
||||||
@@ -364,40 +364,28 @@ const {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore.fnNelist().then(res => {
|
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
(item: any) => {
|
||||||
if (res.data.length > 0) {
|
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
|
||||||
// 过滤不可用的网元
|
|
||||||
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,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
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>
|
</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 { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import BackupModal from './components/BackupModal.vue';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import {
|
import {
|
||||||
@@ -22,13 +21,11 @@ import { pushBackupFTP } from '@/api/neData/backup';
|
|||||||
import saveAs from 'file-saver';
|
import saveAs from 'file-saver';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
|
|
||||||
/**字典数据-状态 */
|
/**字典数据-状态 */
|
||||||
let dictStatus = ref<DictType[]>([]);
|
let dictStatus = ref<DictType[]>([]);
|
||||||
|
|
||||||
/**网元参数 */
|
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
|
||||||
|
|
||||||
/**查询参数 */
|
/**查询参数 */
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
/**网元类型 */
|
/**网元类型 */
|
||||||
@@ -368,23 +365,8 @@ onMounted(() => {
|
|||||||
getDict('ne_license_status').then(res => {
|
getDict('ne_license_status').then(res => {
|
||||||
dictStatus.value = res;
|
dictStatus.value = res;
|
||||||
});
|
});
|
||||||
// 获取网元网元列表
|
// 获取列表数据
|
||||||
useNeInfoStore()
|
fnGetList();
|
||||||
.fnNelist()
|
|
||||||
.then(res => {
|
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
|
||||||
neOtions.value = useNeInfoStore().getNeSelectOtions;
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**打开FTP配置窗口 */
|
/**打开FTP配置窗口 */
|
||||||
@@ -422,7 +404,7 @@ function fnSyncFileToFTP(row: Record<string, any>) {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
:options="neListStore.getNeSelectOtions"
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
:placeholder="t('common.inputPlease')"
|
:placeholder="t('common.inputPlease')"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
|
|||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 useOptions from './hooks/useOptions';
|
||||||
import useConfigList from './hooks/useConfigList';
|
import useConfigList from './hooks/useConfigList';
|
||||||
import useConfigArray from './hooks/useConfigArray';
|
import useConfigArray from './hooks/useConfigArray';
|
||||||
import useConfigArrayChild from './hooks/useConfigArrayChild';
|
import useConfigArrayChild from './hooks/useConfigArrayChild';
|
||||||
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
|
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
|
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
|
||||||
t,
|
t,
|
||||||
@@ -536,41 +536,25 @@ const {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore.fnNelist().then(res => {
|
neCascaderOptions.value = neListStore.getNeSelectOtions.filter(
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
(item: any) => {
|
||||||
if (res.data.length > 0) {
|
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
|
||||||
// 过滤不可用的网元
|
|
||||||
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,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ import { Modal, message } from 'ant-design-vue/es';
|
|||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import { getNeFile, listNeFiles } from '@/api/tool/neFile';
|
import { getNeFile, listNeFiles } from '@/api/tool/neFile';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import ViewDrawer from './components/ViewDrawer.vue';
|
import ViewDrawer from './components/ViewDrawer.vue';
|
||||||
import saveAs from 'file-saver';
|
import saveAs from 'file-saver';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { parseSizeFromFile } from '@/utils/parse-utils';
|
import { parseSizeFromFile } from '@/utils/parse-utils';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
@@ -283,20 +283,10 @@ function fnDrawerOpen(row: Record<string, any>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
if (routeParams.neType) {
|
||||||
neInfoStore.fnNelist().then(res => {
|
neTypeSelect.value = [routeParams.neType, routeParams.neId];
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
fnNeChange(neTypeSelect.value, undefined);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -310,7 +300,7 @@ onMounted(() => {
|
|||||||
<span>{{ t('views.logManage.neFile.neType') }}:</span>
|
<span>{{ t('views.logManage.neFile.neType') }}:</span>
|
||||||
<a-cascader
|
<a-cascader
|
||||||
v-model:value="neTypeSelect"
|
v-model:value="neTypeSelect"
|
||||||
:options="neInfoStore.getNeCascaderOptions"
|
:options="neListStore.getNeCascaderOptions"
|
||||||
@change="fnNeChange"
|
@change="fnNeChange"
|
||||||
:allow-clear="false"
|
:allow-clear="false"
|
||||||
:placeholder="t('views.logManage.neFile.neTypePlease')"
|
: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 { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 { listNeInfo, delNeInfo, stateNeInfo } from '@/api/ne/neInfo';
|
||||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useNeOptions from './hooks/useNeOptions';
|
import useNeOptions from './hooks/useNeOptions';
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const {
|
const {
|
||||||
fnNeStart,
|
fnNeStart,
|
||||||
@@ -262,7 +262,7 @@ function reloadRowInfo(row: Record<string, any>) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
useNeInfoStore().fnRefreshNelist();
|
neListStore.fnNelistRefresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ function fnRecordDelete(id: string) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 刷新缓存
|
// 刷新缓存
|
||||||
useNeInfoStore().fnRefreshNelist();
|
neListStore.fnNelistRefresh();
|
||||||
} else {
|
} else {
|
||||||
message.error({
|
message.error({
|
||||||
content: `${res.msg}`,
|
content: `${res.msg}`,
|
||||||
@@ -404,7 +404,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// 刷新缓存的网元信息
|
// 刷新缓存的网元信息
|
||||||
useNeInfoStore().fnRefreshNelist();
|
neListStore.fnNelistRefresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('common.inputPlease')"
|
:placeholder="t('common.inputPlease')"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ import { PageContainer } from 'antdv-pro-layout';
|
|||||||
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
|
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
|
||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { listNeLicense, stateNeLicense } from '@/api/ne/neLicense';
|
import { listNeLicense, stateNeLicense } from '@/api/ne/neLicense';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const EditModal = defineAsyncComponent(
|
const EditModal = defineAsyncComponent(
|
||||||
() => import('./components/EditModal.vue')
|
() => import('./components/EditModal.vue')
|
||||||
);
|
);
|
||||||
@@ -20,9 +20,6 @@ const EditModal = defineAsyncComponent(
|
|||||||
/**字典数据-状态 */
|
/**字典数据-状态 */
|
||||||
let dictStatus = ref<DictType[]>([]);
|
let dictStatus = ref<DictType[]>([]);
|
||||||
|
|
||||||
/**网元参数 */
|
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
|
||||||
|
|
||||||
/**查询参数 */
|
/**查询参数 */
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
/**网元类型 */
|
/**网元类型 */
|
||||||
@@ -340,21 +337,9 @@ function fnRecordStateBatch() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始字典数据
|
// 初始字典数据
|
||||||
getDict('ne_license_status').then(res => {
|
getDict('ne_license_status')
|
||||||
dictStatus.value = res;
|
|
||||||
});
|
|
||||||
// 获取网元网元列表
|
|
||||||
useNeInfoStore()
|
|
||||||
.fnNelist()
|
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
dictStatus.value = res;
|
||||||
neOtions.value = useNeInfoStore().getNeSelectOtions;
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
@@ -377,7 +362,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
:options="neListStore.getNeSelectOtions"
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
:placeholder="t('common.inputPlease')"
|
:placeholder="t('common.inputPlease')"
|
||||||
/>
|
/>
|
||||||
@@ -492,7 +477,7 @@ onMounted(() => {
|
|||||||
:data-source="tableState.data"
|
:data-source="tableState.data"
|
||||||
:size="tableState.size"
|
:size="tableState.size"
|
||||||
:pagination="tablePagination"
|
:pagination="tablePagination"
|
||||||
:scroll="{ x: tableColumns.length * 120 }"
|
:scroll="{ x: tableColumns.length * 140 }"
|
||||||
@resizeColumn="(w:number, col:any) => (col.width = w)"
|
@resizeColumn="(w:number, col:any) => (col.width = w)"
|
||||||
:row-selection="{
|
:row-selection="{
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
|||||||
import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
|
import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
@@ -199,8 +200,8 @@ function fnModalOk() {
|
|||||||
content: `${t('common.operateOk')}`,
|
content: `${t('common.operateOk')}`,
|
||||||
duration: 3,
|
duration: 3,
|
||||||
});
|
});
|
||||||
// 刷新缓存的网元信息
|
|
||||||
useNeInfoStore().fnRefreshNelist();
|
neListStore.fnNelistRefresh(); // 刷新缓存的网元信息
|
||||||
stepState.neInfo = from; // 保存网元信息
|
stepState.neInfo = from; // 保存网元信息
|
||||||
modalState.stepNext = true; // 开启下一步
|
modalState.stepNext = true; // 开启下一步
|
||||||
} else {
|
} else {
|
||||||
@@ -368,7 +369,7 @@ onMounted(() => {
|
|||||||
<template #title>
|
<template #title>
|
||||||
{{ t('views.ne.common.neTypeTip') }}
|
{{ t('views.ne.common.neTypeTip') }}
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
|
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
@@ -392,7 +393,7 @@ onMounted(() => {
|
|||||||
<template #title>
|
<template #title>
|
||||||
{{ t('views.ne.common.neIdTip') }}
|
{{ t('views.ne.common.neIdTip') }}
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
|
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
@@ -422,7 +423,7 @@ onMounted(() => {
|
|||||||
{{ t('views.ne.common.ipAddrTip') }}
|
{{ t('views.ne.common.ipAddrTip') }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
|
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
@@ -447,7 +448,7 @@ onMounted(() => {
|
|||||||
<template #title>
|
<template #title>
|
||||||
<div>{{ t('views.ne.common.portTip') }}</div>
|
<div>{{ t('views.ne.common.portTip') }}</div>
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
|
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</a-input-number>
|
</a-input-number>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { reactive, toRaw } from 'vue';
|
import { reactive, toRaw } from 'vue';
|
||||||
import { getPara5GFilee, savePara5GFile, updateNeInfo } from '@/api/ne/neInfo';
|
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';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
|
const neListStore = useNeListStore();
|
||||||
|
|
||||||
/**对象信息信息状态类型 */
|
/**对象信息信息状态类型 */
|
||||||
type StateType = {
|
type StateType = {
|
||||||
@@ -37,7 +38,7 @@ export function usePara5G() {
|
|||||||
/**载入数据*/
|
/**载入数据*/
|
||||||
function fnReloadData() {
|
function fnReloadData() {
|
||||||
state.confirmLoading = true;
|
state.confirmLoading = true;
|
||||||
Promise.all([getPara5GFilee(), useNeInfoStore().fnRefreshNelist()]).then(
|
Promise.all([getPara5GFilee(), neListStore.fnNelistRefresh()]).then(
|
||||||
resArr => {
|
resArr => {
|
||||||
// 已保存的配置
|
// 已保存的配置
|
||||||
if (resArr[0].code === RESULT_CODE_SUCCESS) {
|
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 { Modal, TableColumnsType, message } from 'ant-design-vue/es';
|
||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { listNeSoftware, delNeSoftware } from '@/api/ne/neSoftware';
|
import { listNeSoftware, delNeSoftware } from '@/api/ne/neSoftware';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import { downloadFile } from '@/api/tool/file';
|
import { downloadFile } from '@/api/tool/file';
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver';
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
// 异步加载组件
|
// 异步加载组件
|
||||||
@@ -22,9 +22,6 @@ const UploadMoreFile = defineAsyncComponent(
|
|||||||
() => import('./components/UploadMoreFile.vue')
|
() => import('./components/UploadMoreFile.vue')
|
||||||
);
|
);
|
||||||
|
|
||||||
/**网元参数 */
|
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
|
||||||
|
|
||||||
/**查询参数 */
|
/**查询参数 */
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
/**网元类型 */
|
/**网元类型 */
|
||||||
@@ -127,7 +124,7 @@ let tableColumns = ref<TableColumnsType>([
|
|||||||
if (!opt.value) return '';
|
if (!opt.value) return '';
|
||||||
return parseDateToStr(opt.value);
|
return parseDateToStr(opt.value);
|
||||||
},
|
},
|
||||||
width: 150,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('common.operate'),
|
title: t('common.operate'),
|
||||||
@@ -191,7 +188,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listNeSoftware(toRaw(queryParams)).then(res => {
|
listNeSoftware(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
const { total, rows } = res.data;
|
const { total, rows } = res.data;
|
||||||
tablePagination.total = total;
|
tablePagination.total = total;
|
||||||
tableState.data = rows;
|
tableState.data = rows;
|
||||||
@@ -335,23 +332,8 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取列表数据
|
||||||
useNeInfoStore()
|
fnGetList();
|
||||||
.fnNelist()
|
|
||||||
.then(res => {
|
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
|
||||||
neOtions.value = useNeInfoStore().getNeSelectOtions;
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -369,7 +351,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('common.inputPlease')"
|
:placeholder="t('common.inputPlease')"
|
||||||
/>
|
/>
|
||||||
@@ -505,7 +487,7 @@ onMounted(() => {
|
|||||||
:data-source="tableState.data"
|
:data-source="tableState.data"
|
||||||
:size="tableState.size"
|
:size="tableState.size"
|
||||||
:pagination="tablePagination"
|
:pagination="tablePagination"
|
||||||
:scroll="{ x: tableColumns.length * 150 }"
|
:scroll="{ x: tableColumns.length * 180 }"
|
||||||
@resizeColumn="(w:number, col:any) => (col.width = w)"
|
@resizeColumn="(w:number, col:any) => (col.width = w)"
|
||||||
:row-selection="{
|
:row-selection="{
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ import {
|
|||||||
} from 'ant-design-vue/es';
|
} from 'ant-design-vue/es';
|
||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
|
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
@@ -19,6 +18,7 @@ import useI18n from '@/hooks/useI18n';
|
|||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useMaskStore from '@/store/modules/mask';
|
import useMaskStore from '@/store/modules/mask';
|
||||||
const maskStore = useMaskStore();
|
const maskStore = useMaskStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
|
||||||
@@ -33,9 +33,6 @@ const UploadMoreFile = defineAsyncComponent(
|
|||||||
/**字典数据-状态 */
|
/**字典数据-状态 */
|
||||||
let dictStatus = ref<DictType[]>([]);
|
let dictStatus = ref<DictType[]>([]);
|
||||||
|
|
||||||
/**网元参数 */
|
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
|
||||||
|
|
||||||
/**查询参数 */
|
/**查询参数 */
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
/**网元类型 */
|
/**网元类型 */
|
||||||
@@ -151,7 +148,7 @@ let tableColumns = ref<TableColumnsType>([
|
|||||||
if (!opt.value) return '';
|
if (!opt.value) return '';
|
||||||
return parseDateToStr(opt.value);
|
return parseDateToStr(opt.value);
|
||||||
},
|
},
|
||||||
width: 150,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('common.operate'),
|
title: t('common.operate'),
|
||||||
@@ -441,21 +438,9 @@ async function fnRecordUpgrade() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始字典数据
|
// 初始字典数据
|
||||||
getDict('ne_version_status').then(res => {
|
getDict('ne_version_status')
|
||||||
dictStatus.value = res;
|
|
||||||
});
|
|
||||||
// 获取网元网元列表
|
|
||||||
useNeInfoStore()
|
|
||||||
.fnNelist()
|
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
dictStatus.value = res;
|
||||||
neOtions.value = useNeInfoStore().getNeSelectOtions;
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
@@ -478,7 +463,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('common.inputPlease')"
|
:placeholder="t('common.inputPlease')"
|
||||||
/>
|
/>
|
||||||
@@ -607,7 +592,7 @@ onMounted(() => {
|
|||||||
:data-source="tableState.data"
|
:data-source="tableState.data"
|
||||||
:size="tableState.size"
|
:size="tableState.size"
|
||||||
:pagination="tablePagination"
|
:pagination="tablePagination"
|
||||||
:scroll="{ x: tableColumns.length * 120 }"
|
:scroll="{ x: tableColumns.length * 150 }"
|
||||||
@resizeColumn="(w:number, col:any) => (col.width = w)"
|
@resizeColumn="(w:number, col:any) => (col.width = w)"
|
||||||
:row-selection="{
|
:row-selection="{
|
||||||
type: 'checkbox',
|
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 { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
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 { useRoute } from 'vue-router';
|
||||||
import { listAMFNblist } from '@/api/neData/amf';
|
import { listAMFNblist } from '@/api/neData/amf';
|
||||||
import { listMMENblist } from '@/api/neData/mme';
|
import { listMMENblist } from '@/api/neData/mme';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
@@ -264,57 +264,40 @@ function fnGetList(pageNum?: number) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore
|
for (const item of neListStore.getNeCascaderOptions) {
|
||||||
.fnNelist()
|
// 过滤不可用的网元
|
||||||
.then(res => {
|
if (!['AMF', 'MME'].includes(item.value)) continue;
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
const v = JSON.parse(JSON.stringify(item));
|
||||||
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));
|
|
||||||
|
|
||||||
if (v.label === 'AMF') {
|
if (v.label === 'AMF') {
|
||||||
v.label = '5G';
|
v.label = '5G';
|
||||||
}
|
}
|
||||||
if (v.label === 'MME') {
|
if (v.label === 'MME') {
|
||||||
v.label = '4G';
|
v.label = '4G';
|
||||||
}
|
}
|
||||||
neCascaderOptions.value.push(v);
|
neCascaderOptions.value.push(v);
|
||||||
}
|
}
|
||||||
|
if (neCascaderOptions.value.length === 0) {
|
||||||
if (neCascaderOptions.value.length === 0) {
|
message.warning({
|
||||||
message.warning({
|
content: t('common.noData'),
|
||||||
content: t('common.noData'),
|
duration: 2,
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
|
|||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { ProModal } from 'antdv-pro-modal';
|
import { ProModal } from 'antdv-pro-modal';
|
||||||
import UploadModal from '@/components/UploadModal/index.vue';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
import {
|
import {
|
||||||
@@ -32,6 +32,8 @@ import saveAs from 'file-saver';
|
|||||||
import { readSheet, writeSheet } from '@/utils/execl-utils';
|
import { readSheet, writeSheet } from '@/utils/execl-utils';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
|
|
||||||
// 异步加载组件
|
// 异步加载组件
|
||||||
const HistoryModal = defineAsyncComponent(
|
const HistoryModal = defineAsyncComponent(
|
||||||
() => import('./components/history.vue')
|
() => import('./components/history.vue')
|
||||||
@@ -655,40 +657,32 @@ async function fnModalImportTemplate() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (['AMF', 'MME'].includes(item.value)) {
|
||||||
.then(res => {
|
neCascaderOptions.value.push(JSON.parse(JSON.stringify(item)));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neCascaderOptions.value.length === 0) {
|
||||||
useNeInfoStore().neCascaderOptions.forEach(item => {
|
message.warning({
|
||||||
if (['AMF', 'MME'].includes(item.value)) {
|
content: t('common.noData'),
|
||||||
arr.push(JSON.parse(JSON.stringify(item)));
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { listAMFNbStatelist } from '@/api/neData/amf';
|
|||||||
import { parseBasePath } from '@/plugins/file-static-url';
|
import { parseBasePath } from '@/plugins/file-static-url';
|
||||||
import { edgeLineAnimateState } from '@/views/monitor/topologyBuild/hooks/registerEdge';
|
import { edgeLineAnimateState } from '@/views/monitor/topologyBuild/hooks/registerEdge';
|
||||||
import { nodeImageAnimateState } from '@/views/monitor/topologyBuild/hooks/registerNode';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { stateNeInfo } from '@/api/ne/neInfo';
|
import { stateNeInfo } from '@/api/ne/neInfo';
|
||||||
@@ -13,6 +13,7 @@ import { parseDateToStr } from '@/utils/date-utils';
|
|||||||
import { useFullscreen } from '@vueuse/core';
|
import { useFullscreen } from '@vueuse/core';
|
||||||
import { listMMENbStatelist } from '@/api/neData/mme';
|
import { listMMENbStatelist } from '@/api/neData/mme';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
|
|
||||||
/**图DOM节点实例对象 */
|
/**图DOM节点实例对象 */
|
||||||
const graphG6Dom = useTemplateRef('graphG6Dom');
|
const graphG6Dom = useTemplateRef('graphG6Dom');
|
||||||
@@ -358,9 +359,7 @@ function handleRanderGraph(container: HTMLElement | null, data: GraphData) {
|
|||||||
/**
|
/**
|
||||||
* 获取图组数据渲染到画布
|
* 获取图组数据渲染到画布
|
||||||
*/
|
*/
|
||||||
async function fnGraphDataLoad() {
|
async function fnGraphDataLoad() {
|
||||||
// 加载基础网元
|
|
||||||
await useNeInfoStore().fnNelist();
|
|
||||||
const dataNe = await fnGraphDataBase();
|
const dataNe = await fnGraphDataBase();
|
||||||
Object.assign(graphData, dataNe);
|
Object.assign(graphData, dataNe);
|
||||||
graphG6.value = handleRanderGraph(graphG6Dom.value, dataNe);
|
graphG6.value = handleRanderGraph(graphG6Dom.value, dataNe);
|
||||||
@@ -381,7 +380,7 @@ async function fnGraphDataBase() {
|
|||||||
edges: [],
|
edges: [],
|
||||||
};
|
};
|
||||||
// 添加基础网元
|
// 添加基础网元
|
||||||
for (const item of useNeInfoStore().getNeSelectOtions) {
|
for (const item of neListStore.getNeSelectOtions) {
|
||||||
if ('OMC' === item.value) {
|
if ('OMC' === item.value) {
|
||||||
if (item.children?.length === 0) continue;
|
if (item.children?.length === 0) continue;
|
||||||
// 是否存在OMC保证唯一
|
// 是否存在OMC保证唯一
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ import { message } from 'ant-design-vue/es';
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { listIMSSessionList } from '@/api/neData/ims';
|
import { listIMSSessionList } from '@/api/neData/ims';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
|
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
let neOtions = ref<Record<string, any>[]>([]);
|
||||||
@@ -147,13 +148,13 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listIMSSessionList(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
}
|
}
|
||||||
tablePagination.total = res.data.length;
|
tablePagination.total = res.data.length;
|
||||||
tableState.data = res.data;
|
tableState.data = res.data;
|
||||||
if (
|
if (
|
||||||
tablePagination.total <=
|
tablePagination.total <=
|
||||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||||
@@ -172,33 +173,24 @@ function fnGetList(pageNum?: number) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'IMS') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'IMS') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -223,7 +215,11 @@ onMounted(() => {
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item label="IMSI" name="imsi">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<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 { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import UploadModal from '@/components/UploadModal/index.vue';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import {
|
import {
|
||||||
addPCFRule,
|
addPCFRule,
|
||||||
@@ -21,7 +21,7 @@ import { uploadFileToNE } from '@/api/tool/file';
|
|||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
let neOtions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -693,33 +693,24 @@ function fnModalDownloadImportTemplate() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'PCF') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'PCF') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</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 { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { listSMFSubList } from '@/api/neData/smf';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
let neOtions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listSMFSubList(toRaw(queryParams)).then(res => {
|
listSMFSubList(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
const { total, rows } = res.data;
|
const { total, rows } = res.data;
|
||||||
tablePagination.total = total;
|
tablePagination.total = total;
|
||||||
tableState.data = rows;
|
tableState.data = rows;
|
||||||
@@ -247,33 +247,24 @@ function fnGetList(pageNum?: number) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'SMF') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'SMF') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
|||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import UploadModal from '@/components/UploadModal/index.vue';
|
import UploadModal from '@/components/UploadModal/index.vue';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/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 useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver';
|
||||||
@@ -27,7 +27,7 @@ import {
|
|||||||
import { uploadFile } from '@/api/tool/file';
|
import { uploadFile } from '@/api/tool/file';
|
||||||
import { getNeViewFile } from '@/api/tool/neFile';
|
import { getNeViewFile } from '@/api/tool/neFile';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
let neOtions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -739,33 +739,24 @@ function fnModalDownloadImportTemplate() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'UDM') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'UDM') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
|||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import UploadModal from '@/components/UploadModal/index.vue';
|
import UploadModal from '@/components/UploadModal/index.vue';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/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 useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import saveAs from 'file-saver';
|
import saveAs from 'file-saver';
|
||||||
@@ -27,7 +27,7 @@ import {
|
|||||||
import { uploadFile } from '@/api/tool/file';
|
import { uploadFile } from '@/api/tool/file';
|
||||||
import { getNeViewFile } from '@/api/tool/neFile';
|
import { getNeViewFile } from '@/api/tool/neFile';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
let neOtions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -1130,33 +1130,24 @@ async function fnModalDownloadImportTemplate() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'UDM') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'UDM') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -22,14 +22,13 @@ import {
|
|||||||
listUDMVOIP,
|
listUDMVOIP,
|
||||||
resetUDMVOIP,
|
resetUDMVOIP,
|
||||||
} from '@/api/neData/udm_voip';
|
} from '@/api/neData/udm_voip';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver';
|
||||||
import { uploadFileToNE } from '@/api/tool/file';
|
import { uploadFileToNE } from '@/api/tool/file';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
let neOtions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -540,31 +539,24 @@ function fnModalDownloadImportTemplate() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'UDM') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS && res.data?.length > 0) {
|
}
|
||||||
let arr: Record<string, any>[] = [];
|
});
|
||||||
res.data.forEach((v: any) => {
|
if (neOtions.value.length === 0) {
|
||||||
if (v.neType === 'UDM') {
|
message.warning({
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -12,17 +12,7 @@ import {
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import UploadModal from '@/components/UploadModal/index.vue';
|
import UploadModal from '@/components/UploadModal/index.vue';
|
||||||
import {
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
addUDMVOIP,
|
|
||||||
batchAddUDMVOIP,
|
|
||||||
batchDelUDMVOIP,
|
|
||||||
delUDMVOIP,
|
|
||||||
exportUDMVOIP,
|
|
||||||
importUDMVOIP,
|
|
||||||
listUDMVOIP,
|
|
||||||
resetUDMVOIP,
|
|
||||||
} from '@/api/neData/udm_voip';
|
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver';
|
||||||
@@ -33,12 +23,12 @@ import {
|
|||||||
batchDelUDMVolteIMS,
|
batchDelUDMVolteIMS,
|
||||||
delUDMVolteIMS,
|
delUDMVolteIMS,
|
||||||
exportUDMVolteIMS,
|
exportUDMVolteIMS,
|
||||||
|
importUDMVolteIMS,
|
||||||
listUDMVolteIMS,
|
listUDMVolteIMS,
|
||||||
resetUDMVolteIMS,
|
resetUDMVolteIMS,
|
||||||
} from '@/api/neData/udm_volte_ims';
|
} from '@/api/neData/udm_volte_ims';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
let dict: {
|
let dict: {
|
||||||
/**Tag标签类型 0=VoIP, 1=VoLTE */
|
/**Tag标签类型 0=VoIP, 1=VoLTE */
|
||||||
@@ -554,7 +544,7 @@ function fnModalUploadImportUpload(file: File) {
|
|||||||
uploadFileToNE('UDM', neID, file, 5)
|
uploadFileToNE('UDM', neID, file, 5)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
return importUDMVOIP({
|
return importUDMVolteIMS({
|
||||||
neId: neID,
|
neId: neID,
|
||||||
uploadPath: res.data,
|
uploadPath: res.data,
|
||||||
});
|
});
|
||||||
@@ -601,31 +591,24 @@ function fnModalDownloadImportTemplate() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'UDM') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS && res.data?.length > 0) {
|
}
|
||||||
let arr: Record<string, any>[] = [];
|
});
|
||||||
res.data.forEach((v: any) => {
|
if (neOtions.value.length === 0) {
|
||||||
if (v.neType === 'UDM') {
|
message.warning({
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</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 { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { listN3iwf } from '@/api/neUser/n3iwf';
|
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 useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
let neOtions = ref<Record<string, any>[]>([]);
|
||||||
|
|
||||||
@@ -104,33 +104,24 @@ function fnGetList() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neListStore.neCascaderOptions.forEach(item => {
|
||||||
.fnNelist()
|
if (item.value === 'N3IWF') {
|
||||||
.then(res => {
|
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
});
|
||||||
let arr: Record<string, any>[] = [];
|
if (neOtions.value.length === 0) {
|
||||||
res.data.forEach((v: any) => {
|
message.warning({
|
||||||
if (v.neType === 'N3IWF') {
|
content: t('common.noData'),
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
duration: 2,
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (neOtions.value.length > 0) {
|
||||||
|
queryParams.neId = neOtions.value[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, onMounted, toRaw } from 'vue';
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
import { PageContainer } from 'antdv-pro-layout';
|
import { PageContainer } from 'antdv-pro-layout';
|
||||||
import { message } from 'ant-design-vue/es';
|
|
||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { listNSSF } from '@/api/neUser/nssf';
|
import { listNSSF } from '@/api/neUser/nssf';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**网元参数 */
|
|
||||||
let neOtions = ref<Record<string, any>[]>([]);
|
|
||||||
|
|
||||||
/**表格状态类型 */
|
/**表格状态类型 */
|
||||||
type TabeStateType = {
|
type TabeStateType = {
|
||||||
/**加载等待 */
|
/**加载等待 */
|
||||||
@@ -69,12 +64,12 @@ function fnGetList(pageNum?: number) {
|
|||||||
if (tableState.loading) return;
|
if (tableState.loading) return;
|
||||||
tableState.loading = true;
|
tableState.loading = true;
|
||||||
listNSSF().then(res => {
|
listNSSF().then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
}
|
}
|
||||||
const { total, rows } = res.data;
|
const { total, rows } = res.data;
|
||||||
tableState.data = rows;
|
tableState.data = rows;
|
||||||
} else {
|
} else {
|
||||||
tableState.data = [];
|
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 { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import {
|
import {
|
||||||
addCustom,
|
addCustom,
|
||||||
delCustom,
|
delCustom,
|
||||||
@@ -19,7 +19,7 @@ import { getKPITitle } from '@/api/perfManage/goldTarget';
|
|||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
|
const neListStore = useNeListStore();
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
let dict: {
|
let dict: {
|
||||||
/**状态 */
|
/**状态 */
|
||||||
@@ -461,37 +461,30 @@ function fnChangeUnit(value: any) {
|
|||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
let neCascaderOptions = ref<Record<string, any>[]>([]);
|
let neCascaderOptions = ref<Record<string, any>[]>([]);
|
||||||
onMounted(() => {
|
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([
|
Promise.allSettled([
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
getDict('sys_normal_disable'),
|
getDict('sys_normal_disable'),
|
||||||
useNeInfoStore().fnNelist(),
|
|
||||||
])
|
])
|
||||||
.then(resArr => {
|
.then(resArr => {
|
||||||
if (resArr[0].status === 'fulfilled') {
|
if (resArr[0].status === 'fulfilled') {
|
||||||
dict.sysNormalDisable = resArr[0].value;
|
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(() => {
|
.finally(() => {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import {
|
|||||||
RESULT_CODE_ERROR,
|
RESULT_CODE_ERROR,
|
||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { getKPITitle, listKPIData } from '@/api/perfManage/goldTarget';
|
import { getKPITitle, listKPIData } from '@/api/perfManage/goldTarget';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
@@ -47,7 +47,7 @@ import { useRoute } from 'vue-router';
|
|||||||
import { LineOutlined } from '@ant-design/icons-vue';
|
import { LineOutlined } from '@ant-design/icons-vue';
|
||||||
import useLayoutStore from '@/store/modules/layout';
|
import useLayoutStore from '@/store/modules/layout';
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
@@ -825,50 +825,39 @@ watch(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 目前支持的 AMF AUSF MME MOCNGW NSSF SMF UDM UPF PCF
|
// 目前支持的 AMF AUSF MME MOCNGW NSSF SMF UDM UPF PCF
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore.fnNelist().then(res => {
|
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
(item: any) => {
|
||||||
if (res.data.length > 0) {
|
// 过滤不可用的网元
|
||||||
// 过滤不可用的网元
|
return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes(
|
||||||
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
|
item.value
|
||||||
(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,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
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(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import {
|
|||||||
RESULT_CODE_ERROR,
|
RESULT_CODE_ERROR,
|
||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { listCustom } from '@/api/perfManage/customTarget';
|
import { listCustom } from '@/api/perfManage/customTarget';
|
||||||
import { listCustomData } from '@/api/perfManage/customData';
|
import { listCustomData } from '@/api/perfManage/customData';
|
||||||
@@ -45,10 +45,10 @@ import { generateColorRGBA } from '@/utils/generate-utils';
|
|||||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||||
import { LineOutlined } from '@ant-design/icons-vue';
|
import { LineOutlined } from '@ant-design/icons-vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import dayjs, { Dayjs } from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import useLayoutStore from '@/store/modules/layout';
|
import useLayoutStore from '@/store/modules/layout';
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
@@ -893,61 +893,48 @@ onMounted(() => {
|
|||||||
typeArr.push(item.neType);
|
typeArr.push(item.neType);
|
||||||
});
|
});
|
||||||
typeArr = Array.from(new Set(typeArr));
|
typeArr = Array.from(new Set(typeArr));
|
||||||
neInfoStore.fnNelist().then(res => {
|
// 过滤不可用的网元
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||||
if (res.data.length > 0) {
|
(item: any) => {
|
||||||
// 过滤不可用的网元
|
return typeArr.includes(item.value);
|
||||||
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,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
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 { listKPIData, getKPITitle } from '@/api/perfManage/goldTarget';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import dayjs, { Dayjs } from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { generateColorRGBA } from '@/utils/generate-utils';
|
import { generateColorRGBA } from '@/utils/generate-utils';
|
||||||
import { LineSeriesOption } from 'echarts/charts';
|
import { LineSeriesOption } from 'echarts/charts';
|
||||||
@@ -30,9 +30,7 @@ import { useDebounceFn } from '@vueuse/core';
|
|||||||
import { LineOutlined } from '@ant-design/icons-vue';
|
import { LineOutlined } from '@ant-design/icons-vue';
|
||||||
import { TableColumnType } from 'ant-design-vue';
|
import { TableColumnType } from 'ant-design-vue';
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
//test
|
const neListStore = useNeListStore();
|
||||||
|
|
||||||
const neInfoStore = useNeInfoStore();
|
|
||||||
//日期快捷选择
|
//日期快捷选择
|
||||||
const ranges = ref([
|
const ranges = ref([
|
||||||
{
|
{
|
||||||
@@ -72,12 +70,13 @@ const ALL_NE_TYPES = [
|
|||||||
'cbc',
|
'cbc',
|
||||||
] as const;
|
] as const;
|
||||||
type AllChartType = (typeof ALL_NE_TYPES)[number] & string;
|
type AllChartType = (typeof ALL_NE_TYPES)[number] & string;
|
||||||
console.log( neInfoStore.getNeCascaderOptions)
|
|
||||||
// 在 ALL_NE_TYPES 定义之后添加 小写转大写
|
// 在 ALL_NE_TYPES 定义之后添加 小写转大写
|
||||||
const neTypeOptions = neInfoStore.getNeCascaderOptions.map(v => ({
|
const neTypeOptions = neListStore.getNeCascaderOptions
|
||||||
label: v.value,
|
.filter(v => ALL_NE_TYPES.includes(v.value.toLowerCase()))
|
||||||
value: v.label,
|
.map(v => ({
|
||||||
}));
|
label: v.label,
|
||||||
|
value: v.value.toLowerCase(),
|
||||||
|
}));
|
||||||
|
|
||||||
// 使用 ref 来使 networkElementTypes 变为响应式,并使用 ALL_NE_TYPES 初始化
|
// 使用 ref 来使 networkElementTypes 变为响应式,并使用 ALL_NE_TYPES 初始化
|
||||||
const networkElementTypes = ref<AllChartType[]>([...ALL_NE_TYPES]);
|
const networkElementTypes = ref<AllChartType[]>([...ALL_NE_TYPES]);
|
||||||
@@ -300,7 +299,7 @@ const chartStates: Record<
|
|||||||
> = Object.fromEntries(
|
> = Object.fromEntries(
|
||||||
networkElementTypes.value.map(type => [type, createChartState(type)])
|
networkElementTypes.value.map(type => [type, createChartState(type)])
|
||||||
) as Record<AllChartType, ReturnType<typeof createChartState>>;
|
) as Record<AllChartType, ReturnType<typeof createChartState>>;
|
||||||
|
|
||||||
// 日期选择器状态
|
// 日期选择器状态
|
||||||
const rangePicker = reactive({
|
const rangePicker = reactive({
|
||||||
...(Object.fromEntries(
|
...(Object.fromEntries(
|
||||||
@@ -821,7 +820,7 @@ const fetchKPITitle = async (type: AllChartType) => {
|
|||||||
return dayjs(Number(text)).format('YYYY-MM-DD HH:mm:ss');
|
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;
|
const kpiId = item.kpiId;
|
||||||
// 如果没有现有的颜色,生成新的颜色
|
// 如果没有现有的颜色,生成新的颜色
|
||||||
if (!existingColors.has(kpiId)) {
|
if (!existingColors.has(kpiId)) {
|
||||||
@@ -1032,7 +1031,6 @@ const themeObserver = new MutationObserver(() => {
|
|||||||
// 在 onMounted 中添加题观察器
|
// 在 onMounted 中添加题观察器
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
ws.value = new WS();
|
ws.value = new WS();
|
||||||
await neInfoStore.fnNelist();
|
|
||||||
|
|
||||||
// 从本地存储中读取选中的网元类型
|
// 从本地存储中读取选中的网元类型
|
||||||
const savedSelectedNeTypes = localStorage.getItem('selectedNeTypes');
|
const savedSelectedNeTypes = localStorage.getItem('selectedNeTypes');
|
||||||
@@ -1342,7 +1340,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
|
|||||||
<a-tooltip placement="bottom">
|
<a-tooltip placement="bottom">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>
|
<span>
|
||||||
{{ t('views.perfManage.kpiOverView.totalValueTip') }}
|
{{
|
||||||
|
t('views.perfManage.kpiOverView.totalValueTip')
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined />
|
<InfoCircleOutlined />
|
||||||
@@ -1355,7 +1355,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
|
|||||||
<a-tooltip placement="bottom">
|
<a-tooltip placement="bottom">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>
|
<span>
|
||||||
{{ t('views.perfManage.kpiOverView.avgValueTip') }}
|
{{
|
||||||
|
t('views.perfManage.kpiOverView.avgValueTip')
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined />
|
<InfoCircleOutlined />
|
||||||
@@ -1368,7 +1370,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
|
|||||||
<a-tooltip placement="bottom">
|
<a-tooltip placement="bottom">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>
|
<span>
|
||||||
{{ t('views.perfManage.kpiOverView.maxValueTip') }}
|
{{
|
||||||
|
t('views.perfManage.kpiOverView.maxValueTip')
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined />
|
<InfoCircleOutlined />
|
||||||
@@ -1381,7 +1385,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => {
|
|||||||
<a-tooltip placement="bottom">
|
<a-tooltip placement="bottom">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>
|
<span>
|
||||||
{{ t('views.perfManage.kpiOverView.minValueTip') }}
|
{{
|
||||||
|
t('views.perfManage.kpiOverView.minValueTip')
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<InfoCircleOutlined />
|
<InfoCircleOutlined />
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
|||||||
import { parseDateToStr } from '@/utils/date-utils';
|
import { parseDateToStr } from '@/utils/date-utils';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { listperfData } from '@/api/perfManage/perfData';
|
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 useDictStore from '@/store/modules/dict';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
@@ -223,7 +223,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore().fnNelist();
|
useNeListStore().fnNelist();
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
fnGetList();
|
fnGetList();
|
||||||
});
|
});
|
||||||
@@ -246,7 +246,7 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="useNeInfoStore().getNeSelectOtions"
|
:options="useNeListStore().getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
|||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import {
|
import {
|
||||||
addPerfThre,
|
addPerfThre,
|
||||||
delPerfThre,
|
delPerfThre,
|
||||||
@@ -268,9 +268,10 @@ const modalStateFrom = Form.useForm(
|
|||||||
/**性能测量数据集选择初始 */
|
/**性能测量数据集选择初始 */
|
||||||
function fnSelectPerformanceInit(value: any) {
|
function fnSelectPerformanceInit(value: any) {
|
||||||
//console.logg(currentLocale.value); //当前语言
|
//console.logg(currentLocale.value); //当前语言
|
||||||
const performance = useNeInfoStore().perMeasurementList.filter(
|
const performance: any = [];
|
||||||
i => i.neType === value
|
// const performance = useNeListStore().perMeasurementList.filter(
|
||||||
);
|
// i => i.neType === value
|
||||||
|
// );
|
||||||
//进行分组选择
|
//进行分组选择
|
||||||
const groupedData = performance.reduce((groups: any, item: any) => {
|
const groupedData = performance.reduce((groups: any, item: any) => {
|
||||||
const { kpiCode, ...rest } = item;
|
const { kpiCode, ...rest } = item;
|
||||||
@@ -491,9 +492,10 @@ onMounted(() => {
|
|||||||
|
|
||||||
Promise.allSettled([
|
Promise.allSettled([
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore().fnNelist(),
|
useNeListStore().fnNelist(),
|
||||||
// 获取性能测量集列表
|
// 获取性能测量集列表
|
||||||
useNeInfoStore().fnNeTaskPerformance(),
|
// useNeListStore().fnNeTaskPerformance(),
|
||||||
|
// getNePerformanceList(),
|
||||||
]).finally(() => {
|
]).finally(() => {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
fnGetList();
|
fnGetList();
|
||||||
@@ -515,7 +517,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="useNeInfoStore().getNeSelectOtions"
|
:options="useNeListStore().getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
:placeholder="t('views.ne.common.neTypePlease')"
|
||||||
/>
|
/>
|
||||||
@@ -689,7 +691,7 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="modalState.from.neType"
|
v-model:value="modalState.from.neType"
|
||||||
:options="useNeInfoStore().getNeSelectOtions"
|
:options="useNeListStore().getNeSelectOtions"
|
||||||
@change="fnSelectPerformanceInit"
|
@change="fnSelectPerformanceInit"
|
||||||
:allow-clear="false"
|
:allow-clear="false"
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
: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 { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import useUserStore from '@/store/modules/user';
|
import useUserStore from '@/store/modules/user';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import {
|
import {
|
||||||
addPerfTask,
|
addPerfTask,
|
||||||
delPerfTask,
|
delPerfTask,
|
||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
taskStop,
|
taskStop,
|
||||||
taskRun,
|
taskRun,
|
||||||
} from '@/api/perfManage/taskManage';
|
} from '@/api/perfManage/taskManage';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
|
|
||||||
const generateOptions = (start: any, end: any) => {
|
const generateOptions = (start: any, end: any) => {
|
||||||
@@ -222,7 +222,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listPerfTask(toRaw(queryParams)).then(res => {
|
listPerfTask(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
@@ -389,9 +389,10 @@ function fnSelectPer(s: any, option: any) {
|
|||||||
/**性能测量数据集选择初始 */
|
/**性能测量数据集选择初始 */
|
||||||
function fnSelectPerformanceInit(neType: string) {
|
function fnSelectPerformanceInit(neType: string) {
|
||||||
//console.logg(currentLocale.value); //当前语言
|
//console.logg(currentLocale.value); //当前语言
|
||||||
const performance = neInfoStore.perMeasurementList.filter(
|
const performance: any = [];
|
||||||
i => i.neType === neType
|
// const performance = neInfoStore.perMeasurementList.filter(
|
||||||
);
|
// i => i.neType === neType
|
||||||
|
// );
|
||||||
//进行分组选择
|
//进行分组选择
|
||||||
const groupedData = performance.reduce((groups: any, item: any) => {
|
const groupedData = performance.reduce((groups: any, item: any) => {
|
||||||
const { kpiCode, ...rest } = item;
|
const { kpiCode, ...rest } = item;
|
||||||
@@ -699,17 +700,8 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始字典数据
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
Promise.allSettled([
|
|
||||||
// 获取网元网元列表
|
|
||||||
neInfoStore.fnNelist(),
|
|
||||||
// 获取性能测量集列表
|
|
||||||
neInfoStore.fnNeTaskPerformance(),
|
|
||||||
]).finally(() => {
|
|
||||||
// 获取列表数据
|
|
||||||
fnGetList();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -727,7 +719,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||||
<a-auto-complete
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="neInfoStore.getNeSelectOtions"
|
:options="neListStore.getNeSelectOtions"
|
||||||
allow-clear
|
allow-clear
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
:placeholder="t('views.ne.common.neTypePlease')"
|
||||||
/>
|
/>
|
||||||
@@ -890,7 +882,7 @@ onMounted(() => {
|
|||||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||||
<a-cascader
|
<a-cascader
|
||||||
:value="modalState.neType"
|
:value="modalState.neType"
|
||||||
:options="neInfoStore.getNeCascaderOptions"
|
:options="neListStore.getNeCascaderOptions"
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -1007,7 +999,7 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<a-cascader
|
<a-cascader
|
||||||
v-model:value="modalState.neType"
|
v-model:value="modalState.neType"
|
||||||
:options="neInfoStore.getNeCascaderOptions"
|
:options="neListStore.getNeCascaderOptions"
|
||||||
@change="fnNeChange"
|
@change="fnNeChange"
|
||||||
:allow-clear="false"
|
:allow-clear="false"
|
||||||
:placeholder="t('views.ne.common.neTypePlease')"
|
:placeholder="t('views.ne.common.neTypePlease')"
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import {
|
|||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import TerminalSSHView from '@/components/TerminalSSHView/index.vue';
|
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';
|
import { iperfI, iperfV } from '@/api/tool/iperf';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
@@ -66,7 +66,11 @@ async function fnIPerf() {
|
|||||||
});
|
});
|
||||||
return;
|
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({
|
message.warning({
|
||||||
content: 'Please fill in the Host',
|
content: 'Please fill in the Host',
|
||||||
duration: 2,
|
duration: 2,
|
||||||
@@ -229,29 +233,16 @@ function fnMessage(res: Record<string, any>) {
|
|||||||
/**钩子函数,界面打开初始化*/
|
/**钩子函数,界面打开初始化*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore.fnNelist().then(res => {
|
for (const item of neListStore.getNeCascaderOptions) {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
neCascaderOptions.value.push(item); // 过滤不可用的网元
|
||||||
if (res.data.length > 0) {
|
}
|
||||||
// 过滤不可用的网元
|
if (neCascaderOptions.value.length === 0) {
|
||||||
for (const item of neInfoStore.getNeCascaderOptions) {
|
message.warning({
|
||||||
neCascaderOptions.value.push(item);
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
|
});
|
||||||
if (neCascaderOptions.value.length === 0) {
|
return;
|
||||||
message.warning({
|
}
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**钩子函数,界面关闭*/
|
/**钩子函数,界面关闭*/
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import {
|
|||||||
RESULT_CODE_SUCCESS,
|
RESULT_CODE_SUCCESS,
|
||||||
} from '@/constants/result-constants';
|
} from '@/constants/result-constants';
|
||||||
import TerminalSSHView from '@/components/TerminalSSHView/index.vue';
|
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';
|
import { pingV } from '@/api/tool/ping';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
@@ -187,29 +187,16 @@ function fnMessage(res: Record<string, any>) {
|
|||||||
/**钩子函数,界面打开初始化*/
|
/**钩子函数,界面打开初始化*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore.fnNelist().then(res => {
|
for (const item of neListStore.getNeCascaderOptions) {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
neCascaderOptions.value.push(item); // 过滤不可用的网元
|
||||||
if (res.data.length > 0) {
|
}
|
||||||
// 过滤不可用的网元
|
if (neCascaderOptions.value.length === 0) {
|
||||||
for (const item of neInfoStore.getNeCascaderOptions) {
|
message.warning({
|
||||||
neCascaderOptions.value.push(item);
|
content: t('common.noData'),
|
||||||
}
|
duration: 2,
|
||||||
|
});
|
||||||
if (neCascaderOptions.value.length === 0) {
|
return;
|
||||||
message.warning({
|
}
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.warning({
|
|
||||||
content: t('common.noData'),
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**钩子函数,界面关闭*/
|
/**钩子函数,界面关闭*/
|
||||||
|
|||||||
@@ -5,14 +5,16 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
|||||||
import { Modal, message } from 'ant-design-vue/es';
|
import { Modal, message } from 'ant-design-vue/es';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { delNeHost, listNeHost } from '@/api/ne/neHost';
|
import { delNeHost, listNeHost } from '@/api/ne/neHost';
|
||||||
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
|
const neListStore = useNeListStore();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const EditModal = defineAsyncComponent(
|
const EditModal = defineAsyncComponent(
|
||||||
() => import('@/views/ne/neHost/components/EditModal.vue')
|
() => import('@/views/ne/neHost/components/EditModal.vue')
|
||||||
);
|
);
|
||||||
const emit = defineEmits(['modal','link']);
|
const emit = defineEmits(['modal', 'link']);
|
||||||
|
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
let dict: {
|
let dict: {
|
||||||
@@ -35,7 +37,7 @@ let queryParams = reactive({
|
|||||||
/**分组 */
|
/**分组 */
|
||||||
groupId: undefined,
|
groupId: undefined,
|
||||||
/**名称 */
|
/**名称 */
|
||||||
title: '',
|
title: 'OMC',
|
||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
/**每页条数 */
|
/**每页条数 */
|
||||||
@@ -144,7 +146,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listNeHost(toRaw(queryParams)).then(res => {
|
listNeHost(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
const { total, rows } = res.data;
|
const { total, rows } = res.data;
|
||||||
tablePagination.total = total;
|
tablePagination.total = total;
|
||||||
tableState.data = rows;
|
tableState.data = rows;
|
||||||
@@ -185,7 +187,7 @@ let modalState: ModalStateType = reactive({
|
|||||||
function fnModalVisibleByEdit(roleId?: undefined) {
|
function fnModalVisibleByEdit(roleId?: undefined) {
|
||||||
modalState.id = roleId;
|
modalState.id = roleId;
|
||||||
modalState.openByEdit = true;
|
modalState.openByEdit = true;
|
||||||
emit('modal');
|
emit('modal');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -286,7 +288,17 @@ onMounted(() => {
|
|||||||
</template>
|
</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
|
<a-table
|
||||||
@@ -325,10 +337,7 @@ onMounted(() => {
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip v-if="record.groupId !== '1'">
|
<a-tooltip v-if="record.groupId !== '1'">
|
||||||
<template #title>{{ t('common.deleteText') }}</template>
|
<template #title>{{ t('common.deleteText') }}</template>
|
||||||
<a-button
|
<a-button type="link" @click.prevent="fnRecordDelete(record.id)">
|
||||||
type="link"
|
|
||||||
@click.prevent="fnRecordDelete(record.id)"
|
|
||||||
>
|
|
||||||
<template #icon><DeleteOutlined /></template>
|
<template #icon><DeleteOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import { parseDateToStr } from '@/utils/date-utils';
|
|||||||
import { getNeDirZip, getNeFile, listNeFiles } from '@/api/tool/neFile';
|
import { getNeDirZip, getNeFile, listNeFiles } from '@/api/tool/neFile';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import ViewDrawer from '@/views/ne/neFile/components/ViewDrawer.vue';
|
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 useTabsStore from '@/store/modules/tabs';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import saveAs from 'file-saver';
|
import saveAs from 'file-saver';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
const tabsStore = useTabsStore();
|
const tabsStore = useTabsStore();
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -333,20 +333,10 @@ function fnDrawerOpen(row: Record<string, any>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
if (routeParams.neType && routeParams.neId) {
|
||||||
neInfoStore.fnNelist().then(res => {
|
neTypeSelect.value = [routeParams.neType, routeParams.neId];
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
fnNeChange(neTypeSelect.value, undefined);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -366,7 +356,7 @@ onMounted(() => {
|
|||||||
<span>{{ t('views.logManage.neFile.neType') }}:</span>
|
<span>{{ t('views.logManage.neFile.neType') }}:</span>
|
||||||
<a-cascader
|
<a-cascader
|
||||||
v-model:value="neTypeSelect"
|
v-model:value="neTypeSelect"
|
||||||
:options="neInfoStore.getNeCascaderOptions"
|
:options="neListStore.getNeCascaderOptions"
|
||||||
@change="fnNeChange"
|
@change="fnNeChange"
|
||||||
:allow-clear="false"
|
:allow-clear="false"
|
||||||
:placeholder="t('views.logManage.neFile.neTypePlease')"
|
:placeholder="t('views.logManage.neFile.neTypePlease')"
|
||||||
@@ -434,7 +424,7 @@ onMounted(() => {
|
|||||||
<template #icon><DownloadOutlined /></template>
|
<template #icon><DownloadOutlined /></template>
|
||||||
{{ t('common.downloadText') }}
|
{{ t('common.downloadText') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnDrawerOpen(record)"
|
@click.prevent="fnDrawerOpen(record)"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { parseDateToStr } from '@/utils/date-utils';
|
|||||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
import {
|
import {
|
||||||
addTraceTask,
|
addTraceTask,
|
||||||
delTraceTask,
|
delTraceTask,
|
||||||
@@ -23,7 +23,7 @@ import useDictStore from '@/store/modules/dict';
|
|||||||
import { regExpIPv4 } from '@/utils/regular-utils';
|
import { regExpIPv4 } from '@/utils/regular-utils';
|
||||||
import dayjs, { Dayjs } from 'dayjs';
|
import dayjs, { Dayjs } from 'dayjs';
|
||||||
import { parseObjHumpToLine } from '@/utils/parse-utils';
|
import { parseObjHumpToLine } from '@/utils/parse-utils';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neListStore = useNeListStore();
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -577,36 +577,20 @@ onMounted(() => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
neCascaderOptions.value = neListStore.getNeSelectOtions.filter(
|
||||||
.fnNelist()
|
(item: any) => {
|
||||||
.then(res => {
|
return ['AMF', 'AUSF', 'SMF', 'UDM', 'PCF'].includes(item.value); // 过滤不可用的网元
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
}
|
||||||
if (res.data.length > 0) {
|
);
|
||||||
// 过滤不可用的网元
|
if (neCascaderOptions.value.length === 0) {
|
||||||
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
|
message.warning({
|
||||||
(item: any) => {
|
content: t('common.noData'),
|
||||||
return ['AMF', 'AUSF', 'SMF', 'UDM', 'PCF'].includes(item.value);
|
duration: 3,
|
||||||
}
|
|
||||||
);
|
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 获取列表数据
|
||||||
|
fnGetList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user