|
|
|
|
@ -18,7 +18,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="isCal"> |
|
|
|
|
<van-swipe class="my-swipe" :stop-propagation="false" :show-indicators="false"> |
|
|
|
|
<van-swipe class="my-swipe" :stop-propagation="false" :show-indicators="false" :initial-swipe="currentIndex"> |
|
|
|
|
<van-swipe-item> |
|
|
|
|
<van-calendar class="can_box" ref="calendar" first-day-of-week="1" v-model="show" |
|
|
|
|
@confirm="onConfirm" :poppable="false" :show-mark="false" :show-title="false" |
|
|
|
|
@ -106,7 +106,9 @@ export default { |
|
|
|
|
cupCardNo: '', |
|
|
|
|
dayArr: [], |
|
|
|
|
yesterDay: '', |
|
|
|
|
systemTime: dateFormat(new Date(), 'yyyy-MM-dd') |
|
|
|
|
systemTime: dateFormat(new Date(), 'yyyy-MM-dd'), |
|
|
|
|
currentIndex:'0', |
|
|
|
|
currentMonth:'' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
@ -119,6 +121,7 @@ export default { |
|
|
|
|
this.isToday = this.today; |
|
|
|
|
let year = new Date().getFullYear(); |
|
|
|
|
let month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1; //当前月份 |
|
|
|
|
this.currentMonth = month |
|
|
|
|
let month1 = parseInt(month) + 1 < 10 ? '0' + (parseInt(month) + 1) : parseInt(month) + 1; //当前月份的下一月份 |
|
|
|
|
let now = new Date(); |
|
|
|
|
this.yesterDay = dateFormat(new Date(now.setDate(now.getDate() - 1)),'yyyy/MM/dd'); |
|
|
|
|
@ -235,6 +238,7 @@ export default { |
|
|
|
|
// console.log(retData.data) |
|
|
|
|
if(retData.code == 200) { |
|
|
|
|
this.examData = retData.data; |
|
|
|
|
this.selectArr = [] |
|
|
|
|
this.examData.map(item => { |
|
|
|
|
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() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|