Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
265405b7
Commit
265405b7
authored
Aug 22, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.palacesun.com/wuchao/nse-ui
parents
de8b37c0
072a1325
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
59 行增加
和
60 行删除
+59
-60
src/layout/components/Sidebar/SidebarItem.vue
+0
-1
src/store/modules/app.js
+12
-3
src/utils/switchRoute.js
+23
-0
src/views/Classification/index.vue
+3
-10
src/views/EncryptionManagement/list.vue
+3
-13
src/views/desensitizationStrategy/list.vue
+3
-12
src/views/indexManage/ItemManage/index.vue
+3
-12
src/views/indexManage/ItemManage/modules/DiskUsageChart.vue
+0
-0
src/views/indexManage/ItemManage/modules/rateChart.vue
+0
-0
src/views/login.vue
+9
-6
src/views/project/Project/list.vue
+3
-3
没有找到文件。
src/layout/components/Sidebar/SidebarItem.vue
View file @
265405b7
...
...
@@ -3,7 +3,6 @@
<template
v-if=
"hasOneShowingChild(item.children, item) && (!onlyOneChild.children || onlyOneChild.noShowingChildren) && !item.alwaysShow"
>
<app-link
v-if=
"onlyOneChild.meta"
:to=
"resolvePath(onlyOneChild.path, onlyOneChild.query)"
>
<el-menu-item
:index=
"resolvePath(onlyOneChild.path)"
:class=
"
{ 'submenu-title-noDropdown': !isNest }" @click="pageLuyou(onlyOneChild)">
<!--
<svg-icon
:icon-class=
"onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
/>
-->
<template
#
title
><span
class=
"menu-title"
:title=
"hasTitle(onlyOneChild.meta.title)"
>
{{
onlyOneChild
.
meta
.
title
}}
</span></
template
>
</el-menu-item>
</app-link>
...
...
src/store/modules/app.js
View file @
265405b7
...
...
@@ -334,7 +334,7 @@ const router = useRouter()
sessionStorage
.
setItem
(
'navList'
,
JSON
.
stringify
(
data
))
},
setallNav
(
data
)
{
this
.
allnavList
=
d
ata
this
.
allnavList
=
d
eepCloneRoutes
(
data
)
sessionStorage
.
setItem
(
'allnavList'
,
JSON
.
stringify
(
data
))
},
...
...
@@ -376,7 +376,15 @@ const router = useRouter()
})
}
}
}
})
}
,
// 安全的深拷贝方法(保留组件引用)
})
function
deepCloneRoutes
(
routes
)
{
return
routes
.
map
(
route
=>
({
...
route
,
component
:
route
.
component
,
// 直接保留引用
children
:
route
.
children
?
deepCloneRoutes
(
route
.
children
)
:
[]
}))
}
export
default
useAppStore
\ No newline at end of file
src/utils/switchRoute.js
0 → 100644
View file @
265405b7
import
useAppStore
from
'@/store/modules/app'
import
usePermissionStore
from
'@/store/modules/permission'
const
appStore
=
useAppStore
()
const
permissionStore
=
usePermissionStore
()
export
function
changeRoute
()
{
let
menus
=
appStore
.
allnavList
console
.
log
(
'allnavList'
,
menus
)
let
type
=
appStore
.
navStatus
.
type
===
'manage'
?
'project'
:
'manage'
let
filterMenus
=
type
===
'manage'
?
menus
.
filter
(
item
=>
item
.
type
===
'1'
)
:
menus
.
filter
(
item
=>
item
.
type
===
'2'
)
console
.
log
(
'filterMenus'
,
filterMenus
)
appStore
.
setallNav
(
menus
)
appStore
.
setNavStatus
({
type
:
type
})
permissionStore
.
setSidebarRouters
(
filterMenus
)
}
\ No newline at end of file
src/views/Classification/index.vue
View file @
265405b7
...
...
@@ -8,6 +8,7 @@ import TableInfoTab from './modules/TableInfoTab.vue'
import
StructureTab
from
'./modules/StructureTab.vue'
import
EncryptionTab
from
'./modules/EncryptionTab.vue'
import
{
changeRoute
}
from
'@/utils/switchRoute'
import
{
useDict
}
from
'@/utils/dict'
...
...
@@ -138,18 +139,10 @@ const openDecrypt = ref(false)
function
pageProjectManage
()
{
let
filterMenus
=
appStore
.
navStatus
.
type
===
'manage'
?
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'1'
)
:
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'2'
)
// 设置导航菜单
appStore
.
setNav
(
filterMenus
)
permissionStore
.
setSidebarRouters
(
filterMenus
)
let
type
=
appStore
.
navStatus
.
type
===
'manage'
?
'project'
:
'manage'
appStore
.
setNavStatus
({
type
:
type
})
changeRoute
()
router
.
push
({
path
:
'/project
Manage
'
path
:
'/project
/Project
'
})
}
defineExpose
({
...
...
src/views/EncryptionManagement/list.vue
View file @
265405b7
...
...
@@ -2,9 +2,7 @@
import
{
getCurrentInstance
,
reactive
,
ref
,
toRefs
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
QueryForm
from
'./QueryForm.vue'
// import ProjectEditDialog from './ProjectEditDialog.vue'
// import DownloadPluginDialog from './DownloadPluginDialog.vue'
// import ExportDialog from './ExportDialog.vue'
import
{
changeRoute
}
from
'@/utils/switchRoute'
import
{
useRouter
}
from
'vue-router'
import
useAppStore
from
'@/store/modules/app'
...
...
@@ -83,18 +81,10 @@ const tableData = ref([
]);
function
pageProjectManage
()
{
let
filterMenus
=
appStore
.
navStatus
.
type
===
'manage'
?
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'1'
)
:
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'2'
)
// 设置导航菜单
appStore
.
setNav
(
filterMenus
)
permissionStore
.
setSidebarRouters
(
filterMenus
)
let
type
=
appStore
.
navStatus
.
type
===
'manage'
?
'project'
:
'manage'
appStore
.
setNavStatus
({
type
:
type
})
changeRoute
()
router
.
push
({
path
:
'/project
Manage
'
path
:
'/project
/Project
'
})
}
/**
...
...
src/views/desensitizationStrategy/list.vue
View file @
265405b7
...
...
@@ -6,7 +6,7 @@ import AddStrategyDialog from './modules/AddStrategyDialog.vue'
import
{
useRouter
}
from
'vue-router'
import
useAppStore
from
'@/store/modules/app'
import
usePermissionStore
from
'@/store/modules/permission'
import
{
changeRoute
}
from
'@/utils/switchRoute'
const
appStore
=
useAppStore
()
const
permissionStore
=
usePermissionStore
()
const
router
=
useRouter
()
...
...
@@ -54,19 +54,10 @@ function getList() {
}
function
pageProjectManage
()
{
let
filterMenus
=
appStore
.
navStatus
.
type
===
'manage'
?
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'1'
)
:
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'2'
)
// 设置导航菜单
appStore
.
setNav
(
filterMenus
)
permissionStore
.
setSidebarRouters
(
filterMenus
)
let
type
=
appStore
.
navStatus
.
type
===
'manage'
?
'project'
:
'manage'
appStore
.
setNavStatus
({
type
:
type
})
changeRoute
()
router
.
push
({
path
:
'/project
Manage
'
path
:
'/project
/Project
'
})
}
...
...
src/views/
projectHom
e/index.vue
→
src/views/
indexManage/ItemManag
e/index.vue
View file @
265405b7
<
script
setup
name=
"ProjectHome"
>
import
{
ref
,
toRefs
,
reactive
,
getCurrentInstance
,
proxyRefs
,
onMounted
}
from
'vue'
import
{
useDict
}
from
'@/utils/dict'
import
{
changeRoute
}
from
'@/utils/switchRoute'
import
biao
from
'@/assets/images/project/biao.png'
import
jiamibiao
from
'@/assets/images/project/jiamibiao.png'
import
jiamiziduan
from
'@/assets/images/project/jiamiziduan.png'
...
...
@@ -83,18 +83,9 @@ getInfo()
function
pageProjectManage
()
{
let
filterMenus
=
appStore
.
navStatus
.
type
===
'manage'
?
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'1'
)
:
appStore
.
allnavList
.
filter
(
item
=>
item
.
type
===
'2'
)
// 设置导航菜单
appStore
.
setNav
(
filterMenus
)
permissionStore
.
setSidebarRouters
(
filterMenus
)
let
type
=
appStore
.
navStatus
.
type
===
'manage'
?
'project'
:
'manage'
appStore
.
setNavStatus
({
type
:
type
})
changeRoute
()
router
.
push
({
path
:
'/project
Manage
'
path
:
'/project
/Project
'
})
}
...
...
src/views/
projectHom
e/modules/DiskUsageChart.vue
→
src/views/
indexManage/ItemManag
e/modules/DiskUsageChart.vue
View file @
265405b7
File moved
src/views/
projectHom
e/modules/rateChart.vue
→
src/views/
indexManage/ItemManag
e/modules/rateChart.vue
View file @
265405b7
File moved
src/views/login.vue
View file @
265405b7
...
...
@@ -143,7 +143,7 @@ function handleLogin() {
appStore
.
setNav
(
filterMenus
)
appStore
.
setallNav
(
menus
)
console
.
log
(
'appStore.nav'
,
appStore
.
allnavList
)
// console.log('menus',filterMenus)
// permissionStore.allsidebarRouters(menus)
...
...
@@ -205,6 +205,7 @@ function handleLogin() {
}
function
transformRoutes
(
originalRoutes
)
{
return
originalRoutes
.
map
(
route
=>
{
const
hasChildren
=
route
.
submenu
&&
route
.
submenu
.
length
>
0
// 基础转换 - 所有路由都使用Layout作为父组件
const
transformedRoute
=
{
path
:
route
.
url
,
...
...
@@ -217,13 +218,15 @@ function transformRoutes(originalRoutes) {
title
:
route
.
menuname
,
icon
:
route
.
icon
,
noCache
:
false
,
link
:
null
link
:
null
,
singleLevel
:
!
hasChildren
},
children
:
[]
// 初始化children数组
};
// 处理有子路由的情况
if
(
route
.
submenu
&&
route
.
submenu
.
length
>
0
)
{
if
(
hasChildren
)
{
transformedRoute
.
alwaysShow
=
true
transformedRoute
.
children
=
route
.
submenu
.
map
(
child
=>
({
path
:
child
.
url
.
startsWith
(
'/'
)
?
child
.
url
.
substring
(
1
)
:
child
.
url
,
name
:
child
.
menuname
.
replace
(
/
\s
+/g
,
''
),
...
...
@@ -255,9 +258,9 @@ function transformRoutes(originalRoutes) {
}
// 添加alwaysShow属性给有子路由的项
if
(
transformedRoute
.
children
&&
transformedRoute
.
children
.
length
>
0
)
{
transformedRoute
.
alwaysShow
=
true
;
}
//
if (transformedRoute.children && transformedRoute.children.length > 0) {
//
transformedRoute.alwaysShow = true;
//
}
// console.log('transformedRoute',transformedRoute)
return
transformedRoute
;
...
...
src/views/project/Project/list.vue
View file @
265405b7
...
...
@@ -6,6 +6,7 @@ import ProjectEditDialog from './ProjectEditDialog.vue'
import
DownloadPluginDialog
from
'./DownloadPluginDialog.vue'
import
ExportDialog
from
'./ExportDialog.vue'
import
{
useRouter
}
from
'vue-router'
import
{
changeRoute
}
from
'@/utils/switchRoute'
const
router
=
useRouter
()
const
emit
=
defineEmits
([
'page'
])
const
{
proxy
}
=
getCurrentInstance
()
...
...
@@ -115,9 +116,8 @@ const handleCommandProject = (command, project) => {
// 具体操作方法
const
handleEnterProject
=
(
project
)
=>
{
console
.
log
(
'进入项目:'
,
project
)
// // ElMessage.success(`进入项目 ${project.projectName}`)
// emit('page', 'detail', { projectId: project.id})
router
.
push
({
path
:
'/projectHome'
,
query
:
{
projectId
:
project
.
id
}
})
changeRoute
()
router
.
push
({
path
:
'/indexManage/ItemManage'
,
query
:
{
projectId
:
project
.
id
}
})
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论