diff --git a/src/views/examProject.vue b/src/views/examProject.vue index 6e97db1..ebc5018 100644 --- a/src/views/examProject.vue +++ b/src/views/examProject.vue @@ -79,13 +79,13 @@ export default { project:item.name, cuAddr:item.posi, period:item.time.substr(0,2), - timeFrame:item.time.substr(2), + timeFrame:item.time.substr(3), cupName:this.userInfo.name, cupPhone:this.userInfo.mobile, cupCardNo:this.userInfo.papersnumber }) }) - console.log("proArr",this.proArr) + // console.log("proArr",this.proArr) }, methods: { cancelButton(val){ diff --git a/src/views/examination.vue b/src/views/examination.vue index 119d742..2568ef0 100644 --- a/src/views/examination.vue +++ b/src/views/examination.vue @@ -60,7 +60,12 @@
-
+
+ +
今日未放号
+
今日暂无体检计划,请选择其他日期
+
+
{{item.project}}
@@ -81,8 +86,8 @@
- 预约 - 预约 + 预约 + 预约
@@ -136,6 +141,7 @@ export default { } }, created() { + // console.log(this.getWeekTime('2023-03-02')) }, mounted() { this.hospitalId = this.$route.query.id; @@ -150,10 +156,11 @@ export default { for(var i = WeekFirstDay.getDate();i<= parseInt(WeekFirstDay.getDate()) + 6;i++){ this.weekArr.push(i) } + console.log(this.weekArr) var todayWeek = new Date().getDay(); this.weekData.map((item,index) =>{ if(index + 1 == todayWeek){ - this.weekData[index] = '今日' + // this.weekData[index] = '今日' } }) this.startTime = year + '-' + month + '-' + this.today; @@ -248,8 +255,34 @@ export default { } vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqfhlb", JSON.stringify(val), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway) .then((value) => { - console.log('val===>',value) - this.$toast.clear(); + let retData = JSON.parse(value) + console.log(retData.data) + if(retData.data.length == 0){ + this.examData = retData.data + lightAppJssdk.notification.alert({ + message: "当前时间无体检项目", + title: "提示",//可传空 + buttonName: "收到", + success: (data) => { + this.$toast.clear(); + // console.log(this.examData) + }, + fail: function (data) { //错误返回 + } + }) + }else{ + this.examData = retData.data; + this.$toast.clear(); + this.examData.map(item =>{ + item.detailList.map(item1 =>{ + item1.isSelect = false + }) + }) + + } + console.log('data ===>',this.examData) + + // this.$toast.clear(); }) }else{ queryList( @@ -260,6 +293,7 @@ export default { } ).then(res =>{ if(res.data.length == 0){ + this.examData = res.data lightAppJssdk.notification.alert({ message: "当前时间无体检项目", title: "提示",//可传空 @@ -273,15 +307,16 @@ export default { }) }else{ this.examData = res.data; + this.examData.map(item =>{ + item.detailList.map(item1 =>{ + item1.isSelect = false + }) + }) this.$toast.clear(); } console.log(this.examData) - this.examData.map(item =>{ - item.detailList.map(item1 =>{ - item1.isSelect = false - }) - }) + }) } }, @@ -335,11 +370,15 @@ export default { let year = new Date().getFullYear() let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1 this.selectDate = year + '-' + month + '-' + item; + console.log(this.selectDate) this.getList() this.isToday = item }, isShow(){ - this.isCal = !this.isCal + this.isCal = !this.isCal; + if(!this.isCal){ + this.weekArr = this.getWeekTime(this.selectDate) + } }, clickExam(val,val1){ this.selectArr = [] @@ -395,6 +434,28 @@ export default { } }) }, + + // 获取所选日期一周的数据 + getWeekTime(time) { + // var new_Date = new Date(2021,11,10) //获取指定日期当周的一周日期 + var new_Date = new Date(time) //获取本周一周日期 + var timesStamp = new_Date.getTime(); + var currenDay = new_Date.getDay(); + var dates = []; + for (var i = 0; i < 7; i++) { + let date = new Date(timesStamp + 24 * 60 * 60 * 1000 * (i - (currenDay + 6) % 7)); + let y = date.getFullYear() + let m = date.getMonth() + 1 + m < 10 ? m = '0' + m : m + let d = date.getDate() + // d < 10 ? d = "0" + d : d + // let datetime = y + '-' + m + '-' + d + let datetime = d + dates.push(datetime) + } + return dates + // console.log("一周时间:" + ) + } }, } @@ -468,11 +529,7 @@ export default { border-radius: 50%; color:#fff; } - .isnum{ - background: rgb(22, 119, 255,); - border-radius: 50%; - color:#fff; - } + .today_week{ background: rgba(51, 51, 51, .3); border-radius: 50%; @@ -487,6 +544,11 @@ export default { margin-top: 0.1rem; } } + .isnum{ + background: rgb(22, 119, 255,); + border-radius: 50%; + color:#fff; + } } } @@ -513,6 +575,35 @@ export default { .center_box{ width: 100%; margin-top: 0.2rem; + .exam_noresult { + text-align: center; + height: 5.04rem; + background: #fff; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + img { + width: 2.56rem; + height: 2.56rem; + } + + .no_title { + color: #666; + font-size: 0.44rem; + font-weight: bold; + margin-bottom: 0.1rem; + } + + .no_txt { + color: #999; + font-size: 0.24rem; + // width: 3rem; + line-height: 0.33rem; + margin: 0 auto; + } + } .exam_box{ width: 100%; background: #fff; diff --git a/src/views/myExam.vue b/src/views/myExam.vue index 50413b4..e5544b0 100644 --- a/src/views/myExam.vue +++ b/src/views/myExam.vue @@ -122,8 +122,10 @@ export default { item.starTime = systemTime let latime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[1] + ':00'; 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.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.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;//距离取消预约剩余毫秒数 @@ -151,11 +153,15 @@ export default { item.starTime = systemTime let latime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[1] + ':00'; 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.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.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;//距离取消预约剩余毫秒数 + console.log(item.limitCancelTime) // console.log(latime,item.lastTime,lasCanTime,item.lastCanTime,item.limitCancelTime) //670422000 // this.$set( // item,"limitTime",item.limitTime