Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mobi
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
1
Merge Requests
1
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
wbx-PCAndMobi
mobi
Commits
840d3aa9
Commit
840d3aa9
authored
Mar 01, 2021
by
Gakki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
默认加载子项目documents
parent
af28d862
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
documentsRoutes.json
src/router/documentsRoutes.json
+3
-2
getMicRouters.js
src/router/getMicRouters.js
+16
-0
No files found.
src/router/documentsRoutes.json
View file @
840d3aa9
[{
{
"Layout"
:
[{
"path"
:
"/documents/month"
,
"name"
:
"month"
,
"path"
:
"/documents/month"
,
"name"
:
"month"
,
"meta"
:
{
"title"
:
"检查单"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
false
,
"hideInBread"
:
false
},
"meta"
:
{
"title"
:
"检查单"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
false
,
"hideInBread"
:
false
},
"children"
:[
"children"
:[
...
@@ -53,4 +54,4 @@
...
@@ -53,4 +54,4 @@
"meta"
:
{
"title"
:
"投诉密度排行"
,
"menuPath"
:
true
,
"hideInBread"
:
false
}
"meta"
:
{
"title"
:
"投诉密度排行"
,
"menuPath"
:
true
,
"hideInBread"
:
false
}
}
}
]
]
}]
}]}
\ No newline at end of file
\ No newline at end of file
src/router/getMicRouters.js
View file @
840d3aa9
...
@@ -3,6 +3,7 @@ import pudong from '@/router/pudongRoutes.json'
...
@@ -3,6 +3,7 @@ import pudong from '@/router/pudongRoutes.json'
import
xuhui
from
'@/router/xuhuiRoutes.json'
import
xuhui
from
'@/router/xuhuiRoutes.json'
import
huangpu
from
'@/router/huangpuRoutes.json'
import
huangpu
from
'@/router/huangpuRoutes.json'
import
yangpu
from
'@/router/yangpuRoutes.json'
import
yangpu
from
'@/router/yangpuRoutes.json'
import
documents
from
'@/router/documentsRoutes.json'
import
Store
from
'@/store/index'
import
Store
from
'@/store/index'
async
function
GetRoutes
(
router
)
{
async
function
GetRoutes
(
router
)
{
...
@@ -64,6 +65,7 @@ async function GetRoutes(router) {
...
@@ -64,6 +65,7 @@ async function GetRoutes(router) {
const
micSystemRoutersConfigs
=
Object
.
assign
({},
MicRouters
)
const
micSystemRoutersConfigs
=
Object
.
assign
({},
MicRouters
)
const
{
routes
}
=
router
.
options
const
{
routes
}
=
router
.
options
const
parent
=
routes
.
find
(
item
=>
item
.
name
===
'Layout'
)
const
parent
=
routes
.
find
(
item
=>
item
.
name
===
'Layout'
)
for
(
let
key
in
micSystemRoutersConfigs
)
{
for
(
let
key
in
micSystemRoutersConfigs
)
{
for
(
let
i
=
0
;
i
<
micSystemRoutersConfigs
[
key
].
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
micSystemRoutersConfigs
[
key
].
length
;
i
++
)
{
let
firstRouter
=
Object
.
assign
({},
micSystemRoutersConfigs
[
key
][
i
])
let
firstRouter
=
Object
.
assign
({},
micSystemRoutersConfigs
[
key
][
i
])
...
@@ -77,6 +79,20 @@ async function GetRoutes(router) {
...
@@ -77,6 +79,20 @@ async function GetRoutes(router) {
router
.
addRoutes
([
parent
])
router
.
addRoutes
([
parent
])
}
}
}
}
for
(
let
key
in
documents
)
{
for
(
let
i
=
0
;
i
<
documents
[
key
].
length
;
i
++
)
{
let
firstRouter
=
Object
.
assign
({},
documents
[
key
][
i
])
if
(
!!
firstRouter
.
meta
.
openMode
&&
firstRouter
.
meta
.
openMode
==
'outsite'
)
{
firstRouter
.
component
=
TipsOutsite
}
parent
.
children
.
push
(
Object
.
assign
({},
firstRouter
))
router
.
addRoutes
([
parent
])
}
}
}
}
export
default
GetRoutes
export
default
GetRoutes
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