Browse Source

风机、逆变器加载顺序修改

xusl 6 tháng trước cách đây
mục cha
commit
8eb0fd4e67

+ 6 - 8
cpp-ui/src/views/stationDataQuery/historyforecastdata/index.vue

@@ -666,11 +666,9 @@ export default {
   },
   created() {
     this.getQueryDays()
-    this.getStationCode()
+    // this.getStationCode()
   },
   mounted() {
-
-
   },
   beforeDestroy() {
     if (!this.zhChart) {
@@ -744,16 +742,16 @@ export default {
       })
     },
 
-    getQueryDays() {
+    async getQueryDays() {
         // 获取查询D+N天参数值
-        this.$axios({url: '/powerstationstatusdata/queryDays', method: 'get'}).then(response => {
+      await this.$axios({url: '/powerstationstatusdata/queryDays', method: 'get'}).then(response => {
           let queryDays = response.data
           this.dateTime = [new Date(new Date().toLocaleDateString()).getTime(), new Date(new Date().toLocaleDateString()).getTime() + (60 * 60 * 24 * 1000) + parseInt(queryDays) * 60 * 60 * 24 * 1000 - 1]
         })
-
+      this.getStationCode()
     },
-    getStationCode() {
-      this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
+    async getStationCode() {
+      await this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
         this.stationList = response.data
         if (this.stationList.length > 0) {
           this.stationCode = this.stationList[0].value

+ 4 - 3
cpp-ui/src/views/stationDataQuery/inverterstatusdata/index.vue

@@ -109,7 +109,7 @@ export default {
     this.getStationCode()
   },
   mounted() {
-    this.dataQuery()
+
   },
   computed: {},
   methods: {
@@ -179,12 +179,13 @@ export default {
         this.loading = false
       })
     },
-    getStationCode() {
-      this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
+    async getStationCode() {
+      await this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
         this.stationList = response.data
         if (this.stationList.length > 0) {
           this.stationCode = this.stationList[0].value
           this.stationChange()
+          this.dataQuery()
         }
       })
     },

+ 3 - 3
cpp-ui/src/views/stationDataQuery/windturbinestatusdata/index.vue

@@ -111,7 +111,6 @@ export default {
     this.getStationCode()
   },
   mounted() {
-    this.dataQuery()
   },
   computed: {},
   methods: {
@@ -180,12 +179,13 @@ export default {
         this.loading = false
       })
     },
-    getStationCode() {
-      this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
+    async getStationCode() {
+      await this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
         this.stationList = response.data
         if (this.stationList.length > 0) {
           this.stationCode = this.stationList[0].value
           this.stationChange()
+          this.dataQuery()
         }
       })
     },