|
|
@@ -25,6 +25,11 @@
|
|
|
const state = reactive({
|
|
|
tabBarValue:'',
|
|
|
tabBarList:[{
|
|
|
+ "pathName":"honorOverview",
|
|
|
+ "iconPath": "/static/image/tabbar/honorOverview.png",
|
|
|
+ "selectedIconPath": "/static/image/tabbar/honorOverview_cur.png",
|
|
|
+ "text": "荣誉总览"
|
|
|
+ },{
|
|
|
"pathName":"myHonor",
|
|
|
"iconPath": "/static/image/tabbar/myHonor.png",
|
|
|
"selectedIconPath": "/static/image/tabbar/myHonor_cur.png",
|
|
|
@@ -44,21 +49,15 @@
|
|
|
const roleCodes = store.state?.userStore?.userInfo?.roleCodes || [];
|
|
|
// 管理员和校长包含荣誉总览和荣誉教师,其他用户没有荣誉总览和荣誉教师
|
|
|
if(roleCodes.includes('SCHOOL_MANAGER') || roleCodes.includes('SCHOOL_MASTER')){//管理员和校长
|
|
|
- const tabList = [{
|
|
|
- "pathName":"honorOverview",
|
|
|
- "iconPath": "/static/image/tabbar/honorOverview.png",
|
|
|
- "selectedIconPath": "/static/image/tabbar/honorOverview_cur.png",
|
|
|
- "text": "荣誉总览"
|
|
|
- },{
|
|
|
+ state.tabBarList.splice(1, 0, {
|
|
|
"pathName":"honorTeacher",
|
|
|
"iconPath": "/static/image/tabbar/honorTeacher.png",
|
|
|
"selectedIconPath": "/static/image/tabbar/honorTeacher_cur.png",
|
|
|
"text": "荣誉教师"
|
|
|
- }]
|
|
|
- state.tabBarList = [...tabList,...state.tabBarList];
|
|
|
+ });
|
|
|
state.tabBarValue = 'honorOverview';
|
|
|
}else{
|
|
|
- state.tabBarValue = 'myHonor';
|
|
|
+ state.tabBarValue = 'honorOverview';
|
|
|
}
|
|
|
})
|
|
|
</script>
|