|
|
@ -139,7 +139,7 @@ |
|
|
|
</el-tag> |
|
|
|
</el-tag> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="发布班级"> |
|
|
|
<el-form-item label="发布班级"> |
|
|
|
<studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="stuCompKey" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck"></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-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
@ -297,7 +297,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
// this.addInterval() |
|
|
|
this.addInterval() |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
keyword: function(val) { |
|
|
|
keyword: function(val) { |
|
|
@ -377,10 +377,18 @@ export default { |
|
|
|
r.children.forEach( n => { |
|
|
|
r.children.forEach( n => { |
|
|
|
if(n.ischeck){ |
|
|
|
if(n.ischeck){ |
|
|
|
classIds.push(n.classId) |
|
|
|
classIds.push(n.classId) |
|
|
|
studentId = studentId.concat(n.userIds) |
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
util.removeByValue(classIds, n.classId); |
|
|
|
util.removeByValue(classIds, n.classId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
n.children.forEach( j => { |
|
|
|
|
|
|
|
if(j.ischeck){ |
|
|
|
|
|
|
|
studentId.push(j.userId) |
|
|
|
|
|
|
|
classIds.indexOf(n.classId) == -1 && classIds.push(n.classId) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
util.removeByValue(studentId, j.userId); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -392,6 +400,7 @@ export default { |
|
|
|
if(val.children){ |
|
|
|
if(val.children){ |
|
|
|
val.children.map( e => e.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.ischeck = e.ischeck)) |
|
|
|
|
|
|
|
val.children.map( e => e.children.map(n => n.children.map(j => j.ischeck = e.ischeck))) |
|
|
|
this.handleCheck(val2) |
|
|
|
this.handleCheck(val2) |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.form.classId = val.classId |
|
|
|
this.form.classId = val.classId |
|
|
@ -401,10 +410,11 @@ export default { |
|
|
|
twocheck(val,val2){ |
|
|
|
twocheck(val,val2){ |
|
|
|
val.ischeck = !val.ischeck |
|
|
|
val.ischeck = !val.ischeck |
|
|
|
val.children.map( e => e.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 => { |
|
|
|
val2.forEach( e => { |
|
|
|
e.children.forEach( r => { |
|
|
|
e.children.forEach( r => { |
|
|
|
if(r.gradeId == val.gradeId){ |
|
|
|
if(r.gradeId == val.gradeId){ |
|
|
|
if(e.children.every(i => i.ischeck)){ |
|
|
|
if(e.children.length && e.children.every(i => i.ischeck)){ |
|
|
|
e.ischeck = true |
|
|
|
e.ischeck = true |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
e.ischeck = false |
|
|
|
e.ischeck = false |
|
|
@ -416,6 +426,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
threecheck(val,val2){ |
|
|
|
threecheck(val,val2){ |
|
|
|
val.ischeck = !val.ischeck |
|
|
|
val.ischeck = !val.ischeck |
|
|
|
|
|
|
|
val.children.map( e => e.ischeck = val.ischeck) |
|
|
|
val2.forEach( e => { |
|
|
|
val2.forEach( e => { |
|
|
|
e.children.forEach( r => { |
|
|
|
e.children.forEach( r => { |
|
|
|
r.children.forEach( n => { |
|
|
|
r.children.forEach( n => { |
|
|
@ -427,7 +438,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(e.children.every(i => i.ischeck)){ |
|
|
|
if(e.children.length && e.children.every(i => i.ischeck)){ |
|
|
|
e.ischeck = true |
|
|
|
e.ischeck = true |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
e.ischeck = false |
|
|
|
e.ischeck = false |
|
|
@ -436,6 +447,35 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.handleCheck(val2) |
|
|
|
this.handleCheck(val2) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
fourcheck(val,val2){ |
|
|
|
|
|
|
|
val.ischeck = !val.ischeck |
|
|
|
|
|
|
|
val2.forEach( e => { |
|
|
|
|
|
|
|
e.children.forEach( r => { |
|
|
|
|
|
|
|
r.children.forEach( n => { |
|
|
|
|
|
|
|
n.children.forEach( j => { |
|
|
|
|
|
|
|
if(j.studentId == val.studentId){ |
|
|
|
|
|
|
|
if(n.children.every(i => i.ischeck)){ |
|
|
|
|
|
|
|
n.ischeck = true |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
n.ischeck = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if(r.children.length && r.children.every(i => i.ischeck)){ |
|
|
|
|
|
|
|
r.ischeck = true |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
r.ischeck = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if(e.children.length && e.children.every(i => i.ischeck)){ |
|
|
|
|
|
|
|
e.ischeck = true |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
e.ischeck = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.handleCheck(val2) |
|
|
|
|
|
|
|
}, |
|
|
|
handleCurrentChange(val) { |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.page = val; |
|
|
|
this.page = val; |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
@ -516,7 +556,6 @@ export default { |
|
|
|
this.time = [now,second] |
|
|
|
this.time = [now,second] |
|
|
|
this.form.startTime = now |
|
|
|
this.form.startTime = now |
|
|
|
this.form.endTime = second |
|
|
|
this.form.endTime = second |
|
|
|
console.log(11,this.form) |
|
|
|
|
|
|
|
this.addVisible = true |
|
|
|
this.addVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
save(){ |
|
|
|
save(){ |
|
|
@ -529,7 +568,7 @@ export default { |
|
|
|
if((new Date(this.form.endTime).getTime() - new Date(this.form.startTime).getTime()) / 1000 <= 60) return this.$message.warning('考核开始时间和结束时间间隔不得小于1分钟') |
|
|
|
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.testPaperId === '') return this.$message.warning('请选择试卷') |
|
|
|
if(form.classId === '') return this.$message.warning('请选择发布班级') |
|
|
|
if(form.classId === '') return this.$message.warning('请选择发布班级') |
|
|
|
// if(!form.studentId.length) 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 |
|
|
|
if(new Date(this.form.startTime).getTime() < new Date().getTime()) form.state = 2 |
|
|
|
|
|
|
|
|
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|