Commit e3acf977 authored by 耿迪迪's avatar 耿迪迪
parents 53a9cd14 f5170068
...@@ -33,7 +33,7 @@ public class TTrainUserCourse extends BaseEntity ...@@ -33,7 +33,7 @@ public class TTrainUserCourse extends BaseEntity
private Integer state; private Integer state;
/** 最后一次考试时间 */ /** 最后一次考试时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后一次考试时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "最后一次考试时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date examinationTime; private Date examinationTime;
......
...@@ -40,4 +40,6 @@ public class UserCourseVo { ...@@ -40,4 +40,6 @@ public class UserCourseVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date testEndTime; private Date testEndTime;
private Integer trainState;
} }
...@@ -182,7 +182,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService ...@@ -182,7 +182,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
* @return * @return
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public Map<String,Object> examination (Long userCourseId,String[] answers){ public Map<String,Object> examination (Long userCourseId,String[] answers){
TTrainUserCourse userCourse = tTrainUserCourseMapper.selectTTrainUserCourseById(userCourseId); TTrainUserCourse userCourse = tTrainUserCourseMapper.selectTTrainUserCourseById(userCourseId);
TTrainCourseTopic topic = new TTrainCourseTopic(); TTrainCourseTopic topic = new TTrainCourseTopic();
......
...@@ -157,7 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -157,7 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</insert> </insert>
<select id="userCourseList" resultType="com.zehong.system.domain.vo.UserCourseVo"> <select id="userCourseList" resultType="com.zehong.system.domain.vo.UserCourseVo">
SELECT uc.user_course_id AS userCourseId,uc.state ,uc.examination_time AS examinationTime, SELECT uc.user_course_id AS userCourseId,uc.state ,uc.examination_time AS examinationTime,uc.train_state AS trainState,
uc.`examination_result` AS examinationResult,uc.`create_time` AS createTime,c.test_start_time as testStartTime,c.test_end_time as testEndTime, uc.`examination_result` AS examinationResult,uc.`create_time` AS createTime,c.test_start_time as testStartTime,c.test_end_time as testEndTime,
c.`course_name` AS courseName, c.`topic_num` AS topicNum,c.`release_time` AS releaseTime,c.data_kind as dataKind,c.personnel_type as personnelType, c.`course_name` AS courseName, c.`topic_num` AS topicNum,c.`release_time` AS releaseTime,c.data_kind as dataKind,c.personnel_type as personnelType,
p.`plan_name` AS courseType,c.course_id as courseId,c.qualified_num as qualifiedNum p.`plan_name` AS courseType,c.course_id as courseId,c.qualified_num as qualifiedNum
......
...@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sys.staff_name, sys.staff_name,
d.dept_name, d.dept_name,
train.examination_result, train.examination_result,
train.state train.state,train.examination_time
FROM FROM
t_train_user_course train t_train_user_course train
LEFT JOIN sys_user sys ON train.user_id = sys.user_id LEFT JOIN sys_user sys ON train.user_id = sys.user_id
......
...@@ -230,6 +230,7 @@ ...@@ -230,6 +230,7 @@
}, },
}, },
created() { created() {
console.log(this.fileArr);
// this.fileList = this.list; // this.fileList = this.list;
this.addShow = this.fileArr.length > 0 ? true : false; this.addShow = this.fileArr.length > 0 ? true : false;
}, },
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <!-- <el-form-item
class="noAttr" class="noAttr"
:label="`选项${form.questions.length + 1}`" :label="`选项${form.questions.length + 1}`"
prop="" prop=""
...@@ -99,17 +99,16 @@ ...@@ -99,17 +99,16 @@
:class="{ active: answerNum === form.questions.length }" :class="{ active: answerNum === form.questions.length }"
> >
设为正确答案 设为正确答案
</div> </div> -->
<div style="padding-left:30px">
<el-button size="mini" type="primary" @click.prevent="add(addValue)"
>新增选项</el-button
>
</div>
<el-button <!-- </div>
size="mini"
type="primary"
@click.prevent="add(addValue)"
>新增</el-button
>
</div>
</div> </div>
</el-form-item> </el-form-item> -->
</div> </div>
</el-form> </el-form>
</div> </div>
...@@ -143,7 +142,7 @@ export default { ...@@ -143,7 +142,7 @@ export default {
return { return {
form: { form: {
topicTitle: "", topicTitle: "",
questions: [{ value: "" }, { value: "" }, { value: "" }], questions: [{ value: "" }, { value: "" }],
}, },
answerNum: null, answerNum: null,
addValue: "", addValue: "",
...@@ -176,11 +175,11 @@ export default { ...@@ -176,11 +175,11 @@ export default {
getQuestion() { getQuestion() {
getQuestion({ courseId: this.courseId }).then((res) => { getQuestion({ courseId: this.courseId }).then((res) => {
// 如果是修改 就是原来的值,如果不是,就是总数+1 // 如果是修改 就是原来的值,如果不是,就是总数+1
console.log(res) console.log(res);
if (this.topicId) { if (this.topicId) {
res.rows.forEach((item, index) => { res.rows.forEach((item, index) => {
if (item.topicId == this.topicId) { if (item.topicId == this.topicId) {
this.questionNextNum = index+1; this.questionNextNum = index + 1;
} }
}); });
} else { } else {
......
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
class="add-lession" class="add-lession"
:title="title" :title="title"
:visible.sync="visible" :visible.sync="visible"
width="1000px" width="1050px"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:before-close="dialogCancel" :before-close="dialogCancel"
@closed="closeFinished" @closed="closeFinished"
destroy-on-close destroy-on-close
> >
<div v-if="visible" ref="myBody" class="body"> <div v-if="visible" ref="myBody" class="body ">
<transition name="fade" mode="out-in"> <transition name="fade" mode="out-in">
<component <component
:is="currentComponent" :is="currentComponent"
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
getLessonById(this.courseId).then((res) => { getLessonById(this.courseId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
const data = res.data; const data = res.data;
const { courseName, courseType, courseConent, video, enclosure } = const { courseName, courseType, courseConent, video, enclosure,duration,testStartTime,testEndTime } =
data; data;
this.form = { this.form = {
courseName, courseName,
...@@ -212,6 +212,9 @@ export default { ...@@ -212,6 +212,9 @@ export default {
courseConent, courseConent,
video, video,
enclosure, enclosure,
duration,
testStartTime,
testEndTime
}; };
this.fileListVideo = [ this.fileListVideo = [
{ {
...@@ -225,6 +228,7 @@ export default { ...@@ -225,6 +228,7 @@ export default {
url: uploadfile, url: uploadfile,
}, },
]; ];
console.log("--",this.fileListFile);
} }
}); });
}, },
...@@ -303,7 +307,7 @@ export default { ...@@ -303,7 +307,7 @@ export default {
.form-wrapper { .form-wrapper {
padding-top: 22px; padding-top: 22px;
width: 100%; width: 100%;
height: 550px; height: 650px;
overflow: hidden; overflow: hidden;
// padding-bottom: 10px; // padding-bottom: 10px;
margin-bottom: 20px; margin-bottom: 20px;
......
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
v-if="answerOpen" v-if="answerOpen"
:courseId="courseId" :courseId="courseId"
:userCourseId="userCourseId" :userCourseId="userCourseId"
:courseName="lessonData.courseName"
:visible.sync="answerOpen" :visible.sync="answerOpen"
@jj="jj" @jj="jj"
/> />
...@@ -219,6 +220,7 @@ export default { ...@@ -219,6 +220,7 @@ export default {
} }
}, },
updateUserCourse(){ updateUserCourse(){
this.userlessonData.state = null;
changeUserLesson(this.userlessonData).then(response => { changeUserLesson(this.userlessonData).then(response => {
if(this.userlessonData.finishDuration == this.lessonData.duration){ if(this.userlessonData.finishDuration == this.lessonData.duration){
this.finish = true; this.finish = true;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
> >
<div ref="myBody" class="body" v-loading="loading"> <div ref="myBody" class="body" v-loading="loading">
<div class="text"> <div class="text">
<div class="float">炼铁车间炉前工安全生产规范课程</div> <div class="float">{{courseName}}</div>
</div> </div>
<transition name="fade" mode="out-in"> <transition name="fade" mode="out-in">
<div :key="goodJobShow"> <div :key="goodJobShow">
...@@ -92,6 +92,9 @@ export default { ...@@ -92,6 +92,9 @@ export default {
userCourseId: { userCourseId: {
type: [Number, String], type: [Number, String],
}, },
courseName:{
type: [String,String]
},
courseId: { courseId: {
type: [Number, String], type: [Number, String],
}, },
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
v-if="answerOpen" v-if="answerOpen"
:courseId="itemData.courseId" :courseId="itemData.courseId"
:userCourseId="itemData.userCourseId" :userCourseId="itemData.userCourseId"
:courseName = "itemData.courseName"
:visible.sync="answerOpen" :visible.sync="answerOpen"
@jj="jj" @jj="jj"
/> />
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
v-if="answerOpen" v-if="answerOpen"
:courseId="courseId" :courseId="courseId"
:userCourseId="userCourseId" :userCourseId="userCourseId"
:courseName = "courseName"
:visible.sync="answerOpen" :visible.sync="answerOpen"
/> />
</div> </div>
...@@ -41,6 +42,7 @@ export default { ...@@ -41,6 +42,7 @@ export default {
answerOpen: false, answerOpen: false,
courseId: "", courseId: "",
userCourseId: "", userCourseId: "",
courseName:"",
list: [], list: [],
}; };
}, },
...@@ -57,6 +59,7 @@ export default { ...@@ -57,6 +59,7 @@ export default {
examination(e) { examination(e) {
this.courseId = e.courseId; this.courseId = e.courseId;
this.userCourseId = e.userCourseId; this.userCourseId = e.userCourseId;
this.courseName = e.courseName;
// this.answerOpen=true; // this.answerOpen=true;
}, },
}, },
......
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<el-table-column label="序号" width='100' align="center" prop="detailNum"/> <el-table-column label="序号" width='100' align="center" prop="detailNum"/>
<el-table-column label="考试人员" align="center" prop="staffName"/> <el-table-column label="考试人员" align="center" prop="staffName"/>
<el-table-column label="所属部门" align="center" prop="deptName"/> <el-table-column label="所属部门" align="center" prop="deptName"/>
<el-table-column label="考试时间" align="center" prop="examinationTime"/>
<el-table-column label="答对个数" align="center" prop="examinationResult"/> <el-table-column label="答对个数" align="center" prop="examinationResult"/>
<el-table-column label="考试结果" align="center" prop="state"> <el-table-column label="考试结果" align="center" prop="state">
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <!-- <el-form-item
class="noAttr" class="noAttr"
:label="`选项${form.questions.length + 1}`" :label="`选项${form.questions.length + 1}`"
prop="" prop=""
...@@ -99,17 +99,16 @@ ...@@ -99,17 +99,16 @@
:class="{ active: answerNum === form.questions.length }" :class="{ active: answerNum === form.questions.length }"
> >
设为正确答案 设为正确答案
</div> </div> -->
<div style="padding-left:30px">
<el-button size="mini" type="primary" @click.prevent="add(addValue)"
>新增选项</el-button
>
</div>
<el-button <!-- </div>
size="mini"
type="primary"
@click.prevent="add(addValue)"
>新增</el-button
>
</div>
</div> </div>
</el-form-item> </el-form-item> -->
</div> </div>
</el-form> </el-form>
</div> </div>
...@@ -143,7 +142,7 @@ export default { ...@@ -143,7 +142,7 @@ export default {
return { return {
form: { form: {
topicTitle: "", topicTitle: "",
questions: [{ value: "" }, { value: "" }, { value: "" }], questions: [{ value: "" }, { value: "" }],
}, },
answerNum: null, answerNum: null,
addValue: "", addValue: "",
......
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