Prechádzať zdrojové kódy

修复首页和站点详情默认时间

ming 3 rokov pred
rodič
commit
59b29ee968

BIN
dist.zip


BIN
dist4.zip


+ 3 - 0
src/store/index.js

@@ -457,8 +457,11 @@ export default createStore({
             const timestamp = new Date().getTime(); //时间戳
             state.Time_All = [Y, M, D, HH, MM, SS, timestamp]
             state.se_defaultTime = [new Date(Y, M, D, 0, 0, 0), new Date()] //设备监控--->历史趋势时间选择器v-model  //home设备总数
+            state.se_defaultTime2 = [new Date(Y, M, D - 1, 0, 0, 0), new Date()] //--->历史趋势时间选择器v-model  //当前日减1
             state.th_defaultTime = [new Date(Y, M, D, 0, 0, 0), new Date()] //设备监控--->数据报表时间选择器v-model  //home运维管理
             state.fh_defaultTime = [new Date(Y, M, 1, 0, 0, 0), new Date()] //设备监控--->运行状态统计时间选择器v-model  //概览 -> 告警统计折线图
+
+
         },
     }
 })

+ 3 - 2
src/views/home/index.vue

@@ -157,7 +157,7 @@ export default {
       rtAnalogData: {},
 
       htAnalogData: {},
-      dayType: 0,
+      dayType: 1,
       eptrendIco: {},
       eptrendIcoMonth: {},
       epLoad: "",
@@ -186,7 +186,8 @@ export default {
     this.rtAnalogData_api();
     this.siteList_api();
     this.htAnalogData_api();
-    this.eptrendIco_api();
+    // this.eptrendIco_api();
+    this.eptrendIcoMonth_api();
   },
   methods: {
     // searchSite(){

+ 1 - 1
src/views/site/Overview.vue

@@ -158,7 +158,7 @@ export default {
       select_value: 1,
       filterSec_value: 1,
 
-      hisDefaultTime: this.$store.state.se_defaultTime[0],
+      hisDefaultTime: this.$store.state.se_defaultTime2[0],
     };
   },
   created() {},

+ 4 - 0
src/views/site/components/Overview/histTrendChart.vue

@@ -44,6 +44,10 @@ export default {
     electricIco() {
       this.$store.commit("TimeAll_function", [this.hisDefaultTime]);
       var time = this.$store.state.Time_Data;
+       console.log('time[0]')
+      console.log(time[0])
+      console.log(time[1])
+
       api
         .electricIco({
           siteId: this.$store.state.siteId,