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