lining 3 years ago
parent
commit
c80ae69a39

+ 176 - 79
package-lock.json

@@ -2096,44 +2096,6 @@
           "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
           "dev": true
         },
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995588464&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
-          "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646614989&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz",
-          "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz",
-          "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
-          "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
-          "dev": true,
-          "optional": true
-        },
         "debug": {
           "version": "4.3.2",
           "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
@@ -2154,25 +2116,6 @@
             "universalify": "^0.1.0"
           }
         },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz",
-          "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
-          "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
         "ms": {
           "version": "2.1.2",
           "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -2187,28 +2130,6 @@
           "requires": {
             "minipass": "^3.1.1"
           }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703455199&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
-          "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.4.0",
-          "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.4.0.tgz",
-          "integrity": "sha1-ec+SPvAMw5b1k7LnljkEZA9BzxA=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          }
         }
       }
     },
@@ -2621,6 +2542,15 @@
       "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==",
       "dev": true
     },
+    "adler-32": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
+      "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
+      "requires": {
+        "exit-on-epipe": "~1.0.1",
+        "printj": "~1.1.0"
+      }
+    },
     "aggregate-error": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
@@ -4116,6 +4046,16 @@
       "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
       "dev": true
     },
+    "cfb": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.0.tgz",
+      "integrity": "sha512-sXMvHsKCICVR3Naq+J556K+ExBo9n50iKl6LGarlnvuA2035uMlGA/qVrc0wQtow5P1vJEw9UyrKLCbtIKz+TQ==",
+      "requires": {
+        "adler-32": "~1.2.0",
+        "crc-32": "~1.2.0",
+        "printj": "~1.1.2"
+      }
+    },
     "chalk": {
       "version": "2.4.2",
       "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -4483,6 +4423,11 @@
       "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
       "dev": true
     },
+    "codepage": {
+      "version": "1.15.0",
+      "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
+      "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA=="
+    },
     "collection-visit": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -4968,6 +4913,15 @@
         }
       }
     },
+    "crc-32": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",
+      "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==",
+      "requires": {
+        "exit-on-epipe": "~1.0.1",
+        "printj": "~1.1.0"
+      }
+    },
     "create-ecdh": {
       "version": "4.0.4",
       "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
@@ -6618,6 +6572,11 @@
         "strip-eof": "^1.0.0"
       }
     },
+    "exit-on-epipe": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
+      "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="
+    },
     "expand-brackets": {
       "version": "2.1.4",
       "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -6891,6 +6850,11 @@
         "pend": "~1.2.0"
       }
     },
+    "fflate": {
+      "version": "0.3.11",
+      "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.3.11.tgz",
+      "integrity": "sha512-Rr5QlUeGN1mbOHlaqcSYMKVpPbgLy0AWT/W0EHxA6NGI12yO1jpoui2zBBvU2G824ltM6Ut8BFgfHSBGfkmS0A=="
+    },
     "figgy-pudding": {
       "version": "3.5.2",
       "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz",
@@ -7025,6 +6989,11 @@
       "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
       "dev": true
     },
+    "frac": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
+      "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
+    },
     "fragment-cache": {
       "version": "0.2.1",
       "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
@@ -11236,6 +11205,11 @@
         "renderkid": "^2.0.4"
       }
     },
+    "printj": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
+      "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ=="
+    },
     "process": {
       "version": "0.11.10",
       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -12868,6 +12842,14 @@
       "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
       "dev": true
     },
+    "ssf": {
+      "version": "0.11.2",
+      "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
+      "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
+      "requires": {
+        "frac": "~1.1.2"
+      }
+    },
     "sshpk": {
       "version": "1.16.1",
       "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
@@ -14596,6 +14578,87 @@
         }
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.5.0",
+      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz",
+      "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-router": {
       "version": "4.0.10",
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.10.tgz",
@@ -15372,6 +15435,16 @@
         }
       }
     },
+    "wmf": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
+      "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
+    },
+    "word": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
+      "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="
+    },
     "workbox-background-sync": {
       "version": "4.3.1",
       "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-4.3.1.tgz",
@@ -15633,6 +15706,30 @@
       "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
       "dev": true
     },
+    "xlsx": {
+      "version": "0.17.1",
+      "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.17.1.tgz",
+      "integrity": "sha512-SrvK+kMEjiVIKYyJSjSIJwzm2cZn8nQWVh708g7O+pTsmgjoa+uYNLEUn7jmwQdMI/ffCHcY5yEvwBXssBwpRA==",
+      "requires": {
+        "adler-32": "~1.2.0",
+        "cfb": "^1.1.4",
+        "codepage": "~1.15.0",
+        "commander": "~2.17.1",
+        "crc-32": "~1.2.0",
+        "exit-on-epipe": "~1.0.1",
+        "fflate": "^0.3.8",
+        "ssf": "~0.11.2",
+        "wmf": "~1.0.1",
+        "word": "~0.3.0"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.17.1",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
+          "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
+        }
+      }
+    },
     "xmlbuilder": {
       "version": "15.1.1",
       "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",

+ 2 - 1
package.json

@@ -22,7 +22,8 @@
     "stompjs": "^2.3.3",
     "vue": "^3.0.0",
     "vue-router": "^4.0.0-0",
-    "vuex": "^4.0.0-0"
+    "vuex": "^4.0.0-0",
+    "xlsx": "^0.17.1"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.5.0",

+ 7 - 5
src/App.vue

@@ -39,7 +39,7 @@
     },
     created: function () {
       this.initData()
-      this.ceshi()
+      this.subscribe()
     },
     methods: {
       initData: function () {
@@ -64,16 +64,18 @@
       // heartbeat(msg){
       //   console.log(msg);
       // },
-      ceshi() {
+      subscribe() {
         setTimeout(() => {
-          this.ceshi()
-        }, 6000);
+          this.subscribe()
+        }, 30000);
         if (!this.$store.state.observers) {
           let mb = MessageBridge.getInstance();
           let windturbine = [{ key: "/topic/windturbine", action: this.windturbineMessage }];
           let popup = [{ key: "/topic/fault-popup", action: this.faultMessage }];
           let title = [{ key: "/topic/title-info", action: this.titleInfos }];
-          mb.register(title);xz
+          var suggestion = [{ key: "/topic/suggestion", action: this.suggestion }];
+          mb.register(suggestion);
+          mb.register(title);
           mb.register(windturbine);
           mb.register(popup);
           this.$store.commit('observers', true)

+ 26 - 2
src/api/index.js

@@ -75,7 +75,28 @@ const sendRecommend = (data) => {
 const getPower = (data) => {
     return request({
         baseURL:process.env.VUE_APP_ADAPTERURL,
-        url: `/ts/history/snap?tagName=${data.tagName}&startTs=${data.startTs}&endTs=${data.endTs}`,
+        url: `/ts/history/snap?tagName=${data.tagName}&startTs=${data.startTs}&endTs=${data.endTs}&interval=${data.interval}`,
+        method: "get",
+    });
+};
+const getOriginalPower = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_ADAPTERURL,
+        url: `/ts/history/raw?tagName=${data.tagName}&startTs=${data.startTs}&endTs=${data.endTs}`,
+        method: "get",
+    });
+};
+const getWindturbinePower = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_ADAPTERURL,
+        url: `/ts/history/snap?thingId=${data.thingId}&uniformCode=${data.uniformCode}&startTs=${data.startTs}&endTs=${data.endTs}&thingType=${data.thingType}&interval=${data.interval}`,
+        method: "get",
+    });
+};
+const getOriginalWindturbinePower = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_ADAPTERURL,
+        url: `/ts/history/raw?thingId=${data.thingId}&uniformCode=${data.uniformCode}&startTs=${data.startTs}&endTs=${data.endTs}&thingType=${data.thingType}`,
         method: "get",
     });
 };
@@ -126,9 +147,12 @@ export default {
     sendWarning,
     sendRecommend,
     getPower,
+    getOriginalPower,
     getWindWarning,
     getHealthDate,
     getDetial,
     getWarning,
-    getCustomerLock
+    getCustomerLock,
+    getWindturbinePower,
+    getOriginalWindturbinePower,
 };

+ 2 - 2
src/assets/styles/main.css

@@ -46,9 +46,9 @@ body,
   color: rgb(220, 220, 220) !important;
 }
 .el-input__inner{
-  background-color: rgb(100,100,100) !important;
+  /* background-color: rgb(100,100,100) !important; */
   color: rgb(220, 220, 220) !important;
-  border: 1px solid #1D6AEB !important;
+  border: 1px solid rgba(77, 77, 77, 1) !important;
 }
 .el-tabs{
   background-color: black !important;

+ 67 - 17
src/components/BasicInformationDetail.vue

@@ -99,8 +99,8 @@
           <div class="dataTitle">
             <div style="margin-left: 24px;">部件主要参数</div>
           </div>
-          <div class="dataContent" @dblclick="dbClicks()">
-            <div class="dataBlock" v-for="(item,index) in showData" :key="index">
+          <div class="dataContent">
+            <div class="dataBlock" v-for="(item,index) in showData" :key="index" @dblclick="dbClicks(item)">
               <div class="dataName">{{item.name}}</div>
               <div class="numerical">
                 <div class="values">{{item.value}}</div>
@@ -134,7 +134,8 @@
         </div>
       </el-col>
     </el-row>
-    <BasicDataDetails @closed="closeds()" v-model="display"></BasicDataDetails>
+    <BasicDataDetails @closed="closeds()" v-model="display" :datas="windDetails" :partsName="partsName"
+      echartsId="partEcharts" @search-data="search" @original-data="originalData"></BasicDataDetails>
   </div>
 </template>
 
@@ -182,6 +183,7 @@
         powerGridInfo: new Array() /* 电网信息 */,
         restaurants: [],
         lockValues: [],
+        windDetails: [],
         state1: "",
         showIndex: 1,
         starValue: 3,
@@ -211,6 +213,9 @@
         healthInfo: {},
         warning: ["-"],
         showData: [],
+        partsName: '',
+        modelData: {},
+        interval: 60,
         controlErorCodes: [
           "控制成功",
           "控制命令发送失败",
@@ -245,9 +250,9 @@
       getDetial() {
         api.getDetial(this.windturbine.windturbineId).then(msg => {
           let restaurants = []
-          if(msg.data.lockType === 9){
+          if (msg.data.lockType === 9) {
             this.selectValue = this.lockValues?.filter(item => this.windturbine.windturbineId === item.windturbineID)[0]?.value;
-          }else{
+          } else {
             this.selectValue = (msg.data.lockType === 0 ? '' : String(msg.data.lockType))
           }
           this.state1 = msg.data.markValue
@@ -259,13 +264,13 @@
           this.restaurants = restaurants
         })
       },
-      getLocks(){
-                api.getCustomerLock().then(res =>{
-                    if(res){
-                        this.lockValues = res.data
-                    }
-                })
-            },
+      getLocks() {
+        api.getCustomerLock().then(res => {
+          if (res) {
+            this.lockValues = res.data
+          }
+        })
+      },
       getWarning() {
         let parts = ''
         switch (this.showIndex) {
@@ -340,7 +345,7 @@
             this.sendLock({ value: "StationWeatherLock" });
             break;
           default:
-            this.sendLock({ value: "CustomerLock", lockValue: this.selectValue});
+            this.sendLock({ value: "CustomerLock", lockValue: this.selectValue });
             break;
         }
       },
@@ -514,7 +519,7 @@
         }
         let sendList = []
         this.windturbine.lockType = msg.value;
-        if(msg.lockValue){
+        if (msg.lockValue) {
           this.windturbine.lockValue = msg.lockValue
         }
         sendList.push(this.windturbine)
@@ -582,11 +587,56 @@
         });
       },
 
-      dbClicks() {
-        this.display = true;
+      dbClicks(value, windturbineId, timeValues) {
+        this.modelData = value
+        let date = new Date()
+        let endTs = timeValues ? (timeValues[1] > date.getTime()) ? date.getTime() : timeValues[1] : date.getTime();
+        let startTs = timeValues ? timeValues[0] : endTs - 28800000;
+        api.getWindturbinePower({
+          thingId: windturbineId ? windturbineId : this.windturbine.windturbineId,
+          uniformCode: value.code,
+          startTs: startTs,
+          endTs: endTs,
+          thingType: 'windturbine',
+          interval: this.interval,
+        }).then(res => {
+          if (res.data.length > 0) {
+            this.windDetails = res.data
+            this.partsName = value.name
+            this.display = true;
+          }
+        })
+      },
+
+      original(value, windturbineId, timeValues) {
+        this.modelData = value
+        let date = new Date()
+        let endTs = timeValues ? (timeValues[1] > date.getTime()) ? date.getTime() : timeValues[1] : date.getTime();
+        let startTs = timeValues ? timeValues[0] : endTs - 28800000;
+        api.getOriginalWindturbinePower({
+          thingId: windturbineId ? windturbineId : this.windturbine.windturbineId,
+          uniformCode: value.code,
+          startTs: startTs,
+          endTs: endTs,
+          thingType: 'windturbine',
+        }).then(res => {
+          if (res.data.length > 0) {
+            this.windDetails = res.data
+            this.partsName = value.name
+            this.display = true
+          }
+        })
+      },
+      search(values, interval) {
+        this.interval = interval
+        this.dbClicks(this.modelData, '', values)
+      },
+      originalData(values) {
+        this.original(this.modelData, '', values)
       },
       closeds() {
-        this.display = false;
+        this.display = false
+        this.interval = 60
       }
     },
   };

+ 6 - 3
src/components/WindturbineDetailPages.vue

@@ -23,19 +23,19 @@
 						</div>
 					</td>
 					<td>
-						<div class="chunkdiv">
+						<div class="chunkdiv" @dblclick="dbClicks(baseDate.windSpeed)">
 							<div class="title">{{baseDate.windSpeed.name}}:&emsp;</div>
 							<div>{{baseDate.windSpeed.value}}{{baseDate.windSpeed.unit}}</div>
 						</div>
 					</td>
 					<td>
-						<div class="chunkdiv">
+						<div class="chunkdiv" @dblclick="dbClicks(baseDate.power)">
 							<div class="title">{{baseDate.power.name}}:&emsp;</div>
 							<div>{{baseDate.power.value}}{{baseDate.power.unit}}</div>
 						</div>
 					</td>
 					<td>
-						<div class="chunkdiv">
+						<div class="chunkdiv" @dblclick="dbClicks(baseDate.generatorSpeed)">
 							<div class="title">{{baseDate.generatorSpeed.name}}:&emsp;</div>
 							<div>{{baseDate.generatorSpeed.value}}{{baseDate.generatorSpeed.unit}}</div>
 						</div>
@@ -261,6 +261,9 @@
 						console.log(err);
 					});
 			},
+			dbClicks(value) {
+				this.$refs.BasicInfo.dbClicks(value,this.windturbine.windturbineId)
+			},
 		},
 		watch: {
 			'windturbine': {

File diff suppressed because it is too large
+ 359 - 56
src/components/basicDataDetails.vue


+ 0 - 1
src/components/check/areaCard.vue

@@ -85,7 +85,6 @@
                     });
                     flag = false
                 }
-
             },
         },
         watch: {

+ 2 - 2
src/components/control/areaCard.vue

@@ -198,7 +198,7 @@
                     console.log(this);
                     let dateList = []
                     this.titleList.forEach(item => {
-                        if (item.windturbineId.slice(0, 2) === 'NG') {
+                        if (item.windturbineId.slice(0, 2) === 'NG' || item.windturbineId.slice(0, 2) === 'MG') {
                             let arr = Object.keys(this.windturbinelist).sort()
                             this.windturbinelist = (arr.length !== 0 )?this.windturbinelist:this.$store.state.windturbinelist
                             switch (item.operateStyle) {
@@ -715,7 +715,7 @@
                     if (json === 0) {
                         let dateList = []
                         this.titleList.forEach(item => {
-                            if (item.windturbineId.slice(0, 2) === 'NG') {
+                            if (item.windturbineId.slice(0, 2) === 'NG' || item.windturbineId.slice(0, 2) === 'MG') {
                                 let arr = Object.keys(this.windturbinelist).sort()
                                 this.windturbinelist = (arr.length !== 0 )?this.windturbinelist:this.$store.state.windturbinelist
                                 switch (item.operateStyle) {

+ 0 - 1
src/components/focus/focusCard.vue

@@ -131,7 +131,6 @@
 			},
 			ajaxDetail(data, index) {
 				let thisKey = Photoelectric[data.values];
-				console.log(thisKey)
 				let array = []
 				thisKey.forEach(item => { item.value ? array.push(item.value) : '' })
 				let params = array.join(',')

+ 15 - 14
src/components/modeControl/detailPages.vue

@@ -10,33 +10,33 @@
 			<div class="dataList">
 				<div class="data">
 					<div class="name">健康指数:</div>
-					<div class="num">{{showDate.healthIndex}}</div>
+					<div class="num">{{showDate.healthIndex.value}}</div>
 				</div>
 				<div class="data">
 					<div class="name">资源指数:</div>
-					<div class="num">{{showDate.resourceIndex}}</div>
+					<div class="num">{{showDate.resourceIndex.value}}</div>
 				</div>
 				<div class="data">
 					<div class="name">风能利用率:</div>
-					<div class="num">{{showDate.windEnergyRate}}%</div>
+					<div class="num">{{showDate.windEnergyRate.value}}%</div>
 				</div>
 				<div class="data">
 					<div class="name">曲线跟随率:</div>
-					<div class="num">{{showDate.curveFollowingRate}}%</div>
+					<div class="num">{{showDate.curveFollowingRate.value}}%</div>
 				</div>
 				<div class="data">
 					<div class="name">实际功率:</div>
-					<div class="num">{{showDate.realTimePower}}</div>
+					<div class="num">{{showDate.realTimePower.value}}</div>
 					<div class="unit">MW</div>
 				</div>
 				<div class="data">
 					<div class="name">理论功率:</div>
-					<div class="num">{{showDate.theoreticalPower}}</div>
+					<div class="num">{{showDate.theoreticalPower.value}}</div>
 					<div class="unit" @click='ChangeColor()'>MW</div>
 				</div>
 				<div class="data">
 					<div class="name">AGC有功设定:</div>
-					<div class="num">{{showDate.agcPowerSet}}</div>
+					<div class="num">{{showDate.agcPowerSet.value}}</div>
 					<div class="unit" @click='ChangeColors()'>MW</div>
 				</div>
 			</div>
@@ -108,13 +108,13 @@
 			},
 			getMessage(msg) {
 				let data = JSON.parse(msg)
-				data.healthIndex = Number(data.healthIndex).toFixed(0)
-				data.resourceIndex = Number(data.resourceIndex).toFixed(0)
-				data.realTimePower = data.realTimePower.toFixed(2)
-				data.theoreticalPower = data.theoreticalPower.toFixed(2)
-				data.agcPowerSet = data.agcPowerSet.toFixed(2)
-				data.windEnergyRate = data.windEnergyRate.toFixed(2)
-				data.curveFollowingRate = data.curveFollowingRate.toFixed(2)
+				data.healthIndex.value = Number(data.healthIndex.value).toFixed(0)
+				data.resourceIndex.value = Number(data.resourceIndex.value).toFixed(0)
+				data.realTimePower.value = data.realTimePower.value.toFixed(2)
+				data.theoreticalPower.value = data.theoreticalPower.value.toFixed(2)
+				data.agcPowerSet.value = data.agcPowerSet.value.toFixed(2)
+				data.windEnergyRate.value = data.windEnergyRate.value.toFixed(2)
+				data.curveFollowingRate.value = data.curveFollowingRate.value.toFixed(2)
 				this.showDate = data
 			},
 			async getDate() {
@@ -140,6 +140,7 @@
 					tagName: values.PowerSet ? values.PowerSet : values.ActualPower,
 					startTs: startTs,
 					endTs: endTs,
+					interval: 60,
 				}).then(res => {
 					if (res) {
 						if (names === 'PowerSet') {

+ 191 - 284
src/components/modeControl/modeControl.vue

@@ -7,31 +7,51 @@
         </div>
         <div style="display: flex;flex-direction: row;z-index: 2;">
             <div class="showData">
-                <div class="dataBox" @dblclick="dbClicks()">
+                <div class="dataBox" @dblclick="dbClicks(showDate.healthIndex,'健康指数')">
                     <div class="dataTitle">健康指数</div>
-                    <div class="datas">{{showDate.healthIndex}}</div>
+                    <div class="datas">{{showDate.healthIndex?.value.toFixed(0)}}</div>
                 </div>
-                <div class="dataBox">
+                <div class="dataBox" @dblclick="dbClicks(showDate.resourceIndex,'资源指数')">
                     <div class="dataTitle">资源指数</div>
-                    <div class="datas">{{showDate.resourceIndex}}</div>
+                    <div class="datas">{{showDate.resourceIndex?.value.toFixed(0)}}</div>
+                </div>
+            </div>
+            <div>
+                <div id="mainEcharts" @dblclick="dbClick()" class="echarts"></div>
+                <div @dblclick="dbClicks()" class="powerContent">
+                    <div class="power" @dblclick="dbClicks(showDate.realTimePower,'实际功率')">
+                        <div class="powerTitle">实际功率</div>
+                        <div class="powerDatas" style="background-color: rgba(75, 85, 174, 1);">
+                            {{showDate.realTimePower?.value.toFixed(2)}}</div>
+                    </div>
+                    <div class="power1" @dblclick="dbClicks(showDate.theoreticalPower,'理论功率')">
+                        <div class="powerTitle">理论功率</div>
+                        <div class="powerDatas" style="background-color: rgba(05, 187, 76, 1);">
+                            {{showDate.theoreticalPower?.value.toFixed(2)}}</div>
+                    </div>
+                    <div class="power2" @dblclick="dbClicks(showDate.agcPowerSet,'AGC有功设定')">
+                        <div class="powerTitle">AGC有功设定</div>
+                        <div class="powerDatas" style="background-color: rgba(186, 50, 55, 1);">
+                            {{showDate.agcPowerSet?.value.toFixed(2)}}</div>
+                    </div>
                 </div>
             </div>
-            <div id="mainEcharts" @dblclick="dbClick()" class="echarts"></div>
             <div class="showData">
-                <div class="dataBox-right">
+                <div class="dataBox-right" @dblclick="dbClicks(showDate.windEnergyRate,'风能利用率')">
                     <div class="dataTitle">风能利用率</div>
-                    <div class="datas">{{showDate.windEnergyRate}}%</div>
+                    <div class="datas">{{showDate.windEnergyRate?.value.toFixed(2)}}%</div>
                 </div>
-                <div class="dataBox-right">
+                <div class="dataBox-right" @dblclick="dbClicks(showDate.curveFollowingRate,'曲线跟随率')">
                     <div class="dataTitle">曲线跟随率</div>
-                    <div class="datas">{{showDate.curveFollowingRate}}%</div>
+                    <div class="datas">{{showDate.curveFollowingRate?.value.toFixed(2)}}%</div>
                 </div>
             </div>
         </div>
     </div>
     <DetailPages ref="detials" @closed="closed()" v-model="dialogVisible">
-	</DetailPages>
-    <Details title='健康指数' @closed="closeds()" v-model="display"></Details>
+    </DetailPages>
+    <Details @closed="closeds()" v-model="display" :partsName='partsName' echartsId="modelEcharts" :datas="modelDetails"
+        @search-data="search" @original-data="originalData"></Details>
 </template>
 <script>
     import BackgroundData from 'utils/BackgroundData'
@@ -39,7 +59,7 @@
     import MessageBridge from 'utils/MessageBridge'
     import * as echarts from "echarts";
     import DetailPages from "./detailPages.vue";
-    import Details from "./dataDetails.vue";
+    import Details from "../basicDataDetails.vue";
     export default {
         props: {
             // current: {
@@ -47,9 +67,9 @@
             // },
         },
         components: {
-			DetailPages,
+            DetailPages,
             Details
-		},
+        },
         data() {
             return {
                 current: 1,
@@ -61,29 +81,19 @@
                 fieldFlag: 0,
                 dialogVisible: false,
                 display: false,
+                modelDetails: [],
+                partsName: '',
+                modelData: {},
+                interval: 60,
             };
         },
         created() {
             this.initData();
-            // this.getData(),
-            //     this.refreshTimer = setInterval(this.getData, 20000);
         },
         computed: {
-            // healthStyle() {
-            //     return `width: ${this.healthWidth}%;`
-            // },
-            // resourceStyle() {
-            //     return `width: ${this.resourceWidth}%;`
-            // },
-            // windStyle() {
-            //     return `width: ${this.windWidth}%;`
-            // },
-            // curveStyle() {
-            //     return `width: ${this.curveWidth}%;`
-            // },
+
         },
         mounted() {
-            // this.current = this.$props.current
             this.$nextTick(() => {
                 if (document.getElementById('mainEcharts')) {
                     this.getEcharts()
@@ -115,20 +125,12 @@
                     this.ChangeBar(0)
                 } else if (arr[0] === 'OPEN_PAGE_RECOMMENDATION') {
                     this.ChangeBar(1)
-                }else if(msg === 'OPEN_AGC-GS'){
+                } else if (msg === 'OPEN_AGC-GS') {
                     this.dbClick()
                 }
             },
             getEchartss(msg) {
-                let data = JSON.parse(msg)
-                data.healthIndex = Number(data.healthIndex).toFixed(0)
-                data.resourceIndex = Number(data.resourceIndex).toFixed(0)
-                data.realTimePower = data.realTimePower.toFixed(2)
-                data.theoreticalPower = data.theoreticalPower.toFixed(2)
-                data.agcPowerSet = data.agcPowerSet.toFixed(2)
-                data.windEnergyRate = data.windEnergyRate.toFixed(2)
-                data.curveFollowingRate = data.curveFollowingRate.toFixed(2)
-                this.showDate = data
+                this.showDate = JSON.parse(msg)
                 this.getEcharts()
             },
             getEcharts() {
@@ -182,81 +184,83 @@
                         },
                         data: [{
                             value: 125.85,
-                            name: '实际功率',
+                            // name: '实际功率',
                             itemStyle: {
                                 color: 'rgba(75, 85, 174, 1)'
                             },
-                            title: {
-                                color: '#999999',
-                                offsetCenter: ['-70%', '90%']
-                            },
-                            detail: {
-                                width: 50,
-                                height: 12,
-                                fontSize: 18,
-                                offsetCenter: ['-70%', '110%']
-                            }
+                            // title: {
+                            //     color: '#999999',
+                            //     offsetCenter: ['-70%', '90%']
+                            // },
+                            // detail: {
+                            //     width: 50,
+                            //     height: 12,
+                            //     fontSize: 18,
+                            //     offsetCenter: ['-70%', '110%']
+                            // }
                         },
                         {
                             value: 137.63,
-                            name: '理论功率',
+                            // name: '理论功率',
                             itemStyle: {
                                 color: 'rgba(05, 187, 76, 1)'
                             },
-                            title: {
-                                color: '#999999',
-                                offsetCenter: ['0%', '90%']
-                            },
-                            detail: {
-                                width: 50,
-                                height: 12,
-                                fontSize: 18,
-                                offsetCenter: ['0%', '110%']
-                            }
+                            // title: {
+                            //     color: '#999999',
+                            //     offsetCenter: ['0%', '90%']
+                            // },
+                            // detail: {
+                            //     width: 50,
+                            //     height: 12,
+                            //     fontSize: 18,
+                            //     offsetCenter: ['0%', '110%']
+                            // }
                         },
                         {
                             value: 132.04,
-                            name: 'AGC有功设定',
+                            // name: 'AGC有功设定',
                             itemStyle: {
                                 color: 'rgba(186, 50, 55, 1)'
                             },
-                            title: {
-                                color: '#999999',
-                                offsetCenter: ['70%', '90%']
-                            },
-                            detail: {
-                                align: 'center',
-                                width: 50,
-                                height: 12,
-                                fontSize: 18,
-                                offsetCenter: ['70%', '110%']
-                            }
+                            // title: {
+                            //     color: '#999999',
+                            //     offsetCenter: ['70%', '90%']
+                            // },
+                            // detail: {
+                            //     align: 'center',
+                            //     width: 50,
+                            //     height: 12,
+                            //     fontSize: 18,
+                            //     offsetCenter: ['70%', '110%']
+                            // }
                         }
                         ],
-                        title: {
-                            fontSize: 12
-                        },
-                        detail: {
-                            width: 20,
-                            height: 7,
-                            fontSize: 12,
-                            color: '#fff',
-                            backgroundColor: 'auto',
-                            borderRadius: 3,
-                            formatter: ''
-                        }
+                        title: false,
+                        detail: false,
+                        //     title: {
+                        //         fontSize: 12
+                        //     },
+                        //     detail: {
+                        //         width: 20,
+                        //         height: 7,
+                        //         fontSize: 12,
+                        //         color: '#fff',
+                        //         backgroundColor: 'auto',
+                        //         borderRadius: 3,
+                        //         formatter: ''
+                        //     }
                     }]
                 };
-                option.series[0].data[0].value = Number(this.showDate.realTimePower);
-                option.series[0].data[1].value = Number(this.showDate.theoreticalPower);
-                option.series[0].data[2].value = Number(this.showDate.agcPowerSet);
+                option.series[0].data[0].value = Number(this.showDate.realTimePower?.value);
+                option.series[0].data[1].value = Number(this.showDate.theoreticalPower?.value);
+                option.series[0].data[2].value = Number(this.showDate.agcPowerSet?.value);
                 myChart.setOption(option, true);
             },
             ChangeBar(values) {
                 var bd = BackgroundData.getInstance();
                 var mb = MessageBridge.getInstance();
-                var vss = { key: "/topic/voice-control"};
-                var popup = { key: "/topic/fault-popup"};
+                var vss = { key: "/topic/voice-control" };
+                var popup = { key: "/topic/fault-popup" };
                 mb.unregister(popup);
                 mb.unregister(vss);
                 if (!bd.LoginUser) {
@@ -294,18 +298,58 @@
                     }
                 }
             },
-            dbClick(){
+            dbClick() {
                 this.dialogVisible = true;
                 this.$refs.detials.getDate()
             },
-            dbClicks(){
-                this.display = true;
+            dbClicks(data, partsName, timeValues) {
+                this.modelData = data
+                let date = new Date()
+                let endTs = timeValues ? (timeValues[1] > date.getTime()) ? date.getTime() : timeValues[1] : date.getTime();
+                let startTs = timeValues ? timeValues[0] : endTs - 28800000;
+                api.getPower({
+                    tagName: data.tag,
+                    startTs: startTs,
+                    endTs: endTs,
+                    interval: this.interval,
+                }).then(res => {
+                    if (res.data.length > 0) {
+                        this.partsName = partsName
+                        this.display = true;
+                        this.modelDetails = res.data
+                    }
+                })
+            },
+            original(data, partsName, timeValues) {
+                this.modelData = data
+                let date = new Date()
+                let endTs = timeValues ? (timeValues[1] > date.getTime()) ? date.getTime() : timeValues[1] : date.getTime();
+                let startTs = timeValues ? timeValues[0] : endTs - 28800000;
+                api.getOriginalPower({
+                    tagName: data.tag,
+                    startTs: startTs,
+                    endTs: endTs,
+                }).then(res => {
+                    if (res.data.length > 0) {
+                        this.partsName = partsName
+                        this.display = true;
+                        this.modelDetails = res.data
+                    }
+                })
+            },
+            search(values,interval) {
+                this.interval = interval
+                this.dbClicks(this.modelData, this.partsName, values)
+            },
+            originalData(values) {
+                this.original(this.modelData, this.partsName, values)
             },
-            closed(){
+            closed() {
                 this.dialogVisible = false;
             },
-            closeds(){
+            closeds() {
                 this.display = false;
+                this.interval = 60
             }
         },
     }
@@ -413,202 +457,14 @@
         background-color: rgba(37, 116, 219, 1);
     }
 
-    .dataArea {
-        display: flex;
-        flex-direction: row;
-        align-items: center;
-    }
-
-    .dataBlock {
-        width: 29%;
-        height: 82px;
-        background-color: #242424;
-        border: 1px solid #3D3D3D;
-        margin-left: 18px;
-        margin-top: 35px;
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-    }
-
-    .dataName {
-        display: flex;
-        flex-direction: row-reverse;
-        font-size: 12px;
-        color: #999999;
-        /* margin-bottom: 6px; */
-        margin-left: 26px;
-        /* margin-bottom: 20px; */
-    }
-
-    .dataName-right {
-        display: flex;
-        flex-direction: row;
-        font-size: 14px;
-        color: #999999;
-        /* margin-bottom: 6px; */
-        margin-right: 50px;
-        /* margin-bottom: 20px; */
-    }
-
-    .numerical {
-        display: flex;
-        flex-direction: row;
-        color: #05BB4C;
-        align-items: center;
-        margin-left: 26px;
-    }
-
-    .data {
-        display: flex;
-        flex-direction: row;
-        color: #05BB4C;
-        align-items: baseline;
-    }
-
-    .values {
-        font-size: 16px;
-    }
-
-    .unit {
-        font-size: 12px;
-        margin-left: 8px;
-    }
-
-    .images {
-        width: 18px;
-        height: 18px;
-        margin-left: 10px;
-        margin-top: 3px;
-    }
-
-    .images_none {
-        width: 18px;
-        height: 3px;
-        background-color: #FFA500;
-        margin-left: 10px;
-        border-radius: 1px;
-        margin-top: -3px;
-    }
-
-    .dataShow {
-        display: flex;
-        flex-direction: column;
-        width: 200px;
-        position: absolute;
-        left: 1px;
-        top: 62%;
-        line-height: 35px;
-    }
-
-    .dataShows {
-        display: flex;
-        flex-direction: column;
-        width: 200px;
-        position: absolute;
-        right: -35px;
-        top: 62%;
-        line-height: 35px;
-    }
-
-    .number {
-        display: flex;
-        flex-direction: row;
-        align-items: center;
-        font-size: 16px;
-        color: #ffffff;
-        align-items: center;
-        justify-content: space-between;
-    }
-
-    .progress {
-        display: flex;
-        align-items: center;
-        margin-left: 20px;
-        width: 130px;
-        height: 10px;
-        border: 1px solid rgba(83, 92, 93, 0.5);
-        background-color: #000000;
-        margin-bottom: 20px;
-    }
-
-    .progress-right {
-        display: flex;
-        flex-direction: row-reverse;
-        align-items: center;
-        margin-left: 20px;
-        width: 130px;
-        height: 10px;
-        border: 1px solid rgba(83, 92, 93, 0.5);
-        background-color: #000000;
-        margin-bottom: 20px;
-    }
-
-    .progressNum {
-        /* width: 60%; */
-        height: 40%;
-        background-color: rgba(75, 85, 174, 1);
-        border-radius: 2px;
-    }
-
-    .progressNum-right {
-        /* width: 60%; */
-        height: 40%;
-        background-color: rgba(75, 85, 174, 1);
-        border-radius: 2px;
-    }
-
     .echarts {
         width: 300px;
         height: 280px;
-        margin-top: 20px;
+        margin-top: 10px;
         /* background-color: #000000; */
         margin-left: 10px;
     }
 
-    .wind {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        margin-top: 20px;
-    }
-
-    .windNum {
-        font-size: 14px;
-        color: #ffffff;
-    }
-
-    .windTitle {
-        font-size: 18px;
-        color: #ffffff;
-    }
-
-    .follow {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        margin-top: 20px;
-        margin-right: 20px;
-    }
-
-    .followNum {
-        font-size: 14px;
-        color: #ffffff;
-    }
-
-    .followTitle {
-        font-size: 18px;
-        color: #ffffff;
-    }
-
-    .numbers {
-        margin-right: 48px;
-    }
-
-    .numbers-right {
-        margin-left: 18px;
-    }
-
     .showData {
         display: flex;
         flex-direction: column;
@@ -657,4 +513,55 @@
         color: rgba(05, 187, 76, 1);
         margin-right: 5px;
     }
+
+    .powerContent {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        color: #ffffff;
+        position: relative;
+        bottom: 18%;
+        left: 11%;
+    }
+
+    .power {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        font-size: 14px;
+        padding: 5px 10px;
+    }
+
+    .power1 {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        font-size: 14px;
+        padding: 5px 3px 5px 10px;
+    }
+
+    .power2 {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        font-size: 14px;
+        padding: 5px 3px;
+    }
+
+    .powerTitle {
+        margin-bottom: 3px;
+    }
+
+    .powerDatas {
+        border-radius: 2px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 16px;
+        font-weight: 600;
+        padding: 2px 5px;
+    }
 </style>

+ 3 - 2
src/components/warning/warningCard.vue

@@ -89,11 +89,12 @@
 			},
 			/* 行双击 */
 			itemDblclick(row) {
-				this.dialogVisible = true;
 				if (row.category1 === "FJ") {
+					this.dialogVisible = true;
 					this.showSvg = false;
 					this.currentWindturbine = row;
-				} else {
+				} else if(row.category1 === "SYZ"){
+					this.dialogVisible = true;
 					this.svgWeb = row.stationId;
 					this.showSvg = true;
 					this.stationName = row.stationName

+ 2 - 2
src/main.js

@@ -6,10 +6,10 @@ import store from './store'
 import * as echarts from 'echarts';
 import ElementPlus from 'element-plus';
 import 'element-plus/lib/theme-chalk/index.css';
-
+import locale from 'element-ui/lib/locale/lang/zh-CN'
 const app = createApp(App)
 app.config.globalProperties.$echarts = echarts
 app.use(store)
 app.use(router)
-app.use(ElementPlus)
+app.use(ElementPlus, { locale })
 app.mount('#app')

+ 5 - 12
src/utils/MessageBridge.js

@@ -1,7 +1,6 @@
 import { setTimeout } from 'core-js';
 import Stomp from 'stompjs'
 import store from '../store/index'
-// import {config} from '../../config';
 
 export default class MessageBridge {
   observers;// 观察者
@@ -35,7 +34,7 @@ export default class MessageBridge {
 
   /* 获得消息 */
   onmessage(msg) {
-    if (msg.headers.destination === "/topic/heartbeat-data") {
+    if (msg.headers.destination === "title-info") {
       this.flag = (new Date()).getTime()
     }
     if (msg.headers.destination === "/topic/windturbine") {
@@ -52,12 +51,9 @@ export default class MessageBridge {
 
   getActions(destination) {
     var list = new Array();
-    console.log(store.state.observers);
-    if (this.observers.filter(item => item.key === "/topic/windturbine").length === 0) {
+    if ((this.observers.filter(item => item.key === "/topic/windturbine").length === 0) ||(this.observers.filter(item => item.key === "/topic/suggestion").length === 0) ||(this.observers.filter(item => item.key === "/topic/title-info").length === 0) ) {
       store.commit('observers', false)
-      console.log(store.state.observers);
     }
-
     for (var i in this.observers) {
       if (this.observers[i].key == destination) {
         list.push(this.observers[i]);
@@ -75,7 +71,6 @@ export default class MessageBridge {
 
   /* 取消注册消息 */
   unregister(msgs) {
-    console.log('------------------', this.observers);
     let showIndex = null
     this.observers.forEach((item, index) => {
       if (item.key === msgs.key) {
@@ -88,18 +83,17 @@ export default class MessageBridge {
   reconnect() {
     setTimeout(() => {
       this.reconnect()
-    }, 60000);
-    if (((new Date()).getTime() - this.windFlag) > 60000) {
+    }, 10000);
+    if (((new Date()).getTime() - this.windFlag) > 20000) {
       console.log('心跳检测失败1,尝试重新连接');
       this.adapterSocket.disconnect()
       this.adapterSocket.connect()
     }
-    if (((new Date()).getTime() - this.flag) > 60000) {
+    if (((new Date()).getTime() - this.flag) > 20000) {
       console.log('心跳检测失败,尝试重新连接');
       this.calcSocket.disconnect()
       this.calcSocket.connect()
     }
-
   }
 }
 
@@ -128,7 +122,6 @@ class WebSocket {
 
   /* 连接 */
   connect() {
-    // console.log(`正在连接websocket [${this.url}]`)
     this.client = Stomp.client(this.url);
     this.client.connect("", "", this.connectCallBackSubscribe, this.onerror);
     this.client.debug = null;

+ 0 - 416
src/utils/warningInfo.json

@@ -1,416 +0,0 @@
-[
-{"SNAPID":"1","COUNT":"35","TIME":"1057.617","WINDTURBINEID":"XG01_11","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"2","COUNT":"163","TIME":"748.783","WINDTURBINEID":"NG01_01","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"3","COUNT":"70","TIME":"639.417","WINDTURBINEID":"NG01_87","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"4","COUNT":"242","TIME":"627.867","WINDTURBINEID":"SG01_101","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"5","COUNT":"137","TIME":"622.933","WINDTURBINEID":"MG01_42","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"6","COUNT":"369","TIME":"590.8","WINDTURBINEID":"MG01_43","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"7","COUNT":"140","TIME":"584.617","WINDTURBINEID":"NG01_42","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"8","COUNT":"126","TIME":"536.833","WINDTURBINEID":"XG01_30","ALERTTEXT":"三相电流不平衡","CATEGORY":"1"}
-,
-{"SNAPID":"9","COUNT":"1","TIME":"5.25","WINDTURBINEID":"NG01_88","ALERTTEXT":"主轴温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"10","COUNT":"1","TIME":"5.25","WINDTURBINEID":"XG01_31","ALERTTEXT":"主轴温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"11","COUNT":"1","TIME":"5.25","WINDTURBINEID":"NG01_12","ALERTTEXT":"主轴温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"12","COUNT":"1","TIME":"5.25","WINDTURBINEID":"NG01_85","ALERTTEXT":"主轴温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"13","COUNT":"1","TIME":"5.25","WINDTURBINEID":"NG01_01","ALERTTEXT":"主轴温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"14","COUNT":"15","TIME":"955.75","WINDTURBINEID":"XG01_29","ALERTTEXT":"主轴温度温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"15","COUNT":"15","TIME":"900.55","WINDTURBINEID":"XG01_30","ALERTTEXT":"主轴温度温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"16","COUNT":"18","TIME":"858.033","WINDTURBINEID":"SG01_75","ALERTTEXT":"主轴温度温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"17","COUNT":"38","TIME":"850.3","WINDTURBINEID":"SG01_95","ALERTTEXT":"主轴温度温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"18","COUNT":"14","TIME":"836.05","WINDTURBINEID":"SG01_67","ALERTTEXT":"主轴温度温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"19","COUNT":"12","TIME":"829.35","WINDTURBINEID":"XG01_28","ALERTTEXT":"主轴温度温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"20","COUNT":"17","TIME":"825.15","WINDTURBINEID":"SG01_72","ALERTTEXT":"主轴温度温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"21","COUNT":"9","TIME":"154.517","WINDTURBINEID":"SG01_71","ALERTTEXT":"主轴温度高","CATEGORY":"1"}
-,
-{"SNAPID":"22","COUNT":"1","TIME":"1.4","WINDTURBINEID":"SG01_71","ALERTTEXT":"主轴齿轮箱侧温度传感器异常值","CATEGORY":"1"}
-,
-{"SNAPID":"23","COUNT":"34","TIME":"1073.15","WINDTURBINEID":"QG01_71","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"24","COUNT":"36","TIME":"1061.417","WINDTURBINEID":"QG01_70","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"25","COUNT":"33","TIME":"1056.85","WINDTURBINEID":"QG01_75","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"26","COUNT":"34","TIME":"1046.15","WINDTURBINEID":"QG01_82","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"27","COUNT":"33","TIME":"1045.117","WINDTURBINEID":"QG01_67","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"28","COUNT":"36","TIME":"1023.117","WINDTURBINEID":"QG01_81","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"29","COUNT":"35","TIME":"1021.033","WINDTURBINEID":"QG01_86","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"30","COUNT":"36","TIME":"1015.933","WINDTURBINEID":"QG01_77","ALERTTEXT":"停机收浆超时","CATEGORY":"2"}
-,
-{"SNAPID":"31","COUNT":"26","TIME":"850.133","WINDTURBINEID":"NG01_15","ALERTTEXT":"单机发电机U2绕组温度传感器异常值","CATEGORY":"2"}
-,
-{"SNAPID":"32","COUNT":"39","TIME":"960.167","WINDTURBINEID":"NG01_15","ALERTTEXT":"单机发电机U2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"33","COUNT":"7","TIME":"8.917","WINDTURBINEID":"MG01_13","ALERTTEXT":"单机发电机U2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"34","COUNT":"22","TIME":"67.733","WINDTURBINEID":"MG01_17","ALERTTEXT":"单机发电机V2绕组温度传感器异常值","CATEGORY":"2"}
-,
-{"SNAPID":"35","COUNT":"20","TIME":"1069.233","WINDTURBINEID":"NG01_73","ALERTTEXT":"单机发电机V2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"36","COUNT":"34","TIME":"476.533","WINDTURBINEID":"MG01_17","ALERTTEXT":"单机发电机V2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"37","COUNT":"21","TIME":"1063.15","WINDTURBINEID":"NG01_73","ALERTTEXT":"单机发电机V2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"38","COUNT":"40","TIME":"437.183","WINDTURBINEID":"MG01_17","ALERTTEXT":"单机发电机V2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"39","COUNT":"51","TIME":"476.3","WINDTURBINEID":"SG01_26","ALERTTEXT":"单机发电机W2绕组温度传感器异常值","CATEGORY":"2"}
-,
-{"SNAPID":"40","COUNT":"33","TIME":"315.733","WINDTURBINEID":"NG01_07","ALERTTEXT":"单机发电机W2绕组温度传感器异常值","CATEGORY":"2"}
-,
-{"SNAPID":"41","COUNT":"45","TIME":"132.017","WINDTURBINEID":"NG01_73","ALERTTEXT":"单机发电机W2绕组温度传感器异常值","CATEGORY":"2"}
-,
-{"SNAPID":"42","COUNT":"33","TIME":"486","WINDTURBINEID":"SG01_26","ALERTTEXT":"单机发电机W2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"43","COUNT":"13","TIME":"462.183","WINDTURBINEID":"SG01_31","ALERTTEXT":"单机发电机W2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"44","COUNT":"107","TIME":"448.767","WINDTURBINEID":"NG01_07","ALERTTEXT":"单机发电机W2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"45","COUNT":"75","TIME":"400.95","WINDTURBINEID":"NG01_73","ALERTTEXT":"单机发电机W2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"46","COUNT":"31","TIME":"171.75","WINDTURBINEID":"NG01_05","ALERTTEXT":"单机发电机W2绕组温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"47","COUNT":"33","TIME":"482.1","WINDTURBINEID":"SG01_26","ALERTTEXT":"单机发电机W2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"48","COUNT":"14","TIME":"449.267","WINDTURBINEID":"SG01_31","ALERTTEXT":"单机发电机W2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"49","COUNT":"108","TIME":"436.333","WINDTURBINEID":"NG01_07","ALERTTEXT":"单机发电机W2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"50","COUNT":"74","TIME":"383.517","WINDTURBINEID":"NG01_73","ALERTTEXT":"单机发电机W2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"51","COUNT":"30","TIME":"122.85","WINDTURBINEID":"NG01_05","ALERTTEXT":"单机发电机W2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"52","COUNT":"1","TIME":"1.4","WINDTURBINEID":"SG01_79","ALERTTEXT":"单机发电机W2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"53","COUNT":"1","TIME":"1.217","WINDTURBINEID":"SG01_70","ALERTTEXT":"单机发电机W2绕组超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"54","COUNT":"1","TIME":"73.083","WINDTURBINEID":"SG01_94","ALERTTEXT":"单机发电机轴a温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"55","COUNT":"1","TIME":"26.85","WINDTURBINEID":"SG01_30","ALERTTEXT":"单机发电机轴a温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"56","COUNT":"9","TIME":"153.8","WINDTURBINEID":"SG01_71","ALERTTEXT":"单机发电机轴b温度超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"57","COUNT":"1","TIME":"42.983","WINDTURBINEID":"SG01_15","ALERTTEXT":"单机发电机轴b温度预警","CATEGORY":"1"}
-,
-{"SNAPID":"58","COUNT":"18","TIME":"36.767","WINDTURBINEID":"NG01_29","ALERTTEXT":"单机变桨电池柜温度1温度传感器异常值","CATEGORY":"2"}
-,
-{"SNAPID":"59","COUNT":"1","TIME":"1.7","WINDTURBINEID":"SG01_17","ALERTTEXT":"单机变桨电池柜温度2预警","CATEGORY":"1"}
-,
-{"SNAPID":"60","COUNT":"263","TIME":"85.617","WINDTURBINEID":"NG01_11","ALERTTEXT":"单机变桨电池柜温度3温度传感器异常值","CATEGORY":"2"}
-,
-{"SNAPID":"61","COUNT":"298","TIME":"98.25","WINDTURBINEID":"NG01_11","ALERTTEXT":"单机变桨电池柜温度3超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"62","COUNT":"13","TIME":"716.05","WINDTURBINEID":"NG01_02","ALERTTEXT":"单机变桨电池柜温度3预警","CATEGORY":"1"}
-,
-{"SNAPID":"63","COUNT":"2","TIME":"75.2","WINDTURBINEID":"SG01_26","ALERTTEXT":"单机变桨电池柜温度3预警","CATEGORY":"1"}
-,
-{"SNAPID":"64","COUNT":"2","TIME":"11.217","WINDTURBINEID":"SG01_17","ALERTTEXT":"单机变桨电池柜温度3预警","CATEGORY":"1"}
-,
-{"SNAPID":"65","COUNT":"367","TIME":"1143","WINDTURBINEID":"NG01_05","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"66","COUNT":"432","TIME":"1136.383","WINDTURBINEID":"NG01_02","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"67","COUNT":"23","TIME":"954.583","WINDTURBINEID":"NG01_18","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"68","COUNT":"923","TIME":"902.1","WINDTURBINEID":"NG01_37","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"69","COUNT":"16","TIME":"887.617","WINDTURBINEID":"XG01_41","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"70","COUNT":"379","TIME":"341.567","WINDTURBINEID":"SG01_47","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"71","COUNT":"818","TIME":"334.3","WINDTURBINEID":"NG01_33","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"72","COUNT":"399","TIME":"317.85","WINDTURBINEID":"SG01_45","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"73","COUNT":"355","TIME":"310.467","WINDTURBINEID":"SG01_50","ALERTTEXT":"单机风向标故障","CATEGORY":"2"}
-,
-{"SNAPID":"74","COUNT":"9","TIME":"154.15","WINDTURBINEID":"SG01_71","ALERTTEXT":"单机齿轮箱油温超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"75","COUNT":"2","TIME":"1.683","WINDTURBINEID":"SG01_25","ALERTTEXT":"单机齿轮箱油温超限报警","CATEGORY":"1"}
-,
-{"SNAPID":"76","COUNT":"13","TIME":"91.167","WINDTURBINEID":"QG01_75","ALERTTEXT":"发电机转速超速","CATEGORY":"1"}
-,
-{"SNAPID":"77","COUNT":"10","TIME":"80.05","WINDTURBINEID":"QG01_79","ALERTTEXT":"发电机转速超速","CATEGORY":"1"}
-,
-{"SNAPID":"78","COUNT":"8","TIME":"76.15","WINDTURBINEID":"QG01_76","ALERTTEXT":"发电机转速超速","CATEGORY":"1"}
-,
-{"SNAPID":"79","COUNT":"6","TIME":"73.933","WINDTURBINEID":"QG01_78","ALERTTEXT":"发电机转速超速","CATEGORY":"1"}
-,
-{"SNAPID":"80","COUNT":"14","TIME":"73.4","WINDTURBINEID":"QG01_73","ALERTTEXT":"发电机转速超速","CATEGORY":"1"}
-,
-{"SNAPID":"81","COUNT":"11","TIME":"799.283","WINDTURBINEID":"NG01_45","ALERTTEXT":"发电机轴A损坏或碳刷室温度过高","CATEGORY":"1"}
-,
-{"SNAPID":"82","COUNT":"11","TIME":"598.717","WINDTURBINEID":"NG01_33","ALERTTEXT":"发电机轴A损坏或碳刷室温度过高","CATEGORY":"1"}
-,
-{"SNAPID":"83","COUNT":"14","TIME":"465.75","WINDTURBINEID":"SG01_116","ALERTTEXT":"发电机轴A损坏或碳刷室温度过高","CATEGORY":"1"}
-,
-{"SNAPID":"84","COUNT":"14","TIME":"438.967","WINDTURBINEID":"NG01_46","ALERTTEXT":"发电机轴A损坏或碳刷室温度过高","CATEGORY":"1"}
-,
-{"SNAPID":"85","COUNT":"6","TIME":"419.033","WINDTURBINEID":"NG01_20","ALERTTEXT":"发电机轴A损坏或碳刷室温度过高","CATEGORY":"1"}
-,
-{"SNAPID":"86","COUNT":"13","TIME":"413.517","WINDTURBINEID":"NG01_42","ALERTTEXT":"发电机轴A损坏或碳刷室温度过高","CATEGORY":"1"}
-,
-{"SNAPID":"87","COUNT":"3","TIME":"5.267","WINDTURBINEID":"SG01_30","ALERTTEXT":"发电机轴a每分钟温升超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"88","COUNT":"1","TIME":"4.617","WINDTURBINEID":"SG01_05","ALERTTEXT":"发电机轴a每分钟温升超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"89","COUNT":"1","TIME":"4.617","WINDTURBINEID":"SG01_13","ALERTTEXT":"发电机轴a每分钟温升超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"90","COUNT":"1","TIME":"4.617","WINDTURBINEID":"SG01_18","ALERTTEXT":"发电机轴a每分钟温升超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"91","COUNT":"1","TIME":"4.617","WINDTURBINEID":"SG01_32","ALERTTEXT":"发电机轴a每分钟温升超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"92","COUNT":"1","TIME":"4.617","WINDTURBINEID":"SG01_14","ALERTTEXT":"发电机轴a每分钟温升超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"93","COUNT":"1","TIME":"4.617","WINDTURBINEID":"SG01_04","ALERTTEXT":"发电机轴a每分钟温升超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"94","COUNT":"5","TIME":"119.283","WINDTURBINEID":"NG01_01","ALERTTEXT":"发电机轴承温升大于40度","CATEGORY":"1"}
-,
-{"SNAPID":"95","COUNT":"2","TIME":"89.4","WINDTURBINEID":"SG01_15","ALERTTEXT":"发电机轴承温升大于40度","CATEGORY":"1"}
-,
-{"SNAPID":"96","COUNT":"1","TIME":"81.217","WINDTURBINEID":"SG01_30","ALERTTEXT":"发电机轴承温升大于40度","CATEGORY":"1"}
-,
-{"SNAPID":"97","COUNT":"22","TIME":"26.933","WINDTURBINEID":"NG01_01","ALERTTEXT":"发电机轴承温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"98","COUNT":"1","TIME":"11","WINDTURBINEID":"NG01_25","ALERTTEXT":"发电机轴承温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"99","COUNT":"1","TIME":"10.283","WINDTURBINEID":"NG01_76","ALERTTEXT":"发电机轴承温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"100","COUNT":"2","TIME":"9.467","WINDTURBINEID":"NG01_05","ALERTTEXT":"发电机轴承温升速度大于1.5","CATEGORY":"1"}
-,
-{"SNAPID":"101","COUNT":"2","TIME":"77.067","WINDTURBINEID":"SG01_15","ALERTTEXT":"发电机轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"102","COUNT":"1","TIME":"66.133","WINDTURBINEID":"SG01_30","ALERTTEXT":"发电机轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"103","COUNT":"3","TIME":"43.65","WINDTURBINEID":"SG01_29","ALERTTEXT":"发电机轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"104","COUNT":"1","TIME":"1.733","WINDTURBINEID":"SG01_07","ALERTTEXT":"发电机轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"105","COUNT":"2","TIME":"253","WINDTURBINEID":"SG01_71","ALERTTEXT":"变桨电容电压低","CATEGORY":"1"}
-,
-{"SNAPID":"106","COUNT":"1","TIME":"1.167","WINDTURBINEID":"NG01_06","ALERTTEXT":"变桨电容电压低","CATEGORY":"1"}
-,
-{"SNAPID":"107","COUNT":"2","TIME":"252.767","WINDTURBINEID":"SG01_71","ALERTTEXT":"变桨电容电压高","CATEGORY":"1"}
-,
-{"SNAPID":"108","COUNT":"1","TIME":"1","WINDTURBINEID":"SG01_84","ALERTTEXT":"变桨电容电压高","CATEGORY":"1"}
-,
-{"SNAPID":"109","COUNT":"9","TIME":"1235.967","WINDTURBINEID":"MG01_03","ALERTTEXT":"变桨通信不良","CATEGORY":"2"}
-,
-{"SNAPID":"110","COUNT":"13","TIME":"1217.117","WINDTURBINEID":"MG01_04","ALERTTEXT":"变桨通信不良","CATEGORY":"2"}
-,
-{"SNAPID":"111","COUNT":"13","TIME":"1199.65","WINDTURBINEID":"MG01_05","ALERTTEXT":"变桨通信不良","CATEGORY":"2"}
-,
-{"SNAPID":"112","COUNT":"9","TIME":"1156.35","WINDTURBINEID":"MG01_23","ALERTTEXT":"变桨通信不良","CATEGORY":"2"}
-,
-{"SNAPID":"113","COUNT":"12","TIME":"1156.183","WINDTURBINEID":"MG01_15","ALERTTEXT":"变桨通信不良","CATEGORY":"2"}
-,
-{"SNAPID":"114","COUNT":"8","TIME":"1155.367","WINDTURBINEID":"MG01_02","ALERTTEXT":"变桨通信不良","CATEGORY":"2"}
-,
-{"SNAPID":"115","COUNT":"9","TIME":"1151.533","WINDTURBINEID":"MG01_25","ALERTTEXT":"变桨通信不良","CATEGORY":"2"}
-,
-{"SNAPID":"116","COUNT":"1","TIME":"1.45","WINDTURBINEID":"SG01_20","ALERTTEXT":"叶轮转速超速","CATEGORY":"1"}
-,
-{"SNAPID":"117","COUNT":"1","TIME":"1.4","WINDTURBINEID":"SG01_71","ALERTTEXT":"夏季单机齿轮箱油温温度传感器异常值","CATEGORY":"1"}
-,
-{"SNAPID":"118","COUNT":"1","TIME":"1.217","WINDTURBINEID":"SG01_30","ALERTTEXT":"大风引起震动","CATEGORY":"1"}
-,
-{"SNAPID":"119","COUNT":"271","TIME":"1100.55","WINDTURBINEID":"MG01_07","ALERTTEXT":"断轴或联轴器打滑","CATEGORY":"2"}
-,
-{"SNAPID":"120","COUNT":"299","TIME":"1032.717","WINDTURBINEID":"SG01_30","ALERTTEXT":"断轴或联轴器打滑","CATEGORY":"2"}
-,
-{"SNAPID":"121","COUNT":"701","TIME":"755.233","WINDTURBINEID":"SG01_66","ALERTTEXT":"断轴或联轴器打滑","CATEGORY":"2"}
-,
-{"SNAPID":"122","COUNT":"654","TIME":"722.317","WINDTURBINEID":"XG01_29","ALERTTEXT":"断轴或联轴器打滑","CATEGORY":"2"}
-,
-{"SNAPID":"123","COUNT":"343","TIME":"705.417","WINDTURBINEID":"QG01_79","ALERTTEXT":"断轴或联轴器打滑","CATEGORY":"2"}
-,
-{"SNAPID":"124","COUNT":"1","TIME":"1.483","WINDTURBINEID":"SG01_26","ALERTTEXT":"机端过电压","CATEGORY":"2"}
-,
-{"SNAPID":"125","COUNT":"11","TIME":"5.017","WINDTURBINEID":"NG01_44","ALERTTEXT":"机组逆功率","CATEGORY":"2"}
-,
-{"SNAPID":"126","COUNT":"10","TIME":"3.667","WINDTURBINEID":"MG01_21","ALERTTEXT":"机组逆功率","CATEGORY":"2"}
-,
-{"SNAPID":"127","COUNT":"2","TIME":"2.233","WINDTURBINEID":"NG01_37","ALERTTEXT":"机组逆功率","CATEGORY":"2"}
-,
-{"SNAPID":"128","COUNT":"3","TIME":"2","WINDTURBINEID":"NG01_96","ALERTTEXT":"机组逆功率","CATEGORY":"2"}
-,
-{"SNAPID":"129","COUNT":"8","TIME":"153.583","WINDTURBINEID":"SG01_71","ALERTTEXT":"机舱温度高","CATEGORY":"1"}
-,
-{"SNAPID":"130","COUNT":"12","TIME":"32.683","WINDTURBINEID":"SG01_79","ALERTTEXT":"机舱温度高","CATEGORY":"1"}
-,
-{"SNAPID":"131","COUNT":"225","TIME":"81.35","WINDTURBINEID":"NG01_85","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"132","COUNT":"102","TIME":"31.733","WINDTURBINEID":"XG01_10","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"133","COUNT":"74","TIME":"28.95","WINDTURBINEID":"XG01_19","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"134","COUNT":"92","TIME":"28.883","WINDTURBINEID":"NG01_78","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"135","COUNT":"64","TIME":"24.15","WINDTURBINEID":"SG01_01","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"136","COUNT":"63","TIME":"23.983","WINDTURBINEID":"XG01_25","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"137","COUNT":"63","TIME":"23.983","WINDTURBINEID":"XG01_25","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"138","COUNT":"63","TIME":"22.55","WINDTURBINEID":"SG01_19","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"139","COUNT":"63","TIME":"21.25","WINDTURBINEID":"XG01_08","ALERTTEXT":"机舱震动幅度超限","CATEGORY":"1"}
-,
-{"SNAPID":"140","COUNT":"2","TIME":"11.183","WINDTURBINEID":"NG01_70","ALERTTEXT":"桨叶角度差","CATEGORY":"1"}
-,
-{"SNAPID":"141","COUNT":"3","TIME":"9.567","WINDTURBINEID":"SG01_71","ALERTTEXT":"桨叶角度差","CATEGORY":"1"}
-,
-{"SNAPID":"142","COUNT":"2","TIME":"8.417","WINDTURBINEID":"NG01_61","ALERTTEXT":"桨叶角度差","CATEGORY":"1"}
-,
-{"SNAPID":"143","COUNT":"2","TIME":"8.1","WINDTURBINEID":"NG01_73","ALERTTEXT":"桨叶角度差","CATEGORY":"1"}
-,
-{"SNAPID":"144","COUNT":"2","TIME":"8.083","WINDTURBINEID":"NG01_78","ALERTTEXT":"桨叶角度差","CATEGORY":"1"}
-,
-{"SNAPID":"145","COUNT":"2","TIME":"7.2","WINDTURBINEID":"NG01_28","ALERTTEXT":"桨叶角度差","CATEGORY":"1"}
-,
-{"SNAPID":"146","COUNT":"16","TIME":"939.983","WINDTURBINEID":"XG01_02","ALERTTEXT":"桨叶角过小","CATEGORY":"1"}
-,
-{"SNAPID":"147","COUNT":"15","TIME":"931.35","WINDTURBINEID":"XG01_09","ALERTTEXT":"桨叶角过小","CATEGORY":"1"}
-,
-{"SNAPID":"148","COUNT":"6","TIME":"879.167","WINDTURBINEID":"XG01_14","ALERTTEXT":"桨叶角过小","CATEGORY":"1"}
-,
-{"SNAPID":"149","COUNT":"14","TIME":"868.917","WINDTURBINEID":"XG01_04","ALERTTEXT":"桨叶角过小","CATEGORY":"1"}
-,
-{"SNAPID":"150","COUNT":"6","TIME":"849.1","WINDTURBINEID":"XG01_15","ALERTTEXT":"桨叶角过小","CATEGORY":"1"}
-,
-{"SNAPID":"151","COUNT":"1","TIME":"103.55","WINDTURBINEID":"SG01_15","ALERTTEXT":"石板泉发电机轴承温度超过70度","CATEGORY":"1"}
-,
-{"SNAPID":"152","COUNT":"1","TIME":"101.083","WINDTURBINEID":"SG01_30","ALERTTEXT":"石板泉发电机轴承温度超过70度","CATEGORY":"1"}
-,
-{"SNAPID":"153","COUNT":"1","TIME":"95.117","WINDTURBINEID":"SG01_29","ALERTTEXT":"石板泉发电机轴承温度超过70度","CATEGORY":"1"}
-,
-{"SNAPID":"154","COUNT":"1","TIME":"59.733","WINDTURBINEID":"SG01_07","ALERTTEXT":"石板泉发电机轴承温度超过70度","CATEGORY":"1"}
-,
-{"SNAPID":"155","COUNT":"113","TIME":"63.85","WINDTURBINEID":"NG01_17","ALERTTEXT":"风机偏航过程震动","CATEGORY":"1"}
-,
-{"SNAPID":"156","COUNT":"22","TIME":"7.05","WINDTURBINEID":"NG01_27","ALERTTEXT":"风机偏航过程震动","CATEGORY":"1"}
-,
-{"SNAPID":"157","COUNT":"16","TIME":"6.3","WINDTURBINEID":"NG01_06","ALERTTEXT":"风机偏航过程震动","CATEGORY":"1"}
-,
-{"SNAPID":"158","COUNT":"15","TIME":"6.05","WINDTURBINEID":"NG01_55","ALERTTEXT":"风机偏航过程震动","CATEGORY":"1"}
-,
-{"SNAPID":"159","COUNT":"15","TIME":"5.367","WINDTURBINEID":"NG01_85","ALERTTEXT":"风机偏航过程震动","CATEGORY":"1"}
-,
-{"SNAPID":"160","COUNT":"5","TIME":"75.95","WINDTURBINEID":"SG01_94","ALERTTEXT":"风机轴a轴b温差大","CATEGORY":"1"}
-,
-{"SNAPID":"161","COUNT":"1","TIME":"1.2","WINDTURBINEID":"SG01_06","ALERTTEXT":"风机轴a轴b温差大","CATEGORY":"1"}
-,
-{"SNAPID":"162","COUNT":"229","TIME":"74.883","WINDTURBINEID":"NG01_22","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"163","COUNT":"51","TIME":"60.333","WINDTURBINEID":"QG01_78","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"164","COUNT":"39","TIME":"59.017","WINDTURBINEID":"QG01_77","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"165","COUNT":"42","TIME":"58.783","WINDTURBINEID":"QG01_77","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"166","COUNT":"44","TIME":"58.333","WINDTURBINEID":"QG01_76","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"167","COUNT":"38","TIME":"57.917","WINDTURBINEID":"QG01_76","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"168","COUNT":"31","TIME":"56.983","WINDTURBINEID":"QG01_79","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"169","COUNT":"37","TIME":"55.767","WINDTURBINEID":"QG01_79","ALERTTEXT":"风速突变","CATEGORY":"1"}
-,
-{"SNAPID":"170","COUNT":"69","TIME":"94.183","WINDTURBINEID":"XG01_21","ALERTTEXT":"齿轮箱油温度高","CATEGORY":"1"}
-,
-{"SNAPID":"171","COUNT":"2","TIME":"80.2","WINDTURBINEID":"XG01_06","ALERTTEXT":"齿轮箱油温度高","CATEGORY":"1"}
-,
-{"SNAPID":"172","COUNT":"8","TIME":"39.45","WINDTURBINEID":"XG01_04","ALERTTEXT":"齿轮箱油温度高","CATEGORY":"1"}
-,
-{"SNAPID":"173","COUNT":"4","TIME":"12.9","WINDTURBINEID":"XG01_18","ALERTTEXT":"齿轮箱油温度高","CATEGORY":"1"}
-,
-{"SNAPID":"174","COUNT":"2","TIME":"1.65","WINDTURBINEID":"SG01_25","ALERTTEXT":"齿轮箱油温度高","CATEGORY":"1"}
-,
-{"SNAPID":"175","COUNT":"98","TIME":"717.85","WINDTURBINEID":"XG01_09","ALERTTEXT":"齿轮箱温控阀故障或换热器效率低","CATEGORY":"2"}
-,
-{"SNAPID":"176","COUNT":"145","TIME":"636.117","WINDTURBINEID":"XG01_05","ALERTTEXT":"齿轮箱温控阀故障或换热器效率低","CATEGORY":"2"}
-,
-{"SNAPID":"177","COUNT":"220","TIME":"611.05","WINDTURBINEID":"XG01_01","ALERTTEXT":"齿轮箱温控阀故障或换热器效率低","CATEGORY":"2"}
-,
-{"SNAPID":"178","COUNT":"177","TIME":"552.133","WINDTURBINEID":"XG01_08","ALERTTEXT":"齿轮箱温控阀故障或换热器效率低","CATEGORY":"2"}
-,
-{"SNAPID":"179","COUNT":"127","TIME":"466.717","WINDTURBINEID":"XG01_06","ALERTTEXT":"齿轮箱温控阀故障或换热器效率低","CATEGORY":"2"}
-,
-{"SNAPID":"180","COUNT":"103","TIME":"419.083","WINDTURBINEID":"XG01_13","ALERTTEXT":"齿轮箱温控阀故障或换热器效率低","CATEGORY":"2"}
-,
-{"SNAPID":"181","COUNT":"26","TIME":"838.017","WINDTURBINEID":"XG01_09","ALERTTEXT":"齿轮箱轴承温升超过40度","CATEGORY":"1"}
-,
-{"SNAPID":"182","COUNT":"15","TIME":"820.867","WINDTURBINEID":"XG01_25","ALERTTEXT":"齿轮箱轴承温升超过40度","CATEGORY":"1"}
-,
-{"SNAPID":"183","COUNT":"17","TIME":"676.2","WINDTURBINEID":"XG01_08","ALERTTEXT":"齿轮箱轴承温升超过40度","CATEGORY":"1"}
-,
-{"SNAPID":"184","COUNT":"17","TIME":"658.5","WINDTURBINEID":"XG01_06","ALERTTEXT":"齿轮箱轴承温升超过40度","CATEGORY":"1"}
-,
-{"SNAPID":"185","COUNT":"39","TIME":"626.133","WINDTURBINEID":"XG01_12","ALERTTEXT":"齿轮箱轴承温升超过40度","CATEGORY":"1"}
-,
-{"SNAPID":"186","COUNT":"16","TIME":"27.183","WINDTURBINEID":"XG01_04","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"187","COUNT":"25","TIME":"26.8","WINDTURBINEID":"SG01_90","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"188","COUNT":"10","TIME":"26.517","WINDTURBINEID":"MG01_19","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"189","COUNT":"27","TIME":"25.717","WINDTURBINEID":"SG01_103","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"190","COUNT":"18","TIME":"25.467","WINDTURBINEID":"XG01_21","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"191","COUNT":"14","TIME":"25.35","WINDTURBINEID":"MG01_22","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"192","COUNT":"21","TIME":"23.4","WINDTURBINEID":"QG01_79","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"193","COUNT":"16","TIME":"23.317","WINDTURBINEID":"SG01_107","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"194","COUNT":"13","TIME":"21.65","WINDTURBINEID":"SG01_97","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"195","COUNT":"21","TIME":"20.483","WINDTURBINEID":"NG01_01","ALERTTEXT":"齿轮箱轴承温升速度超过1.5","CATEGORY":"1"}
-,
-{"SNAPID":"196","COUNT":"17","TIME":"947.717","WINDTURBINEID":"XG01_25","ALERTTEXT":"齿轮箱轴承温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"197","COUNT":"17","TIME":"947.717","WINDTURBINEID":"XG01_25","ALERTTEXT":"齿轮箱轴承温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"198","COUNT":"14","TIME":"852.633","WINDTURBINEID":"XG01_35","ALERTTEXT":"齿轮箱轴承温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"199","COUNT":"39","TIME":"756.067","WINDTURBINEID":"NG01_89","ALERTTEXT":"齿轮箱轴承温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"200","COUNT":"29","TIME":"615.25","WINDTURBINEID":"XG01_09","ALERTTEXT":"齿轮箱轴承温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"201","COUNT":"26","TIME":"604","WINDTURBINEID":"SG01_90","ALERTTEXT":"齿轮箱轴承温差大于8度","CATEGORY":"1"}
-,
-{"SNAPID":"202","COUNT":"10","TIME":"328.7","WINDTURBINEID":"XG01_21","ALERTTEXT":"齿轮箱轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"203","COUNT":"2","TIME":"80.667","WINDTURBINEID":"XG01_06","ALERTTEXT":"齿轮箱轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"204","COUNT":"1","TIME":"72.733","WINDTURBINEID":"SG01_103","ALERTTEXT":"齿轮箱轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"205","COUNT":"1","TIME":"71.067","WINDTURBINEID":"SG01_97","ALERTTEXT":"齿轮箱轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"206","COUNT":"9","TIME":"60.95","WINDTURBINEID":"XG01_28","ALERTTEXT":"齿轮箱轴承温度高","CATEGORY":"1"}
-,
-{"SNAPID":"207","COUNT":"9","TIME":"154.183","WINDTURBINEID":"SG01_71","ALERTTEXT":"齿轮箱高速轴轴温大于90度","CATEGORY":"1"}
-
-]

+ 30 - 30
src/views/StatusBar.vue

@@ -137,21 +137,21 @@
       this.statusTimer = null;
     },
     created() {
-      this.WarningInfo = new WarningInfo();
-      this.datas()
-      this.refreshData()
+      // this.WarningInfo = new WarningInfo();
+      // this.datas()
+      // this.refreshData()
     },
     methods: {
-      datas() {
-        this.WarningInfo.warning.forEach(item => {
-          if (item.CATEGORY === "1") {
-            this.hiddenDangerData.push(item)
-          } else {
-            this.defectData.push(item)
-          }
-        })
-        console.log( this.hiddenDangerData,this.defectData)
-      },
+      // datas() {
+      //   this.WarningInfo.warning.forEach(item => {
+      //     if (item.CATEGORY === "1") {
+      //       this.hiddenDangerData.push(item)
+      //     } else {
+      //       this.defectData.push(item)
+      //     }
+      //   })
+      //   console.log( this.hiddenDangerData,this.defectData)
+      // },
       appendZero(obj) {
         if (obj < 10) {
           return "0" + obj;
@@ -159,27 +159,27 @@
           return obj;
         }
       },
-      refreshData() {
-        var bd = BackgroundData.getInstance();
-        this.hiddenDangerNum = bd.HiddenProblems.length;
-        this.defectNum = bd.Defects.length;
-        this.malfunctionNum = bd.Failure.length;
-        this.accidentNum = bd.Accidents.length;
-        // this.hiddenDangerData = bd.HiddenProblems;
-        // this.defectData = bd.Defects;
-        this.malfunctionData = bd.Failure;
-        this.accidentData = bd.Accidents;
-        this.timer = setTimeout(() => {
-          clearInterval(this.timer);
-          this.refreshData()
-        }, 5000);
-      },
+      // refreshData() {
+      //   var bd = BackgroundData.getInstance();
+      //   this.hiddenDangerNum = bd.HiddenProblems.length;
+      //   this.defectNum = bd.Defects.length;
+      //   this.malfunctionNum = bd.Failure.length;
+      //   this.accidentNum = bd.Accidents.length;
+      //   // this.hiddenDangerData = bd.HiddenProblems;
+      //   // this.defectData = bd.Defects;
+      //   this.malfunctionData = bd.Failure;
+      //   this.accidentData = bd.Accidents;
+      //   this.timer = setTimeout(() => {
+      //     clearInterval(this.timer);
+      //     this.refreshData()
+      //   }, 5000);
+      // },
     },
   };
 </script>
 
 <style scoped>
-  :deep(.el-table__body-wrapper::-webkit-scrollbar) {
+  /* :deep(.el-table__body-wrapper::-webkit-scrollbar) {
     width: 8px;
     background-color: black;
   }
@@ -191,7 +191,7 @@
 
   :deep(.el-table td, .el-table th) {
     border-bottom: 1px solid rgb(36, 36, 36);
-  }
+  } */
 
   span {
     font-size: 13px;

+ 70 - 34
src/views/TitleBar.vue

@@ -38,76 +38,76 @@
       </el-col>
       <el-col :span="19" style="margin-left: 60px;">
         <div class="titleinfoall">
-          <div class="titleinfo" @dblclick="dbClicks()">
+          <div class="titleinfo" @dblclick="dbClicks(titleInfo.dailyPowerGeneration,'日发电量')">
             <ul>
               <li>
                 <!-- <TitleBarCard title="装机容量" unit="MW" :value="installedCapacity"></TitleBarCard> -->
                 <span class="showTitle">日发电量</span>
-                <span class="showvalue">{{titleInfo.dailyPowerGeneration}}</span>
+                <span class="showvalue">{{titleInfo.dailyPowerGeneration?.value.toFixed(2)}}</span>
                 <span class="showTitle">万kW/h</span>
               </li>
             </ul>
           </div>
-          <div class="titleinfo"  @dblclick="dbClicks()">
+          <div class="titleinfo" @dblclick="dbClicks(titleInfo.powerLossFault,'故障损失')">
             <ul>
               <li>
                 <!-- <TitleBarCard title="实时功率" unit="MW" :value="totalPower"></TitleBarCard> -->
                 <span class="showTitle">故障损失</span>
                 <span
-                  :class="titleInfo.powerLossFault?(titleInfo.powerLossFault.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossFault.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossFault?titleInfo.powerLossFault.value:''}}</span>
+                  :class="titleInfo.powerLossFault?(titleInfo.powerLossFault.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossFault.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossFault?.value.toFixed(2)}}</span>
                 <span class="showTitle">万kW/h</span>
               </li>
             </ul>
           </div>
-          <div class="titleinfo"  @dblclick="dbClicks()">
+          <div class="titleinfo" @dblclick="dbClicks(titleInfo.powerLossRestrictions,'限电损失')">
             <ul>
               <li>
                 <!-- <TitleBarCard title="日发电量" unit="kWh" :value="dailyPowerGeneration"></TitleBarCard> -->
                 <span class="showTitle">限电损失</span>
                 <span
-                  :class="titleInfo.powerLossRestrictions?(titleInfo.powerLossRestrictions.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossRestrictions.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossRestrictions?titleInfo.powerLossRestrictions.value:''}}</span>
+                  :class="titleInfo.powerLossRestrictions?(titleInfo.powerLossRestrictions.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossRestrictions.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossRestrictions?.value.toFixed(2)}}</span>
                 <span class="showTitle">万kW/h</span>
               </li>
             </ul>
           </div>
-          <div class="titleinfo"  @dblclick="dbClicks()">
+          <div class="titleinfo" @dblclick="dbClicks(titleInfo.powerLossInspection,'检修损失')">
             <ul>
               <li>
                 <span class="showTitle">检修损失</span>
                 <span
-                  :class="titleInfo.powerLossInspection?(titleInfo.powerLossInspection.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossInspection.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossInspection?titleInfo.powerLossInspection.value:''}}</span>
+                  :class="titleInfo.powerLossInspection?(titleInfo.powerLossInspection.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossInspection.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossInspection?.value.toFixed(2)}}</span>
                 <span class="showTitle">万kW/h</span>
               </li>
             </ul>
           </div>
-          <div class="titleinfo"  @dblclick="dbClicks()">
+          <div class="titleinfo" @dblclick="dbClicks(titleInfo.powerLossBurden,'受累损失')">
             <ul>
               <li>
                 <span class="showTitle">受累损失</span>
                 <span
-                  :class="titleInfo.powerLossBurden?(titleInfo.powerLossBurden.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossBurden.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossBurden?titleInfo.powerLossBurden.value:''}}</span>
+                  :class="titleInfo.powerLossBurden?(titleInfo.powerLossBurden.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossBurden.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossBurden?.value.toFixed(2)}}</span>
                 <span class="showTitle">万kW/h</span>
               </li>
             </ul>
           </div>
-          <div class="titleinfo"  @dblclick="dbClicks()">
+          <div class="titleinfo" @dblclick="dbClicks(titleInfo.powerLossPerformance,'性能损失')">
             <ul>
               <li>
                 <span class="showTitle">性能损失</span>
                 <span
-                  :class="titleInfo.powerLossPerformance?(titleInfo.powerLossPerformance.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossPerformance.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossPerformance?titleInfo.powerLossPerformance.value:''}}</span>
+                  :class="titleInfo.powerLossPerformance?(titleInfo.powerLossPerformance.trend === 'Counterpoise'?'showvalue':titleInfo.powerLossPerformance.trend === 'Rise'?'showvalue-up':'showvalue-down'):''">{{titleInfo.powerLossPerformance?.value.toFixed(2)}}</span>
                 <span class="showTitle">万kW/h</span>
               </li>
             </ul>
           </div>
-          <div class="titleinfo"  @dblclick="dbClicks()">
+          <div class="titleinfo" @dblclick="dbClicks(titleInfo.fieldElectricity,'场用电量')">
             <ul>
               <li>
                 <span class="showTitle">场用电量</span>
-                <span class="showvalue">{{titleInfo.fieldElectricity}}</span>
+                <span class="showvalue">{{titleInfo.fieldElectricity?.value.toFixed(2)}}</span>
                 <span class="showTitle">万kW/h</span>
               </li>
-            </ul>
+            </ul> 
           </div>
         </div>
       </el-col>
@@ -130,7 +130,8 @@
         </div>
       </el-col>
     </el-row>
-    <DataDetails @closed="closeds()" v-model="display"></DataDetails>
+    <DataDetails @closed="closeds()" v-model="display" :datas="titleDetails" :partsName="partsName"
+      echartsId="titleEcharts" @search-data="search" @original-data="originalData"></DataDetails>
   </div>
 </template>
 
@@ -138,8 +139,9 @@
   import TitleBarCard from "components/TitleBarCard.vue";
   import BackgroundData from "utils/BackgroundData";
   import MessageBridge from 'utils/MessageBridge'
-  import DataDetails from "components/dataDetails.vue";
+  import DataDetails from "components/basicDataDetails.vue";
   import api from "api/index";
+  import dayjs from 'dayjs'
   export default {
     name: "TitleBar",
     components: {
@@ -155,7 +157,10 @@
           name: "",
           psd: "",
         },
+        partsName: '',
+        titleDetails: [],
         titleInfo: {},
+        modelData: {},
         usreName: "未登录...",
         loginMessage: "", // 登录提示
         formLabelWidth: "120px",
@@ -165,7 +170,8 @@
         monthlyPowerGeneration: 0, // 月发电量
         annualPowerGeneration: 0, // 年发电量
         installedCapacity: 734, // 装机容量
-        display: false
+        display: false,
+        interval: 60,
       };
     },
     computed: {
@@ -195,17 +201,7 @@
         mb.register(vs);
       },
       titleInfos(msg) {
-        let data = JSON.parse(msg)
-        if (Object.keys(data)?.length > 0) {
-          data.dailyPowerGeneration = data.dailyPowerGeneration.toFixed(2)
-          data.powerLossFault.value = data.powerLossFault.value.toFixed(2)
-          data.powerLossRestrictions.value = data.powerLossRestrictions.value.toFixed(2)
-          data.powerLossInspection.value = data.powerLossInspection.value.toFixed(2)
-          data.powerLossBurden.value = data.powerLossBurden.value.toFixed(2)
-          data.powerLossPerformance.value = data.powerLossPerformance.value.toFixed(2)
-          data.fieldElectricity = data.fieldElectricity.toFixed(2)
-          this.titleInfo = data
-        }
+        this.titleInfo = JSON.parse(msg)
       },
       handleClose(done) {
         done();
@@ -240,8 +236,8 @@
         //   this.loginMessage='正在登录...';
         // bd.login(this.form.name,this.form.psd,this.onLoged);
         api.login({
-          username:this.form.name,
-          password:  this.form.psd,
+          username: this.form.name,
+          password: this.form.psd,
         }).then(res => {
           if (res) {
 
@@ -281,12 +277,52 @@
         this.usreName = '未登录...';
         this.isLogin = false;
       },
-      dbClicks() {
-        this.display = true;
+      dbClicks(data, partsName, timeValues) {
+        this.modelData = data
+        let date = new Date()
+        let endTs = timeValues ? (timeValues[1] > date.getTime()) ? date.getTime() : timeValues[1] : date.getTime();
+        let startTs = timeValues ? timeValues[0] : endTs - 28800000;
+        api.getPower({
+          tagName: data.tag,
+          startTs: startTs,
+          endTs: endTs,
+          interval: this.interval,
+        }).then(res => {
+          if (res.data.length > 0) {
+            this.partsName = partsName
+            this.display = true;
+            this.titleDetails = res.data
+          }
+        })
+      },
+      original(data, partsName, timeValues) {
+        this.modelData = data
+        let date = new Date()
+        let endTs = timeValues ? (timeValues[1] > date.getTime()) ? date.getTime() : timeValues[1] : date.getTime();
+        let startTs = timeValues ? timeValues[0] : endTs - 28800000;
+        api.getOriginalPower({
+          tagName: data.tag,
+          startTs: startTs,
+          endTs: endTs,
+        }).then(res => {
+          if (res.data.length > 0) {
+            this.partsName = partsName
+            this.display = true;
+            this.titleDetails = res.data
+          }
+        })
+      },
+      search(values,interval) {
+        this.interval = interval
+        this.dbClicks(this.modelData, this.partsName, values)
+      },
+      originalData(values) {
+        this.original(this.modelData, this.partsName, values)
       },
       closeds() {
         this.display = false;
-      }
+        this.interval = 60
+      },
     },
   };
 </script>