11 Commits

Author SHA1 Message Date
TsMask
2b2a09ff38 Merge branch 'main-v2' into lichang 2025-07-01 10:15:22 +08:00
TsMask
a9b266d49f Merge branch 'main-v2' into lichang 2025-06-26 17:30:28 +08:00
TsMask
4690a874af Merge branch 'main-v2' into lichang 2025-06-16 19:41:00 +08:00
TsMask
859615fecc feat: 菜单根据切换核心网显示 2025-06-13 19:48:09 +08:00
TsMask
4167428c10 chore: 更新依赖项版本 2025-06-13 14:24:36 +08:00
TsMask
11137c03a3 feat: 选择核心网控件 2025-06-13 14:21:56 +08:00
TsMask
d623b7ea36 Merge branch 'main-v2' into lichang 2025-06-12 19:40:54 +08:00
TsMask
4e4b4bc2b7 feat: 顶部右侧内容移除冗余代码,封装为组件 2025-06-12 10:43:47 +08:00
TsMask
4d171b0d06 Merge branch 'main-v2' into lichang 2025-06-12 10:42:27 +08:00
TsMask
52573c7678 Merge branch 'main-v2' into lichang 2025-06-12 10:17:18 +08:00
TsMask
9bddfceda5 fix: 网元参数配置list类型值空白空格bug补充占位符 2025-06-09 18:25:48 +08:00
67 changed files with 769 additions and 428 deletions

View File

@@ -14,9 +14,9 @@
"dependencies": {
"@ant-design/icons-vue": "7.0.1",
"@antv/g6": "4.8.25",
"@codemirror/lang-javascript": "6.2.3",
"@codemirror/lang-javascript": "6.2.4",
"@codemirror/lang-yaml": "6.1.2",
"@codemirror/merge": "6.10.0",
"@codemirror/merge": "6.10.2",
"@codemirror/theme-one-dark": "6.1.2",
"@tato30/vue-pdf": "1.11.3",
"@vueuse/core": "13.0.0",
@@ -24,22 +24,21 @@
"@xterm/xterm": "5.5.0",
"ant-design-vue": "4.2.6",
"antdv-pro-layout": "4.2.0",
"antdv-pro-modal": "4.0.8",
"antdv-pro-modal": "4.0.9",
"codemirror": "6.0.1",
"crypto-js": "4.2.0",
"dayjs": "1.11.13",
"echarts": "5.6.0",
"file-saver": "2.0.5",
"grid-layout-plus": "1.0.6",
"intl-tel-input": "25.2.0",
"js-base64": "^3.7.7",
"js-cookie": "^3.0.5",
"localforage": "^1.10.0",
"nprogress": "^0.2.0",
"p-queue": "8.0.1",
"pinia": "2.3.0",
"vue": "3.5.13",
"vue-i18n": "11.1.2",
"pinia": "3.0.3",
"vue": "3.5.16",
"vue-i18n": "11.1.5",
"vue-router": "4.5.0",
"vue3-smooth-dnd": "0.0.6",
"xlsx": "0.18.5"
@@ -50,12 +49,12 @@
"@types/js-cookie": "3.0.6",
"@types/node": "^18.0.0",
"@types/nprogress": "0.2.3",
"@vitejs/plugin-vue": "5.2.3",
"less": "4.2.2",
"@vitejs/plugin-vue": "5.2.4",
"less": "4.3.0",
"typescript": "5.8.2",
"unplugin-vue-components": "0.28.0",
"vite": "6.3.3",
"vite": "6.3.5",
"vite-plugin-compression": "0.5.1",
"vue-tsc": "2.2.8"
"vue-tsc": "2.2.10"
}
}

86
src/api/core/coreInfo.ts Normal file
View 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,
});
}

View File

@@ -73,12 +73,12 @@ export function delNeInfo(infoIds: string | number) {
/**
* 查询网元列表全部无分页
* @param query 查询参数 neType neId bandStatus bandHost
* @param query 查询参数 coreUid, neUid bandStatus bandHost
* @returns object
*/
export function listAllNeInfo(query: Record<string, any>) {
return request({
url: '/ne/info/listAll',
url: '/ne/info/list/all',
method: 'GET',
params: query,
timeout: 60_000,
@@ -87,57 +87,57 @@ export function listAllNeInfo(query: Record<string, any>) {
/**
* 查询网元状态
* @param neType 网元类型
* @param neId 网元ID
* @param coreUid 核心网ID
* @param neUid 网元ID
* @returns object
*/
export function stateNeInfo(neType: string, neId: string) {
export function stateNeInfo(coreUid: string, neUid: string) {
return request({
url: '/ne/info/state',
method: 'GET',
params: { neType, neId },
params: { coreUid, neUid },
});
}
/**
* 查询网元信息
* @param neType 网元类型
* @param neId 网元ID
* @param coreUid 核心网ID
* @param neUid 网元ID
* @returns object
*/
export function getNeInfoByTypeAndID(neType: string, neId: string) {
export function getNeInfoByTypeAndID(coreUid: string, neUid: string) {
return request({
url: '/ne/info/byTypeAndID',
url: '/ne/info/nf',
method: 'GET',
params: { neType, neId },
params: { coreUid, neUid },
});
}
/**
* 网元端OAM配置文件读取
* @param neType 网元类型
* @param neId 网元ID
* @param coreUid 核心网ID
* @param neUid 网元ID
* @returns object
*/
export function getOAMFile(neType: string, neId: string) {
export function getOAMFile(coreUid: string, neUid: string) {
return request({
url: '/ne/info/oamFile',
url: '/ne/info/file/oam',
method: 'GET',
params: { neType, neId },
params: { coreUid, neUid },
});
}
/**
* 网元端配置文件写入
* @param neType 网元类型
* @param neId 网元ID
* @param coreUid 核心网ID
* @param neUid 网元ID
* @param content 用json对象
* @param sync 同步到网元
* @returns object
*/
export function saveOAMFile(data: Record<string, any>) {
return request({
url: `/ne/info/oamFile`,
url: `/ne/info/file/oam`,
method: 'PUT',
data: data,
timeout: 60_000,
@@ -150,7 +150,7 @@ export function saveOAMFile(data: Record<string, any>) {
*/
export function getPara5GFilee() {
return request({
url: '/ne/info/para5GFile',
url: '/ne/info/file/para5g',
method: 'GET',
});
}
@@ -158,12 +158,12 @@ export function getPara5GFilee() {
/**
* 网元端公共配置文件写入
* @param content txt内容为字符串 其他文件格式都用json对象
* @param syncNe 同步到网元端 NeType@ NeId
* @param syncNe 同步到网元端 coreUid@ neUid
* @returns object
*/
export function savePara5GFile(data: Record<string, any>) {
return request({
url: `/ne/info/para5GFile`,
url: `/ne/info/file/para5g`,
method: 'PUT',
data: data,
timeout: 60_000,
@@ -172,7 +172,7 @@ export function savePara5GFile(data: Record<string, any>) {
/**
* 网元服务操作
* @param data 对象 {neType,neId,action}
* @param data 对象 {coreUid, neUid, action}
* @returns object
*/
export function serviceNeAction(data: Record<string, any>) {

View File

@@ -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';

View File

@@ -5,8 +5,9 @@ import {
clearMenuItem,
MenuDataItem,
} from 'antdv-pro-layout';
import RightContent from './components/RightContent.vue';
import HeaderContentRight from './components/HeaderContentRight/HeaderContentRight.vue';
import Tabs from './components/Tabs.vue';
import CoreSelect from './components/CoreSelect.vue';
import GlobalMask from '@/components/GlobalMask/index.vue';
import ForcePasswdChange from '@/components/ForcePasswdChange/index.vue';
import { scriptUrl } from '@/assets/js/icon_font_8d5l8fzk5b87iudi';
@@ -21,7 +22,8 @@ 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 useCoreStore from '@/store/modules/core';
import useNeStore from '@/store/modules/ne';
import useRouterStore from '@/store/modules/router';
import useTabsStore from '@/store/modules/tabs';
import useI18n from '@/hooks/useI18n';
@@ -34,7 +36,6 @@ import { parseUrlPath } from '@/plugins/file-static-url';
const { proConfig, waterMarkContent } = useLayoutStore();
const { t, currentLocale } = useI18n();
const routerStore = useRouterStore();
const neListStore = useNeListStore();
const tabsStore = useTabsStore();
const appStore = useAppStore();
const router = useRouter();
@@ -68,19 +69,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 +80,12 @@ const menuData = computed(() => {
rootRoute.children = children;
}
}
const neTypes = neListStore.getNeSelectOtions.map(v => v.value);
let routes = clearMenuItem(router.getRoutes());
routes = routerStore.clearMenuItemByNeList(routes, neTypes);
const coreUid = useCoreStore().getCurrentCoreUid;
const neTypes = useNeStore()
.fnNeSelectOtions(coreUid)
.map(v => v.value);
routes = routerStore.clearMenuItemByNeList(routes, coreUid, neTypes);
const { menuData } = getMenuData(routes);
return menuData;
});
@@ -151,10 +142,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;
@@ -275,6 +269,7 @@ onUnmounted(() => {
v-model:openKeys="layoutState.openKeys"
:menu-data="menuData"
:breadcrumb="{ routes: breadcrumb }"
:siderWidth="248"
v-bind="proConfig"
:iconfont-url="scriptUrl"
:locale="fnLocale"
@@ -294,13 +289,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"
@@ -314,9 +313,14 @@ onUnmounted(() => {
<!--插槽-渲染顶部内容区域仅布局side有效-->
<template #headerContentRender></template>
<!--插槽-渲染顶部内容区域仅布局side有效-->
<template #menuHeaderExtraRender>
<CoreSelect></CoreSelect>
</template>
<!--插槽-渲染顶部内容右端区域-->
<template #headerContentRightRender>
<RightContent />
<HeaderContentRight />
</template>
<!--插槽-导航标签项-->

View File

@@ -0,0 +1,78 @@
<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 == 'all' ? 'Global' : coreStore.current?.value
);
/**选择列表数据 */
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>

View 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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,241 +0,0 @@
<script setup lang="ts">
import svgLight from '@/assets/svg/light.svg';
import svgDark from '@/assets/svg/dark.svg';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { viewTransitionTheme } from 'antdv-pro-layout';
import { ProModal } from 'antdv-pro-modal';
import { ref } from 'vue';
import { useRoute, 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 useUserStore from '@/store/modules/user';
import useAlarmStore from '@/store/modules/alarm';
import useMaskStore from '@/store/modules/mask';
const { isFullscreen, toggle } = useFullscreen();
const { t, changeLocale, optionsLocale } = useI18n();
const layoutStore = useLayoutStore();
const maskStore = useMaskStore();
const userStore = useUserStore();
const appStore = useAppStore();
const route = useRoute();
const router = useRouter();
/**头像展开项点击 */
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;
}
}
/**锁屏确认 */
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 } });
}
/**告警数按钮提示跳转 */
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>
<!-- 锁屏操作 -->
<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>
<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">
{{ opt.label }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
<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>
</a-space>
</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;
}
}
.theme-icon {
width: 18px;
height: 18px;
margin-bottom: 4px;
color: inherit;
}
</style>

View File

@@ -10,7 +10,8 @@ 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 useCoreStore from '@/store/modules/core';
import useNeStore from '@/store/modules/ne';
import useRouterStore from '@/store/modules/router';
// NProgress Configuration
@@ -103,8 +104,11 @@ 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 +132,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 {

77
src/store/modules/core.ts Normal file
View File

@@ -0,0 +1,77 @@
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: {
/**当前核心网Uid */
getCurrentCoreUid(): string {
return this.current.value;
},
/**选择器 */
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;

View File

@@ -70,9 +70,9 @@ const proRender = (render: any) => (render === false ? false : undefined);
const proConfigLocal: LayoutStore['proConfig'] = localGetJSON(
CACHE_LOCAL_PROCONFIG
) || {
layout: 'mix',
layout: 'side',
theme: 'light',
menuTheme: 'light',
menuTheme: 'dark',
fixSiderbar: true,
fixedHeader: true,
splitMenus: true,

View File

@@ -11,16 +11,16 @@ type NeList = {
/**网元列表 */
neList: Record<string, any>[];
/**级联options树结构 */
neCascaderOptions: Record<string, any>[];
neCascaderOptions: Map<string, Record<string, any>[]>;
/**选择器单级父类型 */
neSelectOtions: Record<string, any>[];
neSelectOtions: Map<string, Record<string, any>[]>;
};
const useNeListStore = defineStore('ne_list', {
const useNeStore = defineStore('ne_list', {
state: (): NeList => ({
neList: [],
neCascaderOptions: [],
neSelectOtions: [],
neCascaderOptions: new Map(),
neSelectOtions: new Map(),
}),
getters: {
/**
@@ -72,33 +72,71 @@ const useNeListStore = defineStore('ne_list', {
// 原始列表
this.neList = JSON.parse(JSON.stringify(res.data));
// 转级联数据
const options = parseDataToOptions(
res.data,
'neType',
'neName',
'neId'
'neUid'
);
this.neCascaderOptions = options;
// 转选择器单级父类型
this.neSelectOtions = options.map(item => {
return {
for (const item of options) {
const k = item.coreUid;
// 转级联数据
let cascaderMap = this.neCascaderOptions.get(k);
if (cascaderMap) {
cascaderMap.push(item);
} else {
cascaderMap = [item];
}
this.neCascaderOptions.set(k, cascaderMap);
// 转选择器单级父类型
let selectMap = this.neSelectOtions.get(k);
const selectItem = {
label: item.label,
value: item.value,
};
});
if (selectMap) {
selectMap.push(selectItem);
} else {
selectMap = [selectItem];
}
this.neSelectOtions.set(k, selectMap);
}
}
return res;
},
/**
* options树结构
* @param coreUid uid
*/
fnNeCascaderOptions(coreUid: string) {
const m = this.neCascaderOptions.get(coreUid);
if (!m) {
return [];
}
return m;
},
/**
*
* @param coreUid uid
*/
fnNeSelectOtions(coreUid: string) {
const m = this.neSelectOtions.get(coreUid);
if (!m) {
return [];
}
return m;
},
/**
*
* @param coreUid uid
* @param metaNeType ['udm', 'ims', 'udm+ims', 'SGWC']
* @returns boolean
*/
fnHasNe(metaNeType: string[]) {
fnHasNe(coreUid: string, metaNeType: string[]) {
if (this.neList.length > 0) {
const neTypes = this.neSelectOtions.map(item => item.value);
const neTypes = this.fnNeSelectOtions(coreUid).map(item => item.value);
let match = false; // 匹配
for (const netype of metaNeType) {
if (netype.indexOf('+') > -1) {
@@ -120,4 +158,4 @@ const useNeListStore = defineStore('ne_list', {
},
});
export default useNeListStore;
export default useNeStore;

View File

@@ -58,16 +58,28 @@ 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 };
// 过滤核心网菜单
if (coreUid.length < 8 && finalItem.meta?.core == true) {
// 全局 网元菜单
return null;
}
if (coreUid.length == 8 && finalItem.meta?.core == false) {
// 核心网 非网元菜单
return null;
}
// 过滤网元类型
if (
Array.isArray(finalItem.meta?.neType) &&
@@ -96,6 +108,7 @@ const useRouterStore = defineStore('router', {
if (finalItem.children && finalItem.children.length > 0) {
const children = this.clearMenuItemByNeList(
finalItem.children,
coreUid,
neTypes
);
// 如果子菜单都被过滤掉了,就不显示

View File

@@ -9,6 +9,11 @@ declare module 'vue-router' {
permissions?: string[];
/**角色 */
roles?: string[];
/**租户标识 */
tenant?: boolean;
/**核心网标识 */
core?: boolean;
/**网元类型信息 */
neType?: string[];
}

View File

@@ -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 neListStore = useNeStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
/**网元可选 */

View File

@@ -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 neListStore = useNeStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });

View File

@@ -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 neListStore = useNeStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });

View File

@@ -27,13 +27,13 @@ import useWS from './hooks/useWS';
import useAppStore from '@/store/modules/app';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { useRouter } from 'vue-router';
import 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 neListStore = useNeStore();
const { t } = useI18n();
const { wsSend, userActivitySend, upfTFSend, reSendUPF } = useWS();

View File

@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import 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 neListStore = useNeStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });

View File

@@ -5,7 +5,7 @@ import { Modal, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import 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 neListStore = useNeStore();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });

View File

@@ -35,10 +35,10 @@ 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';
const { t, currentLocale } = useI18n();
const neListStore = useNeListStore();
const neListStore = useNeStore();
const ws = new WS();
/**图DOM节点实例对象 */

View File

@@ -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 neListStore = useNeStore();
const { t } = useI18n();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });

View File

@@ -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 neListStore = useNeStore();
const { getDict } = useDictStore();
const { t, currentLocale } = useI18n();

View File

@@ -8,14 +8,14 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { listAct, exportAll } from '@/api/faultManage/eventAlarm';
import useI18n from '@/hooks/useI18n';
import 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 neListStore = useNeStore();
const { t } = useI18n();
/**表格字段列排序 */

View File

@@ -14,13 +14,13 @@ import {
import { listAct, exportAlarm } from '@/api/faultManage/actAlarm';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import 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 neListStore = useNeStore();
const { getDict } = useDictStore();
const { t } = useI18n();

View File

@@ -7,13 +7,13 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listAlarm } from '@/api/logManage/alarm';
import 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 neListStore = useNeStore();
/**字典数据 */
let dict: {
/**告警状态 */

View File

@@ -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 neListStore = useNeStore();
/**文件来源 */
let sourceState = reactive({

View File

@@ -7,13 +7,13 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listForwarding } from '@/api/logManage/forwarding';
import 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 neListStore = useNeStore();
/**字典数据 */
let dict: {
/**告警状态 */

View File

@@ -4,13 +4,13 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, message } from 'ant-design-vue/es';
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import 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 neListStore = useNeStore();
const { t } = useI18n();
/**网元参数 */

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, message } from 'ant-design-vue/es';
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import 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 neListStore = useNeStore();
/**网元参数 */
let neOptions = ref<Record<string, any>[]>([]);

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, message } from 'ant-design-vue/es';
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import 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 neListStore = useNeStore();
/**网元参数 */
let neOptions = ref<Record<string, any>[]>([]);

View File

@@ -7,7 +7,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';
@@ -15,7 +15,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 neListStore = useNeStore();
const { t } = useI18n();
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
t,

View File

@@ -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 neListStore = useNeStore();
/**字典数据-状态 */
let dictStatus = ref<DictType[]>([]);

View File

@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
import useI18n from '@/hooks/useI18n';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import 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 neListStore = useNeStore();
const { t } = useI18n();
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
t,

View File

@@ -7,13 +7,13 @@ import { Modal, message } from 'ant-design-vue/es';
import { parseDateToStr } from '@/utils/date-utils';
import { getNeFile, listNeFiles } from '@/api/tool/neFile';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import 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 neListStore = useNeStore();
const { t } = useI18n();
const route = useRoute();

View File

@@ -7,12 +7,12 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import 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 neListStore = useNeStore();
const { t } = useI18n();
const {
fnNeStart,

View File

@@ -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 neListStore = useNeStore();
const EditModal = defineAsyncComponent(
() => import('./components/EditModal.vue')
);

View File

@@ -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 neListStore = useNeStore();
const { t } = useI18n();
/**字典数据 */

View File

@@ -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 neListStore = useNeStore();
/**对象信息信息状态类型 */
type StateType = {

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import 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 neListStore = useNeStore();
const { t } = useI18n();
// 异步加载组件

View File

@@ -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 neListStore = useNeStore();
const { t } = useI18n();
const { getDict } = useDictStore();

View File

@@ -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 useCoreStore from '@/store/modules/core';
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();
/**文件来源 */
let sourceState = reactive({
@@ -306,9 +306,10 @@ function fnSyncFileToFTP(fileName: string) {
}
onMounted(() => {
const coreUid = useCoreStore().getCurrentCoreUid;
sourceState.list = sourceState.list.filter(item => {
if (!item.neType) return true;
return neListStore.fnHasNe([item.neType]);
return useNeStore().fnHasNe(coreUid, [item.neType]);
});
});
</script>

View File

@@ -6,11 +6,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import 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 neListStore = useNeStore();
const route = useRoute();
const { t } = useI18n();

View File

@@ -12,7 +12,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { ColumnsType } from 'ant-design-vue/es/table';
import { ProModal } from 'antdv-pro-modal';
import UploadModal from '@/components/UploadModal/index.vue';
import 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 neListStore = useNeStore();
// 异步加载组件
const HistoryModal = defineAsyncComponent(

View File

@@ -5,7 +5,7 @@ import { listAMFNbStatelist } from '@/api/neData/amf';
import { parseBasePath } from '@/plugins/file-static-url';
import { edgeLineAnimateState } from '@/views/monitor/topologyBuild/hooks/registerEdge';
import { nodeImageAnimateState } from '@/views/monitor/topologyBuild/hooks/registerNode';
import 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 neListStore = useNeStore();
/**图DOM节点实例对象 */
const graphG6Dom = useTemplateRef('graphG6Dom');

View File

@@ -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 neListStore = useNeStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);

View File

@@ -6,7 +6,7 @@ import { message, Modal, Form, TableColumnsType } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import UploadModal from '@/components/UploadModal/index.vue';
import 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 neListStore = useNeStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);

View File

@@ -7,11 +7,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { listSMFSubList } from '@/api/neData/smf';
import 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 neListStore = useNeStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);

View File

@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import UploadModal from '@/components/UploadModal/index.vue';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import 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 neListStore = useNeStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);

View File

@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import UploadModal from '@/components/UploadModal/index.vue';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import 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 neListStore = useNeStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);

View File

@@ -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 neListStore = useNeStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);

View File

@@ -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 neListStore = useNeStore();
/**字典数据 */
let dict: {
/**Tag标签类型 0=VoIP, 1=VoLTE */

View File

@@ -6,11 +6,11 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { listN3iwf } from '@/api/neUser/n3iwf';
import 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 neListStore = useNeStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);

View File

@@ -8,7 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import 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 neListStore = useNeStore();
/**字典数据 */
let dict: {
/**状态 */

View File

@@ -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 neListStore = useNeStore();
const route = useRoute();
const { t, currentLocale } = useI18n();
const ws = new WS();

View File

@@ -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 neListStore = useNeStore();
const route = useRoute();
const { t, currentLocale } = useI18n();
const ws = new WS();

View File

@@ -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 neListStore = useNeStore();
//日期快捷选择
const ranges = ref([
{

View File

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

View File

@@ -9,7 +9,7 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useNeListStore from '@/store/modules/ne_list';
import useNeStore from '@/store/modules/ne';
import {
addPerfThre,
delPerfThre,
@@ -269,7 +269,7 @@ const modalStateFrom = Form.useForm(
function fnSelectPerformanceInit(value: any) {
//console.logg(currentLocale.value); //当前语言
const performance: any = [];
// const performance = useNeListStore().perMeasurementList.filter(
// const performance = useNeStore().perMeasurementList.filter(
// i => i.neType === value
// );
//进行分组选择
@@ -492,9 +492,9 @@ onMounted(() => {
Promise.allSettled([
// 获取网元网元列表
useNeListStore().fnNelist(),
useNeStore().fnNelist(),
// 获取性能测量集列表
// useNeListStore().fnNeTaskPerformance(),
// useNeStore().fnNeTaskPerformance(),
// getNePerformanceList(),
]).finally(() => {
// 获取列表数据
@@ -517,7 +517,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="useNeStore().getNeSelectOtions"
allow-clear
:placeholder="t('views.ne.common.neTypePlease')"
/>
@@ -691,7 +691,7 @@ onMounted(() => {
>
<a-select
v-model:value="modalState.from.neType"
:options="useNeListStore().getNeSelectOtions"
:options="useNeStore().getNeSelectOtions"
@change="fnSelectPerformanceInit"
:allow-clear="false"
:placeholder="t('views.ne.common.neTypePlease')"

View File

@@ -10,7 +10,7 @@ import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import useUserStore from '@/store/modules/user';
import 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 neListStore = useNeStore();
const { t, currentLocale } = useI18n();
const generateOptions = (start: any, end: any) => {

View File

@@ -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 neListStore = useNeStore();
const { t } = useI18n();
/**网元参数 */

View File

@@ -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 neListStore = useNeStore();
const { t } = useI18n();
/**网元参数 */

View File

@@ -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 neListStore = useNeStore();
const { getDict } = useDictStore();
const { t } = useI18n();
const EditModal = defineAsyncComponent(

View File

@@ -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 neListStore = useNeStore();
const { t } = useI18n();
const route = useRoute();
const router = useRouter();

View File

@@ -11,7 +11,7 @@ import { parseDateToStr } from '@/utils/date-utils';
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
import 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 neListStore = useNeStore();
const { getDict } = useDictStore();
const { t } = useI18n();
const router = useRouter();