|
|
|
|
@ -5,11 +5,7 @@ |
|
|
|
|
<div class="no_title">查询无结果</div> |
|
|
|
|
<div class="no_txt">暂无您的预约项目,请选择医院后进行预约</div> |
|
|
|
|
</div> |
|
|
|
|
<van-list |
|
|
|
|
:finished="finished" |
|
|
|
|
finished-text="没有更多了" |
|
|
|
|
@load="onLoad" |
|
|
|
|
> |
|
|
|
|
<van-list :finished="finished" finished-text="没有更多了" @load="onLoad"> |
|
|
|
|
<van-cell class="exam_box" v-for="item in examArr" :key="item.id"> |
|
|
|
|
<div class="time_box">{{ item.createDeptName }}</div> |
|
|
|
|
<div class="pro_box" v-for="item1 in item.details" :key="item1.id"> |
|
|
|
|
@ -30,7 +26,8 @@ |
|
|
|
|
<img v-else src="~@/assets/image/pro_gray.png" alt="" /> |
|
|
|
|
</div> |
|
|
|
|
<div class="pro_name">{{ item1.project }} </div> |
|
|
|
|
<div class="pro_pos" :class="[item1.apmStatus === 2 ? 'tips' : item1.apmStatus == 1 ? 'cancel_tip' : '',]"> |
|
|
|
|
<div class="pro_pos" |
|
|
|
|
:class="[item1.apmStatus === 2 ? 'tips' : item1.apmStatus == 1 ? 'cancel_tip' : '',]"> |
|
|
|
|
{{ |
|
|
|
|
item1.apmStatus == 1 ? '您的体检项目已取消' : item1.apmStatus == 3 ? '体检项目已完成' : (item1.apmStatus == 2 && |
|
|
|
|
item1.lastExamTime == 0) ? '您的体检已过期' : item1.limitTime |
|
|
|
|
@ -40,7 +37,7 @@ |
|
|
|
|
<div class="cancel" @click="cancelRegisiter(item1)" |
|
|
|
|
:class="[item1.apmStatus == 3 ? 'finish' : item1.apmStatus == 1 || item1.limitCancelTime < 30 * 60 * 1000 ? 'cancel_item' : '',]"> |
|
|
|
|
{{ |
|
|
|
|
item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约' |
|
|
|
|
item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约' |
|
|
|
|
}}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@ -58,7 +55,7 @@ export default { |
|
|
|
|
return { |
|
|
|
|
current: 1, |
|
|
|
|
size: 10, |
|
|
|
|
finished:false, |
|
|
|
|
finished: false, |
|
|
|
|
examArr: [], |
|
|
|
|
userInfo: null, |
|
|
|
|
systemTime: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'), |
|
|
|
|
@ -89,7 +86,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
onLoad(){ |
|
|
|
|
onLoad() { |
|
|
|
|
this.current += 1; |
|
|
|
|
this.queryMyRecord(); |
|
|
|
|
}, |
|
|
|
|
@ -134,8 +131,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(/-/g,'/'))) |
|
|
|
|
item.lastTime = Date.parse(new Date(latime.replace(/-/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;//距离取消预约剩余毫秒数 |
|
|
|
|
@ -152,15 +149,15 @@ export default { |
|
|
|
|
// }else{ |
|
|
|
|
// this.examArr = retData.data.records; |
|
|
|
|
// } |
|
|
|
|
this.examArr = [...this.examArr,...list]; |
|
|
|
|
this.examArr = [...this.examArr, ...list]; |
|
|
|
|
console.log(this.examArr) |
|
|
|
|
if(retData.data.total == this.examArr.length){ |
|
|
|
|
if (retData.data.total == this.examArr.length) { |
|
|
|
|
this.finished = true |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.current++ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, err => { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
@ -175,7 +172,7 @@ export default { |
|
|
|
|
// }else{ |
|
|
|
|
// this.examArr = res.data.records; |
|
|
|
|
// } |
|
|
|
|
list.map(item1 => { |
|
|
|
|
list.map(item1 => { |
|
|
|
|
item1.details.map(item => { |
|
|
|
|
let systemTime = Date.parse(new Date(this.systemTime)); |
|
|
|
|
item.starTime = systemTime |
|
|
|
|
@ -183,9 +180,9 @@ 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(/-/g,'/'))) |
|
|
|
|
item.lastTime = Date.parse(new Date(latime.replace(/-/g,'/'))) |
|
|
|
|
console.log('las',item.lastTime) |
|
|
|
|
item.lastCanTime = Date.parse(new Date(lasCanTime.replace(/-/g, '/'))) |
|
|
|
|
item.lastTime = Date.parse(new Date(latime.replace(/-/g, '/'))) |
|
|
|
|
console.log('las', item.lastTime) |
|
|
|
|
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;//距离取消预约剩余毫秒数 |
|
|
|
|
@ -198,13 +195,13 @@ export default { |
|
|
|
|
}) |
|
|
|
|
this.timeList() |
|
|
|
|
|
|
|
|
|
this.examArr = [...this.examArr,...list]; |
|
|
|
|
if(res.data.total == res.data.pages){ |
|
|
|
|
this.examArr = [...this.examArr, ...list]; |
|
|
|
|
if (res.data.total == res.data.pages) { |
|
|
|
|
this.finished = true |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.current++ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.examArr.map(item => { |
|
|
|
|
// let systemTime = Date.parse(new Date(this.systemTime)); |
|
|
|
|
// this.starTime = systemTime |
|
|
|
|
@ -363,7 +360,11 @@ export default { |
|
|
|
|
let retData = JSON.parse(value); |
|
|
|
|
if (retData.code == 200) { |
|
|
|
|
this.$toast('操作成功'); |
|
|
|
|
this.queryMyRecord(); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.current = 1; |
|
|
|
|
this.examArr = [] |
|
|
|
|
this.queryMyRecord(); |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}, err => { |
|
|
|
|
}) |
|
|
|
|
@ -373,7 +374,11 @@ export default { |
|
|
|
|
console.log(res) |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
this.$toast('操作成功'); |
|
|
|
|
this.queryMyRecord(); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.current = 1; |
|
|
|
|
this.examArr = [] |
|
|
|
|
this.queryMyRecord(); |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|