修改放号记录分页

main
jinna 3 years ago
parent 3383ffb84a
commit 1475ce4e60
  1. 43
      src/views/myExam.vue

@ -5,9 +5,14 @@
<div class="no_title">查询无结果</div> <div class="no_title">查询无结果</div>
<div class="no_txt">暂无您的预约项目请选择医院后进行预约</div> <div class="no_txt">暂无您的预约项目请选择医院后进行预约</div>
</div> </div>
<div class="exam_box" v-for="item in examArr" :key="item.id"> <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="time_box">{{ item.createDeptName }}</div>
<div class="pro_box" v-for="item1 in item.details" :key="item1.project"> <div class="pro_box" v-for="item1 in item.details" :key="item1.id">
<div class="pro_top"> <div class="pro_top">
<div class="img_box"> <div class="img_box">
<img v-if="item.apmStatus !== 1" src="~@/assets/image/time.png" alt="" /> <img v-if="item.apmStatus !== 1" src="~@/assets/image/time.png" alt="" />
@ -40,7 +45,8 @@
</div> </div>
</div> </div>
</div> </div>
</div> </van-cell>
</van-list>
</div> </div>
</template> </template>
@ -52,6 +58,7 @@ export default {
return { return {
current: 1, current: 1,
size: 10, size: 10,
finished:false,
examArr: [], examArr: [],
userInfo: null, userInfo: null,
systemTime: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'), systemTime: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
@ -82,6 +89,10 @@ export default {
} }
}, },
methods: { methods: {
onLoad(){
this.current += 1;
this.queryMyRecord();
},
// //
querySystemTime() { querySystemTime() {
if (this.GlobalConfig.appMode) { 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) => { 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(); this.$toast.clear();
let retData = JSON.parse(value); let retData = JSON.parse(value);
// console.log(retData,'record')
if (retData.code == 200) { 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; this.examArr = retData.data.records;
console.log(this.examArr) }
if(res.data.current == res.data.pages){
this.finished = true
}else{
this.current++
}
this.examArr.map(item1 => { this.examArr.map(item1 => {
item1.details.map(item => { item1.details.map(item => {
console.log(item) console.log(item)
@ -144,11 +165,19 @@ export default {
else { else {
myRecord("", this.userInfo.papersnumber, this.current, this.size).then(res => { myRecord("", this.userInfo.papersnumber, this.current, this.size).then(res => {
this.$toast.clear(); this.$toast.clear();
let list = res.data.records;
if(res.data.pages > 1){
this.examArr = [...this.examArr,...list]
}else{
this.examArr = res.data.records; this.examArr = res.data.records;
console.log(this.examArr) }
if(res.data.current == res.data.pages){
this.finished = true
}else{
this.current++
}
this.examArr.map(item1 => { this.examArr.map(item1 => {
item1.details.map(item => { item1.details.map(item => {
console.log(item)
let systemTime = Date.parse(new Date(this.systemTime)); let systemTime = Date.parse(new Date(this.systemTime));
item.starTime = systemTime item.starTime = systemTime
let latime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[1] + ':00'; let latime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[1] + ':00';

Loading…
Cancel
Save