Explorar o código

2023-03-30 update

1. areaCard 增加状态异常栏展示
moccus hai 1 ano
pai
achega
2d31e0333f
Modificáronse 1 ficheiros con 33 adicións e 5 borrados
  1. 33 5
      src/components/problem/areaCard.vue

+ 33 - 5
src/components/problem/areaCard.vue

@@ -11,6 +11,20 @@
           <el-collapse-item name="1">
             <template v-slot:title>
               <div class="tit1">
+                <div class="title">状态异常</div>
+                <span class="num">{{ statusRepair.length }}</span>
+              </div>
+            </template>
+            <MatrixBlock
+              area="problem"
+              @problem-click="handleClick"
+              @on-click="handleDetails"
+              :dataList="statusRepair"
+            ></MatrixBlock>
+          </el-collapse-item>
+          <el-collapse-item name="2">
+            <template v-slot:title>
+              <div class="tit1">
                 <div class="title">故障</div>
                 <span class="num">{{ faultList.length }}</span>
               </div>
@@ -23,7 +37,7 @@
             ></MatrixBlock>
           </el-collapse-item>
 
-          <el-collapse-item name="2">
+          <el-collapse-item name="3">
             <template v-slot:title>
               <div class="tit1">
                 <div class="title">维护</div>
@@ -38,7 +52,7 @@
             ></MatrixBlock>
           </el-collapse-item>
 
-          <el-collapse-item name="3">
+          <el-collapse-item name="4">
             <template v-slot:title>
               <div class="tit1">
                 <div class="title">离线</div>
@@ -53,7 +67,7 @@
             ></MatrixBlock>
           </el-collapse-item>
 
-          <el-collapse-item name="4">
+          <el-collapse-item name="5">
             <template v-slot:title>
               <div class="tit1">
                 <div class="title">挂牌</div>
@@ -68,7 +82,7 @@
             ></MatrixBlock>
           </el-collapse-item>
 
-          <el-collapse-item name="5">
+          <el-collapse-item name="6">
             <template v-slot:title>
               <div class="tit1">
                 <div class="title">风速功率不匹配</div>
@@ -124,7 +138,7 @@ export default {
   },
   data() {
     return {
-      activeNames: ["1", "2", "3", "4", "5"],
+      activeNames: ["1", "2", "3", "4", "5", "6"],
       dialogVisible: false,
       currentWindturbine: {},
       values: [],
@@ -133,6 +147,7 @@ export default {
       big: false,
       current: 0,
       faultList: [],
+      statusRepair: [],
       unpaidList: [],
       maintainList: [],
       offlineList: [],
@@ -198,6 +213,7 @@ export default {
         this.offlineList = [];
         this.listedList = [];
         this.faultList = [];
+        this.statusRepair = []
         this.unpaidList = [];
         let faultRecord = [];
         let flashingList = this.$store.state.faultList || [];
@@ -225,6 +241,9 @@ export default {
               (item) => val.windturbineId === item.windturbineID
             )[0]?.value;
           }
+          if(val.abnormalState === true) {
+            this.statusRepair.push(val)
+          }
           switch (val.status) {
             case 4:
               if (val.undeliveredStatus >= 4) {
@@ -256,6 +275,7 @@ export default {
       this.unpaidList = [];
       this.faultList = [];
       this.maintainList = [];
+      this.statusRepair = []
       this.offlineList = [];
       this.listedList = [];
 
@@ -268,6 +288,9 @@ export default {
             val.active = true;
           }
         });
+        if(val.abnormalState === true){
+          this.statusRepair.push(val)
+        }
         switch (val.status) {
           case 4:
             if (val.undeliveredStatus >= 4) {
@@ -320,6 +343,11 @@ export default {
           (item.active = !item.active), (flag = true);
         }
       });
+      this.statusRepair.forEach((item) => {
+        if (item.windturbineId === values.windturbineId) {
+          (item.active = !item.active), (flag = true);
+        }
+      });
       flag
         ? ""
         : this.maintainList.forEach((item) => {