Browse Source

沙盘增加联动事件

Koishi 3 years ago
parent
commit
64cae8bd8a
2 changed files with 142 additions and 100 deletions
  1. 8 2
      src/views/SandTable/SandTable.vue
  2. 134 98
      src/views/SandTable/component/ThreeModel1.vue

+ 8 - 2
src/views/SandTable/SandTable.vue

@@ -743,7 +743,7 @@ export default {
           stationid: that.wpId,
         },
         success(res) {
-			console.log(res)
+          console.log(res);
           let warnChartData = [];
           for (let key in res.data) {
             const ele = res.data[key];
@@ -888,7 +888,8 @@ export default {
     },
 
     // 点击风场或者光伏
-    clickMapItem(videoArray) {
+    clickMapItem(videoArray, wpId) {
+      this.wpId = wpId;
       this.videoArray.forEach((pEle, pIndex) => {
         pEle.forEach((cEle, cIndex) => {
           setTimeout(() => {
@@ -906,6 +907,11 @@ export default {
           }, (pIndex + cIndex + pIndex) * 150);
         });
       });
+      this.getWtInfo();
+      this.getWpHealthInfo();
+      this.getTop4Info();
+      this.getWarnMGT();
+      this.getRepertoryMGT();
     },
 
     // 页面跳转

+ 134 - 98
src/views/SandTable/component/ThreeModel1.vue

@@ -154,14 +154,17 @@ export default {
           position: null,
           name: "麻黄山",
           clickName: function () {
-            that.clickMapItem([
-              "MHS_FDC_SC",
-              "MG01_01_TD",
-              "MG01_02_TD",
-              "MG01_03_TD",
-              "MG01_04_TD",
-              "MG01_05_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "MHS_FDC_SC",
+                "MG01_01_TD",
+                "MG01_02_TD",
+                "MG01_03_TD",
+                "MG01_04_TD",
+                "MG01_05_TD",
+              ],
+              "MHS_FDC"
+            );
           },
           clickFan: () => {
             this.showFanInfo(this.htmlLayer[0].position);
@@ -170,14 +173,17 @@ export default {
             this.lsl = this.htmlLayer[0].lsl;
             this.csl = this.htmlLayer[0].csl;
             this.gzsl = this.htmlLayer[0].gzsl;
-            that.clickMapItem([
-              "MHS_FDC_SC",
-              "MG01_01_TD",
-              "MG01_02_TD",
-              "MG01_03_TD",
-              "MG01_04_TD",
-              "MG01_05_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "MHS_FDC",
+                "MG01_01_TD",
+                "MG01_02_TD",
+                "MG01_03_TD",
+                "MG01_04_TD",
+                "MG01_05_TD",
+              ],
+              "MHS_FDC"
+            );
           },
         },
         // 牛首山
@@ -195,14 +201,17 @@ export default {
           position: null,
           name: "牛首山",
           clickName: function () {
-            that.clickMapItem([
-              "NSS_FDC_SC",
-              "NG01_27_TD",
-              "NG01_28_TD",
-              "NG01_30_TD",
-              "NG01_31_TD",
-              "NG01_32_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "NSS_FDC_SC",
+                "NG01_27_TD",
+                "NG01_28_TD",
+                "NG01_30_TD",
+                "NG01_31_TD",
+                "NG01_32_TD",
+              ],
+              "NSS_FDC"
+            );
           },
           clickFan: () => {
             this.showFanInfo(this.htmlLayer[1].position);
@@ -211,14 +220,17 @@ export default {
             this.lsl = this.htmlLayer[1].lsl;
             this.csl = this.htmlLayer[1].csl;
             this.gzsl = this.htmlLayer[1].gzsl;
-            that.clickMapItem([
-              "NSS_FDC_SC",
-              "NG01_27_TD",
-              "NG01_28_TD",
-              "NG01_30_TD",
-              "NG01_31_TD",
-              "NG01_32_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "NSS_FDC_SC",
+                "NG01_27_TD",
+                "NG01_28_TD",
+                "NG01_30_TD",
+                "NG01_31_TD",
+                "NG01_32_TD",
+              ],
+              "NSS_FDC"
+            );
           },
         },
         // 青山
@@ -236,14 +248,17 @@ export default {
           position: null,
           name: "青山",
           clickName: function () {
-            that.clickMapItem([
-              "QS_FDC_SC",
-              "QG01_67_TD",
-              "QG01_69_TD",
-              "QG01_71_TD",
-              "QG01_72_TD",
-              "QG01_73_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "QS_FDC_SC",
+                "QG01_67_TD",
+                "QG01_69_TD",
+                "QG01_71_TD",
+                "QG01_72_TD",
+                "QG01_73_TD",
+              ],
+              "QS_FDC"
+            );
           },
           clickFan: () => {
             this.showFanInfo(this.htmlLayer[2].position);
@@ -252,14 +267,17 @@ export default {
             this.lsl = this.htmlLayer[2].lsl;
             this.csl = this.htmlLayer[2].csl;
             this.gzsl = this.htmlLayer[2].gzsl;
-            that.clickMapItem([
-              "QS_FDC_SC",
-              "QG01_67_TD",
-              "QG01_69_TD",
-              "QG01_71_TD",
-              "QG01_72_TD",
-              "QG01_73_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "QS_FDC_SC",
+                "QG01_67_TD",
+                "QG01_69_TD",
+                "QG01_71_TD",
+                "QG01_72_TD",
+                "QG01_73_TD",
+              ],
+              "QS_FDC"
+            );
           },
         },
         // 石板泉
@@ -277,14 +295,17 @@ export default {
           position: null,
           name: "石板泉",
           clickName: function () {
-            that.clickMapItem([
-              "SBQ_FDC_SC",
-              "SG01_01_TD",
-              "SG01_02_TD",
-              "SG01_03_TD",
-              "SG01_04_TD",
-              "SG01_05_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "SBQ_FDC_SC",
+                "SG01_01_TD",
+                "SG01_02_TD",
+                "SG01_03_TD",
+                "SG01_04_TD",
+                "SG01_05_TD",
+              ],
+              "SBQ_FDC"
+            );
           },
           clickFan: () => {
             this.showFanInfo(this.htmlLayer[3].position);
@@ -293,14 +314,17 @@ export default {
             this.lsl = this.htmlLayer[3].lsl;
             this.csl = this.htmlLayer[3].csl;
             this.gzsl = this.htmlLayer[3].gzsl;
-            that.clickMapItem([
-              "SBQ_FDC_SC",
-              "SG01_01_TD",
-              "SG01_02_TD",
-              "SG01_03_TD",
-              "SG01_04_TD",
-              "SG01_05_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "SBQ_FDC_SC",
+                "SG01_01_TD",
+                "SG01_02_TD",
+                "SG01_03_TD",
+                "SG01_04_TD",
+                "SG01_05_TD",
+              ],
+              "SBQ_FDC"
+            );
           },
         },
         // 香山
@@ -318,14 +342,17 @@ export default {
           position: null,
           name: "香山",
           clickName: function () {
-            that.clickMapItem([
-              "XS_FDC_SC",
-              "XG01_26_TD",
-              "XG01_27_TD",
-              "XG01_29_TD",
-              "XG01_30_TD",
-              "XG01_31_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "XS_FDC_SC",
+                "XG01_26_TD",
+                "XG01_27_TD",
+                "XG01_29_TD",
+                "XG01_30_TD",
+                "XG01_31_TD",
+              ],
+              "XS_FDC"
+            );
           },
           clickFan: () => {
             this.showFanInfo(this.htmlLayer[4].position);
@@ -334,14 +361,17 @@ export default {
             this.lsl = this.htmlLayer[4].lsl;
             this.csl = this.htmlLayer[4].csl;
             this.gzsl = this.htmlLayer[4].gzsl;
-            that.clickMapItem([
-              "XS_FDC_SC",
-              "XG01_26_TD",
-              "XG01_27_TD",
-              "XG01_29_TD",
-              "XG01_30_TD",
-              "XG01_31_TD",
-            ]);
+            that.clickMapItem(
+              [
+                "XS_FDC_SC",
+                "XG01_26_TD",
+                "XG01_27_TD",
+                "XG01_29_TD",
+                "XG01_30_TD",
+                "XG01_31_TD",
+              ],
+              "XS_FDC"
+            );
           },
         },
         // 大武口
@@ -464,14 +494,17 @@ export default {
           position: null,
           name: "国电大厦",
           clickName: function () {
-            that.clickMapItem([
-              "SBQ_FDC_SC",
-              "NSS_FDC_SC",
-              "QS_FDC_SC",
-              "MHS_FDC_SC",
-              "XS_FDC_SC",
-              "PL_GDC_SC",
-            ]);
+            that.clickMapItem(
+              [
+                "SBQ_FDC_SC",
+                "NSS_FDC_SC",
+                "QS_FDC_SC",
+                "MHS_FDC_SC",
+                "XS_FDC_SC",
+                "PL_GDC_SC",
+              ],
+              "0"
+            );
           },
           clickFan: () => {
             this.showFanInfo(this.htmlLayer[10].position);
@@ -480,14 +513,17 @@ export default {
             this.lsl = this.htmlLayer[10].lsl;
             this.csl = this.htmlLayer[10].csl;
             this.gzsl = this.htmlLayer[10].gzsl;
-            that.clickMapItem([
-              "SBQ_FDC_SC",
-              "NSS_FDC_SC",
-              "QS_FDC_SC",
-              "MHS_FDC_SC",
-              "XS_FDC_SC",
-              "PL_GDC_SC",
-            ]);
+            that.clickMapItem(
+              [
+                "SBQ_FDC_SC",
+                "NSS_FDC_SC",
+                "QS_FDC_SC",
+                "MHS_FDC_SC",
+                "XS_FDC_SC",
+                "PL_GDC_SC",
+              ],
+              "0"
+            );
           },
         },
       ],
@@ -565,8 +601,8 @@ export default {
       }
     },
     // 点击风场或者光伏传回点击的值
-    clickMapItem(videoArray = []) {
-      this.$emit("clickMapItem", videoArray);
+    clickMapItem(videoArray = [], wpId = "") {
+      this.$emit("clickMapItem", videoArray, wpId);
     },
     // Vector3 to screen
     vector3ToScreen: function (position) {