Commit 96f23a75 authored by 纪泽龙's avatar 纪泽龙

优化考试试卷管理与培训管理的发布格式,简化发布流程。更改发布限制。

parent 54904620
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
> >
</div> </div>
<div class="detail-item"> <div class="detail-item">
判断<span>{{ bottomFrom.judgmentScore }}</span 判断<span>{{ bottomFrom.judgmentScore }}</span
>/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{ >/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{
pds * bottomFrom.judgmentScore pds * bottomFrom.judgmentScore
}}</span }}</span
......
...@@ -145,7 +145,9 @@ ...@@ -145,7 +145,9 @@
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template v-slot="{ row: { status, courseId } }"> <template
v-slot="{ row: { courseName, courseType, status, courseId } }"
>
<!-- <div>{{status}}</div> --> <!-- <div>{{status}}</div> -->
<el-button <el-button
v-if="status == 0" v-if="status == 0"
...@@ -175,7 +177,7 @@ ...@@ -175,7 +177,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="issueDilog(courseId)" @click="issueDilog(courseId, courseName, courseType)"
>发布</el-button >发布</el-button
> >
</template> </template>
...@@ -196,7 +198,18 @@ ...@@ -196,7 +198,18 @@
:checkLock.sync="checkLock" :checkLock.sync="checkLock"
:visible.sync="dilogFlag" :visible.sync="dilogFlag"
/> />
<el-dialog title="发布详情" :visible.sync="issueVisible" width="60%"> <el-dialog
class="lessons-program"
title="发布详情"
:visible.sync="issueVisible"
width="60%"
>
<span class="dialogName"
>培训名称: <span class="a">{{ dilogName }}</span>
</span>
<span class="dialogName"
>培训计划: <span class="a">{{ dilogType }}</span></span
>
<div class="detail flex"> <div class="detail flex">
<div class="detail-item"> <div class="detail-item">
单选题<span>{{ bottomFrom.singleChoiceScore }}</span 单选题<span>{{ bottomFrom.singleChoiceScore }}</span
...@@ -213,20 +226,19 @@ ...@@ -213,20 +226,19 @@
}}</span }}</span
> >
</div> </div>
<div class="detail-item"> <div class="detail-item">
判断<span>{{ bottomFrom.judgmentScore }}</span 判断<span>{{ bottomFrom.judgmentScore }}</span
>/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{ >/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{
pds * bottomFrom.judgmentScore pds * bottomFrom.judgmentScore
}}</span }}</span
> >
</div> </div>
<div class="detail-item">
合格分数为<span class="textC">{{ bottomFrom.qualifiedNum }}</span
>
</div> </div>
<div class="detail">
<div class="detail-item"> <div class="detail-item">
<span>{{ danxs + duoxs + pds }}</span <span>{{ danxs + duoxs + pds }}</span
>道题,总共计<span class="textC">{{ >道题,总共计<span class="textC">{{
danxs * bottomFrom.singleChoiceScore + danxs * bottomFrom.singleChoiceScore +
duoxs * bottomFrom.multipleChoiceScore + duoxs * bottomFrom.multipleChoiceScore +
...@@ -235,6 +247,12 @@ ...@@ -235,6 +247,12 @@
> >
</div> </div>
</div> </div>
<div class="detail">
<div class="detail-item">
合格分数为<span class="textC">{{ bottomFrom.qualifiedNum }}</span
>
</div>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="issueVisible = false"> </el-button> <el-button @click="issueVisible = false"> </el-button>
...@@ -289,6 +307,8 @@ export default { ...@@ -289,6 +307,8 @@ export default {
dilogFlag: false, dilogFlag: false,
// 发布弹框 // 发布弹框
issueVisible: false, issueVisible: false,
dilogName: "",
dilogType: null,
bottomFrom: { bottomFrom: {
singleChoiceScore: 0, singleChoiceScore: 0,
multipleChoiceScore: 0, multipleChoiceScore: 0,
...@@ -426,8 +446,8 @@ export default { ...@@ -426,8 +446,8 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
// 发布弹框 // 发布弹框
issueDilog(courseId) { issueDilog(courseId, name, type) {
getQuestion({courseId}) getQuestion({ courseId })
.then((res) => { .then((res) => {
this.questionList = res.rows.map((item) => { this.questionList = res.rows.map((item) => {
return { return {
...@@ -449,6 +469,12 @@ export default { ...@@ -449,6 +469,12 @@ export default {
}; };
}) })
.then((res) => { .then((res) => {
this.dilogName = name;
this.dilogType =
type &&
this.courseOptions.filter((item) => item.planId == type)[0] &&
this.courseOptions.filter((item) => item.planId == type)[0]
.planName;
this.issueVisible = true; this.issueVisible = true;
this.issueCourseId = courseId; this.issueCourseId = courseId;
}); });
...@@ -457,15 +483,16 @@ export default { ...@@ -457,15 +483,16 @@ export default {
}, },
// 发布 // 发布
issueLesson(courseId) { issueLesson(courseId) {
this.$confirm("确定要发布吗", { // this.$confirm("确定要发布吗", {
confirmButtonText: "确定", // confirmButtonText: "确定",
cancelButtonText: "取消", // cancelButtonText: "取消",
type: "warning", // type: "warning",
}) // })
.then(() => { // .then(() => {
// 判断是否录入答题合格数 // // 判断是否录入答题合格数
return getLessonById(courseId); // return getLessonById(courseId);
}) // })
getLessonById(courseId)
.then((res) => { .then((res) => {
// if ( // if (
// res.data.singleChoiceScore >= 0 && // res.data.singleChoiceScore >= 0 &&
...@@ -594,10 +621,19 @@ export default { ...@@ -594,10 +621,19 @@ export default {
::v-deep .el-dialog { ::v-deep .el-dialog {
margin-top: 10vh !important; margin-top: 10vh !important;
} }
::v-deep .el-dialog .el-dialog__body {
padding-top: 5px;
}
.dialogName {
margin-right: 50px;
color: #000;
font-size: 16px;
}
.detail { .detail {
// position: absolute; // position: absolute;
// bottom: -20px; // bottom: -20px;
// left: 10px; // left: 10px;
margin-top: 20px;
.textC { .textC {
font-weight: 800; font-weight: 800;
font-size: 18px; font-size: 18px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com * @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-20 20:14:18 * @Date: 2022-09-20 20:14:18
* @LastEditors: 纪泽龙 jizelong@qq.com * @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-01-05 09:38:13 * @LastEditTime: 2023-02-03 15:59:38
* @FilePath: /danger-manage-web/src/views/myLessons/CheckLesson.vue * @FilePath: /danger-manage-web/src/views/myLessons/CheckLesson.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -92,7 +92,8 @@ ...@@ -92,7 +92,8 @@
</div> </div>
<div class="btn-wrapper flex"> <div class="btn-wrapper flex">
<el-button v-if="this.finish" @click="againQuesstion" type="primary">{{ <!-- topicNum>0代表有考试题,没考试题不需要考试 -->
<el-button v-if="this.finish &&lessonData.topicNum>0 " @click="againQuesstion" type="primary">{{
state == 2 || state == 1 ? "重新考试" : "开始考试" state == 2 || state == 1 ? "重新考试" : "开始考试"
}}</el-button> }}</el-button>
<el-button @click="$router.back()" type="primary" plain>取消</el-button> <el-button @click="$router.back()" type="primary" plain>取消</el-button>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
> >
</div> </div>
<div class="detail-item"> <div class="detail-item">
判断<span>{{ bottomFrom.judgmentScore }}</span 判断<span>{{ bottomFrom.judgmentScore }}</span
>/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{ >/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{
pds * bottomFrom.judgmentScore pds * bottomFrom.judgmentScore
}}</span }}</span
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<el-table v-loading="loading" :data="lessonsList"> <el-table v-loading="loading" :data="lessonsList">
<el-table-column label="序号" align="center" prop="bankNum" width="55" /> <el-table-column label="序号" align="center" prop="bankNum" width="55" />
<el-table-column label="课程标题" align="center" prop="courseName" /> <el-table-column label="考试名称" align="center" prop="courseName" />
<el-table-column <el-table-column
label="开始时间" label="开始时间"
align="center" align="center"
...@@ -102,7 +102,11 @@ ...@@ -102,7 +102,11 @@
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template v-slot="{ row: { status, courseId, qualifiedNum } }"> <template
v-slot="{
row: { courseName, topicNum, status, courseId, qualifiedNum },
}"
>
<!-- <div>{{status}}</div> --> <!-- <div>{{status}}</div> -->
<!-- <el-button <!-- <el-button
v-if="status == 0" v-if="status == 0"
...@@ -140,7 +144,7 @@ ...@@ -140,7 +144,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="issueDilog(courseId)" @click="issueDilog(courseId, courseName, topicNum)"
>发布</el-button >发布</el-button
> >
</template> </template>
...@@ -161,7 +165,18 @@ ...@@ -161,7 +165,18 @@
:checkLock.sync="checkLock" :checkLock.sync="checkLock"
:visible.sync="dilogFlag" :visible.sync="dilogFlag"
/> />
<el-dialog title="发布详情" :visible.sync="issueVisible" width="60%"> <el-dialog
class="lessons-program"
title="发布详情"
:visible.sync="issueVisible"
width="60%"
>
<span class="dialogName"
>考试名称: <span class="a">{{ dilogName }}</span>
</span>
<!-- <span class="dialogName"
>培训计划: <span class="a">{{ dilogType }}</span></span
> -->
<div class="detail flex"> <div class="detail flex">
<div class="detail-item"> <div class="detail-item">
单选题<span>{{ bottomFrom.singleChoiceScore }}</span 单选题<span>{{ bottomFrom.singleChoiceScore }}</span
...@@ -178,20 +193,19 @@ ...@@ -178,20 +193,19 @@
}}</span }}</span
> >
</div> </div>
<div class="detail-item"> <div class="detail-item">
判断<span>{{ bottomFrom.judgmentScore }}</span 判断<span>{{ bottomFrom.judgmentScore }}</span
>/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{ >/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{
pds * bottomFrom.judgmentScore pds * bottomFrom.judgmentScore
}}</span }}</span
> >
</div> </div>
<div class="detail-item">
合格分数为<span class="textC">{{ bottomFrom.qualifiedNum }}</span
>
</div> </div>
<div class="detail">
<div class="detail-item"> <div class="detail-item">
<span>{{ danxs + duoxs + pds }}</span <span>{{ danxs + duoxs + pds }}</span
>道题,总共计<span class="textC">{{ >道题,总共计<span class="textC">{{
danxs * bottomFrom.singleChoiceScore + danxs * bottomFrom.singleChoiceScore +
duoxs * bottomFrom.multipleChoiceScore + duoxs * bottomFrom.multipleChoiceScore +
...@@ -200,6 +214,12 @@ ...@@ -200,6 +214,12 @@
> >
</div> </div>
</div> </div>
<div class="detail">
<div class="detail-item">
合格分数为<span class="textC">{{ bottomFrom.qualifiedNum }}</span
>
</div>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="issueVisible = false"> </el-button> <el-button @click="issueVisible = false"> </el-button>
...@@ -255,6 +275,9 @@ export default { ...@@ -255,6 +275,9 @@ export default {
dilogFlag: false, dilogFlag: false,
// 发布 // 发布
issueVisible: false, issueVisible: false,
dilogName: "",
dilogTopicNum: 0,
// dilogType: null,
bottomFrom: { bottomFrom: {
singleChoiceScore: 0, singleChoiceScore: 0,
multipleChoiceScore: 0, multipleChoiceScore: 0,
...@@ -404,12 +427,18 @@ export default { ...@@ -404,12 +427,18 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
// 发布 // 发布
issueDilog(courseId) { issueDilog(courseId, name, num) {
getQuestion({courseId}) if (num === 0) {
this.$message({
message: "请至少录入一道考题在发布",
type: "warning",
});
return;
}
getQuestion({ courseId })
.then((res) => { .then((res) => {
console.log(res) console.log(res);
this.questionList = res.rows.map((item) => { this.questionList = res.rows.map((item) => {
return { return {
topicType: item.topicType, topicType: item.topicType,
topicId: item.topicId, topicId: item.topicId,
...@@ -422,13 +451,15 @@ export default { ...@@ -422,13 +451,15 @@ export default {
}) })
.then((res) => { .then((res) => {
this.bottomFrom = { this.bottomFrom = {
singleChoiceScore: res.data.singleChoiceScore ||0, singleChoiceScore: res.data.singleChoiceScore || 0,
multipleChoiceScore: res.data.multipleChoiceScore||0, multipleChoiceScore: res.data.multipleChoiceScore || 0,
judgmentScore: res.data.judgmentScore||0, judgmentScore: res.data.judgmentScore || 0,
qualifiedNum: res.data.qualifiedNum||0, qualifiedNum: res.data.qualifiedNum || 0,
}; };
}) })
.then((res) => { .then((res) => {
// 名称
this.dilogName = name;
this.issueVisible = true; this.issueVisible = true;
this.issueCourseId = courseId; this.issueCourseId = courseId;
}); });
...@@ -436,15 +467,17 @@ export default { ...@@ -436,15 +467,17 @@ export default {
// //
}, },
issueLesson(courseId) { issueLesson(courseId) {
this.$confirm("确定要发布吗", { // this.$confirm("确定要发布吗", {
confirmButtonText: "确定", // confirmButtonText: "确定",
cancelButtonText: "取消", // cancelButtonText: "取消",
type: "warning", // type: "warning",
}) // })
.then(() => { // .then(() => {
// 判断是否录入答题合格数 // // 判断是否录入答题合格数
return getLessonById(courseId); // return getLessonById(courseId);
}) // })
getLessonById(courseId)
.then((res) => { .then((res) => {
// if ( // if (
// res.data.singleChoiceScore > 0 && // res.data.singleChoiceScore > 0 &&
...@@ -502,10 +535,19 @@ export default { ...@@ -502,10 +535,19 @@ export default {
::v-deep .el-dialog { ::v-deep .el-dialog {
margin-top: 10vh !important; margin-top: 10vh !important;
} }
::v-deep .el-dialog .el-dialog__body {
padding-top: 5px;
}
.dialogName {
margin-right: 50px;
color: #000;
font-size: 16px;
}
.detail { .detail {
// position: absolute; // position: absolute;
// bottom: -20px; // bottom: -20px;
// left: 10px; // left: 10px;
margin-top: 20px;
.textC { .textC {
font-weight: 800; font-weight: 800;
font-size: 18px; font-size: 18px;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
> >
</div> </div>
<div class="detail-item"> <div class="detail-item">
判断<span>{{ bottomFrom.judgmentScore }}</span 判断<span>{{ bottomFrom.judgmentScore }}</span
>/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{ >/题,共<span>{{ pds }}</span> 题,计<span class="textC">{{
pds * bottomFrom.judgmentScore pds * bottomFrom.judgmentScore
}}</span }}</span
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment