Browse Source

fix: 月报周报定位问题

zhangyuhan 4 năm trước cách đây
mục cha
commit
381eafd844
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 2 2
      src/views/reportData/pageMonth.vue
  2. 2 2
      src/views/reportData/pageWeek.vue

+ 2 - 2
src/views/reportData/pageMonth.vue

@@ -282,7 +282,7 @@ export default {
   },
   computed: {
     getQueryTime () {
-      const paramsDate = this.$route.query.start
+      const paramsDate = this.$route.query.end
       if (paramsDate) {
         const paramsData = {
           year: dateFormatter(paramsDate * 1000, 'yyyy'),
@@ -344,7 +344,7 @@ export default {
             } else {
               item.pushtime = ''
             }
-            if (dateFormatter(item.startdate * 1000, 'yyyyMM') === time) {
+            if (dateFormatter(item.enddate * 1000, 'yyyyMM') === time) {
               resultStatus = true
               that.isWeekIndex = index
               console.log(time)

+ 2 - 2
src/views/reportData/pageWeek.vue

@@ -190,7 +190,7 @@ export default {
   },
   computed: {
     getQueryTime () {
-      const paramsDate = this.$route.query.start
+      const paramsDate = this.$route.query.end
       if (paramsDate) {
         const paramsData = {
           year: dateFormatter(paramsDate * 1000, 'yyyy'),
@@ -234,7 +234,7 @@ export default {
               queryData.start = this.getQueryTime.start
               queryData.end = this.getQueryTime.end
               this.weekList.forEach((v, index) => {
-                if (String(v.startdate) === queryData.start) {
+                if (String(v.enddate) === queryData.end) {
                   this.isWeekIndex = index
                 }
               })