feat: 添加服务类型适配不同的显示菜单内容
This commit is contained in:
86
src/api/core/coreInfo.ts
Normal file
86
src/api/core/coreInfo.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
import { CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants';
|
||||
import { sessionGet } from '@/utils/cache-session-utils';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询核心网列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listCoreInfo(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/core/info/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询核心网列表全部无分页
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listAllCoreInfo(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/core/info/list/all',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询核心网信息详细
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getCoreInfo(id: string | number) {
|
||||
return request({
|
||||
url: `/core/info/${id}`,
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 核心网信息新增
|
||||
* @param data 核心网对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addCoreInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/core/info`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 核心网信息修改
|
||||
* @param data 核心网对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateCoreInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/core/info`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 核心网信息删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delCoreInfo(id: string | number) {
|
||||
return request({
|
||||
url: `/core/info/${id}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CBC列表
|
||||
* @param query 查询参数
|
||||
@@ -16,8 +14,6 @@ export function listCBC(query: Record<string, any>) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CBC签约用户新增
|
||||
* @param data 签约对象
|
||||
@@ -32,10 +28,7 @@ export function addCBC(data: Record<string, any>) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export function updateCBCStatus(data:any) {
|
||||
export function updateCBCStatus(data: any) {
|
||||
return request({
|
||||
url: `/neData/cbc/message/${data.id}/${data.status}?neId=${data.neId}`,
|
||||
method: 'PUT',
|
||||
@@ -43,8 +36,7 @@ export function updateCBCStatus(data:any) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function updateCBC(data:any) {
|
||||
export function updateCBC(data: any) {
|
||||
return request({
|
||||
url: `/neData/cbc/message/${data.id}?neId=${data.neId}`,
|
||||
method: 'PUT',
|
||||
@@ -53,8 +45,6 @@ export function updateCBC(data:any) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CBC删除
|
||||
* @param data 签约对象
|
||||
@@ -67,9 +57,3 @@ export function delCBC(neId: string, id: string) {
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,3 +6,12 @@ export const APP_REQUEST_HEADER_VERSION = 'X-App-Version';
|
||||
|
||||
/**应用-请求数据-密钥 */
|
||||
export const APP_DATA_API_KEY = 'T9ox2DCzpLfJIPzkH9pKhsOTMOEMJcFv';
|
||||
|
||||
/**应用-服务类型 单核心网 */
|
||||
export const APP_SERVER_TYPE_O = 'oc';
|
||||
|
||||
/**应用-服务类型 多核心网 */
|
||||
export const APP_SERVER_TYPE_M = 'mc';
|
||||
|
||||
/**应用-服务类型 租户核心网 */
|
||||
export const APP_SERVER_TYPE_T = 'tc';
|
||||
|
||||
@@ -4,6 +4,9 @@ export const CACHE_SESSION_CRYPTO_API = 'cache:session:cryptoApi';
|
||||
/**会话缓存-网络请求 */
|
||||
export const CACHE_SESSION_FATCH = 'cache:session:fatch';
|
||||
|
||||
/**会话缓存-当前选中核心网 */
|
||||
export const CACHE_SESSION_CORE = 'cache:session:core';
|
||||
|
||||
/**本地缓存-布局设置 */
|
||||
export const CACHE_LOCAL_PROCONFIG = 'cache:local:proConfig';
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ import {
|
||||
clearMenuItem,
|
||||
MenuDataItem,
|
||||
} from 'antdv-pro-layout';
|
||||
import RightContent from './components/RightContent.vue';
|
||||
import CoreSelect from './components/CoreSelect.vue';
|
||||
import HeaderContentRight from './components/HeaderContentRight/HeaderContentRight.vue';
|
||||
import Tabs from './components/Tabs.vue';
|
||||
import GlobalMask from '@/components/GlobalMask/index.vue';
|
||||
import ForcePasswdChange from '@/components/ForcePasswdChange/index.vue';
|
||||
@@ -21,7 +22,7 @@ import {
|
||||
import { useRouter } from 'vue-router';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -29,12 +30,13 @@ import useAlarmStore from '@/store/modules/alarm';
|
||||
import { getServerTime } from '@/api';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { APP_SERVER_TYPE_M } from '@/constants/app-constants';
|
||||
import { getTimezoneOffset, parseDateUTCToStr } from '@/utils/date-utils';
|
||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
const { proConfig, waterMarkContent } = useLayoutStore();
|
||||
const { t, currentLocale } = useI18n();
|
||||
const routerStore = useRouterStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const tabsStore = useTabsStore();
|
||||
const appStore = useAppStore();
|
||||
const router = useRouter();
|
||||
@@ -68,19 +70,6 @@ watch(
|
||||
);
|
||||
|
||||
// 动态路由添加到菜单面板
|
||||
// const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||
// if (rootRoute) {
|
||||
// const children = routerStore.setRootRouterData(rootRoute.children);
|
||||
// const buildRouterData = routerStore.buildRouterData;
|
||||
// if (buildRouterData.length > 0) {
|
||||
// rootRoute.children = children.concat(buildRouterData);
|
||||
// } else {
|
||||
// rootRoute.children = children;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// const { menuData } = getMenuData(clearMenuItem(router.getRoutes()));
|
||||
//
|
||||
const menuData = computed(() => {
|
||||
const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||
if (rootRoute) {
|
||||
@@ -92,9 +81,9 @@ const menuData = computed(() => {
|
||||
rootRoute.children = children;
|
||||
}
|
||||
}
|
||||
const neTypes = neListStore.getNeSelectOtions.map(v => v.value);
|
||||
const neTypes = neStore.getNeSelectOtions.map(v => v.value);
|
||||
let routes = clearMenuItem(router.getRoutes());
|
||||
routes = routerStore.clearMenuItemByNeList(routes, neTypes);
|
||||
routes = routerStore.clearMenuItemByNeList(routes, '12345678', neTypes);
|
||||
const { menuData } = getMenuData(routes);
|
||||
return menuData;
|
||||
});
|
||||
@@ -151,10 +140,13 @@ tabsStore.clear();
|
||||
|
||||
// LOGO地址
|
||||
const logoUrl = computed(() => {
|
||||
let url =
|
||||
appStore.logoType === 'brand'
|
||||
? parseUrlPath(appStore.filePathBrand)
|
||||
: parseUrlPath(appStore.filePathIcon);
|
||||
let url = parseUrlPath(appStore.filePathIcon);
|
||||
if (appStore.logoType === 'brand') {
|
||||
url = parseUrlPath(appStore.filePathBrand);
|
||||
}
|
||||
if (layoutState.collapsed) {
|
||||
url = parseUrlPath(appStore.filePathIcon);
|
||||
}
|
||||
|
||||
if (url.indexOf('{language}') === -1) {
|
||||
return url;
|
||||
@@ -294,13 +286,17 @@ onUnmounted(() => {
|
||||
:alt="appStore.appName"
|
||||
:title="appStore.appName"
|
||||
/>
|
||||
<h1 class="app-name" :title="appStore.appName">
|
||||
<h1
|
||||
class="app-name"
|
||||
:title="appStore.appName"
|
||||
v-show="!layoutState.collapsed"
|
||||
>
|
||||
<span class="marquee app-name_scrollable">
|
||||
{{ appStore.appName }}
|
||||
</span>
|
||||
</h1>
|
||||
</template>
|
||||
<template v-if="appStore.logoType === 'brand'">
|
||||
<template v-else-if="appStore.logoType === 'brand'">
|
||||
<img
|
||||
class="logo-brand"
|
||||
:src="logoUrl"
|
||||
@@ -316,7 +312,15 @@ onUnmounted(() => {
|
||||
|
||||
<!--插槽-渲染顶部内容右端区域-->
|
||||
<template #headerContentRightRender>
|
||||
<RightContent />
|
||||
<HeaderContentRight />
|
||||
</template>
|
||||
|
||||
<!--插槽-渲染顶部内容区域,仅布局side有效-->
|
||||
<template
|
||||
#menuHeaderExtraRender
|
||||
v-if="useAppStore().serverType === APP_SERVER_TYPE_M"
|
||||
>
|
||||
<CoreSelect></CoreSelect>
|
||||
</template>
|
||||
|
||||
<!--插槽-导航标签项-->
|
||||
|
||||
76
src/layouts/components/CoreSelect.vue
Normal file
76
src/layouts/components/CoreSelect.vue
Normal file
@@ -0,0 +1,76 @@
|
||||
<script lang="ts" setup>
|
||||
import useCoreStore from '@/store/modules/core';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { ref } from 'vue';
|
||||
const coreStore = useCoreStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**当前选中 */
|
||||
const coreValue = ref(coreStore.current?.value || 'Global');
|
||||
/**选择列表数据 */
|
||||
const coreOtions = ref(coreStore.getSelectOtions);
|
||||
/**选择过滤名称 */
|
||||
const coreName = ref();
|
||||
|
||||
/**选择 */
|
||||
function handleSelect(v: any, item: any) {
|
||||
if (v === 'all') {
|
||||
coreValue.value = 'Global';
|
||||
} else {
|
||||
coreValue.value = v;
|
||||
}
|
||||
coreStore.setCurrent(item);
|
||||
}
|
||||
|
||||
/**搜索过滤 */
|
||||
function handleSearchFilter(e: any) {
|
||||
const label = e.target.value;
|
||||
coreOtions.value = coreStore.getSelectOtions.filter((item: any) => {
|
||||
return item.label.indexOf(label) !== -1;
|
||||
});
|
||||
}
|
||||
|
||||
/**内容挂载DOM */
|
||||
function getPopupContainer(): any {
|
||||
return document.querySelector('.ant-pro-sider');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="coreValue"
|
||||
:options="coreOtions"
|
||||
style="width: 100%"
|
||||
:getPopupContainer="getPopupContainer"
|
||||
@change="handleSelect"
|
||||
>
|
||||
<template #option="{ label }">
|
||||
<span>{{ label }}</span>
|
||||
</template>
|
||||
<template #dropdownRender="{ menuNode: menu }">
|
||||
<strong>Core</strong>
|
||||
<a-button
|
||||
type="default"
|
||||
:block="true"
|
||||
@click="handleSelect('all', { label: 'Global', value: 'all' })"
|
||||
>
|
||||
<template #icon> <HomeOutlined /> </template>
|
||||
Global
|
||||
</a-button>
|
||||
<a-input-search
|
||||
placeholder="Search Core Name"
|
||||
style="width: 100%; margin: 4px 0"
|
||||
v-model:value="coreName"
|
||||
@change="handleSearchFilter"
|
||||
>
|
||||
<template #enterButton>
|
||||
<ReloadOutlined />
|
||||
</template>
|
||||
</a-input-search>
|
||||
<a-divider style="margin: 4px 0" />
|
||||
<component :is="menu" />
|
||||
</template>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
120
src/layouts/components/HeaderContentRight/HeaderContentRight.vue
Normal file
120
src/layouts/components/HeaderContentRight/HeaderContentRight.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<script setup lang="ts">
|
||||
import svgLight from '@/assets/svg/light.svg';
|
||||
import svgDark from '@/assets/svg/dark.svg';
|
||||
import { viewTransitionTheme } from 'antdv-pro-layout';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useFullscreen } from '@vueuse/core';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
import LockScreen from './components/LockScreen.vue';
|
||||
import UserProfile from './components/UserProfile.vue';
|
||||
const { isFullscreen, toggle } = useFullscreen();
|
||||
const { t, changeLocale, optionsLocale, currentLocale } = useI18n();
|
||||
const layoutStore = useLayoutStore();
|
||||
const appStore = useAppStore();
|
||||
const router = useRouter();
|
||||
|
||||
/**告警数按钮提示跳转 */
|
||||
function fnClickAlarm() {
|
||||
router.push({ name: 'ActiveAlarm_2088' });
|
||||
}
|
||||
|
||||
/**改变主题色 */
|
||||
function fnClickTheme(e: any) {
|
||||
viewTransitionTheme(isDarkMode => {
|
||||
layoutStore.changeConf('theme', isDarkMode ? 'light' : 'dark');
|
||||
}, e);
|
||||
}
|
||||
|
||||
/**改变多语言 */
|
||||
function fnChangeLocale(e: any) {
|
||||
changeLocale(e.key);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-space :size="12" align="center">
|
||||
<!-- 告警气泡 -->
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.alarm') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="fnClickAlarm">
|
||||
<template #icon>
|
||||
<a-badge
|
||||
:count="useAlarmStore().activeAlarmTotal"
|
||||
:overflow-count="99"
|
||||
status="warning"
|
||||
style="color: inherit"
|
||||
>
|
||||
<BellOutlined />
|
||||
</a-badge>
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 锁屏操作 -->
|
||||
<LockScreen></LockScreen>
|
||||
|
||||
<!-- 全屏操作 -->
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.fullscreen') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="toggle">
|
||||
<template #icon>
|
||||
<FullscreenExitOutlined v-if="isFullscreen" />
|
||||
<FullscreenOutlined v-else />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 明暗主题操作 -->
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.theme') }}</template>
|
||||
<a-button type="text" @click="fnClickTheme">
|
||||
<template #icon>
|
||||
<img
|
||||
v-if="layoutStore.proConfig.theme === 'dark'"
|
||||
:src="svgDark"
|
||||
class="theme-icon"
|
||||
/>
|
||||
<img v-else :src="svgLight" class="theme-icon" />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 多语言操作 -->
|
||||
<a-dropdown
|
||||
placement="bottomRight"
|
||||
trigger="click"
|
||||
v-if="appStore.i18nOpen && hasPermissions(['system:setting:i18n'])"
|
||||
>
|
||||
<a-button type="text" style="color: inherit">
|
||||
<template #icon> <TranslationOutlined /> </template>
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu @click="fnChangeLocale">
|
||||
<a-menu-item
|
||||
v-for="opt in optionsLocale"
|
||||
:key="opt.value"
|
||||
:disabled="opt.value == currentLocale"
|
||||
>
|
||||
{{ opt.label }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<!-- 用户信息操作 -->
|
||||
<UserProfile></UserProfile>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.theme-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-bottom: 4px;
|
||||
color: inherit;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,71 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import useMaskStore from '@/store/modules/mask';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const maskStore = useMaskStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**锁屏确认 */
|
||||
const lockConfirm = ref<boolean>(false);
|
||||
/**锁屏密码 */
|
||||
const lockPasswd = ref<string>('');
|
||||
|
||||
/**锁屏按钮提示 */
|
||||
function fnClickLock() {
|
||||
lockConfirm.value = true;
|
||||
lockPasswd.value = '';
|
||||
maskStore.lockPasswd = '';
|
||||
}
|
||||
|
||||
/**锁屏确认跳转锁屏页面 */
|
||||
function fnClickLockToPage() {
|
||||
lockConfirm.value = false;
|
||||
maskStore.lockPasswd = lockPasswd.value;
|
||||
maskStore.handleMaskType('lock');
|
||||
router.push({ name: 'LockScreen', query: { redirect: route.path } });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span v-perms:has="['system:setting:lock']">
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.lock') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="fnClickLock()">
|
||||
<template #icon>
|
||||
<LockOutlined />
|
||||
</template>
|
||||
</a-button>
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:center-y="true"
|
||||
:width="400"
|
||||
:minHeight="200"
|
||||
:mask-closable="false"
|
||||
v-model:open="lockConfirm"
|
||||
:title="t('loayouts.rightContent.lockTip')"
|
||||
@ok="fnClickLockToPage()"
|
||||
>
|
||||
<a-space>
|
||||
{{ t('loayouts.rightContent.lockPasswd') }}:
|
||||
<a-input-password
|
||||
v-model:value="lockPasswd"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip
|
||||
:title="t('loayouts.rightContent.lockPasswdTip')"
|
||||
placement="topLeft"
|
||||
>
|
||||
<UnlockOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input-password>
|
||||
</a-space>
|
||||
</ProModal>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
@@ -0,0 +1,83 @@
|
||||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**头像展开项点击 */
|
||||
function fnClick({ key }: MenuInfo) {
|
||||
switch (key) {
|
||||
case 'settings':
|
||||
router.push({ name: 'Settings' });
|
||||
break;
|
||||
case 'profile':
|
||||
router.push({ name: 'Profile' });
|
||||
break;
|
||||
case 'logout':
|
||||
userStore.fnLogOut().finally(() => router.push({ name: 'Login' }));
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-dropdown placement="bottomRight" trigger="click">
|
||||
<div class="user">
|
||||
<a-avatar
|
||||
shape="circle"
|
||||
size="default"
|
||||
:src="userStore.getAvatar"
|
||||
:alt="userStore.userName"
|
||||
></a-avatar>
|
||||
<span class="nick">
|
||||
{{ userStore.nickName }}
|
||||
</span>
|
||||
</div>
|
||||
<template #overlay>
|
||||
<a-menu @click="fnClick">
|
||||
<!-- <a-menu-item key="profile">
|
||||
<template #icon>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.profile') }}</span>
|
||||
</a-menu-item> -->
|
||||
<a-menu-item key="settings">
|
||||
<template #icon>
|
||||
<SettingOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.settings') }}</span>
|
||||
</a-menu-item>
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="logout">
|
||||
<template #icon>
|
||||
<LogoutOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.logout') }}</span>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.user {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.nick {
|
||||
padding-left: 8px;
|
||||
padding-right: 16px;
|
||||
font-size: 16px;
|
||||
max-width: 164px;
|
||||
white-space: nowrap;
|
||||
text-align: start;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -10,8 +10,9 @@ import { getAccessToken } from '@/plugins/auth-token';
|
||||
import { validHttp } from '@/utils/regular-utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
import useCoreStore from '@/store/modules/core';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
|
||||
// NProgress Configuration
|
||||
NProgress.configure({ showSpinner: false });
|
||||
@@ -103,8 +104,10 @@ router.beforeEach(async (to, from, next) => {
|
||||
const user = useUserStore();
|
||||
if (user.roles && user.roles.length === 0) {
|
||||
try {
|
||||
// 获取核心网列表
|
||||
await useCoreStore().fnCorelist();
|
||||
// 获取网元信息
|
||||
await useNeListStore().fnNelist();
|
||||
await useNeStore().fnNelist();
|
||||
// 获取用户信息
|
||||
await user.fnGetInfo();
|
||||
// 获取路由信息
|
||||
@@ -128,7 +131,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
} else if (
|
||||
to.meta.neType &&
|
||||
to.meta.neType.length > 0 &&
|
||||
!useNeListStore().fnHasNe(to.meta.neType)
|
||||
!useNeStore().fnHasNe(to.meta.neType)
|
||||
) {
|
||||
next({ name: 'NotPermission' });
|
||||
} else {
|
||||
|
||||
@@ -23,8 +23,8 @@ type AppStore = {
|
||||
version: string;
|
||||
/**系统引导使用 */
|
||||
bootloader: boolean;
|
||||
/**服务版本 */
|
||||
serverVersion: string;
|
||||
/**服务类型 oc 单核心网 mc 多核心网 tc 租户核心网 */
|
||||
serverType: string;
|
||||
// 用户登录认证
|
||||
loginAuth: boolean;
|
||||
// 用户接口加密
|
||||
@@ -60,7 +60,7 @@ const useAppStore = defineStore('app', {
|
||||
|
||||
version: '-',
|
||||
bootloader: false,
|
||||
serverVersion: '-',
|
||||
serverType: '-',
|
||||
loginAuth: true,
|
||||
cryptoApi: true,
|
||||
serialNum: '-',
|
||||
@@ -90,7 +90,7 @@ const useAppStore = defineStore('app', {
|
||||
const res = await getSysConf();
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
this.version = res.data.version;
|
||||
this.serverVersion = res.data.serverVersion;
|
||||
this.serverType = res.data.serverType;
|
||||
this.bootloader = res.data.bootloader === 'true';
|
||||
// 引导时
|
||||
if (this.bootloader) {
|
||||
|
||||
72
src/store/modules/core.ts
Normal file
72
src/store/modules/core.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import { defineStore } from 'pinia';
|
||||
import { listAllCoreInfo } from '@/api/core/coreInfo';
|
||||
import { localGetJSON, localSetJSON } from '@/utils/cache-local-utils';
|
||||
import { CACHE_SESSION_CORE } from '@/constants/cache-keys-constants';
|
||||
|
||||
/**核心网信息类型 */
|
||||
type Core = {
|
||||
/**核心网列表 */
|
||||
coreList: Record<string, any>[];
|
||||
/**当前选择 */
|
||||
current: Record<string, any>;
|
||||
/**选择器单级父类型 */
|
||||
coreSelectOtions: Record<string, any>[];
|
||||
};
|
||||
|
||||
const useCoreStore = defineStore('core', {
|
||||
state: (): Core => ({
|
||||
coreList: [],
|
||||
current: localGetJSON(CACHE_SESSION_CORE) || {
|
||||
label: 'Global',
|
||||
value: 'all',
|
||||
},
|
||||
coreSelectOtions: [],
|
||||
}),
|
||||
getters: {
|
||||
getSelectOtions(): Record<string, any>[] {
|
||||
return this.coreSelectOtions;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setCurrent(value: Record<string, any> = {}) {
|
||||
this.current = value;
|
||||
localSetJSON(CACHE_SESSION_CORE, value);
|
||||
},
|
||||
// 刷新核心网列表
|
||||
async fnCorelistRefresh() {
|
||||
this.coreList = [];
|
||||
return await this.fnCorelist();
|
||||
},
|
||||
// 获取核心网列表
|
||||
async fnCorelist() {
|
||||
// 有数据不请求
|
||||
if (this.coreList.length > 0) {
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS['en_US'],
|
||||
data: this.coreList,
|
||||
};
|
||||
}
|
||||
const res = await listAllCoreInfo({});
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 原始列表
|
||||
this.coreList = JSON.parse(JSON.stringify(res.data));
|
||||
|
||||
// 转选择器单级父类型
|
||||
this.coreSelectOtions = res.data.map((item: any) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.coreUid,
|
||||
};
|
||||
});
|
||||
}
|
||||
return res;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default useCoreStore;
|
||||
@@ -6,19 +6,19 @@ import {
|
||||
import { listAllNeInfo } from '@/api/ne/neInfo';
|
||||
import { parseDataToOptions } from '@/utils/parse-tree-utils';
|
||||
|
||||
/**网元列表信息类型 */
|
||||
type NeList = {
|
||||
/**网元信息类型 */
|
||||
type Ne = {
|
||||
/**网元列表 */
|
||||
neList: Record<string, any>[];
|
||||
list: Record<string, any>[];
|
||||
/**级联options树结构 */
|
||||
neCascaderOptions: Record<string, any>[];
|
||||
/**选择器单级父类型 */
|
||||
neSelectOtions: Record<string, any>[];
|
||||
};
|
||||
|
||||
const useNeListStore = defineStore('ne_list', {
|
||||
state: (): NeList => ({
|
||||
neList: [],
|
||||
const useNeStore = defineStore('ne', {
|
||||
state: (): Ne => ({
|
||||
list: [],
|
||||
neCascaderOptions: [],
|
||||
neSelectOtions: [],
|
||||
}),
|
||||
@@ -29,7 +29,7 @@ const useNeListStore = defineStore('ne_list', {
|
||||
* @returns 级联options
|
||||
*/
|
||||
getNeList(state) {
|
||||
return state.neList;
|
||||
return state.list;
|
||||
},
|
||||
/**
|
||||
* 获取级联options树结构
|
||||
@@ -51,17 +51,17 @@ const useNeListStore = defineStore('ne_list', {
|
||||
actions: {
|
||||
// 刷新网元列表
|
||||
async fnNelistRefresh() {
|
||||
this.neList = [];
|
||||
this.list = [];
|
||||
return await this.fnNelist();
|
||||
},
|
||||
// 获取网元列表
|
||||
async fnNelist() {
|
||||
// 有数据不请求
|
||||
if (this.neList.length > 0) {
|
||||
if (this.list.length > 0) {
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS['en_US'],
|
||||
data: this.neList,
|
||||
data: this.list,
|
||||
};
|
||||
}
|
||||
const res = await listAllNeInfo({
|
||||
@@ -70,7 +70,7 @@ const useNeListStore = defineStore('ne_list', {
|
||||
});
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 原始列表
|
||||
this.neList = JSON.parse(JSON.stringify(res.data));
|
||||
this.list = JSON.parse(JSON.stringify(res.data));
|
||||
|
||||
// 转级联数据
|
||||
const options = parseDataToOptions(
|
||||
@@ -97,7 +97,7 @@ const useNeListStore = defineStore('ne_list', {
|
||||
* @returns boolean
|
||||
*/
|
||||
fnHasNe(metaNeType: string[]) {
|
||||
if (this.neList.length > 0) {
|
||||
if (this.list.length > 0) {
|
||||
const neTypes = this.neSelectOtions.map(item => item.value);
|
||||
let match = false; // 匹配
|
||||
for (const netype of metaNeType) {
|
||||
@@ -120,4 +120,4 @@ const useNeListStore = defineStore('ne_list', {
|
||||
},
|
||||
});
|
||||
|
||||
export default useNeListStore;
|
||||
export default useNeStore;
|
||||
@@ -16,6 +16,11 @@ import {
|
||||
MENU_COMPONENT_LAYOUT_LINK,
|
||||
} from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import {
|
||||
APP_SERVER_TYPE_M,
|
||||
APP_SERVER_TYPE_O,
|
||||
} from '@/constants/app-constants';
|
||||
|
||||
/**路由构建参数类型 */
|
||||
type RouterStore = {
|
||||
@@ -58,16 +63,36 @@ const useRouterStore = defineStore('router', {
|
||||
/**
|
||||
* 根据网元类型过滤菜单
|
||||
* @param routes 经过clearMenuItem(router.getRoutes())处理
|
||||
* @param coreUid 核心网元uid
|
||||
* @param neTypes 网元类型
|
||||
* @returns 过滤后的菜单
|
||||
*/
|
||||
clearMenuItemByNeList(
|
||||
routes: RouteRecord[] | RouteRecordRaw[],
|
||||
coreUid: string,
|
||||
neTypes: string[]
|
||||
): RouteRecordRaw[] {
|
||||
return routes
|
||||
.map((item: RouteRecord | RouteRecordRaw) => {
|
||||
const finalItem = { ...item };
|
||||
|
||||
// 过滤核心网菜单
|
||||
switch (useAppStore().serverType) {
|
||||
case APP_SERVER_TYPE_O:
|
||||
break;
|
||||
case APP_SERVER_TYPE_M:
|
||||
// 过滤核心网菜单
|
||||
if (coreUid.length < 8 && finalItem.meta?.core == true) {
|
||||
// 全局 网元菜单
|
||||
return null;
|
||||
}
|
||||
if (coreUid.length == 8 && finalItem.meta?.core == false) {
|
||||
// 核心网 非网元菜单
|
||||
return null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// 过滤网元类型
|
||||
if (
|
||||
Array.isArray(finalItem.meta?.neType) &&
|
||||
@@ -96,6 +121,7 @@ const useRouterStore = defineStore('router', {
|
||||
if (finalItem.children && finalItem.children.length > 0) {
|
||||
const children = this.clearMenuItemByNeList(
|
||||
finalItem.children,
|
||||
coreUid,
|
||||
neTypes
|
||||
);
|
||||
// 如果子菜单都被过滤掉了,就不显示
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { listAMFDataUE, delAMFDataUE, exportAMFDataUE } from '@/api/neData/amf';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||
@@ -22,7 +22,7 @@ import { useClipboard } from '@vueuse/core';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const ws = new WS();
|
||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||
/**网元可选 */
|
||||
@@ -464,7 +464,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'AMF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import {
|
||||
delIMSDataCDR,
|
||||
exportIMSDataCDR,
|
||||
@@ -26,7 +26,7 @@ import dayjs, { type Dayjs } from 'dayjs';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const ws = new WS();
|
||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||
|
||||
@@ -523,7 +523,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'IMS') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { listMMEDataUE, delMMEDataUE, exportMMEDataUE } from '@/api/neData/mme';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||
@@ -22,7 +22,7 @@ import { useClipboard } from '@vueuse/core';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const ws = new WS();
|
||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||
|
||||
@@ -472,7 +472,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'MME') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ import useWS from './hooks/useWS';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { upfWhoId } from './hooks/useWS';
|
||||
|
||||
const router = useRouter();
|
||||
const appStore = useAppStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const { wsSend, userActivitySend, upfTFSend, reSendUPF } = useWS();
|
||||
|
||||
@@ -292,7 +292,7 @@ const getPopupContainer = () => {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'UPF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
@@ -307,7 +307,7 @@ onMounted(() => {
|
||||
fnSelectUDM({ key: udmOtions.value[0].value });
|
||||
}
|
||||
// 过滤不可用的网元
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return ['UDM', 'SMF', 'IMS', 'AMF', 'MME'].includes(item.value);
|
||||
}
|
||||
@@ -362,7 +362,7 @@ onBeforeUnmount(() => {
|
||||
<div
|
||||
class="item toRouter"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
v-if="neListStore.fnHasNe(['udm'])"
|
||||
v-if="neStore.fnHasNe(['udm'])"
|
||||
>
|
||||
<div @click="fnToRouter('UdmSub_2001')">
|
||||
<UserOutlined
|
||||
@@ -399,7 +399,7 @@ onBeforeUnmount(() => {
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
style="margin: 0 12px"
|
||||
v-perms:has="['dashboard:overview:imsUeNum']"
|
||||
v-if="neListStore.fnHasNe(['ims'])"
|
||||
v-if="neStore.fnHasNe(['ims'])"
|
||||
>
|
||||
<div>
|
||||
<img :src="svgUserIMS" style="width: 18px; margin-right: 8px" />
|
||||
@@ -414,7 +414,7 @@ onBeforeUnmount(() => {
|
||||
@click="fnToRouter('SmfSub_2005')"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
v-perms:has="['dashboard:overview:smfUeNum']"
|
||||
v-if="neListStore.fnHasNe(['smf'])"
|
||||
v-if="neStore.fnHasNe(['smf'])"
|
||||
>
|
||||
<div>
|
||||
<img :src="svgUserSMF" style="width: 18px; margin-right: 8px" />
|
||||
@@ -430,7 +430,7 @@ onBeforeUnmount(() => {
|
||||
<div
|
||||
class="skim panel base"
|
||||
v-perms:has="['dashboard:overview:gnbBase']"
|
||||
v-if="neListStore.fnHasNe(['amf'])"
|
||||
v-if="neStore.fnHasNe(['amf'])"
|
||||
>
|
||||
<div class="inner">
|
||||
<h3>
|
||||
@@ -471,7 +471,7 @@ onBeforeUnmount(() => {
|
||||
<div
|
||||
class="skim panel base"
|
||||
v-perms:has="['dashboard:overview:enbBase']"
|
||||
v-if="neListStore.fnHasNe(['mme'])"
|
||||
v-if="neStore.fnHasNe(['mme'])"
|
||||
>
|
||||
<div class="inner">
|
||||
<h3>
|
||||
|
||||
@@ -29,13 +29,13 @@ import useWS from './hooks/useWS';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { upfWhoId } from './hooks/useWS';
|
||||
import { listAMFNbStatelist } from '@/api/neData/amf';
|
||||
import { listMMENbStatelist } from '@/api/neData/mme';
|
||||
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const router = useRouter();
|
||||
const appStore = useAppStore();
|
||||
const { t } = useI18n();
|
||||
@@ -407,7 +407,7 @@ const getPopupContainer = () => {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.getNeCascaderOptions.forEach(item => {
|
||||
console.log(item)
|
||||
if (item.value === 'UPF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
@@ -426,7 +426,7 @@ onMounted(() => {
|
||||
// fnSelectNeRe({ key: onlineArr[0].value });
|
||||
// }
|
||||
// 过滤不可用的网元
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return ['UDM', 'SMF', 'IMS', 'AMF', 'MME'].includes(item.value);
|
||||
}
|
||||
@@ -443,7 +443,7 @@ onMounted(() => {
|
||||
let onlineArr: Record<string, any>[] = [];
|
||||
|
||||
// UDM
|
||||
neListStore.neList.forEach((v: any) => {
|
||||
neStore.list.forEach((v: any) => {
|
||||
if (
|
||||
v.status &&
|
||||
[
|
||||
@@ -511,7 +511,7 @@ onBeforeUnmount(() => {
|
||||
<div
|
||||
class="item toRouter"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
v-if="neListStore.fnHasNe(['udm'])"
|
||||
v-if="neStore.fnHasNe(['udm'])"
|
||||
>
|
||||
<div @click="fnToRouter('UdmSub_2001')">
|
||||
<UserOutlined
|
||||
@@ -548,7 +548,7 @@ onBeforeUnmount(() => {
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
style="margin: 0 12px"
|
||||
v-perms:has="['dashboard:overview:imsUeNum']"
|
||||
v-if="neListStore.fnHasNe(['ims'])"
|
||||
v-if="neStore.fnHasNe(['ims'])"
|
||||
>
|
||||
<div>
|
||||
<img :src="svgUserIMS" style="width: 18px; margin-right: 8px" />
|
||||
@@ -563,7 +563,7 @@ onBeforeUnmount(() => {
|
||||
@click="fnToRouter('SmfSub_2005')"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
v-perms:has="['dashboard:overview:smfUeNum']"
|
||||
v-if="neListStore.fnHasNe(['smf'])"
|
||||
v-if="neStore.fnHasNe(['smf'])"
|
||||
>
|
||||
<div>
|
||||
<img :src="svgUserSMF" style="width: 18px; margin-right: 8px" />
|
||||
@@ -679,7 +679,7 @@ onBeforeUnmount(() => {
|
||||
<div
|
||||
class="skim panel base"
|
||||
v-perms:has="['dashboard:overview:gnbBase']"
|
||||
v-if="neListStore.fnHasNe(['amf'])"
|
||||
v-if="neStore.fnHasNe(['amf'])"
|
||||
>
|
||||
<div class="inner">
|
||||
<h3 class="leftright">
|
||||
@@ -737,7 +737,7 @@ onBeforeUnmount(() => {
|
||||
<div
|
||||
class="skim panel base"
|
||||
v-perms:has="['dashboard:overview:enbBase']"
|
||||
v-if="neListStore.fnHasNe(['mme'])"
|
||||
v-if="neStore.fnHasNe(['mme'])"
|
||||
>
|
||||
<div class="inner">
|
||||
<h3></h3>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import {
|
||||
RESULT_CODE_ERROR,
|
||||
@@ -23,7 +23,7 @@ import saveAs from 'file-saver';
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const ws = new WS();
|
||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||
|
||||
@@ -476,7 +476,7 @@ function wsMessage(res: Record<string, any>) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'SGWC') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import {
|
||||
RESULT_CODE_ERROR,
|
||||
@@ -23,7 +23,7 @@ import dayjs, { type Dayjs } from 'dayjs';
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const ws = new WS();
|
||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||
|
||||
@@ -503,7 +503,7 @@ function wsMessage(res: Record<string, any>) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'SMF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -35,11 +35,11 @@ import {
|
||||
} from '@/constants/result-constants';
|
||||
import { parseSizeFromByte } from '@/utils/parse-utils';
|
||||
import { message } from 'ant-design-vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const { t, currentLocale } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const ws = new WS();
|
||||
|
||||
/**图DOM节点实例对象 */
|
||||
@@ -563,7 +563,7 @@ function fnRealTime() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'SMF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import {
|
||||
delSMSCDataCDR,
|
||||
exportSMSCDataCDR,
|
||||
@@ -26,7 +26,7 @@ import { hasPermissions } from '@/plugins/auth-user';
|
||||
import dayjs, { type Dayjs } from 'dayjs';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const ws = new WS();
|
||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||
@@ -477,7 +477,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'SMSC') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
exportAlarm,
|
||||
} from '@/api/faultManage/actAlarm';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import saveAs from 'file-saver';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
@@ -26,7 +26,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { readLoalXlsx } from '@/utils/execl-utils';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import dayjs, { type Dayjs } from 'dayjs';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t, currentLocale } = useI18n();
|
||||
|
||||
@@ -861,7 +861,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
/>
|
||||
@@ -1362,7 +1362,7 @@ onMounted(() => {
|
||||
>
|
||||
<a-auto-complete
|
||||
v-model:value="modalState.showSetFrom.ne_type"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
|
||||
@@ -8,14 +8,14 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { listAct, exportAll } from '@/api/faultManage/eventAlarm';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import saveAs from 'file-saver';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import { writeSheet } from '@/utils/execl-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import dayjs, { type Dayjs } from 'dayjs';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**表格字段列排序 */
|
||||
@@ -453,7 +453,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
/>
|
||||
|
||||
@@ -14,13 +14,13 @@ import {
|
||||
import { listAct, exportAlarm } from '@/api/faultManage/actAlarm';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import saveAs from 'file-saver';
|
||||
import { writeSheet } from '@/utils/execl-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import dayjs, { type Dayjs } from 'dayjs';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -660,7 +660,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
/>
|
||||
|
||||
@@ -7,13 +7,13 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { listAlarm } from '@/api/logManage/alarm';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import dayjs, { type Dayjs } from 'dayjs';
|
||||
const neStore = useNeStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
/**告警状态 */
|
||||
@@ -298,7 +298,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
allow-clear
|
||||
/>
|
||||
|
||||
@@ -8,13 +8,13 @@ import BackupModal from '@/views/ne/neConfigBackup/components/BackupModal.vue';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import saveAs from 'file-saver';
|
||||
import { delFile, getFile, listFile } from '@/api/tool/file';
|
||||
import { parseSizeFromFile } from '@/utils/parse-utils';
|
||||
import { pushBackupFTP } from '@/api/neData/backup';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
/**文件来源 */
|
||||
let sourceState = reactive({
|
||||
@@ -318,7 +318,7 @@ function fnSyncFileToFTP(fileName: string) {
|
||||
onMounted(() => {
|
||||
sourceState.list = sourceState.list.filter(item => {
|
||||
if (!item.neType) return true;
|
||||
return neListStore.fnHasNe([item.neType]);
|
||||
return neStore.fnHasNe([item.neType]);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -7,13 +7,13 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { listForwarding } from '@/api/logManage/forwarding';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import dayjs, { type Dayjs } from 'dayjs';
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
/**告警状态 */
|
||||
@@ -312,7 +312,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
allow-clear
|
||||
/>
|
||||
|
||||
@@ -4,13 +4,13 @@ import { PageContainer } from 'antdv-pro-layout';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getMMLByNE, sendMMlByNE } from '@/api/mmlManage/neOperate';
|
||||
import { uploadFileToNE } from '@/api/tool/file';
|
||||
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**网元参数 */
|
||||
@@ -541,7 +541,7 @@ function fnAutoCompleteKeydown(evt: any) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return !['OMC', 'CBC', 'SGWC'].includes(item.value); // 过滤不可用的网元
|
||||
}
|
||||
|
||||
@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getMMLByOMC, sendMMlByOMC } from '@/api/mmlManage/omcOperate';
|
||||
import { uploadFileToNE } from '@/api/tool/file';
|
||||
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOptions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -505,7 +505,7 @@ function fnAutoCompleteKeydown(evt: any) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'OMC') {
|
||||
neOptions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getMMLByUDM, sendMMlByUDM } from '@/api/mmlManage/udmOperate';
|
||||
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||
import { uploadFileToNE } from '@/api/tool/file';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOptions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -505,7 +505,7 @@ function fnAutoCompleteKeydown(evt: any) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'UDM') {
|
||||
neOptions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { DataNode } from 'ant-design-vue/es/tree';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useOptions from './hooks/useOptions';
|
||||
import useConfigList from './hooks/useConfigList';
|
||||
import useConfigArray from './hooks/useConfigArray';
|
||||
@@ -16,7 +16,7 @@ import useConfigArrayChild from './hooks/useConfigArrayChild';
|
||||
import useArrayImport from './hooks/useArrayImport';
|
||||
import useArrayBatchDel from './hooks/useArrayBatchDel';
|
||||
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
|
||||
@@ -393,7 +393,7 @@ const { batchState, modalBatchOpen, modalBatchClose, modalBatchOk } =
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Form, Modal, TableColumnsType, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import BackupModal from './components/BackupModal.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
@@ -21,7 +21,7 @@ import { pushBackupFTP } from '@/api/neData/backup';
|
||||
import saveAs from 'file-saver';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
/**字典数据-状态 */
|
||||
let dictStatus = ref<DictType[]>([]);
|
||||
@@ -404,7 +404,7 @@ function fnSyncFileToFTP(row: Record<string, any>) {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
:allow-clear="true"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
|
||||
@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useOptions from './hooks/useOptions';
|
||||
import useConfigList from './hooks/useConfigList';
|
||||
import useConfigArray from './hooks/useConfigArray';
|
||||
import useConfigArrayChild from './hooks/useConfigArrayChild';
|
||||
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
|
||||
t,
|
||||
@@ -536,7 +536,7 @@ const {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neCascaderOptions.value = neListStore.getNeSelectOtions.filter(
|
||||
neCascaderOptions.value = neStore.getNeSelectOtions.filter(
|
||||
(item: any) => {
|
||||
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
|
||||
}
|
||||
@@ -767,9 +767,10 @@ onMounted(() => {
|
||||
@dblclick="listEdit(record)"
|
||||
>
|
||||
<template v-if="record['type'] === 'enum'">
|
||||
{{ JSON.parse(record['filter'])[text] || ' ' }}
|
||||
{{ JSON.parse(record['filter'])[text] }}
|
||||
</template>
|
||||
<template v-else>{{ `${text}` || ' ' }}</template>
|
||||
<template v-else>{{ `${text}` }}</template>
|
||||
<!-- 空格占位 -->
|
||||
<EditOutlined
|
||||
class="editable-cell__icon"
|
||||
@click="listEdit(record)"
|
||||
@@ -890,7 +891,7 @@ onMounted(() => {
|
||||
{{ JSON.parse(text['filter'])[text.value] }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ `${text.value}` || ' ' }}
|
||||
{{ `${text.value}` }}
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@@ -976,7 +977,7 @@ onMounted(() => {
|
||||
{{ JSON.parse(text['filter'])[text.value] }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ `${text.value}` || ' ' }}
|
||||
{{ `${text.value}` }}
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1089,7 +1090,7 @@ onMounted(() => {
|
||||
></a-input>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ `${item.value || ' '}` }}
|
||||
{{ `${item.value }}
|
||||
</div>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
|
||||
@@ -7,13 +7,13 @@ import { Modal, message } from 'ant-design-vue/es';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { getNeFile, listNeFiles } from '@/api/tool/neFile';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import ViewDrawer from './components/ViewDrawer.vue';
|
||||
import saveAs from 'file-saver';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { parseSizeFromFile } from '@/utils/parse-utils';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
@@ -300,7 +300,7 @@ onMounted(() => {
|
||||
<span>{{ t('views.logManage.neFile.neType') }}:</span>
|
||||
<a-cascader
|
||||
v-model:value="neTypeSelect"
|
||||
:options="neListStore.getNeCascaderOptions"
|
||||
:options="neStore.getNeCascaderOptions"
|
||||
@change="fnNeChange"
|
||||
:allow-clear="false"
|
||||
:placeholder="t('views.logManage.neFile.neTypePlease')"
|
||||
|
||||
@@ -7,12 +7,12 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { listNeInfo, delNeInfo, stateNeInfo } from '@/api/ne/neInfo';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useNeOptions from './hooks/useNeOptions';
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const {
|
||||
fnNeStart,
|
||||
@@ -262,7 +262,7 @@ function reloadRowInfo(row: Record<string, any>) {
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
neListStore.fnNelistRefresh();
|
||||
neStore.fnNelistRefresh();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ function fnRecordDelete(id: string) {
|
||||
}
|
||||
});
|
||||
// 刷新缓存
|
||||
neListStore.fnNelistRefresh();
|
||||
neStore.fnNelistRefresh();
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
@@ -404,7 +404,7 @@ function fnGetList(pageNum?: number) {
|
||||
})
|
||||
.finally(() => {
|
||||
// 刷新缓存的网元信息
|
||||
neListStore.fnNelistRefresh();
|
||||
neStore.fnNelistRefresh();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { PageContainer } from 'antdv-pro-layout';
|
||||
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
@@ -12,7 +12,7 @@ import { listNeLicense, stateNeLicense } from '@/api/ne/neLicense';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const EditModal = defineAsyncComponent(
|
||||
() => import('./components/EditModal.vue')
|
||||
);
|
||||
@@ -348,7 +348,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
:allow-clear="true"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
|
||||
@@ -8,9 +8,9 @@ import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**字典数据 */
|
||||
@@ -201,7 +201,7 @@ function fnModalOk() {
|
||||
duration: 3,
|
||||
});
|
||||
|
||||
neListStore.fnNelistRefresh(); // 刷新缓存的网元信息
|
||||
neStore.fnNelistRefresh(); // 刷新缓存的网元信息
|
||||
stepState.neInfo = from; // 保存网元信息
|
||||
modalState.stepNext = true; // 开启下一步
|
||||
} else {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { reactive, toRaw } from 'vue';
|
||||
import { getPara5GFilee, savePara5GFile, updateNeInfo } from '@/api/ne/neInfo';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
/**对象信息信息状态类型 */
|
||||
type StateType = {
|
||||
@@ -38,7 +38,7 @@ export function usePara5G() {
|
||||
/**载入数据*/
|
||||
function fnReloadData() {
|
||||
state.confirmLoading = true;
|
||||
Promise.all([getPara5GFilee(), neListStore.fnNelistRefresh()]).then(
|
||||
Promise.all([getPara5GFilee(), neStore.fnNelistRefresh()]).then(
|
||||
resArr => {
|
||||
// 已保存的配置
|
||||
if (resArr[0].code === RESULT_CODE_SUCCESS) {
|
||||
|
||||
@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
|
||||
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { listNeSoftware, delNeSoftware } from '@/api/ne/neSoftware';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { downloadFile } from '@/api/tool/file';
|
||||
import { saveAs } from 'file-saver';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
// 异步加载组件
|
||||
@@ -351,7 +351,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
@@ -18,7 +18,7 @@ import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useMaskStore from '@/store/modules/mask';
|
||||
const maskStore = useMaskStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
@@ -463,7 +463,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
|
||||
@@ -8,13 +8,13 @@ import BackupModal from '@/views/ne/neConfigBackup/components/BackupModal.vue';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import saveAs from 'file-saver';
|
||||
import { delFile, getFile, listFile } from '@/api/tool/file';
|
||||
import { parseSizeFromFile } from '@/utils/parse-utils';
|
||||
import { pushBackupFTP } from '@/api/neData/backup';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
/**文件来源 */
|
||||
let sourceState = reactive({
|
||||
@@ -308,7 +308,7 @@ function fnSyncFileToFTP(fileName: string) {
|
||||
onMounted(() => {
|
||||
sourceState.list = sourceState.list.filter(item => {
|
||||
if (!item.neType) return true;
|
||||
return neListStore.fnHasNe([item.neType]);
|
||||
return neStore.fnHasNe([item.neType]);
|
||||
});
|
||||
});
|
||||
</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 useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { listAMFNblist } from '@/api/neData/amf';
|
||||
import { listMMENblist } from '@/api/neData/mme';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -264,7 +264,7 @@ function fnGetList(pageNum?: number) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
for (const item of neListStore.getNeCascaderOptions) {
|
||||
for (const item of neStore.getNeCascaderOptions) {
|
||||
// 过滤不可用的网元
|
||||
if (!['AMF', 'MME'].includes(item.value)) continue;
|
||||
const v = JSON.parse(JSON.stringify(item));
|
||||
|
||||
@@ -12,7 +12,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import UploadModal from '@/components/UploadModal/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t, currentLocale } = useI18n();
|
||||
import {
|
||||
@@ -32,7 +32,7 @@ import saveAs from 'file-saver';
|
||||
import { readSheet, writeSheet } from '@/utils/execl-utils';
|
||||
import { useRoute } from 'vue-router';
|
||||
const route = useRoute();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
// 异步加载组件
|
||||
const HistoryModal = defineAsyncComponent(
|
||||
@@ -657,7 +657,7 @@ async function fnModalImportTemplate() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (['AMF', 'MME'].includes(item.value)) {
|
||||
neCascaderOptions.value.push(JSON.parse(JSON.stringify(item)));
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { listAMFNbStatelist } from '@/api/neData/amf';
|
||||
import { parseBasePath } from '@/plugins/file-static-url';
|
||||
import { edgeLineAnimateState } from '@/views/monitor/topologyBuild/hooks/registerEdge';
|
||||
import { nodeImageAnimateState } from '@/views/monitor/topologyBuild/hooks/registerNode';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { stateNeInfo } from '@/api/ne/neInfo';
|
||||
@@ -13,7 +13,7 @@ import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { useFullscreen } from '@vueuse/core';
|
||||
import { listMMENbStatelist } from '@/api/neData/mme';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
/**图DOM节点实例对象 */
|
||||
const graphG6Dom = useTemplateRef('graphG6Dom');
|
||||
@@ -380,7 +380,7 @@ async function fnGraphDataBase() {
|
||||
edges: [],
|
||||
};
|
||||
// 添加基础网元
|
||||
for (const item of neListStore.getNeCascaderOptions) {
|
||||
for (const item of neStore.getNeCascaderOptions) {
|
||||
if ('OMC' === item.value) {
|
||||
if (item.children?.length === 0) continue;
|
||||
// 是否存在OMC保证唯一
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
import { reactive, ref, onMounted, toRaw } from 'vue';
|
||||
import { PageContainer } from 'antdv-pro-layout';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import { message, Modal, Form, notification } from 'ant-design-vue/es';
|
||||
import { message, Modal, Form } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import {
|
||||
@@ -16,9 +15,9 @@ import {
|
||||
listCBC,
|
||||
updateCBCStatus,
|
||||
updateCBC,
|
||||
} from '@/api/cbc/cbe';
|
||||
import { parseDateToStr, parseDuration } from '@/utils/date-utils';
|
||||
|
||||
} from '@/api/neData/cbc';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**网元参数 */
|
||||
@@ -832,33 +831,29 @@ function pwsTypeChange(value: any) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
useNeListStore()
|
||||
.fnNelist()
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
if (res.data.length > 0) {
|
||||
let arr: Record<string, any>[] = [];
|
||||
res.data.forEach(i => {
|
||||
if (i.neType === 'CBC') {
|
||||
arr.push({ value: i.neId, label: i.neName });
|
||||
}
|
||||
});
|
||||
neOtions.value = arr;
|
||||
if (arr.length > 0) {
|
||||
queryParams.neId = arr[0].value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('common.noData'),
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'CBC') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
});
|
||||
if (neOtions.value.length === 0) {
|
||||
message.warning({
|
||||
content: t('common.noData'),
|
||||
duration: 2,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (neOtions.value.length > 0) {
|
||||
queryParams.neId = neOtions.value[0].value;
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('common.noData'),
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -5,12 +5,12 @@ import { message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { listIMSSessionList } from '@/api/neData/ims';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
@@ -173,7 +173,7 @@ function fnGetList(pageNum?: number) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'IMS') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { message, Modal, Form, TableColumnsType } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import UploadModal from '@/components/UploadModal/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import {
|
||||
addPCFRule,
|
||||
@@ -21,7 +21,7 @@ import { uploadFileToNE } from '@/api/tool/file';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { saveAs } from 'file-saver';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -693,7 +693,7 @@ function fnModalDownloadImportTemplate() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'PCF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { listSMFSubList } from '@/api/neData/smf';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -247,7 +247,7 @@ function fnGetList(pageNum?: number) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'SMF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import UploadModal from '@/components/UploadModal/index.vue';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { saveAs } from 'file-saver';
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
import { getNeViewFile } from '@/api/tool/neFile';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -739,7 +739,7 @@ function fnModalDownloadImportTemplate() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'UDM') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import UploadModal from '@/components/UploadModal/index.vue';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import saveAs from 'file-saver';
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
import { getNeViewFile } from '@/api/tool/neFile';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -1130,7 +1130,7 @@ async function fnModalDownloadImportTemplate() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'UDM') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@ import {
|
||||
listUDMVOIP,
|
||||
resetUDMVOIP,
|
||||
} from '@/api/neData/udm_voip';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
import { getNeViewFile } from '@/api/tool/neFile';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -579,7 +579,7 @@ function fnModalDownloadImportTemplate() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'UDM') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import UploadModal from '@/components/UploadModal/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { saveAs } from 'file-saver';
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
resetUDMVolteIMS,
|
||||
} from '@/api/neData/udm_volte_ims';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
/**Tag标签类型 0=VoIP, 1=VoLTE */
|
||||
@@ -658,7 +658,7 @@ function fnModalDownloadImportTemplate() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'UDM') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { listN3IWFSubList } from '@/api/neUser/n3iwf';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const { t } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
|
||||
@@ -104,7 +104,7 @@ function fnGetList() {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neListStore.neCascaderOptions.forEach(item => {
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'N3IWF') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import {
|
||||
addCustom,
|
||||
delCustom,
|
||||
@@ -19,7 +19,7 @@ import { getKPITitle } from '@/api/perfManage/goldTarget';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
const { t, currentLocale } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
/**状态 */
|
||||
@@ -461,7 +461,7 @@ function fnChangeUnit(value: any) {
|
||||
let neCascaderOptions = ref<Record<string, any>[]>([]);
|
||||
onMounted(() => {
|
||||
// 过滤不可用的网元
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes(
|
||||
item.value
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getKPITitle, listKPIData } from '@/api/perfManage/goldTarget';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
@@ -47,7 +47,7 @@ import { useRoute } from 'vue-router';
|
||||
import { LineOutlined } from '@ant-design/icons-vue';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
const layoutStore = useLayoutStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const route = useRoute();
|
||||
const { t, currentLocale } = useI18n();
|
||||
const ws = new WS();
|
||||
@@ -825,7 +825,7 @@ watch(
|
||||
onMounted(() => {
|
||||
// 目前支持的 AMF AUSF MME MOCNGW NSSF SMF UDM UPF PCF
|
||||
// 获取网元网元列表
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
// 过滤不可用的网元
|
||||
return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes(
|
||||
|
||||
@@ -6,7 +6,7 @@ import { message, Form, Modal } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import useNeInfoStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
} from '@/api/perfManage/kpi-title';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const { getNeSelectOtions } = useNeInfoStore();
|
||||
const neStore = useNeStore();
|
||||
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
@@ -390,7 +390,7 @@ onMounted(() => {
|
||||
<a-form-item label="NE Type" name="neType">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
@@ -577,7 +577,7 @@ onMounted(() => {
|
||||
>
|
||||
<a-auto-complete
|
||||
v-model:value="modalState.from.neType"
|
||||
:options="getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:disabled="!!modalState.from.id"
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { listCustom } from '@/api/perfManage/customTarget';
|
||||
import { listCustomData } from '@/api/perfManage/customData';
|
||||
@@ -48,7 +48,7 @@ import { useRoute } from 'vue-router';
|
||||
import dayjs from 'dayjs';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
const layoutStore = useLayoutStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const route = useRoute();
|
||||
const { t, currentLocale } = useI18n();
|
||||
const ws = new WS();
|
||||
@@ -964,7 +964,7 @@ onMounted(() => {
|
||||
});
|
||||
typeArr = Array.from(new Set(typeArr));
|
||||
// 过滤不可用的网元
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return typeArr.includes(item.value);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import { listKPIData, getKPITitle } from '@/api/perfManage/goldTarget';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import dayjs from 'dayjs';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { generateColorRGBA } from '@/utils/generate-utils';
|
||||
import { LineSeriesOption } from 'echarts/charts';
|
||||
@@ -30,7 +30,7 @@ import { useDebounceFn } from '@vueuse/core';
|
||||
import { LineOutlined } from '@ant-design/icons-vue';
|
||||
import { TableColumnType } from 'ant-design-vue';
|
||||
const { t, currentLocale } = useI18n();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
//日期快捷选择
|
||||
const ranges = ref([
|
||||
{
|
||||
@@ -71,7 +71,7 @@ const ALL_NE_TYPES = [
|
||||
] as const;
|
||||
type AllChartType = (typeof ALL_NE_TYPES)[number] & string;
|
||||
// 在 ALL_NE_TYPES 定义之后添加 小写转大写
|
||||
const neTypeOptions = neListStore.getNeCascaderOptions
|
||||
const neTypeOptions = neStore.getNeCascaderOptions
|
||||
.filter(v => ALL_NE_TYPES.includes(v.value.toLowerCase()))
|
||||
.map(v => ({
|
||||
label: v.label,
|
||||
|
||||
@@ -145,11 +145,11 @@ import * as echarts from 'echarts/core'
|
||||
import { LineChart } from 'echarts/charts'
|
||||
import { GridComponent } from 'echarts/components'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { WS } from '@/plugins/ws-websocket'
|
||||
import { listKPIData } from '@/api/perfManage/goldTarget'
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
echarts.use([LineChart, GridComponent, CanvasRenderer])
|
||||
|
||||
@@ -174,7 +174,7 @@ const wsStatus = ref('未连接')
|
||||
onMounted(async () => {
|
||||
// console.log('组件挂载,开始获取IMS网元列表') // 调试信息
|
||||
|
||||
const res = await useNeListStore().fnNelist()
|
||||
const res = await neStore.fnNelist()
|
||||
// console.log('获取到的网元列表响应:', res) // 调试信息
|
||||
|
||||
if (res && Array.isArray(res.data)) {
|
||||
|
||||
@@ -7,9 +7,10 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { listperfData } from '@/api/perfManage/perfData';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const neStore = useNeStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -223,7 +224,7 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
// 获取网元网元列表
|
||||
useNeListStore().fnNelist();
|
||||
neStore.fnNelist();
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
});
|
||||
@@ -246,7 +247,7 @@ onMounted(() => {
|
||||
>
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="useNeListStore().getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import {
|
||||
addPerfThre,
|
||||
delPerfThre,
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
threStop,
|
||||
threRun,
|
||||
} from '@/api/perfManage/perfThreshold';
|
||||
const neStore = useNeStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t, currentLocale } = useI18n();
|
||||
|
||||
@@ -189,7 +190,7 @@ function fnGetList(pageNum?: number) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
listPerfThreshold(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
tableState.selectedRowKeys = [];
|
||||
@@ -490,16 +491,8 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
Promise.allSettled([
|
||||
// 获取网元网元列表
|
||||
useNeListStore().fnNelist(),
|
||||
// 获取性能测量集列表
|
||||
// useNeListStore().fnNeTaskPerformance(),
|
||||
// getNePerformanceList(),
|
||||
]).finally(() => {
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
});
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -517,7 +510,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="useNeListStore().getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
/>
|
||||
@@ -610,9 +603,7 @@ onMounted(() => {
|
||||
<template v-if="column.key === 'id'">
|
||||
<a-space :size="8" align="center">
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
Run
|
||||
</template>
|
||||
<template #title> Run </template>
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnTaskModalVisible('run', record)"
|
||||
@@ -691,7 +682,7 @@ onMounted(() => {
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.neType"
|
||||
:options="useNeListStore().getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
@change="fnSelectPerformanceInit"
|
||||
:allow-clear="false"
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
|
||||
@@ -10,7 +10,7 @@ import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import {
|
||||
addPerfTask,
|
||||
delPerfTask,
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
taskStop,
|
||||
taskRun,
|
||||
} from '@/api/perfManage/taskManage';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t, currentLocale } = useI18n();
|
||||
|
||||
const generateOptions = (start: any, end: any) => {
|
||||
@@ -719,7 +719,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
/>
|
||||
@@ -882,7 +882,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType">
|
||||
<a-cascader
|
||||
:value="modalState.neType"
|
||||
:options="neListStore.getNeCascaderOptions"
|
||||
:options="neStore.getNeCascaderOptions"
|
||||
disabled
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -999,7 +999,7 @@ onMounted(() => {
|
||||
>
|
||||
<a-cascader
|
||||
v-model:value="modalState.neType"
|
||||
:options="neListStore.getNeCascaderOptions"
|
||||
:options="neStore.getNeCascaderOptions"
|
||||
@change="fnNeChange"
|
||||
:allow-clear="false"
|
||||
:placeholder="t('views.ne.common.neTypePlease')"
|
||||
|
||||
@@ -8,9 +8,9 @@ import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import TerminalSSHView from '@/components/TerminalSSHView/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { iperfI, iperfV } from '@/api/tool/iperf';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**网元参数 */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, onMounted, onBeforeUnmount, ref, toRaw } from 'vue';
|
||||
import { reactive, onMounted, onBeforeUnmount, ref } from 'vue';
|
||||
import { PageContainer } from 'antdv-pro-layout';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -8,9 +8,9 @@ import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import TerminalSSHView from '@/components/TerminalSSHView/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import { pingV } from '@/api/tool/ping';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**网元参数 */
|
||||
@@ -187,7 +187,7 @@ function fnMessage(res: Record<string, any>) {
|
||||
/**钩子函数,界面打开初始化*/
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
for (const item of neListStore.getNeCascaderOptions) {
|
||||
for (const item of neStore.getNeCascaderOptions) {
|
||||
neCascaderOptions.value.push(item); // 过滤不可用的网元
|
||||
}
|
||||
if (neCascaderOptions.value.length === 0) {
|
||||
|
||||
@@ -5,10 +5,10 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { delNeHost, listNeHost } from '@/api/ne/neHost';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
const EditModal = defineAsyncComponent(
|
||||
@@ -305,7 +305,7 @@ onMounted(() => {
|
||||
<a-form-item :label="t('views.ne.neHost.title')" name="title">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.title"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
:options="neStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
size="small"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
|
||||
@@ -9,13 +9,13 @@ import { parseSizeFromFile } from '@/utils/parse-utils';
|
||||
import { getNeDirZip, getNeFile, listNeFiles } from '@/api/tool/neFile';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import ViewDrawer from '@/views/ne/neFile/components/ViewDrawer.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import saveAs from 'file-saver';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
const tabsStore = useTabsStore();
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -360,7 +360,7 @@ onMounted(() => {
|
||||
<span>{{ t('views.logManage.neFile.neType') }}:</span>
|
||||
<a-cascader
|
||||
v-model:value="neTypeSelect"
|
||||
:options="neListStore.getNeCascaderOptions"
|
||||
:options="neStore.getNeCascaderOptions"
|
||||
@change="fnNeChange"
|
||||
:allow-clear="false"
|
||||
:placeholder="t('views.logManage.neFile.neTypePlease')"
|
||||
|
||||
@@ -11,7 +11,7 @@ import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import {
|
||||
addTraceTask,
|
||||
delTraceTask,
|
||||
@@ -23,7 +23,7 @@ import useDictStore from '@/store/modules/dict';
|
||||
import { regExpIPv4 } from '@/utils/regular-utils';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import { parseObjHumpToLine } from '@/utils/parse-utils';
|
||||
const neListStore = useNeListStore();
|
||||
const neStore = useNeStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
@@ -613,7 +613,7 @@ onMounted(() => {
|
||||
);
|
||||
|
||||
// 获取网元网元列表
|
||||
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
|
||||
neCascaderOptions.value = neStore.getNeCascaderOptions.filter(
|
||||
(item: any) => {
|
||||
return ['AMF', 'AUSF', 'SMF', 'UDM', 'PCF', 'UPF'].includes(item.value); // 过滤不可用的网元
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user