From fdb56545ef4e56f639b8d511ac107cb5e5ede6db Mon Sep 17 00:00:00 2001 From: jinna Date: Fri, 17 Feb 2023 14:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/examProject.vue | 5 +- src/views/examination.vue | 149 ++++++++++++++------------------------ 2 files changed, 59 insertions(+), 95 deletions(-) diff --git a/src/views/examProject.vue b/src/views/examProject.vue index 9f312ad..6e97db1 100644 --- a/src/views/examProject.vue +++ b/src/views/examProject.vue @@ -129,7 +129,10 @@ export default { clickFail(){ this.$router.replace({ - name:'examination' + name:'examination', + query:{ + id:this.proData.createDept + } }) }, clickSucc(){ diff --git a/src/views/examination.vue b/src/views/examination.vue index 4ef8b91..732717e 100644 --- a/src/views/examination.vue +++ b/src/views/examination.vue @@ -200,6 +200,10 @@ export default { }) }, getList(){ + this.$toast.loading({ + message:'加载中', + duration: 0, + }) queryList( { createDept:this.hospitalId, @@ -208,111 +212,68 @@ export default { } ).then(res =>{ if(res.data.length == 0){ - this.examData = [ - // { - // project:'单眼视力',cuAddr:'三楼眼科',apmDay: "2023-03-12", - // totalNum : 10, totalApmNum: 0, - // detailList: [ - // { - // period:"上午", - // timeFrame: "9:00-9:30", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, - // enableApm: 0 - // }, - // { - // period:"上午", - // timeFrame: "9:30-10:00", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, // 剩余号数 - // enableApm: 0 // 是否可预约 - // }, - // { - // period:"上午", - // timeFrame: "10:30-11:00", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, // 剩余号数 - // enableApm: 0 // 是否可预约 - // } - // ] - // }, - // { - // project:'听力',cuAddr:'三楼眼科',apmDay: "2023-03-12", - // totalNum : 10, totalApmNum: 0, - // detailList: [ - // { - // period:"上午", - // timeFrame: "9:00-9:30", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, - // enableApm: 0 - // }, - // { - // period:"上午", - // timeFrame: "9:30-10:00", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, // 剩余号数 - // enableApm: 0 // 是否可预约 - // }, - // { - // period:"上午", - // timeFrame: "10:30-11:00", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, // 剩余号数 - // enableApm: 0 // 是否可预约 - // } - // ] - // }, - // { - // project:'四肢',cuAddr:'三楼眼科',apmDay: "2023-03-12", - // totalNum : 10, totalApmNum: 0, - // detailList: [ - // { - // period:"上午", - // timeFrame: "9:00-9:30", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, - // enableApm: 0 - // }, - // { - // period:"上午", - // timeFrame: "9:30-10:00", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, // 剩余号数 - // enableApm: 0 // 是否可预约 - // }, - // { - // period:"上午", - // timeFrame: "10:30-11:00", - // numberNum: 5, - // apmNum: 0, - // residueNum: 0, // 剩余号数 - // enableApm: 0 // 是否可预约 - // } - // ] - // } - ]; - lightAppJssdk.notification.alert({ + lightAppJssdk.notification.alert({ message: "当前时间无体检项目", title: "提示",//可传空 buttonName: "收到", - success: function (data) { + success: (data) => { + if(JSON.parse(data).buttonIndex == 1){ + this.examData = [ + { + project:'单眼视力',cuAddr:'', + totalNum : 0, totalApmNum: 0, + apmDay: new Date().getFullYear() + '-' + new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + '-' + new Date().getDate(), + detailList: [] + }, + { + project:'听力',cuAddr:'', + totalNum : 0, totalApmNum: 0, + apmDay: new Date().getFullYear() + '-' + new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + '-' + new Date().getDate(), + detailList: [] + }, + { + project:'四肢',cuAddr:'', + totalNum : 0, totalApmNum: 0, + apmDay: new Date().getFullYear() + '-' + new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + '-' + new Date().getDate(), + detailList: [ + ] + } + ]; + this.examData.map(item =>{ + item.detailList.push( + {period:"上午",timeFrame: "08:00-08:30",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + }, + {period:"上午",timeFrame: "08:30-09:00",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + },{period:"上午",timeFrame: "09:00-09:30",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + },{period:"上午",timeFrame: "09:30-10:00",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + },{period:"下午",timeFrame: "01:00-01:30",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + },{period:"下午",timeFrame: "01:30-02:00",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + },{period:"下午",timeFrame: "02:00-02:30",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + },{period:"下午",timeFrame: "02:30-03:00",numberNum: 5,apmNum: 0, + residueNum: 0,enableApm: 0 + }, + ) + }) + this.$toast.clear(); + } + // console.log(this.examData) }, fail: function (data) { //错误返回 } }) }else{ this.examData = res.data; + this.$toast.clear(); } + console.log(this.examData) this.examData.map(item =>{ item.detailList.map(item1 =>{ item1.isSelect = false