rt-sim-training-client/src/views/organization/index.vue
2021-07-05 16:16:17 +08:00

102 lines
3.9 KiB
Vue

<template>
<div>
<div class="title_content">{{ companyName + '教学管理' }}</div>
<el-button v-if="!hideBack" type="text" class="lessonManageBack" @click="back">返回</el-button>
<div class="lessonManageInfo">
<el-menu class="lessonManageMenu" default-active="2-1">
<el-menu-item index="1" @click="clickMenu">
<img :src="classIcon" class="teachMenu">
<span class="teachMenuTitle" :style="{color: $route.path.includes('classManage')?'#5BDBFF': '#000'}">班级管理</span>
</el-menu-item>
<el-submenu index="2">
<template slot="title">
<img :src="lessonIcon" class="teachMenu">
<span class="teachMenuTitle">课程管理</span>
</template>
<el-menu-item-group>
<el-menu-item index="2-1" class="lessonIcon" :style="{color: $route.path.includes('lessonManage')?'#5BDBFF': '#000'}" @click="clickMenu">发布课程管理</el-menu-item>
<el-menu-item index="2-2" class="lessonIcon" :style="{color: $route.path.includes('draftLessonManage')?'#5BDBFF': '#000'}" @click="clickMenu">草稿课程管理</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-menu-item index="3" @click="clickMenu">
<img :src="examIcon" class="teachMenu">
<span slot="title" class="teachMenuTitle" :style="{color: $route.path.includes('examManage')?'#5BDBFF': '#000'}">考试管理</span>
</el-menu-item>
<el-menu-item index="4" @click="clickMenu">
<img :src="ruleIcon" class="teachMenu">
<span slot="title" :style="{color: $route.path.includes('ruleManage')?'#5BDBFF': '#000'}" class="teachMenuTitle">评价管理</span>
</el-menu-item>
</el-menu>
<div class="lessonManageOther">
<router-view />
</div>
</div>
</div>
</template>
<script>
import ClassIcon from '@/assets/teachManage/class.png';
import LessonIcon from '@/assets/teachManage/lesson.png';
import ExamIcon from '@/assets/teachManage/exam.png';
import RuleIcon from '@/assets/teachManage/rule.png';
export default {
name: 'Organization',
data() {
return {
classIcon: ClassIcon,
lessonIcon: LessonIcon,
examIcon: ExamIcon,
ruleIcon: RuleIcon,
mapIdList: [],
lessonList: [],
classList: []
};
},
computed: {
companyName() {
return this.$store.state.user.companyName;
},
hideBack() {
return this.$route.query.enter === 'teacher';
}
},
created() {
},
methods:{
clickMenu(val) {
if (val.index === '2-1') {
this.$router.replace('/info/organization/lessonManage');
} else if (val.index === '2-2') {
this.$router.replace('/info/organization/draftLessonManage');
} else if (val.index === '1') {
this.$router.replace('/info/organization/classManage');
} else if (val.index === '3') {
this.$router.replace('/info/organization/examManage');
} else if (val.index === '4') {
this.$router.replace('/info/organization/ruleManage');
}
},
back() {
this.$router.go(-1);
}
}
};
</script>
<style scoped>
.back_box {height: 20px;z-index: 36;width: 40px;text-align: center;position: absolute;right: 20px;top: -20px;}
.title_content {width: 100%;margin: 20px 0 30px;text-align: center;font-size: 28px;font-weight: bold;}
.teachMenu{width: 18px;height: 18px;margin-right: 8px;}
.lessonIcon{font-size: 16px;}
.teachMenuTitle{font-size: 18px;}
.lessonManageBack{position: fixed;right: 20px;top: 70px;}
.lessonManageOther{width: calc(100% - 200px);margin-left: 200px;}
.lessonManageInfo{width: 96%;margin: 0 auto;overflow: hidden;}
.lessonManageMenu{width: 200px;float: left;}
</style>