Ver código fonte

问题修改

xujuanning 20 horas atrás
pai
commit
1a1d1daf36

+ 1 - 1
src/api/monthlyPerformanceAnalysis.js

@@ -457,7 +457,7 @@ export function getComponentsData(params) {
 export function getComponentsTableData(params) {
   return request({
     baseURL: process.env.VUE_APP_API,
-    url: `/original/realData2`,
+    url: `/original/realData`,
     method: "GET",
     params: params
   });

+ 9 - 8
src/views/economicsOperation/windTurbineMonitor/index.vue

@@ -5,7 +5,7 @@
         风机:
         <el-select v-model="windSObj" clearable @clear="checkAllWind = false" collapse-tags multiple>
             <el-option label="全选" :class="{ selected: checkAllWind }" @click="funCheckwindsAll"></el-option>
-            <el-option v-for="item in windSList" :key="item.id" :label="item.aname" :value="item.id">
+            <el-option v-for="item in windSList" :key="item.aname" :label="item.aname" :value="item.aname">
             </el-option>
         </el-select>
       </div>
@@ -191,6 +191,7 @@ export default {
         this.tableColumn.push(obj)
       })
       this.componentsVisible = false
+      this.funGetTableData()
     },
     // 获取风机
     async getWindData() {
@@ -202,8 +203,8 @@ export default {
       if (datas.data.length) {
         this.windSList = datas.data;
         datas.data.forEach((it, index) => {
-          if (index < 5) {
-            this.windSObj.push(it.id)
+          if (index < 10) {
+            this.windSObj.push(it.aname)
           }
         })
       } else {
@@ -240,14 +241,14 @@ export default {
       let that = this;
       let uni = []
       that.selectComponentsData.forEach((it, index) => {
-        if (index < 5) {
+        if (index < 10) {
           uni.push(it.uniformCode)
         }
       })
       let params = {
-        windturbineIds: that.windSObj,
-        uniformCodes: uni,
-        time: new Date(that.dateTime).getTime()
+        windturbineIds: that.windSObj.join(","),
+        uniformCodes: uni.join(","),
+        time: new Date(that.dateTime).getTime() / 1000
       }
       getComponentsTableData(params).then((res) => {
         if (res) {
@@ -280,7 +281,7 @@ export default {
     funCheckwindsAll() {
         this.checkAllWind = !this.checkAllWind;
         if (this.checkAllWind) {
-            this.windSObj = this.windSList.map((o) => o.id);
+            this.windSObj = this.windSList.map((o) => o.aname);
         } else {
             this.windSObj = [];
         }