feat(top-bar-mixin): 添加面板页面
This commit is contained in:
parent
5f258c1420
commit
7a59b10298
|
@ -1,5 +1,6 @@
|
|||
import * as api from '@/api/manage.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getRouters } from '@/api/settle'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -31,12 +32,16 @@ export default {
|
|||
// name: '产品审核',
|
||||
// path: 'productCheck',
|
||||
// },
|
||||
]
|
||||
],
|
||||
roleMenu: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['name', 'user'])
|
||||
},
|
||||
created() {
|
||||
this.getRoles()
|
||||
},
|
||||
methods: {
|
||||
getApprovalStatus() {
|
||||
api.waitApprovalNum().then((res) => {
|
||||
|
@ -45,6 +50,19 @@ export default {
|
|||
api.receiveApprovalNum().then((res) => {
|
||||
this.receiveApprovalNum = res.data
|
||||
})
|
||||
},
|
||||
getRoles() {
|
||||
getRouters().then((res) => {
|
||||
this.roleMenu = res.data || []
|
||||
if (!this.roleMenu.find((item) => item.routeName === 'summaryDashboard')) {
|
||||
this.topList.splice(0, 1)
|
||||
if (this.$route.name === 'summaryDashboard') {
|
||||
this.$router.replace({
|
||||
name: 'Dashboard'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue