|
|
@@ -490,19 +490,22 @@ export default {
|
|
|
let testExamineBaseList = res.data[0];
|
|
|
console.log("res.data[0][0]", res.data[0][0]);
|
|
|
this.brief = res.data[0][0].brief;
|
|
|
+ testExamineBaseList.sort((a,b)=>{
|
|
|
+ return new Date(b.create_at) - new Date(a.create_at)
|
|
|
+ })
|
|
|
this.testExamineBaseList = testExamineBaseList;
|
|
|
console.log("selectTestExamineBase", res.data[0][0]);
|
|
|
this.PageBaseData = JSON.parse(res.data[0][0].json);
|
|
|
if(this.pType == 1){
|
|
|
this.aArray = res.data[0];
|
|
|
- this.timeListA = this.aArray.map(i=>{return {value:i.time,label:i.timeLabel,createAt:i.create_at}})
|
|
|
+ this.timeListA = this.aArray.map(i=>{return {value:i.time,label:i.timeLabel,createAt:i.create_at,time:i.value}})
|
|
|
this.timeListA.sort((a,b)=>{
|
|
|
return new Date(b.createAt) - new Date(a.createAt)
|
|
|
})
|
|
|
if(this.timeListA.length>0)this.timeA = this.timeListA[0].value;
|
|
|
}else {
|
|
|
this.bArray = res.data[0];
|
|
|
- this.timeListB = this.bArray.map(i=>{return {value:i.time,label:i.timeLabel,createAt:i.create_at}})
|
|
|
+ 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)=>{
|
|
|
return new Date(b.createAt) - new Date(a.createAt)
|
|
|
})
|
|
|
@@ -567,7 +570,15 @@ export default {
|
|
|
|
|
|
let _url = "selectExamineTestName"
|
|
|
if(this.testExamineBaseList[0].value){
|
|
|
- const timeValue = JSON.parse(this.testExamineBaseList[0].value).time;
|
|
|
+ let timeValue = ""
|
|
|
+ if(this.pType == 1){
|
|
|
+ timeValue = this.timeListA.find(i=>i.value == this.timeA).time
|
|
|
+ }else {
|
|
|
+ timeValue = this.timeListB.find(i=>i.value == this.timeB).time
|
|
|
+ }
|
|
|
+
|
|
|
+ timeValue = JSON.parse(timeValue).time;
|
|
|
+ // const timeValue = JSON.parse(this.testExamineBaseList[0].value).time;
|
|
|
params[0].startTime = timeValue[0];
|
|
|
params[0].endTime = timeValue[1];
|
|
|
_url = `selectExamineTestNameFilterTime`
|
|
|
@@ -587,9 +598,15 @@ export default {
|
|
|
},
|
|
|
// 查看数据来源
|
|
|
lookPrize(val) {
|
|
|
- // return;
|
|
|
if(this.testExamineBaseList[0].value){
|
|
|
- const timeValue = JSON.parse(this.testExamineBaseList[0].value).time;
|
|
|
+ let timeValue = ""
|
|
|
+ if(this.pType == 1){
|
|
|
+ timeValue = this.timeListA.find(i=>i.value == this.timeA).time
|
|
|
+ }else {
|
|
|
+ timeValue = this.timeListB.find(i=>i.value == this.timeB).time
|
|
|
+ }
|
|
|
+
|
|
|
+ timeValue = JSON.parse(timeValue).time;
|
|
|
this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?userid=${this.userid}&cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.userid}&tType=${this.pType}&examineId=${this.testExamineBaseList[0].id}&timeLimit=${timeValue}`;
|
|
|
}else{
|
|
|
this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?userid=${this.userid}&cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.userid}&tType=${this.pType}&examineId=${this.testExamineBaseList[0].id}`;
|