|
|
|
@ -30,12 +30,13 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import Setting from '@/setting' |
|
|
|
|
export default { |
|
|
|
|
props: ['path'], |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
active: '', |
|
|
|
|
menus: [ |
|
|
|
|
defaultMenus: [ |
|
|
|
|
{ |
|
|
|
|
index: '1', |
|
|
|
|
title: '系统后台', |
|
|
|
@ -125,6 +126,7 @@ export default { |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
menus: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -136,9 +138,46 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
|
|
|
|
|
|
Setting.dynamicRoute && this.initTabs() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
initTabs () { |
|
|
|
|
const { btns } = this.$store.state |
|
|
|
|
const tabs = this.defaultMenus |
|
|
|
|
btns.includes('/configure') && this.menus.push(tabs[0]) |
|
|
|
|
|
|
|
|
|
const children1 = [] |
|
|
|
|
btns.includes('/curriculum') && children1.push(tabs[1].children[0]) |
|
|
|
|
btns.includes('/theoreticalCourse') && children1.push(tabs[1].children[1]) |
|
|
|
|
btns.includes('/information') && children1.push(tabs[1].children[2]) |
|
|
|
|
btns.includes('/resourse') && children1.push(tabs[1].children[3]) |
|
|
|
|
this.menus.push({ |
|
|
|
|
index: '2', |
|
|
|
|
title: '职站教学后台', |
|
|
|
|
children: children1 |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const children2 = [] |
|
|
|
|
btns.includes('/shop:产品管理') && children2.push(tabs[2].children[0]) |
|
|
|
|
btns.includes('/shop:营销推广管理') && children2.push(tabs[2].children[1]) |
|
|
|
|
btns.includes('/parnerOperation') && children2.push(tabs[2].children[2]) |
|
|
|
|
btns.includes('/parner') && children2.push(tabs[2].children[3]) |
|
|
|
|
this.menus.push({ |
|
|
|
|
index: '3', |
|
|
|
|
title: '职站商城后台', |
|
|
|
|
children: children2 |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const children3 = [] |
|
|
|
|
btns.includes('/match') && children3.push(tabs[3].children[0]) |
|
|
|
|
btns.includes('/data') && children3.push(tabs[3].children[1]) |
|
|
|
|
btns.includes('/review') && children3.push(tabs[3].children[2]) |
|
|
|
|
this.menus.push({ |
|
|
|
|
index: '4', |
|
|
|
|
title: '运营后台', |
|
|
|
|
children: children3 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleSelect (index) { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|