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