提交修改

This commit is contained in:
daihh
2023-01-04 17:53:44 +08:00
parent 3af2d10631
commit cef100a2d4
5 changed files with 174 additions and 49 deletions

View File

@@ -94,9 +94,11 @@
this.loadRecord();
},
watch:{
studyId(newVal){
content(newObj){
this.loadExamInfo();
this.loadRecord();
}
},
deep:true
},
methods: {
loadExamInfo(){
@@ -125,24 +127,25 @@
if(this.studyId==''){
return;
}
this.loadExamContent();
if(this.records.length==0){
let params={
studyId:this.studyId,
contentId:this.content.id
}
apiStudy.myExamList2(params).then(examRs=>{
if(examRs.status==200){
this.records=examRs.result;
let len=examRs.result.length;
if(this.info.times>len){
this.allowSubmit=true;
}else{
this.allowSubmit=false;
this.records=[];
this.loadExamContent();
//if(this.records.length==0){
let params={
studyId:this.studyId,
contentId:this.content.id
}
}
})
}
apiStudy.myExamList2(params).then(examRs=>{
if(examRs.status==200){
this.records=examRs.result;
let len=examRs.result.length;
if(this.info.times>len){
this.allowSubmit=true;
}else{
this.allowSubmit=false;
}
}
})
//}
},
startTest(){
//转向详细页面

View File

@@ -92,14 +92,12 @@
this.loadHomeworkInfo();
},
watch:{
studyId(newVal){
this.loadHomeworkInfo();
},
content(newVal,oldVal){
if(newVal.id!=oldVal.id){
this.loadHomeworkInfo();
}
}
},
deep:true
},
methods: {
loadHomeworkInfo(){