ln 1 年之前
父节点
当前提交
141c88a1c0
共有 3 个文件被更改,包括 21 次插入15 次删除
  1. 10 0
      src/api/index.js
  2. 7 11
      src/components/BasicInformationDetail.vue
  3. 4 4
      src/components/modeControl/modeControl.vue

+ 10 - 0
src/api/index.js

@@ -400,6 +400,15 @@ const returnSetting = (data) => {
         method: "get",
     });
 };
+
+//刷新报警信息
+const getAlarmSnap = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_SHARDINGURL,
+        url: `/alarm/snap?stationid=${data.stationid}&category1=${data.category1}&windturbineid=${data.windturbineid}&isopened=${data.isopened}`,
+        method: "get",
+    });
+};
 export default {
     login,
     getStation,
@@ -452,4 +461,5 @@ export default {
     recommended,
     statusChange,
     returnSetting,
+    getAlarmSnap,
 };

+ 7 - 11
src/components/BasicInformationDetail.vue

@@ -212,7 +212,7 @@
                 'text-align': 'center',
               }"
             >
-              <el-table-column prop="alertTime" label="时间" width="220">
+              <el-table-column prop="lastUpdateTime" label="时间" width="220">
               </el-table-column>
               <el-table-column prop="alertText" label="故障信息" width="280">
               </el-table-column>
@@ -316,7 +316,7 @@ export default {
       selectValue: "7",
       healthInfo: {},
       dataValues: {},
-      warning: ["-"],
+      warning: [],
       showData: [],
       partsName: "",
       modelData: {},
@@ -416,19 +416,15 @@ export default {
         });
     },
     async getWarning() {
-      await api.getWindturbineWarning({
-          pagenum: 1000,
-          pagesize: 1,
+      await api.getAlarmSnap({
+          stationid: this.windturbine.stationId,
+          category1: 'windturbine',
           windturbineid: this.windturbine.windturbineId,
-          starttime: dayjs(new Date(this.windturbine.ts).getTime()- 172800000).format('YYYY-MM-DD HH:mm:ss'),
-          endtime:  dayjs(new Date(this.windturbine.ts).getTime()).format('YYYY-MM-DD HH:mm:ss'),
+          isopened: 1,
         })
         .then((msg) => {
           if (msg.data) {
-            msg.data.records.forEach((item) => {
-                item.alertTime = dayjs(item.alertTime).format("MM-DD HH:mm:ss");
-              });
-            this.warning = msg.data.records;
+            this.warning = msg.data;
             // this.warningDeal() 
           }
         })

+ 4 - 4
src/components/modeControl/modeControl.vue

@@ -55,7 +55,7 @@
                                 $store.state.currentStation
                                 ]?.realTimePower?.value.toFixed(2)
                             : showDate.realTimePower?.value.toFixed(2)
-                        }}
+                        }} <div style="font-size: 12px;">MW</div>
                         </div>
                     </div>
                     <div class="power1" @dblclick="
@@ -78,7 +78,7 @@
                                 $store.state.currentStation
                                 ]?.theoreticalPower?.value.toFixed(2)
                             : showDate.theoreticalPower?.value.toFixed(2)
-                        }}
+                        }}<div style="font-size: 12px;">MW</div>
                         </div>
                     </div>
                     <div
@@ -104,7 +104,7 @@
                                 $store.state.currentStation
                                 ]?.agcPowerSet?.value.toFixed(2)
                             : showDate.agcPowerSet?.value.toFixed(2)
-                        }}
+                        }}<div style="font-size: 12px;">MW</div>
                         </div>
                     </div>
                 </div>
@@ -694,7 +694,7 @@ export default {
   color: #ffffff;
   position: relative;
   bottom: 15%;
-  left: 11%;
+  left: 3%;
 }
 
 .power {