forked from liweijie/education
J教学日志管理
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
<div class="page-container">
|
||||
<el-card shadow="never" class="tab-card">
|
||||
<el-tabs v-model="activeTab" class="organ-tabs">
|
||||
<el-tab-pane label="教学日志管理查询" name="query">
|
||||
<!-- 教学日志管理查询页:仅管理员/教研室等非教员、非机关人员可见 -->
|
||||
<el-tab-pane v-if="hasQueryAccess" label="教学日志管理查询" name="query">
|
||||
<log-view v-if="activeTab === 'query'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已上报机关教学日志" name="reported">
|
||||
<reported-view v-if="activeTab === 'reported'" />
|
||||
<reported-view v-if="activeTab === 'reported'" :is-teacher="isTeacher" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="机关已审核教学日志" name="audited">
|
||||
<audited-view v-if="activeTab === 'audited'" />
|
||||
@@ -28,6 +29,29 @@ export default {
|
||||
return {
|
||||
activeTab: 'query'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
roles() {
|
||||
return this.$store.getters.roles || []
|
||||
},
|
||||
/** 教员角色 */
|
||||
isTeacher() {
|
||||
return this.roles.includes('TEACHER')
|
||||
},
|
||||
/** 机关人员角色 */
|
||||
isDepartmentPersonnel() {
|
||||
return this.roles.includes('DEPARTMENT_PERSONNEL')
|
||||
},
|
||||
/** 教学日志管理查询页仅非教员、非机关人员可见 */
|
||||
hasQueryAccess() {
|
||||
return !this.isTeacher && !this.isDepartmentPersonnel
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 教员/机关人员无法查看教学日志管理查询页,默认落在已上报页
|
||||
if (!this.hasQueryAccess) {
|
||||
this.activeTab = 'reported'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user