试卷创建调整
This commit is contained in:
parent
e4cf9de494
commit
affd81e756
@ -16,7 +16,7 @@
|
||||
<div class="btn-buy">
|
||||
<!-- <el-button v-if="!isLocal" type="success" :disabled="disabled" @click="buy">{{ $t('global.buy') }}</el-button> -->
|
||||
<el-button v-if="hasPermssion && !isComprehensive && !isLocal" type="primary" :disabled="disabled" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
|
||||
<el-button v-show="isStartDemon" :disabled="disabled" type="primary" @click="start">{{ $t('demonstration.startSimulation') }}</el-button>
|
||||
<el-button :disabled="disabled" type="primary" @click="start">{{ $t('demonstration.startSimulation') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -78,9 +78,6 @@ export default {
|
||||
isComprehensive() {
|
||||
return this.courseModel.prdType === '03';
|
||||
},
|
||||
isStartDemon() {
|
||||
return (this.hasPermssion || this.tryTime > 0);
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
|
@ -257,7 +257,7 @@ export default {
|
||||
const reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
|
||||
const studentIdJudge = !!studentId && !reg.test(studentId);
|
||||
if (studentIdJudge && name) {
|
||||
students.push({account:dataList[1][i], name: dataList[2][i]});
|
||||
students.push({account:dataList[0][i], name: dataList[1][i]});
|
||||
} else {
|
||||
if (!studentId && !name) {
|
||||
break;
|
||||
|
@ -35,7 +35,7 @@ import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||
import RuleFrom from './rule';
|
||||
import ExamFrom from './examFrom';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getExamLessonDetail, setCourseList, setCourseListGzb } from '@/api/management/exam';
|
||||
import { getExamLessonDetail, setCourseList } from '@/api/management/exam';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
@ -71,9 +71,6 @@ export default {
|
||||
},
|
||||
isFastCreate() {
|
||||
return this.display == 1 && this.$route.params.mode != 'edit' && Number(this.$route.params.ruleId);
|
||||
},
|
||||
isGzbShow() {
|
||||
return getSessionStorage('project').startsWith('gzb');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -103,6 +100,7 @@ export default {
|
||||
});
|
||||
},
|
||||
async definition(data) {
|
||||
console.log(data, '====');
|
||||
this.course = data;
|
||||
this.formData = {};
|
||||
this.display = 2;
|
||||
@ -140,11 +138,7 @@ export default {
|
||||
};
|
||||
let res = {};
|
||||
try {
|
||||
if (this.isGzbShow) {
|
||||
res = await setCourseListGzb(result);
|
||||
} else {
|
||||
res = await setCourseList(result);
|
||||
}
|
||||
res = await setCourseList(result);
|
||||
this.$message.success({ message: res.message });
|
||||
this.$store.dispatch('exam/setRuleList', []); // 清空规则列表数据
|
||||
const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`;
|
||||
|
@ -25,7 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getExamLessonDetail, setCourseList, setCourseListGzb } from '@/api/management/exam';
|
||||
import { getExamLessonDetail, setCourseList } from '@/api/management/exam';
|
||||
import { UrlConfig, getTrainingOperateTypeMap } from '@/scripts/ConstDic';
|
||||
import editRule from './editRule';
|
||||
import LangStorage from '@/utils/lang';
|
||||
@ -72,9 +72,6 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isGzbShow() {
|
||||
return getSessionStorage('project').startsWith('gzb');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
@ -135,7 +132,7 @@ export default {
|
||||
examDefinitionRulesVOList: this.ruleList, // 规则
|
||||
fullPoint: Number(this.course.fullMark), // 满分
|
||||
lessonId: this.course.region, // 课程id
|
||||
classes: this.isGzbShow ? this.course.classes.map(ele => { return {id: ele}; }) : [],
|
||||
classes: this.course.classes.map(ele => { return {id: ele}; }),
|
||||
name: this.course.name, // 名称
|
||||
passingPoint: Number(this.course.passMark), // 及格分
|
||||
remarks: this.course.desc, // 考试说明
|
||||
@ -154,12 +151,7 @@ export default {
|
||||
},
|
||||
async save(data) {
|
||||
try {
|
||||
let res = {};
|
||||
if (this.isGzbShow) {
|
||||
res = await setCourseListGzb(data);
|
||||
} else {
|
||||
res = await setCourseList(data);
|
||||
}
|
||||
const res = await setCourseList(data);
|
||||
this.$message.success({ message: res.message });
|
||||
this.$store.dispatch('exam/setCourseDetail', this.formDetail); // 清空 form 表单数据
|
||||
this.$store.dispatch('exam/setRuleList', []); // 清空规则列表数据
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div slot="header" class="lessonHeader">
|
||||
{{ $t('global.lessonSystem') }}
|
||||
</div>
|
||||
<el-button size="mini" type="primary" style="position: absolute;right: 10px;top: 10px;" @click="draftLessonManage">草稿课程管理</el-button>
|
||||
<el-button v-if="isCompanyAdmin || isAdmin" size="mini" type="primary" style="position: absolute;right: 10px;top: 10px;" @click="draftLessonManage">草稿课程管理</el-button>
|
||||
</el-card>
|
||||
<el-card v-loading="loading">
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
@ -18,9 +18,9 @@
|
||||
<el-table-column :label="this.$t('global.operate')">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">{{ $t('teach.enterTheCourse') }}</el-button>
|
||||
<el-button v-if="((isLessonCreator && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button v-if="((isLessonCreator && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="warning" @click="handleSoldOut(scope.row)">下架</el-button>
|
||||
<el-button v-if="((isLessonCreator && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="danger" @click="handleDelete(scope.row)">删除课程</el-button>
|
||||
<el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="warning" @click="handleSoldOut(scope.row)">下架</el-button>
|
||||
<el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="danger" @click="handleDelete(scope.row)">删除课程</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -61,8 +61,8 @@ export default {
|
||||
userId() {
|
||||
return this.$store.state.user.id;
|
||||
},
|
||||
isLessonCreator() {
|
||||
return this.$store.state.user.roles.includes(lessonCreater);
|
||||
isCompanyAdmin() {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user