From 5b4cf971c42eb8c5fd7f6019aeab8ddf951cdb18 Mon Sep 17 00:00:00 2001 From: jinna Date: Wed, 22 Feb 2023 09:25:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=91=E7=9A=84=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/examProject.vue | 2 +- src/views/myExam.vue | 57 ++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/views/examProject.vue b/src/views/examProject.vue index e16b77d..5ad99c2 100644 --- a/src/views/examProject.vue +++ b/src/views/examProject.vue @@ -19,7 +19,7 @@
{{ item.cuAddr }}
-
取消预约
+
取消项目
diff --git a/src/views/myExam.vue b/src/views/myExam.vue index ea3ac79..9be14d2 100644 --- a/src/views/myExam.vue +++ b/src/views/myExam.vue @@ -125,18 +125,7 @@ export default { if (retData.code == 200) { let list = retData.data.records; - if(res.data.pages > 1){ - this.examArr = [...this.examArr,...list] - }else{ - this.examArr = retData.data.records; - } - if(res.data.current == res.data.pages){ - this.finished = true - }else{ - this.current++ - } - - this.examArr.map(item1 => { + list.map(item1 => { item1.details.map(item => { console.log(item) let systemTime = Date.parse(new Date(this.systemTime)); @@ -145,8 +134,8 @@ export default { let lasCanTime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[0] + ':00'; // item.lastCanTime = Date.parse(new Date(lasCanTime.replaceAll('-', '/'))) // item.lastTime = Date.parse(new Date(latime.replaceAll('-', '/'))) - item.lastCanTime = Date.parse(new Date(lasCanTime.replace(/\D/g, '/'))) - item.lastTime = Date.parse(new Date(latime.replace(/\D/g, '/'))) + item.lastCanTime = Date.parse(new Date(lasCanTime.replace(/-/g,'/'))) + item.lastTime = Date.parse(new Date(latime.replace(/-/g,'/'))) item.limitTime = this.intervalTime(item.starTime, item.lastTime) item.lastExamTime = systemTime < item.lastTime ? item.lastTime - systemTime : 0 item.limitCancelTime = systemTime < item.lastCanTime ? item.lastCanTime - systemTime : 0;//距离取消预约剩余毫秒数 @@ -157,6 +146,21 @@ export default { }) }) this.timeList() + + // if(res.data.pages > 1){ + // this.examArr = [...this.examArr,...list] + // }else{ + // this.examArr = retData.data.records; + // } + this.examArr = [...this.examArr,...list]; + console.log(this.examArr) + if(retData.data.total == this.examArr.length){ + this.finished = true + }else{ + this.current++ + } + + } }, err => { this.$toast.clear(); @@ -166,17 +170,12 @@ export default { myRecord("", this.userInfo.papersnumber, this.current, this.size).then(res => { this.$toast.clear(); let list = res.data.records; - if(res.data.pages > 1){ - this.examArr = [...this.examArr,...list] - }else{ - this.examArr = res.data.records; - } - if(res.data.current == res.data.pages){ - this.finished = true - }else{ - this.current++ - } - this.examArr.map(item1 => { + // if(res.data.pages > 1){ + // this.examArr = [...this.examArr,...list] + // }else{ + // this.examArr = res.data.records; + // } + list.map(item1 => { item1.details.map(item => { let systemTime = Date.parse(new Date(this.systemTime)); item.starTime = systemTime @@ -198,6 +197,14 @@ export default { }) }) this.timeList() + + this.examArr = [...this.examArr,...list]; + if(res.data.total == res.data.pages){ + this.finished = true + }else{ + this.current++ + } + // this.examArr.map(item => { // let systemTime = Date.parse(new Date(this.systemTime)); // this.starTime = systemTime