Browse Source

首页地貌图修改

chenminghua 3 years ago
parent
commit
bcfc0742e7

+ 18 - 0
src/views/Home/Home.vue

@@ -39,6 +39,7 @@
           :data="fcmap"
           :xtData="xtmap"
           @mapClick="changeShowType"
+          @backStation="onBackStation"
         ></Map>
       </div>
       <div class="top-right-panel">
@@ -766,6 +767,7 @@ export default {
       },
       dialogType: null,
       wpId: "0",
+      wpName: "",  //安全天数下面的场站名
       fcmap: {},
       xtmap: {},
       dialogShow: false,
@@ -1003,6 +1005,9 @@ export default {
 
     // 点击地图展示类型
     changeShowType(wpId, planBtnName) {
+      console.log('changeShowType wpId: ' + wpId)
+      console.log('changeShowType planBtnName: ' + planBtnName)
+      this.wpName = planBtnName;
       this.planBtnName = planBtnName;
       this.jczbmap = {};
       clearInterval(this.timmer);
@@ -1034,6 +1039,19 @@ export default {
       });
     },
 
+    // 点击安全天数下的场站按钮重置数据
+    onBackStation(){
+      if (this.wpId.indexOf("FDC") == -1){
+        clearInterval(this.timmer);
+        this.timmer = null;
+        this.wpId = this.wpId.substring(0, this.wpId.indexOf("0")) + "_FDC";
+        this.requestData(false);
+        this.timmer = setInterval(() => {
+          this.requestData(false);
+        }, this.$store.state.websocketTimeSec);
+      }
+    },
+
     // 显示功率复核图表
     showPowerChart(res) {
       this.dialogTitle = res.dialogTitle;

+ 7 - 1
src/views/Home/components/map.vue

@@ -26,7 +26,7 @@
       </div>
     </div>
     <div class="name-box" v-if="currentMode != 'NX'">
-      <div class="name-box-title">{{ currentTitle }}</div>
+      <div class="name-box-title" @click="onBackStation">{{ currentTitle }}</div>
       <div class="name-box-period" v-show="currentPeriod != 'ZERO'">
         <span class="name-box-period-label">期次:</span>
         <span class="name-box-period-value"
@@ -290,6 +290,11 @@ export default {
       this.currentPeriod = period;
       this.currentMode = "SUB";
     },
+    // 返回当前场站
+    onBackStation(){
+      this.currentPeriod = "ZERO"
+      this.$emit("backStation");
+    }
   },
   watch: {
     wpId(res) {
@@ -357,6 +362,7 @@ export default {
       font-weight: 400;
       color: #ffffff;
       line-height: 1;
+      cursor: pointer;
     }
 
     .name-box-period {

+ 8 - 3
src/views/Home/components/map/MHS_FDC.vue

@@ -135,7 +135,7 @@
         fill="#119933"
         opacity="0"
         class="map-float"
-        data-period="二期"
+        data-period="MHS02_GC,麻黄山二期"
       />
       <path
         d="M473.4,384.8c-3,0-6,0-9,0c-5-2.6-10-5.3-15-7.8c-3.4-1.7-7.1-2.6-11-3c-8.9-0.9-17.8-1.8-26.7-2.9c-5-0.6-9.7-2.2-14-5
@@ -156,7 +156,7 @@
         fill="#119933"
         opacity="0"
         class="map-float"
-        data-period="一期"
+        data-period="MHS01_GC,麻黄山一期"
       />
       <g
         class="item-label"
@@ -320,9 +320,11 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "麻黄山", planBtnName.substring(planBtnName.length - 2));
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "麻黄山", planBtnName.substring(planBtnName.length - 2));
     },
     click: function (id) {
       this.activeId = id;
@@ -350,7 +352,10 @@ export default {
           });
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
-          that.$emit("changePeriod", "麻黄山", period);
+          let strs = period.split(",");
+          that.$emit("changePeriod", "麻黄山", strs[1].substring(strs[1].length - 2));
+          that.changeshowType(strs[0], strs[1]);
+          that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0;
         });
       });

+ 9 - 4
src/views/Home/components/map/NSS_FDC.vue

@@ -155,7 +155,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="三期"
+            data-period="NSS03_GC,牛首三期"
           />
           <path
             d="M68,294c-5,0-10,0-15,0c-11.1-6.4-24-10.3-31.5-21.9c-0.4-0.7-1.2-1.2-1.9-1.5c-8.6-3.4-10.2-11.6-10.4-18.8
@@ -181,7 +181,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="二期"
+            data-period="NSS02_GC,牛首二期"
           />
           <path
             d="M573,171c0,8,0,16,0,24c-0.9,1.8-1.8,3.6-1.8,5.6c0,4.1-2.3,6.9-4.9,9.9c-5.1,5.8-11.7,7.9-18.9,8.7
@@ -200,7 +200,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="一期"
+            data-period="NSS01_GC,牛首一期"
           />
         </g>
       </g>
@@ -495,9 +495,11 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "牛首山", planBtnName.substring(planBtnName.length - 2));
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "牛首山", planBtnName.substring(planBtnName.length - 2));
     },
     click: function (id) {
       this.activeId = id;
@@ -528,7 +530,10 @@ export default {
           });
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
-          that.$emit("changePeriod", "牛首山", period);
+          let strs = period.split(",");
+          that.$emit("changePeriod", "牛首山", strs[1].substring(strs[1].length - 2));
+          that.changeshowType(strs[0], strs[1]);
+          that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0.2;
         });
       });

+ 9 - 4
src/views/Home/components/map/QS_FDC.vue

@@ -145,7 +145,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="一期"
+            data-period="QS01_GC,青山一期"
           />
           <path
             d="M122,61c4.3,0,8.7,0,13,0c3.7,0.7,7.5,1.2,11.2,2c10.9,2.5,20.9,7,28.7,15.1c6.3,6.6,11.4,14.4,19.2,19.5
@@ -161,7 +161,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="二期"
+            data-period="QS02_GC,青山二期"
           />
           <path
             d="M408,371c-0.7,0-1.3,0-2,0c-3.6-2.1-7.4-2.6-11.5-2c-2.9,0.4-6.9,1.4-8.2-1.8c-2-5-6.1-5.6-10.2-6.9
@@ -184,7 +184,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="三期"
+            data-period="QS03_GC,青山三期"
           />
         </g>
       </g>
@@ -458,9 +458,11 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "青山", planBtnName.substring(planBtnName.length - 2));
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "青山", planBtnName.substring(planBtnName.length - 2));
     },
     click: function (id) {
       this.activeId = id;
@@ -491,7 +493,10 @@ export default {
           });
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
-          that.$emit("changePeriod", "青山", period);
+          let strs = period.split(",");
+          that.$emit("changePeriod", "青山", strs[1].substring(strs[1].length - 2));
+          that.changeshowType(strs[0], strs[1]);
+          that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0.2;
         });
       });

+ 10 - 5
src/views/Home/components/map/SBQ_FDC.vue

@@ -159,7 +159,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="二期"
+            data-period="SBQ02_GC,石板泉二期"
           />
           <path
             d="M9,316c-3,0-7.2,1.2-8.7-0.3C-1.2,314.2,0,310,0,307c1.9-4.8,2.3-9.8,1.6-14.8c-0.8-6.4,0.9-11.8,4.3-16.9
@@ -181,7 +181,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="三期"
+            data-period="SBQ03_GC,石板泉三期"
           />
           <path
             d="M499,40c1,0,2,0,3,0c1.3,1,2.6,2.1,3.9,3c4.2,2.6,9.2,4.6,11.8,9c2,3.3,4.5,4.6,7.9,5.3c7.9,1.7,14.3,5.4,19.6,11.8
@@ -198,7 +198,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="四期"
+            data-period="SBQ04_GC,石板泉四期"
           />
           <path
             d="M698,207c0,8.7,0,17.3,0,26c-3.9,2.6-8.3,5.4-8.5,10.5c-0.3,8.1-4.6,12.7-11,16.8c-5.4,3.5-9.4,9.3-15.5,11.6
@@ -221,7 +221,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="一期"
+            data-period="SBQ01_GC,石板泉一期"
           />
         </g>
       </g>
@@ -578,9 +578,11 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "石板泉", planBtnName.substring(planBtnName.length - 2));
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "石板泉", planBtnName.substring(planBtnName.length - 2));
     },
     click: function (id) {
       this.activeId = id;
@@ -611,7 +613,10 @@ export default {
           });
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
-          that.$emit("changePeriod", "石板泉", period);
+          let strs = period.split(",");
+          that.$emit("changePeriod", "石板泉", strs[1].substring(strs[1].length - 2));
+          that.changeshowType(strs[0], strs[1]);
+          that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0.2;
         });
       });

+ 8 - 3
src/views/Home/components/map/XS_FDC.vue

@@ -134,7 +134,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="二期"
+            data-period="XS02_GC,香山二期"
           />
           <path
             d="M592,14c1.7,0,3.3,0,5,0c2,2.3,4.7,3.7,7.4,5c7,3.4,14.2,6.6,21.2,10.2c11.2,5.7,19.3,13.5,17.5,27.5c-0.3,2.6,0,5.3,0.1,8
@@ -156,7 +156,7 @@
             fill="#119933"
             opacity="0"
             class="map-float"
-            data-period="一期"
+            data-period="XS01_GC,香山一期"
           />
         </g>
       </g>
@@ -325,9 +325,11 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "香山", planBtnName.substring(planBtnName.length - 2));
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
+      this.$emit("changePeriod", "香山", planBtnName.substring(planBtnName.length - 2));
     },
     click: function (id) {
       this.activeId = id;
@@ -358,7 +360,10 @@ export default {
           });
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
-          that.$emit("changePeriod", "香山", period);
+          let strs = period.split(",");
+          that.$emit("changePeriod", "香山", strs[1].substring(strs[1].length - 2));
+          that.changeshowType(strs[0], strs[1]);
+          that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0.2;
         });
       });

+ 32 - 4
src/views/malfunctionRecall/index.vue

@@ -102,23 +102,40 @@
     <div>
       <ComTable :data="tableData" height="85vh"></ComTable>
     </div>
+    <div>
+      <el-dialog
+        title="故障诊断"
+        v-model="dialogVisible"
+        width="1400px"
+        top="10vh"
+        custom-class="modal hide-header"
+        :close-on-click-modal="false"
+        :before-close="onClickDialogClose"
+      >
+        <fault-diagnosis :data="rowitem"/>
+      </el-dialog>
+    </div>
   </div>
 </template>
 
 <script>
 import ComTable from "@com/coms/table/table.vue";
+import FaultDiagnosis from "../HealthControl/fault-diagnosis.vue";
 
 export default {
-  components: { ComTable },
+  components: { ComTable, FaultDiagnosis },
   data() {
+    const that = this;
     return {
       value1: "",
       value2: "",
       wpId: "",
       wpArray: [],
+      rowitem: "",
       wpName: "",
       wtId: "",
       type: "2",
+      dialogVisible: false,
       tableData: {
         column: [
           {
@@ -129,7 +146,7 @@ export default {
           },
           {
             name: "机组",
-            field: "wtName",
+            field: "windTurbineId",
             is_num: false,
             is_light: false,
           },
@@ -171,7 +188,9 @@ export default {
             template() {
               return "<el-button type='text' style='cursor: pointer;'>回溯</el-button>";
             },
-            click(e, row) {},
+             click(e, row) {
+              that.onClickOption(row);
+            },
           },
         ],
         data: [],
@@ -279,7 +298,7 @@ export default {
               for (var i = 0; i < data.length; i++) {
                 let obj = {
                   wpName: data[i].wpName,
-                  wtName: data[i].wtName,
+                  windTurbineId: data[i].windTurbineId,
                   stopTime: new Date(data[i].stopTime).formatDate(
                     "yyyy-MM-dd hh:mm:ss"
                   ),
@@ -301,6 +320,15 @@ export default {
         },
       });
     },
+    // 回放按钮
+    onClickOption(row) {
+      this.rowitem = row
+      this.dialogVisible = true;
+    },
+    // 关闭弹窗
+    onClickDialogClose() {
+      this.dialogVisible = false;
+    },
   },
 };
 </script>