考试权限调整
This commit is contained in:
parent
378d5430e6
commit
73f98ce8b4
@ -46,7 +46,7 @@
|
||||
<div class="btn-buy">
|
||||
<!-- <el-button v-if="!isLocal" :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button> -->
|
||||
<el-button v-if="hasPermssion && !isLocal" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||
<el-button v-if="hasPermssion && !$route.query.noPreLogout && !courseModel.systemFault" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button v-if=" (isAdmin || isShowPaper)&& !$route.query.noPreLogout && !courseModel.systemFault" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
|
||||
<el-button v-if="$route.query.noPreLogout" type="primary" :disabled="disabled" @click="quit">退出</el-button>
|
||||
</div>
|
||||
@ -59,6 +59,7 @@ import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
import { superAdmin, admin } from '@/router/index';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailView',
|
||||
@ -111,6 +112,12 @@ export default {
|
||||
});
|
||||
}
|
||||
return sumRemains >= 10;
|
||||
},
|
||||
isShowPaper() {
|
||||
return this.$store.state.user.companyId && this.$store.state.user.companyAdmin;
|
||||
},
|
||||
isAdmin() {
|
||||
return this.$store.state.user.roles.includes(admin) || this.$store.state.user.roles.includes(superAdmin);
|
||||
}
|
||||
// height() {
|
||||
// return this.$route.query.noPreLogout ? this.$store.state.app.height : this.$store.state.app.height - 91;
|
||||
@ -169,16 +176,12 @@ export default {
|
||||
},
|
||||
checkCourse() {
|
||||
this.loading = true;
|
||||
if (this.isAddRule) {
|
||||
const path = `${this.$route.path.match(/(\/.*)\/course/)[1]}${UrlConfig.examRuleManage}`;
|
||||
this.$router.push({
|
||||
path: path,
|
||||
query: { lessonId: this.courseModel.id },
|
||||
noPreLogout: this.$route.query.noPreLogout
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.notViewTheCoursePaper'));
|
||||
}
|
||||
const path = `${this.$route.path.match(/(\/.*)\/course/)[1]}${UrlConfig.examRuleManage}`;
|
||||
this.$router.push({
|
||||
path: path,
|
||||
query: { lessonId: this.courseModel.id },
|
||||
noPreLogout: this.$route.query.noPreLogout
|
||||
});
|
||||
},
|
||||
distribute() { // 分发
|
||||
this.disabled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user