Browse Source

Merge branch 'dev' into 'test'

Dev

See merge request quanshu/mp-ui-pc!150
hunagwb 3 years ago
parent
commit
1914938e1c
1 changed files with 11 additions and 1 deletions
  1. 11 1
      src/views/index.vue

+ 11 - 1
src/views/index.vue

@@ -371,7 +371,7 @@ export default {
     };
   },
   mounted: function () {
-
+    this.initDefaultTime()
     this.initChart()
     // this.$nextTick(function () {
 
@@ -387,6 +387,16 @@ export default {
   },
   methods: {
 
+    initDefaultTime(){
+      const end = new Date();
+      const start = new Date();
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * (7-1));
+      this.timeArr1 = [start,end]
+      this.timeArr2 = [start,end]
+      this.timeArr3 = [start,end]
+      this.timeArr4 = [start,end]
+    },
+
     initChart(){
       // 初始化echarts实例
       this.chartObj1 = echarts.init(this.$refs.echart1);