|
|
|
@ -123,7 +123,7 @@ |
|
|
|
|
</el-tag> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="发布班级"> |
|
|
|
|
<studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="form.id" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck" @fourcheck="fourcheck"></studentSide> |
|
|
|
|
<studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="stuCompKey" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck" @fourcheck="fourcheck"></studentSide> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
@ -199,7 +199,7 @@ |
|
|
|
|
<div class="details"> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="key">考核内容:</span> |
|
|
|
|
<p class="val">{{testPaperName}}</p> |
|
|
|
|
<p class="val">{{assContent}}</p> |
|
|
|
|
</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="key">考核题数:</span> |
|
|
|
@ -272,7 +272,10 @@ export default { |
|
|
|
|
testPaperId: '', |
|
|
|
|
testPaperName: '', |
|
|
|
|
quesNum: 0, |
|
|
|
|
assPeopleNum: 0 |
|
|
|
|
assPeopleNum: 0, |
|
|
|
|
assContent: '', |
|
|
|
|
timer: null, |
|
|
|
|
stuCompKey: 1 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
components: { |
|
|
|
@ -291,6 +294,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getData() |
|
|
|
|
this.addInterval() |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
keyword: function(val) { |
|
|
|
@ -335,7 +339,15 @@ export default { |
|
|
|
|
this.listData = res.data.Assessment |
|
|
|
|
this.total = res.data.total |
|
|
|
|
}) |
|
|
|
|
.catch(err => {}) |
|
|
|
|
.catch(err => { |
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
addInterval(){ |
|
|
|
|
this.timer = setInterval(this.getData,1000) |
|
|
|
|
this.$once('hook:beforeDestroy',() => { |
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleCheck(data){ |
|
|
|
|
let professionalStudentIds = [] |
|
|
|
@ -380,11 +392,13 @@ export default { |
|
|
|
|
val.ischeck = !val.ischeck |
|
|
|
|
val.children.map( e => e.ischeck = val.ischeck) |
|
|
|
|
val.children.map( e => e.children.map(n => n.ischeck = e.ischeck)) |
|
|
|
|
val.children.map( e => e.children.map(n => n.children.map(j => j.ischeck = e.ischeck))) |
|
|
|
|
this.handleCheck(val2) |
|
|
|
|
}, |
|
|
|
|
twocheck(val,val2){ |
|
|
|
|
val.ischeck = !val.ischeck |
|
|
|
|
val.children.map( e => e.ischeck = val.ischeck) |
|
|
|
|
val.children.map( e => e.children.map(n => n.ischeck = e.ischeck)) |
|
|
|
|
val2.forEach( e => { |
|
|
|
|
e.children.forEach( r => { |
|
|
|
|
if(r.gradeId == val.gradeId){ |
|
|
|
@ -469,6 +483,7 @@ export default { |
|
|
|
|
edit(row){ |
|
|
|
|
this.$get(`${this.api.queryAssessmentNumber}?id=${row.id}`).then(res => { |
|
|
|
|
this.form = row |
|
|
|
|
this.originalName = row.assessmentName |
|
|
|
|
this.form.studentId = res.data.studentId |
|
|
|
|
this.testPaperName = row.name |
|
|
|
|
this.time = [this.form.startTime,this.form.endTime] |
|
|
|
@ -479,7 +494,7 @@ export default { |
|
|
|
|
nameChange(){ |
|
|
|
|
if(this.form.assessmentName !== this.originalName){ |
|
|
|
|
this.$get(`${this.api.queryAssessmentName}?userId=${this.userId}&assessmentName=${this.form.assessmentName}`).then(res => { |
|
|
|
|
if(res.data.userInfo){ |
|
|
|
|
if(res.data.Assessment){ |
|
|
|
|
this.nameRepeat = true |
|
|
|
|
this.$message.warning('该考核名称已存在') |
|
|
|
|
}else{ |
|
|
|
@ -492,7 +507,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
monitor(row){ |
|
|
|
|
this.setAssInfo({ |
|
|
|
|
id: row.id |
|
|
|
|
id: row.id, |
|
|
|
|
endTime: row.endTime |
|
|
|
|
}) |
|
|
|
|
this.$router.push('monitor') |
|
|
|
|
}, |
|
|
|
@ -523,9 +539,12 @@ export default { |
|
|
|
|
if(this.nameRepeat) return this.$message.warning('该考核名称已存在') |
|
|
|
|
if(form.type === '') return this.$message.warning('请选择考核类型') |
|
|
|
|
if(form.startTime === '') return this.$message.warning('请选择考核时间') |
|
|
|
|
if(new Date(this.form.startTime).getTime() < new Date().getTime()) return this.$message.warning('考试开始时间不能小于当前时间') |
|
|
|
|
if((new Date(this.form.endTime).getTime() - new Date(this.form.startTime).getTime()) / 1000 <= 60) return this.$message.warning('考核开始时间和结束时间间隔不得小于1分钟') |
|
|
|
|
if(form.testPaperId === '') return this.$message.warning('请选择试卷') |
|
|
|
|
if(form.classId === '') return this.$message.warning('请选择发布班级') |
|
|
|
|
if(!form.studentId.length) return this.$message.warning('请选择学生') |
|
|
|
|
if(new Date(this.form.startTime).getTime() < new Date().getTime()) form.state = 2 |
|
|
|
|
|
|
|
|
|
let data = { |
|
|
|
|
id: form.id, |
|
|
|
@ -566,6 +585,12 @@ export default { |
|
|
|
|
testPaperId: '', |
|
|
|
|
type: '' |
|
|
|
|
} |
|
|
|
|
this.time = [] |
|
|
|
|
this.testPaperName = '' |
|
|
|
|
this.testPaperId = '' |
|
|
|
|
this.cid = '' |
|
|
|
|
this.keywordPaper = '' |
|
|
|
|
this.stuCompKey++ |
|
|
|
|
}, |
|
|
|
|
openSelect(){ |
|
|
|
|
this.selectVisible = true |
|
|
|
@ -606,13 +631,13 @@ export default { |
|
|
|
|
this.selectVisible = false |
|
|
|
|
}, |
|
|
|
|
closeSelect(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
show(row){ |
|
|
|
|
this.$get(`${this.api.queryAssessmentDetails}?id=${row.id}`) |
|
|
|
|
.then(res => { |
|
|
|
|
let data = res.data.data |
|
|
|
|
this.testPaperName = data.name |
|
|
|
|
this.assContent = data.name |
|
|
|
|
this.quesNum = data.questionNumber.split(',').length |
|
|
|
|
this.assPeopleNum = data.number |
|
|
|
|
}) |
|
|
|
|