diff --git a/src/views/myExam.vue b/src/views/myExam.vue index e5544b0..ea3ac79 100644 --- a/src/views/myExam.vue +++ b/src/views/myExam.vue @@ -5,42 +5,48 @@
查询无结果
暂无您的预约项目,请选择医院后进行预约
-
-
{{ item.createDeptName }}
-
-
-
- - -
-
-
{{ doDateFormatter(item.apmDay) }}
-
{{ item1.period + ' ' + item1.timeFrame }}
-
-
-
-
+ + +
{{ item.createDeptName }}
+
+
- - + + +
+
+
{{ doDateFormatter(item.apmDay) }}
+
{{ item1.period + ' ' + item1.timeFrame }}
-
{{ item1.project }}
-
- {{ - item1.apmStatus == 1 ? '您的体检项目已取消' : item1.apmStatus == 3 ? '体检项目已完成' : (item1.apmStatus == 2 && - item1.lastExamTime == 0) ? '您的体检已过期' : item1.limitTime - }}
-
-
- {{ - item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约' - }}
+
+
+
+ + +
+
{{ item1.project }}
+
+ {{ + item1.apmStatus == 1 ? '您的体检项目已取消' : item1.apmStatus == 3 ? '体检项目已完成' : (item1.apmStatus == 2 && + item1.lastExamTime == 0) ? '您的体检已过期' : item1.limitTime + }}
+
+
+
+ {{ + item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约' + }}
+
-
-
+ +
@@ -52,6 +58,7 @@ export default { return { current: 1, size: 10, + finished:false, examArr: [], userInfo: null, systemTime: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'), @@ -82,6 +89,10 @@ export default { } }, methods: { + onLoad(){ + this.current += 1; + this.queryMyRecord(); + }, //系统时间 querySystemTime() { if (this.GlobalConfig.appMode) { @@ -111,10 +122,20 @@ export default { vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdckwdyy", JSON.stringify({ createDept: "", cupCardNo: this.userInfo.papersnumber, current: this.current, size: this.size }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { this.$toast.clear(); let retData = JSON.parse(value); - // console.log(retData,'record') if (retData.code == 200) { - this.examArr = retData.data.records; - console.log(this.examArr) + 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 => { item1.details.map(item => { console.log(item) @@ -144,11 +165,19 @@ export default { else { myRecord("", this.userInfo.papersnumber, this.current, this.size).then(res => { this.$toast.clear(); - this.examArr = res.data.records; - console.log(this.examArr) + 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 => { item1.details.map(item => { - console.log(item) let systemTime = Date.parse(new Date(this.systemTime)); item.starTime = systemTime let latime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[1] + ':00';