Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dxgaqgl-vue
Project
Project
Details
Activity
Releases
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
李苏
dxgaqgl-vue
Commits
100b341c
Commit
100b341c
authored
May 21, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
THE PAGE DXG HOMEPAGE
parent
75b3ef00
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
73 deletions
+73
-73
index.js
src/router/index.js
+13
-13
permission.js
src/store/modules/permission.js
+60
-60
No files found.
src/router/index.js
View file @
100b341c
...
@@ -1497,19 +1497,19 @@ export const constantRoutes = [
...
@@ -1497,19 +1497,19 @@ export const constantRoutes = [
component
:
()
=>
import
(
'@/views/error/401'
),
component
:
()
=>
import
(
'@/views/error/401'
),
hidden
:
true
hidden
:
true
},
},
//
{
{
//
path: '',
path
:
''
,
//
component: Layout,
component
:
Layout
,
//
redirect: 'index',
redirect
:
'index'
,
//
children: [
children
:
[
//
{
{
//
path: 'index',
path
:
'index'
,
// component: () => import('@/views
/index'),
component
:
()
=>
import
(
'@/views/threeViolations/homePage
/index'
),
//
name: 'Index',
name
:
'Index'
,
//
meta: { title: '首页', icon: 'dashboard', affix: true }
meta
:
{
title
:
'首页'
,
icon
:
'dashboard'
,
affix
:
true
}
//
}
}
//
]
]
//
},
},
{
{
path
:
'/user'
,
path
:
'/user'
,
component
:
Layout
,
component
:
Layout
,
...
...
src/store/modules/permission.js
View file @
100b341c
...
@@ -159,70 +159,70 @@ const permission = {
...
@@ -159,70 +159,70 @@ const permission = {
/* 重置首页路由*/
/* 重置首页路由*/
// let hompePage = treeToList([...newCommonList,...newErpList,...newPowerRoutes]).filter(item=>item.mkid==localStorage.getItem('homeMkid'))
// let hompePage = treeToList([...newCommonList,...newErpList,...newPowerRoutes]).filter(item=>item.mkid==localStorage.getItem('homeMkid'))
let
ttlist
=
treeToList
([...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
])
let
ttlist
=
treeToList
([...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
])
let
homePage
=
ttlist
.
filter
(
item
=>
item
.
mkid
==
localStorage
.
getItem
(
'homeMkid'
))
//
let homePage = ttlist.filter(item => item.mkid == localStorage.getItem('homeMkid'))
/* 替换首页*/
/
/ /
* 替换首页*/
if
(
homePage
&&
homePage
[
0
])
{
//
if (homePage && homePage[0]) {
if
(
homePage
[
0
].
component
)
{
//
if (homePage[0].component) {
// Layout ParentView 组件特殊处理
//
// Layout ParentView 组件特殊处理
if
(
homePage
[
0
].
component
===
'Layout'
)
{
//
if (homePage[0].component === 'Layout') {
homePage
[
0
].
component
=
Layout
//
homePage[0].component = Layout
}
else
if
(
homePage
[
0
].
component
===
'ParentView'
)
{
//
} else if (homePage[0].component === 'ParentView') {
homePage
[
0
].
component
=
ParentView
//
homePage[0].component = ParentView
}
else
if
(
homePage
[
0
].
component
===
'InnerLink'
)
{
//
} else if (homePage[0].component === 'InnerLink') {
homePage
[
0
].
component
=
InnerLink
//
homePage[0].component = InnerLink
}
else
{
//
} else {
if
(
homePage
[
0
].
commonComponent
)
{
//
if (homePage[0].commonComponent) {
homePage
[
0
].
component
=
loadCommonView
(
homePage
[
0
].
component
)
//
homePage[0].component = loadCommonView(homePage[0].component)
}
else
if
(
homePage
[
0
].
erpComponent
)
{
//
} else if (homePage[0].erpComponent) {
homePage
[
0
].
component
=
loadErpView
(
homePage
[
0
].
component
)
//
homePage[0].component = loadErpView(homePage[0].component)
}
else
{
//
} else {
homePage
[
0
].
component
=
loadView
(
homePage
[
0
].
component
)
//
homePage[0].component = loadView(homePage[0].component)
}
//
}
}
//
}
}
//
}
/* 移除默认路由*/
//
/* 移除默认路由*/
let
newHome
=
{
//
let newHome = {
path
:
''
,
//
path: '',
component
:
Layout
,
//
component: Layout,
redirect
:
'index'
,
//
redirect: 'index',
hidden
:
true
,
//
hidden: true,
children
:
[{
//
children: [{
path
:
'index'
,
//
path: 'index',
component
:
homePage
[
0
].
component
,
//
component: homePage[0].component ,
name
:
'Index'
,
//
name: 'Index',
meta
:
{
//
meta: {
title
:
'首页'
,
//
title: '首页',
icon
:
'dashboard'
,
//
icon: 'dashboard',
affix
:
true
//
affix: true
}
//
}
}]
//
}]
}
//
}
router
.
addRoutes
([
newHome
])
//
router.addRoutes([newHome])
constantRoutes
.
push
(
newHome
)
//
constantRoutes.push(newHome)
}
else
{
//
}else{
let
newHome
=
{
//
let newHome= {
path
:
''
,
//
path: '',
component
:
Layout
,
//
component: Layout,
redirect
:
'index'
,
//
redirect: 'index',
hidden
:
true
,
//
hidden: true,
children
:
[{
//
children: [{
path
:
'index'
,
//
path: 'index',
component
:
()
=>
import
(
'@/views/index'
),
//
component: () => import('@/views/index'),
name
:
'Index'
,
//
name: 'Index',
meta
:
{
//
meta: {
title
:
'首页'
,
//
title: '首页',
icon
:
'dashboard'
,
//
icon: 'dashboard',
affix
:
true
//
affix: true
}
//
}
}]
//
}]
}
//
}
router
.
addRoutes
([
newHome
])
//
router.addRoutes([newHome])
constantRoutes
.
push
(
newHome
)
//
constantRoutes.push(newHome)
}
//
}
/*
/*
...
...
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