Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
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
office
haoban-3
Commits
59ede12e
Commit
59ede12e
authored
May 10, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 菜单框架
parent
f1b4fb3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
aside-menu.vue
src/components/layout/aside-menu.vue
+1
-1
index.vue
src/components/layout/index.vue
+4
-2
main-menu.vue
src/components/layout/main-menu.vue
+13
-1
No files found.
src/components/layout/aside-menu.vue
View file @
59ede12e
...
...
@@ -34,7 +34,7 @@ export default {
},
methods
:
{
toPage
(
menu
)
{
if
(
this
.
activedCode
==
menu
.
menuCode
)
return
;
// if (this.$route.patch == '/' + menu.menuUrl
) return;
this
.
$router
.
push
(
'/'
+
menu
.
menuUrl
);
}
}
...
...
src/components/layout/index.vue
View file @
59ede12e
...
...
@@ -8,9 +8,9 @@
<!-- 页面内容 -->
<!--
<router-view
v-if=
"activeBrand"
:brandId=
"activeBrand"
:activeGroupId=
"activeGroup"
:tabType=
"activeTab"
@
showTab=
"showTab"
></router-view>
-->
<keep-alive
v-if=
"$route.meta.keepAlive"
>
<router-view></router-view>
<router-view
:brand-id=
"enterpriseId"
></router-view>
</keep-alive>
<router-view
v-else
></router-view>
<router-view
v-else
:brand-id=
"enterpriseId"
></router-view>
</div>
</div>
</div>
...
...
@@ -30,6 +30,7 @@ export default {
data
()
{
return
{
breadShow
:
true
,
enterpriseId
:
''
,
// 菜单树数据
menuList
:
[],
// 菜单平铺数据
...
...
@@ -46,6 +47,7 @@ export default {
},
created
()
{
provideData
.
layoutVm
=
this
;
this
.
enterpriseId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
).
enterpriseId
;
this
.
$on
(
'command'
,
this
.
onCommand
);
this
.
$router
.
beforeEach
((
to
,
from
,
next
)
=>
{
this
.
activedMenu
=
this
.
getActivedMenu
(
this
.
getMenuByPath
(
to
.
path
.
slice
(
1
)));
...
...
src/components/layout/main-menu.vue
View file @
59ede12e
...
...
@@ -19,6 +19,8 @@
<
script
>
import
ChangeStore
from
'./components/change-store.vue'
;
import
UserInfo
from
'./components/user-info.vue'
;
import
{
getRequest
}
from
'@/api/api.js'
;
import
errorMsg
from
'@/common/js/error.js'
;
export
default
{
name
:
'main-menu'
,
components
:
{
ChangeStore
,
UserInfo
},
...
...
@@ -42,6 +44,9 @@ export default {
applyCount
:
0
};
},
created
()
{
this
.
updateAplyCount
();
},
methods
:
{
toIndex
()
{
this
.
$router
.
push
(
'/index'
);
...
...
@@ -65,7 +70,14 @@ export default {
}
},
updateAplyCount
()
{
console
.
log
(
'获取待审批数量'
);
getRequest
(
'/haoban-manage3-web/audit/get-audit-count'
,
{}).
then
(
resp
=>
{
const
{
errorCode
,
result
}
=
resp
.
data
||
{};
if
(
errorCode
!=
1
)
{
errorMsg
.
errorMsg
(
resp
.
data
);
return
;
}
this
.
applyCount
=
result
||
0
;
});
}
}
};
...
...
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