Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
b7ef95ab
Commit
b7ef95ab
authored
Jan 09, 2022
by
季圣华
Browse files
优化页面按钮显示的逻辑
parent
ae77bf87
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/components/layouts/TabLayout.vue
View file @
b7ef95ab
...
@@ -122,8 +122,6 @@
...
@@ -122,8 +122,6 @@
let
oldIndex
=
this
.
linkList
.
indexOf
(
newRoute
.
fullPath
)
let
oldIndex
=
this
.
linkList
.
indexOf
(
newRoute
.
fullPath
)
let
oldPositionRoute
=
this
.
pageList
[
oldIndex
]
let
oldPositionRoute
=
this
.
pageList
[
oldIndex
]
this
.
pageList
.
splice
(
oldIndex
,
1
,
Object
.
assign
({},
newRoute
,{
meta
:
oldPositionRoute
.
meta
}))
this
.
pageList
.
splice
(
oldIndex
,
1
,
Object
.
assign
({},
newRoute
,{
meta
:
oldPositionRoute
.
meta
}))
//给菜单id赋值,用于调用之后控制按钮的显示
Vue
.
ls
.
set
(
'
funId
'
,
oldPositionRoute
.
meta
.
id
,
7
*
24
*
60
*
60
*
1000
)
}
}
},
},
'
activePage
'
:
function
(
key
)
{
'
activePage
'
:
function
(
key
)
{
...
...
jshERP-web/src/components/page/GlobalLayout.vue
View file @
b7ef95ab
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<side-menu
<side-menu
mode=
"inline"
mode=
"inline"
:menus=
"menus"
:menus=
"menus"
@
menuSelect=
"myMenuSelect
Mobile
"
@
menuSelect=
"myMenuSelect"
:theme=
"navTheme"
:theme=
"navTheme"
:collapsed=
"false"
:collapsed=
"false"
:collapsible=
"true"
></side-menu>
:collapsible=
"true"
></side-menu>
...
@@ -157,11 +157,6 @@
...
@@ -157,11 +157,6 @@
let
storeKey
=
'
route:title:
'
+
this
.
activeMenu
.
url
let
storeKey
=
'
route:title:
'
+
this
.
activeMenu
.
url
this
.
$ls
.
set
(
storeKey
,
this
.
activeMenu
.
text
)
this
.
$ls
.
set
(
storeKey
,
this
.
activeMenu
.
text
)
},
},
myMenuSelectMobile
(
value
){
this
.
myMenuSelect
(
value
)
//给菜单id赋值,用于调用之后控制按钮的显示
Vue
.
ls
.
set
(
'
funId
'
,
this
.
activeMenu
.
id
,
7
*
24
*
60
*
60
*
1000
);
},
findMenuBykey
(
menus
,
key
){
findMenuBykey
(
menus
,
key
){
for
(
let
i
of
menus
){
for
(
let
i
of
menus
){
if
(
i
.
url
==
key
){
if
(
i
.
url
==
key
){
...
...
jshERP-web/src/mixins/JeecgListMixin.js
View file @
b7ef95ab
...
@@ -351,12 +351,11 @@ export const JeecgListMixin = {
...
@@ -351,12 +351,11 @@ export const JeecgListMixin = {
},
},
/* 按钮权限 */
/* 按钮权限 */
initActiveBtnStr
()
{
initActiveBtnStr
()
{
let
funId
=
Vue
.
ls
.
get
(
'
funId
'
);
//功能id
let
btnStrList
=
Vue
.
ls
.
get
(
'
winBtnStrList
'
);
//按钮功能列表 JSON字符串
let
btnStrList
=
Vue
.
ls
.
get
(
'
winBtnStrList
'
);
//按钮功能列表 JSON字符串
this
.
btnEnableList
=
""
;
//按钮列表
this
.
btnEnableList
=
""
;
//按钮列表
if
(
funId
&&
btnStrList
)
{
if
(
location
.
pathname
&&
btnStrList
)
{
for
(
let
i
=
0
;
i
<
btnStrList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
btnStrList
.
length
;
i
++
)
{
if
(
btnStrList
[
i
].
funId
==
funId
)
{
if
(
btnStrList
[
i
].
url
===
location
.
pathname
)
{
if
(
btnStrList
[
i
].
btnStr
)
{
if
(
btnStrList
[
i
].
btnStr
)
{
this
.
btnEnableList
=
btnStrList
[
i
].
btnStr
;
this
.
btnEnableList
=
btnStrList
[
i
].
btnStr
;
}
}
...
...
Write
Preview
Supports
Markdown
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