diff --git a/src/views/examination.vue b/src/views/examination.vue index b2b5573..77dcdcf 100644 --- a/src/views/examination.vue +++ b/src/views/examination.vue @@ -18,7 +18,7 @@
- + { item.detailList.map(item1 => { item1.isSelect = false @@ -257,6 +261,7 @@ export default { ).then(res => { this.$toast.clear(); if (res.code == 200) { + this.selectArr = [] this.examData = res.data; this.examData.map(item => { item.detailList.map(item1 => { @@ -335,7 +340,12 @@ export default { // let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1 this.examData = []; this.selectDate = item; - console.log(this.selectDate) + let month = parseInt(new Date(this.selectDate).getMonth()) < 10 ? '0' + (parseInt(new Date(this.selectDate).getMonth()) + 1) : (parseInt(new Date(this.selectDate).getMonth()) + 1); + if(month == this.currentMonth){ + this.currentIndex = '0' + }else{ + this.currentIndex = '1' + } this.getList() this.isToday = item }, @@ -371,13 +381,17 @@ export default { } }) }) - console.log(this.selectArr) + console.log('sele ===>',this.selectArr) }, onConfirm(date) { let year = date.getFullYear(); let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() - let text = year + '/' + month + '/' + day + let text = year + '/' + month + '/' + day; + console.log('current ===>',month); + // if(this.currentMonth == month){ + this.currentIndex = '0' + // } this.selectDate = text; this.getList() }, @@ -386,7 +400,9 @@ export default { let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() let text = year + '/' + month + '/' + day + console.log('next===>',month) this.selectDate = text; + this.currentIndex = '1' this.getList() },