|
@@ -480,7 +480,7 @@ export default {
|
|
|
typ: this.pType,
|
|
typ: this.pType,
|
|
|
org: this.org,
|
|
org: this.org,
|
|
|
oid: this.oid,
|
|
oid: this.oid,
|
|
|
- time:this.pType==1?this.timeA:this.timeB
|
|
|
|
|
|
|
+ time:""
|
|
|
};
|
|
};
|
|
|
this.ajax
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "selectTestExamineBase2", params)
|
|
.get(this.$store.state.api + "selectTestExamineBase2", params)
|
|
@@ -493,6 +493,7 @@ export default {
|
|
|
testExamineBaseList.sort((a,b)=>{
|
|
testExamineBaseList.sort((a,b)=>{
|
|
|
return new Date(b.create_at) - new Date(a.create_at)
|
|
return new Date(b.create_at) - new Date(a.create_at)
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
this.testExamineBaseList = testExamineBaseList;
|
|
this.testExamineBaseList = testExamineBaseList;
|
|
|
console.log("selectTestExamineBase", res.data[0][0]);
|
|
console.log("selectTestExamineBase", res.data[0][0]);
|
|
|
this.PageBaseData = JSON.parse(res.data[0][0].json);
|
|
this.PageBaseData = JSON.parse(res.data[0][0].json);
|
|
@@ -502,18 +503,21 @@ export default {
|
|
|
this.timeListA.sort((a,b)=>{
|
|
this.timeListA.sort((a,b)=>{
|
|
|
return new Date(b.createAt) - new Date(a.createAt)
|
|
return new Date(b.createAt) - new Date(a.createAt)
|
|
|
})
|
|
})
|
|
|
- if(this.timeListA.length>0)this.timeA = this.timeListA[0].value;
|
|
|
|
|
|
|
+ if(this.timeListA.length>0 && !this.timeA)this.timeA = this.timeListA[0].value;
|
|
|
|
|
+ this.testExamineBaseList = this.testExamineBaseList.filter(i=>i.time === this.timeA)
|
|
|
}else {
|
|
}else {
|
|
|
this.bArray = res.data[0];
|
|
this.bArray = res.data[0];
|
|
|
this.timeListB = this.bArray.map(i=>{return {value:i.time,label:i.timeLabel,createAt:i.create_at,time:i.value}})
|
|
this.timeListB = this.bArray.map(i=>{return {value:i.time,label:i.timeLabel,createAt:i.create_at,time:i.value}})
|
|
|
this.timeListB.sort((a,b)=>{
|
|
this.timeListB.sort((a,b)=>{
|
|
|
return new Date(b.createAt) - new Date(a.createAt)
|
|
return new Date(b.createAt) - new Date(a.createAt)
|
|
|
})
|
|
})
|
|
|
- if(this.timeListB.length>0)this.timeB = this.timeListB[0].value;
|
|
|
|
|
|
|
+ if(this.timeListB.length>0 && !this.timeB)this.timeB = this.timeListB[0].value;
|
|
|
if(!this.bArray.length){
|
|
if(!this.bArray.length){
|
|
|
this.pType = 1
|
|
this.pType = 1
|
|
|
}
|
|
}
|
|
|
|
|
+ this.testExamineBaseList = this.testExamineBaseList.filter(i=>i.time === this.timeB)
|
|
|
}
|
|
}
|
|
|
|
|
+ // this.testExamineBaseList = this.testExamineBaseList.filter(i=>i.type == this.pType)
|
|
|
// 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
|
|
// 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
|
|
|
this.getData();
|
|
this.getData();
|
|
|
})
|
|
})
|