添加时间
This commit is contained in:
@@ -53,6 +53,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -60,6 +61,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -67,6 +69,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -74,6 +77,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartType === '天然气I' || this.chartType === '天然气II') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -242,7 +246,7 @@ export default {
|
||||
.map((_, index) => {
|
||||
const today = new Date();
|
||||
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
|
||||
return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
|
||||
return `${currentMonth < 10?'0'+currentMonth:currentMonth }.${new Date(
|
||||
dtimestamp
|
||||
).getDate()}`;}).reverse()
|
||||
}else if (this.chartTime == "月") {
|
||||
@@ -259,7 +263,7 @@ export default {
|
||||
return Array(12)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${currentYear}.${12 - index}`;}).reverse()
|
||||
return `${12 - index}`;}).reverse()
|
||||
}
|
||||
},
|
||||
isLeapYear(year) {
|
||||
|
||||
Reference in New Issue
Block a user