Browse Source

修改风机逆变器数据查询下拉框加载顺序

xusl 7 months ago
parent
commit
2a50d6182d

+ 13 - 2
cpp-ui/src/views/stationDataQuery/inverterstatusdata/index.vue

@@ -123,11 +123,22 @@ export default {
     // 获取所有逆变器名称(列表转义应用)
     this.$axios.get('/inverterinfo/findAll').then((res) => {
       this.nameList = res.data
+      if (res.data.length > 0) {
+        // 默认选中前5个风机
+        let count = 0
+        for (let i = 0; i < res.data.length; i++) {
+          if (count <= 4) {
+            this.equipmentId.push(res.data[i].value)
+            count++
+          }
+        }
+      }
+      // 获取场站下拉列表
+      this.getStationCode()
     }).catch((error) => {
       this.$message.error('获取逆变器转义名称出错' + error)
     })
-    // 获取场站下拉列表
-    this.getStationCode()
+
   },
   mounted() {
 

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

@@ -137,13 +137,14 @@ export default {
           }
         }
       }
+      // 获取场站下拉列表
+      this.getStationCode()
     }).catch((error) => {
       this.$message.error('获取风机转义名称出错' + error)
     })
   },
   mounted() {
-    // 获取场站下拉列表
-    this.getStationCode()
+
   },
   computed: {},
   methods: {