Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
digital-construction
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
张牧越
digital-construction
Commits
a00ebf12
Commit
a00ebf12
authored
Jun 07, 2023
by
张牧越
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
60513e7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
6 deletions
+44
-6
Index.vue
src/components/Index.vue
+44
-6
No files found.
src/components/Index.vue
View file @
a00ebf12
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
v-if=
"router.child && router.child.length == 0"
v-if=
"router.child && router.child.length == 0"
:key=
"index"
:key=
"index"
class=
"router-link"
class=
"router-link"
@
click=
"c
hildRouteName = ''
"
@
click=
"c
learRoute
"
>
>
<router-link
<router-link
:to=
"
{ path: router.menu_url, query: { token_code: token } }"
:to=
"
{ path: router.menu_url, query: { token_code: token } }"
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</div>
</div>
<el-dropdown
v-else
:key=
"index"
placement=
"bottom"
>
<el-dropdown
v-else
:key=
"index"
placement=
"bottom"
>
<div
:class=
"['parent-router',
childRouteNam
e ? 'active' : '']"
>
<div
:class=
"['parent-router',
router.isActiv
e ? 'active' : '']"
>
{{
router
.
right_name
{{
router
.
right_name
}}{{
childRouteName
?
`/${childRouteName
}
`
:
""
}}
}}{{
childRouteName
?
`/${childRouteName
}
`
:
""
}}
<
/div
>
<
/div
>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
:
key
=
"index"
:
key
=
"index"
:
to
=
"{ path: router.menu_url, query: { token_code: token
}
}
"
:
to
=
"{ path: router.menu_url, query: { token_code: token
}
}
"
>
>
<
span
@
click
=
"c
hildRouteName = ''
"
>
{{
<
span
@
click
=
"c
learRoute
"
>
{{
router
.
right_name
router
.
right_name
}}
<
/span></
router
-
link
}}
<
/span></
router
-
link
>
>
...
@@ -203,8 +203,31 @@ export default {
...
@@ -203,8 +203,31 @@ export default {
window
.
location
.
href
=
window
.
location
.
origin
+
"/pweb/m/"
;
window
.
location
.
href
=
window
.
location
.
origin
+
"/pweb/m/"
;
}
,
}
,
setRoute
(
router
,
child
)
{
setRoute
(
router
,
child
)
{
router
.
isActive
=
true
;
console
.
log
(
router
,
child
);
console
.
log
(
router
,
child
);
localStorage
.
setItem
(
"activeParentId"
,
router
.
id
);
localStorage
.
setItem
(
"activeChildId"
,
child
.
id
);
this
.
childRouteName
=
child
.
right_name
;
this
.
childRouteName
=
child
.
right_name
;
this
.
$forceUpdate
();
}
,
clearRoute
()
{
this
.
childRouteName
=
""
;
localStorage
.
setItem
(
"activeParentId"
,
""
);
localStorage
.
setItem
(
"activeChildId"
,
""
);
this
.
leftNav
=
this
.
leftNav
.
map
((
item
)
=>
{
return
{
...
item
,
isActive
:
false
,
}
;
}
);
this
.
rightNav
=
this
.
rightNav
.
map
((
item
)
=>
{
return
{
...
item
,
isActive
:
false
,
}
;
}
);
this
.
$forceUpdate
();
}
,
}
,
}
,
}
,
computed
:
{
computed
:
{
...
@@ -216,11 +239,26 @@ export default {
...
@@ -216,11 +239,26 @@ export default {
getBaseInfo
().
then
((
res
)
=>
{
getBaseInfo
().
then
((
res
)
=>
{
this
.
screenDetail
=
res
.
data
;
this
.
screenDetail
=
res
.
data
;
document
.
title
=
res
.
data
.
project_name
;
document
.
title
=
res
.
data
.
project_name
;
let
menu
=
res
.
data
.
menu
.
map
((
item
)
=>
{
return
{
...
item
,
isActive
:
localStorage
.
getItem
(
"activeParentId"
)
==
item
.
id
?
true
:
false
,
}
;
}
);
let
selectedMenu
=
res
.
data
.
menu
.
filter
((
item
)
=>
{
return
item
.
id
==
localStorage
.
getItem
(
"activeParentId"
);
}
);
if
(
selectedMenu
.
length
>
0
)
{
this
.
childRouteName
=
selectedMenu
[
0
].
child
.
filter
((
item
)
=>
{
return
item
.
id
==
localStorage
.
getItem
(
"activeChildId"
);
}
)[
0
].
right_name
;
}
if
(
res
.
data
.
menu
.
length
>=
3
)
{
if
(
res
.
data
.
menu
.
length
>=
3
)
{
this
.
leftNav
=
res
.
data
.
menu
.
slice
(
0
,
3
);
this
.
leftNav
=
menu
.
slice
(
0
,
3
);
this
.
rightNav
=
res
.
data
.
menu
.
slice
(
3
,
res
.
data
.
menu
.
length
);
this
.
rightNav
=
menu
.
slice
(
3
,
res
.
data
.
menu
.
length
);
}
else
{
}
else
{
this
.
leftNav
=
[...
res
.
data
.
menu
];
this
.
leftNav
=
[...
menu
];
}
}
}
);
}
);
this
.
bodyScale
();
this
.
bodyScale
();
...
...
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