Browse Source

问题修改

SunZehao 1 month ago
parent
commit
2582f64cb5

+ 2 - 2
src/api/zhbj/index.js

@@ -1060,7 +1060,7 @@ export function apiGeWarningeconreportReport(params) {
 export function apiGetwinddirection(params) {
     return request({
         baseURL: process.env.VUE_APP_API,
-        url: `winddirecton/machine?wpid=${params.wpid}`,
+        url: `winddirecton/machine?wpid=${params.wpid}&year=${params.year}`,
         method: 'get'
     })
 }
@@ -1068,7 +1068,7 @@ export function apiGetwinddirection(params) {
 export function apiGetweatherMachine(params) {
     return request({
         baseURL: process.env.VUE_APP_API,
-        url: `winddirecton/weatherMachine?wpid=${params.wpid}`,
+        url: `winddirecton/weatherMachine?wpid=${params.wpid}&year=${params.year}`,
         method: 'get'
     })
 }

+ 5 - 2
src/components/windDetail/index.vue

@@ -339,13 +339,13 @@
                             <div class="numBot">总故障</div>
                         </div>
                     </div>
-                    <div class="warnItems" v-for="(it, index) in warnTypeData.dataColumn1" :key="index" @click="getwarnTableData(it)">
+                    <div class="warnItems" v-for="(it, index) in warnTypeData.dataColumn1" :key="index" @click="getwarnTableDataFn(it)">
                         <div class="warnItemLeft">{{it.count}}</div>
                         <div class="warnItemRight">{{it.name}}</div>
                     </div>
                 </div>
                 <div class="warn" v-for="(it, index) in warnTypeData.dataColumnOther" :key="index">
-                    <div class="warnItems" v-for="(itv, index) in it" :key="index" @click="getwarnTableData(itv)">
+                    <div class="warnItems" v-for="(itv, index) in it" :key="index" @click="getwarnTableDataFn(itv)">
                         <div class="warnItemLeft" :class="isRed(index)">{{itv.count}}</div>
                         <div class="warnItemRight" :class="isRed(index)">{{itv.name}}</div>
                     </div>
@@ -725,6 +725,9 @@ export default {
             }
         })
     },
+    getwarnTableDataFn(data) {
+        this.getwarnTableData(data, this.wind.wtid)
+    },
     getwarnTableData(data, id) {
         let that = this
         let params = {

+ 4 - 4
src/views/IntegratedAlarm/DetailMatrix/index.vue

@@ -871,7 +871,7 @@
             requestData(first) {
                 if (first) {
                     // this.BASE.showLoading();
-                    this.changeData(first, dataJson)
+                    // this.changeData(first, dataJson)
                 }
                 api
                     .matrixDetailPush({
@@ -886,9 +886,9 @@
             },
 
             changeData(first, res) {
-                if (Object.values(res.data.data).length) {
-                    let sourceMap = res.data.data;
-                    let windNumData = res.data.data.powerVos[0]
+                if (Object.values(res.data).length) {
+                    let sourceMap = res.data;
+                    let windNumData = res.data.powerVos[0]
                     this.titleListNew.forEach(it => {
                         it.value1 = windNumData[it.code]
                     })