408249787 2 years ago
parent
commit
348d05fdaf

+ 1 - 0
src/views/statisticView/DayStatistics.vue

@@ -84,6 +84,7 @@ export default {
       getDegreeByDayOrMonth({ isDay: 1, year: year, month: month, day: day }).then(res => {
         console.log(res.data)
         this.dataInfo = res.data
+        this.title = []
         this.total = res.data.reduce((pre, list, index) => {
           pre = list.lines.map((item, i) => {
             if (index === 0) this.title.push(item.name)

+ 1 - 0
src/views/statisticView/MonthStatistics.vue

@@ -78,6 +78,7 @@ export default {
       const [year, month] = time.split('-')
       getDegreeByDayOrMonth({ isDay: 0, year: year, month: month }).then(res => {
         console.log(res.data)
+        this.title = []
         this.dataInfo = res.data
         this.total = res.data.reduce((pre, list, index) => {
           pre = list.lines.map((item, i) => {