|
@@ -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);
|