Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 68bd6679
authored
Jun 03, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fi
1 parent
8039de4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
14 deletions
src/components/DesktopLeftSider/Sub/Menu.vue
src/components/DesktopRightSider/DesktopRightSider.vue
src/utils/common/common.js
src/components/DesktopLeftSider/Sub/Menu.vue
View file @
68bd667
...
@@ -212,15 +212,17 @@ export default {
...
@@ -212,15 +212,17 @@ export default {
}
}
// 同步激活样式
// 同步激活样式
resData
.
forEach
((
item
)
=>
{
resData
.
forEach
((
item
)
=>
{
const
{
menuName
:
pMenuName
}
=
item
.
origin
;
if
(
curBreadcrumb
)
{
item
.
showSubList
=
pMenuName
===
curBreadcrumb
[
0
].
name
;
const
{
menuName
:
pMenuName
}
=
item
.
origin
;
item
.
children
.
forEach
((
cItem
,
cIndex
)
=>
{
item
.
showSubList
=
pMenuName
===
curBreadcrumb
[
0
].
name
;
cItem
.
subItemActive
=
false
;
item
.
children
.
forEach
((
cItem
,
cIndex
)
=>
{
if
(
cItem
.
origin
.
menuName
===
curBreadcrumb
[
1
].
name
)
{
cItem
.
subItemActive
=
false
;
cItem
.
subItemActive
=
true
;
if
(
cItem
.
origin
.
menuName
===
curBreadcrumb
[
1
].
name
)
{
curBreadcrumb
[
1
].
id
=
cItem
.
id
;
cItem
.
subItemActive
=
true
;
}
curBreadcrumb
[
1
].
id
=
cItem
.
id
;
})
}
})
}
});
});
if
(
isInit
&&
curBreadcrumb
)
{
if
(
isInit
&&
curBreadcrumb
)
{
...
@@ -228,10 +230,33 @@ export default {
...
@@ -228,10 +230,33 @@ export default {
let
path
=
thisBread
.
path
||
'/noData'
;
let
path
=
thisBread
.
path
||
'/noData'
;
let
name
=
thisBread
.
name
||
''
;
let
name
=
thisBread
.
name
||
''
;
let
id
=
thisBread
.
id
||
''
;
let
id
=
thisBread
.
id
||
''
;
if
(
!
path
||
path
==
'/noData'
)
{
showEmpty
=
true
;
};
name
&&
getMenuAuth
(
id
,
name
);
name
&&
getMenuAuth
(
id
,
name
);
history
.
pushState
(
null
,
path
,
path
);
history
.
pushState
({
breadcrumb
:
curBreadcrumb
},
path
,
path
);
store
.
dispatch
(
'app/setCommonData'
,
{
showEmpty
});
}
else
{
let
firstList
=
state
.
menuList
[
0
];
let
pOrigin
=
firstList
.
origin
;
let
cOrigin
=
firstList
.
children
[
0
].
origin
;
const
breadcrumb
=
[
{
name
:
pOrigin
.
menuName
,
path
:
pOrigin
.
frontRoute
},
{
name
:
cOrigin
.
menuName
,
path
:
cOrigin
.
frontRoute
}
];
if
(
!
cOrigin
.
frontRoute
||
cOrigin
.
frontRoute
==
'/noData'
)
{
showEmpty
=
true
;
};
name
&&
getMenuAuth
(
firstList
.
children
[
0
].
id
,
cOrigin
.
menuName
);
history
.
pushState
({
breadcrumb
},
cOrigin
.
frontRoute
,
cOrigin
.
frontRoute
);
store
.
dispatch
(
'app/setCommonData'
,
{
showEmpty
});
}
}
}
}
},
err
=>
{
},
err
=>
{
...
...
src/components/DesktopRightSider/DesktopRightSider.vue
View file @
68bd667
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
const
subMircroEle
=
document
.
getElementById
(
'sub-system-frame'
);
const
subMircroEle
=
document
.
getElementById
(
'sub-system-frame'
);
subMircroEle
.
addEventListener
(
'DOMNodeInserted'
,
function
(
e
)
{
subMircroEle
.
addEventListener
(
'DOMNodeInserted'
,
function
(
e
)
{
const
target
=
e
.
currentTarget
,
const
target
=
e
.
currentTarget
,
tarInner
=
target
.
innerHTML
;
tarInner
=
target
.
innerHTML
;
if
(
!
state
.
el_sub_innerH
!==
!
tarInner
)
{
if
(
!
state
.
el_sub_innerH
!==
!
tarInner
)
{
state
.
el_sub_innerH
=
target
.
innerHTML
;
state
.
el_sub_innerH
=
target
.
innerHTML
;
}
}
...
...
src/utils/common/common.js
View file @
68bd667
...
@@ -20,9 +20,9 @@ export const Common = {
...
@@ -20,9 +20,9 @@ export const Common = {
if
(
authFlag
)
{
if
(
authFlag
)
{
data
.
forEach
(
labelItem
=>
{
data
.
forEach
(
labelItem
=>
{
if
(
flag
)
{
if
(
flag
)
{
elItem
.
style
.
display
=
'none
'
;
elItem
.
style
.
visibility
=
'hidden
'
;
if
(
elText
.
includes
(
labelItem
.
label
))
{
if
(
elText
.
includes
(
labelItem
.
label
))
{
elItem
.
style
.
display
=
'block
'
;
elItem
.
style
.
visibility
=
'visible
'
;
flag
=
false
;
flag
=
false
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment