Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
B
beiligong-web-base
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
范骋宇
beiligong-web-base
Commits
32f29cc1
Commit
32f29cc1
authored
Jun 10, 2026
by
范骋宇
🇺🇸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登陆之后绕过导航页面,直接跳转文档中心
parent
717a5684
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
5 deletions
+189
-5
index.js
applications/architecture-dee/src/router/index.js
+8
-2
index.vue
applications/architecture-dee/src/views/login/index.vue
+181
-3
No files found.
applications/architecture-dee/src/router/index.js
View file @
32f29cc1
...
...
@@ -144,11 +144,17 @@ export const constantRoutes = [
// component: () => import('@/views/general/page/index.vue'),
// hidden: true
// },
// {
// path: '/',
// name: 'navigation',
// meta: { disnav: true },
// component: () => import('@/views/navigation/index'),
// hidden: true
// },
{
path
:
'/'
,
name
:
'navigation'
,
meta
:
{
disnav
:
true
},
component
:
()
=>
import
(
'@/views/
navigatio
n/index'
),
component
:
()
=>
import
(
'@/views/
logi
n/index'
),
hidden
:
true
},
// {
...
...
applications/architecture-dee/src/views/login/index.vue
View file @
32f29cc1
...
...
@@ -102,6 +102,7 @@
</
template
>
<
script
>
import
{
getPageByWorkspaceId
}
from
'@/api/usercenter'
// import CryptoJS from 'crypto-js'
import
{
mapGetters
}
from
'vuex'
import
RSA
from
'@/utils/rsa.js'
...
...
@@ -131,7 +132,7 @@ export default {
}
},
computed
:
{
...
mapGetters
([
'supportedLanguages'
])
...
mapGetters
([
'supportedLanguages'
,
'activeWorkSpace'
,
'permMenus'
])
},
watch
:
{
'loginForm.account'
(
val
)
{
...
...
@@ -185,7 +186,7 @@ export default {
validate
.
then
(
x
=>
{
const
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
loginForm
))
params
.
password
=
password
this
.
$store
.
dispatch
(
'user/login'
,
params
).
then
((
res
)
=>
{
this
.
$store
.
dispatch
(
'user/login'
,
params
).
then
(
async
(
res
)
=>
{
// 记录认证方式和认证方式对应的token字段名称
this
.
$utils
.
setTokenName
()
this
.
$utils
.
setAuthType
()
...
...
@@ -203,7 +204,9 @@ export default {
this
.
$store
.
dispatch
(
'tagsView/delAllCachedViews'
,
params
)
this
.
$store
.
dispatch
(
'permission/clearPermissionList'
)
// this.$router.push({ path: this.redirect || '/' })
this
.
$router
.
push
({
path
:
'/'
})
// this.$router.push({ path: '/' })
await
this
.
$store
.
dispatch
(
'menu/getMenus'
)
this
.
getMenusPerm
()
}
})
// 清除剪切板
...
...
@@ -211,6 +214,181 @@ export default {
}).
catch
(
e
=>
{
})
}
},
getMenusPerm
()
{
getPageByWorkspaceId
({
id
:
this
.
activeWorkSpace
.
id
}).
then
(
res
=>
{
const
allApps
=
res
.
items
.
sourceDxAppWorkLink
?
res
.
items
.
sourceDxAppWorkLink
.
map
(
r
=>
{
return
r
.
target
})
:
[]
let
dxAppWorkGroups
=
[]
const
tabs
=
[]
if
(
Array
.
isArray
(
res
.
items
.
dxAppWorkGroups
)
&&
res
.
items
.
dxAppWorkGroups
.
length
>
0
)
{
dxAppWorkGroups
=
res
.
items
.
dxAppWorkGroups
||
[]
}
dxAppWorkGroups
.
forEach
((
group
,
idx
)
=>
{
tabs
.
push
({
name
:
group
.
groupName
,
id
:
group
.
id
+
''
,
dxApplications
:
group
.
sourceDxAppWorkGroupLink
&&
group
.
sourceDxAppWorkGroupLink
.
length
?
this
.
getPermAppMenu
(
group
.
sourceDxAppWorkGroupLink
.
map
(
r
=>
{
r
.
target
&&
allApps
.
push
(
r
.
target
)
r
.
target
.
pWorkGroupName
=
group
.
groupName
return
r
.
target
}))
:
[]
})
})
const
obj
=
{}
const
apps
=
this
.
getPermAppMenu
(
allApps
.
reduce
(
function
(
item
,
next
)
{
obj
[
next
.
id
]
?
''
:
obj
[
next
.
id
]
=
true
&&
item
.
push
(
next
)
return
item
},
[]))
if
(
apps
.
length
>
0
)
{
const
docApp
=
apps
.
find
(
a
=>
a
.
innerName
===
'dcs-doc'
)
if
(
docApp
)
{
this
.
goContent
(
docApp
)
}
else
{
this
.
$utils
.
showMessageWarning
(
'请在应用中心配置菜单页面'
)
}
}
else
{
this
.
$utils
.
showMessageWarning
(
'请在应用中心配置菜单页面'
)
}
})
},
goContent
(
app
)
{
if
(
!
app
.
dxApplicationMenus
)
{
return
this
.
$utils
.
showMessageWarning
(
'请在应用中心配置菜单页面'
)
}
const
menu
=
this
.
$utils
.
generateTree
(
app
.
dxApplicationMenus
,
{
pid
:
'parentId'
})
console
.
log
({
menu
})
if
(
this
.
activeWorkSpace
)
{
const
params
=
{
'openProps'
:
[
{
'name'
:
'dxApplicationPage'
}
],
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'dxWorkspaceId'
,
'operator'
:
'EQ'
,
'value'
:
this
.
activeWorkSpace
.
id
},
{
'fieldName'
:
'dxApplicationId'
,
'operator'
:
'EQ'
,
'value'
:
app
.
id
}
],
'operator'
:
'AND'
}
}
this
.
$api
.
searchApi
(
'DxSpaceStartPage'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
content
&&
res
.
items
.
content
.
length
)
{
const
activePage
=
res
.
items
.
content
[
0
].
dxApplicationPage
console
.
log
({
activePage
})
let
toPage
if
(
activePage
.
type
===
'1'
)
{
toPage
=
{
path
:
`/page/
${
activePage
.
pageKey
}
`
,
query
:
{}
}
}
else
if
(
activePage
.
type
===
'2'
)
{
toPage
=
{
path
:
activePage
.
route
,
query
:
{}
}
}
if
(
activePage
.
name
)
{
toPage
.
query
.
title
=
activePage
.
name
}
toPage
.
query
.
menuRootAppId
=
app
.
id
this
.
setMenu
(
menu
||
[])
localStorage
.
setItem
(
'moduleName'
,
app
.
name
)
this
.
$router
.
push
(
toPage
)
}
else
{
this
.
topage
(
menu
,
app
)
}
})
}
else
{
this
.
topage
(
menu
,
app
)
}
},
getPermAppMenu
(
dxApplications
)
{
console
.
log
({
dxApplications
})
console
.
log
(
' this.permMenus'
,
this
.
permMenus
)
const
permMenus
=
this
.
permMenus
.
filter
(
m
=>
m
.
dxApplicationId
)
const
apps
=
[]
dxApplications
.
forEach
(
app
=>
{
const
menuIdx
=
permMenus
.
findIndex
(
g
=>
g
.
dxApplicationId
===
app
.
id
)
if
(
menuIdx
>
-
1
)
{
app
.
dxApplicationMenus
=
permMenus
.
filter
(
h
=>
h
.
parentId
&&
h
.
dxApplicationId
===
app
.
id
)
apps
.
push
(
app
)
}
})
return
apps
},
setMenu
(
menu
)
{
// this.$store.dispatch('menu/updateMenu', menu)
// localStorage.setItem('menu', JSON.stringify(menu))
},
topage
(
menu
,
app
)
{
console
.
log
({
menu
,
app
})
const
activePage
=
this
.
getActiveTab
(
menu
)
console
.
log
({
activePage
})
if
(
!
activePage
)
return
// this.$store.dispatch('tagsView/addCachedMenuPages', {
// menuId: menu.id,
// pageId: activePage.id
// })
// if (!item.permFlag) {
// return
// }
let
toPage
if
(
activePage
.
type
===
'1'
)
{
toPage
=
{
path
:
`/page/
${
activePage
.
pageKey
}
`
,
query
:
{}
}
}
else
if
(
activePage
.
type
===
'2'
)
{
toPage
=
{
path
:
activePage
.
route
,
query
:
{}
}
}
if
(
activePage
.
name
)
{
toPage
.
query
.
title
=
activePage
.
name
}
toPage
.
query
.
menuRootAppId
=
app
.
id
this
.
setMenu
(
menu
||
[])
localStorage
.
setItem
(
'moduleName'
,
app
.
name
)
this
.
$router
.
push
(
toPage
)
},
getActiveTab
(
menus
)
{
for
(
let
i
=
0
;
i
<
menus
.
length
;
i
++
)
{
const
menu
=
menus
[
i
]
if
(
menu
.
dxApplicationPage
&&
menu
.
dxApplicationPage
.
subTypeName
===
'DxApplicationPage'
&&
menu
.
permFlag
)
{
return
menu
.
dxApplicationPage
}
else
if
(
menu
.
children
&&
menu
.
children
.
length
>
0
&&
menu
.
permFlag
)
{
for
(
let
j
=
0
;
j
<
menu
.
children
.
length
;
j
++
)
{
const
item
=
menu
.
children
[
j
]
if
(
item
.
dxApplicationPage
&&
item
.
dxApplicationPage
.
subTypeName
===
'DxApplicationPage'
)
{
return
item
.
dxApplicationPage
}
else
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
return
this
.
getActiveTab
(
item
)
}
}
}
}
}
/**
* AES加密方法
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment