|
|
@ -112,9 +112,10 @@ export default { |
|
|
|
watch: { |
|
|
|
dotList: function (newvalue) { |
|
|
|
const days = this.days.slice(0); |
|
|
|
const index = days.findIndex(day => day.show); |
|
|
|
days.forEach((day, i) => { |
|
|
|
newvalue.forEach((item, j) => { |
|
|
|
if (i === j) { |
|
|
|
if (i - index === j) { |
|
|
|
day.info = item; |
|
|
|
} |
|
|
|
}); |
|
|
@ -224,14 +225,18 @@ export default { |
|
|
|
if (current - pre === 1 || current - pre === -2) { |
|
|
|
// 下一个月 或 下一周 |
|
|
|
this.daysNext(); |
|
|
|
this.start = this.$t.time.add(this.start, 1, 'month').valueOf(); |
|
|
|
this.end = this.$t.time.add(this.end, 1, 'month').valueOf(); |
|
|
|
const arr = this.days.filter(s => s.show); |
|
|
|
const end = `${arr[arr.length - 1].fullDate} 23:59:59`; |
|
|
|
this.start = this.$moment(arr[0].fullDate).valueOf(); |
|
|
|
this.end = this.$moment(end).valueOf(); |
|
|
|
this.$emit('handleFindPoint', this.start, this.end); |
|
|
|
} else { |
|
|
|
// 上一个月 或 上一周 |
|
|
|
this.daysPre(); |
|
|
|
this.start = this.$t.time.add(this.start, -1, 'month').valueOf(); |
|
|
|
this.end = this.$t.time.add(this.end, -1, 'month').valueOf(); |
|
|
|
const arr = this.days.filter(s => s.show); |
|
|
|
const end = `${arr[arr.length - 1].fullDate} 23:59:59`; |
|
|
|
this.start = this.$moment(arr[0].fullDate).valueOf(); |
|
|
|
this.end = this.$moment(end).valueOf(); |
|
|
|
this.$emit('handleFindPoint', this.start, this.end); |
|
|
|
} |
|
|
|
}, |
|
|
|