xushining 3 tahun lalu
induk
melakukan
98b3d1f3a1

+ 3 - 0
src/components/area/windturbine/BasicInformationDetail.vue

@@ -57,6 +57,9 @@ import BackgroundData from "../../../assets/script/BackgroundData";
 
 export default {
   name: "BasicInformationDetail",
+  props:{
+    alarms:Object,
+  },
   data() {
     return {
       BasicInfo: {},

+ 4 - 2
src/components/area/windturbine/WindturbineDetailPages.vue

@@ -49,7 +49,7 @@
 
       <el-tabs type="border-card" tab-position="bottom" stretch="true">
         <el-tab-pane label="基本信息">
-          <BasicInformationDetail ref="BasicInfo"></BasicInformationDetail>
+          <BasicInformationDetail ref="BasicInfo" :alarms="alarms"></BasicInformationDetail>
         </el-tab-pane>
         <el-tab-pane label="机舱信息" disabled>
           <BasicInformationDetail></BasicInformationDetail>
@@ -99,6 +99,7 @@ export default {
       line:"",
       alarmTime:"",
       alarmContent:"",
+      alarms:{},
     };
   },
   created() {
@@ -128,12 +129,13 @@ export default {
     initData(){
       axios.get(`http://${config.calcUrl}/windturbine/line/${this.windturbine.windturbineId}`)
       .then(msg=>this.line=msg.data);
-      axios.get(`http://${config.calcUrl}/alarm/real-time-alarm?objectId=${this.windturbine.windturbineId}&pageIndex=1&pageSize=1`)
+      axios.get(`http://${config.calcUrl}/alarm/real-time-alarm?objectId=${this.windturbine.windturbineId}&pageIndex=1&pageSize=50`)
       .then(msg=>{
         var vs = msg.data;
         if(vs.length<=0)return;
         this.alarmTime = BackgroundData.getInstance().formatDate(vs[0].lastUpdateTime);
         this.alarmContent = vs[0].alertText;
+        this.alarms = msg.data;
       })
       .catch(err=>{
         console.log(err);