+
@@ -114,7 +114,7 @@ export default {
'userId','clientId'
]),
...mapState('assessment', [
- 'reviewId','paperId','isReview','reviewStatus','stuId'
+ 'reviewId','paperId','isReview','reviewStatus','stuId','timeSpent'
]),
...mapGetters('assessment', [
'getCorrectingName'
@@ -152,7 +152,6 @@ export default {
this.paperName = list[0].name
this.userName = list[0].userName
this.this_score = list[0].this_score
- this.duration = list[0].duration
})
.catch(err => {})
},
diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue
index 77041df..6d61644 100644
--- a/src/pages/assessment/list/index.vue
+++ b/src/pages/assessment/list/index.vue
@@ -139,7 +139,7 @@
-
+
@@ -297,7 +297,7 @@ export default {
},
mounted() {
this.getData()
- // this.addInterval()
+ this.addInterval()
},
watch: {
keyword: function(val) {
@@ -377,10 +377,18 @@ export default {
r.children.forEach( n => {
if(n.ischeck){
classIds.push(n.classId)
- studentId = studentId.concat(n.userIds)
}else{
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){
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)
}else{
this.form.classId = val.classId
@@ -401,10 +410,11 @@ export default {
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){
- if(e.children.every(i => i.ischeck)){
+ if(e.children.length && e.children.every(i => i.ischeck)){
e.ischeck = true
}else{
e.ischeck = false
@@ -416,6 +426,7 @@ export default {
},
threecheck(val,val2){
val.ischeck = !val.ischeck
+ val.children.map( e => e.ischeck = val.ischeck)
val2.forEach( e => {
e.children.forEach( r => {
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
}else{
e.ischeck = false
@@ -436,6 +447,35 @@ export default {
})
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) {
this.page = val;
this.getData();
@@ -516,7 +556,6 @@ export default {
this.time = [now,second]
this.form.startTime = now
this.form.endTime = second
- console.log(11,this.form)
this.addVisible = true
},
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(form.testPaperId === '') 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
let data = {
diff --git a/src/pages/assessment/list/studentSide.vue b/src/pages/assessment/list/studentSide.vue
index 59d3412..32e5f55 100644
--- a/src/pages/assessment/list/studentSide.vue
+++ b/src/pages/assessment/list/studentSide.vue
@@ -1,7 +1,7 @@
@@ -54,7 +54,6 @@ export default {
let classId = this.classId ? this.classId.split(',') : []
let studentId = this.studentId
let classList = []
- console.log(22,this.classId)
this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => {
let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList
StaffProfessionalArchitectureList.map(n => {
@@ -80,7 +79,17 @@ export default {
schoolId: this.clientId
}
this.$get(`${this.api.queryStudent}/1/200`,data).then(res => {
- e.userIds = res.data.studentList.map(n => n.userId)
+ res.data.studentList.map(s => {
+ (s.ifVisible = false), (s.ischeck = false), (s.label = s.studentName)
+ if(studentId.includes(s.userId)){
+ s.ischeck = true
+ e.ifVisible = true
+ j.ifVisible = true
+ n.ifVisible = true
+ }
+ })
+ e.children = res.data.studentList
+ // e.userIds = res.data.studentList.map(n => n.userId)
}).catch(res => {})
if(classId.includes(String(e.classId))){
@@ -91,10 +100,10 @@ export default {
})
j.children = res.data.Class
classList = classList.concat(res.data.Class)
- if(j.children.every(i => i.ischeck)){
+ if(j.children.length && j.children.every(i => i.ischeck)){
j.ischeck = true
}
- if(n.children.every(i => i.ischeck)){
+ if(n.children.length && n.children.every(i => i.ischeck)){
n.ischeck = true
}
}).catch(res => {});
@@ -123,6 +132,10 @@ export default {
threecheckitem(three){
this.$emit("threecheck",three,this.majorList)
},
+ // 选择学生
+ fourcheckitem(four){
+ this.$emit("fourcheck",four,this.majorList)
+ },
}
};
diff --git a/src/pages/assessment/list/studentTree.vue b/src/pages/assessment/list/studentTree.vue
index cf9b717..435c2bd 100644
--- a/src/pages/assessment/list/studentTree.vue
+++ b/src/pages/assessment/list/studentTree.vue
@@ -42,10 +42,25 @@
-
+
+
{{item2.label}}班
+
+
+
+
+
+ {{item3.label}}
+
+
+
@@ -124,6 +139,9 @@ export default {
threecheckitem(item){
this.$emit('threecheckitem',item);
},
+ fourcheckitem(item){
+ this.$emit('fourcheckitem',item);
+ },
//判断数组中是否包含某个对象
isHasObj(arr, val) {
var flag = 0; //1为有 0为没有
diff --git a/src/pages/assessment/review/index.vue b/src/pages/assessment/review/index.vue
index de6c114..4b5646a 100644
--- a/src/pages/assessment/review/index.vue
+++ b/src/pages/assessment/review/index.vue
@@ -49,7 +49,7 @@