瀏覽代碼

华电项目启动报错

liujiejie 8 月之前
父節點
當前提交
7c3a2f9f3c

+ 31 - 12
.env.hd

@@ -1,15 +1,34 @@
-###
- # @Author: your name
- # @Date: 2025-07-17 14:13:20
- # @LastEditTime: 2025-07-22 13:35:37
- # @LastEditors: milo-MacBook-Pro.local
- # @Description: In User Settings Edit
- # @FilePath: /performance-test/.env.hd
-### 
-# VUE_APP_MAPVIEW=http://192.168.0.1/tiles/{z}/{x}/{y}.png
-VUE_APP_MAPVIEW=/tiles/{z}/{x}/{y}.png
 VUE_APP_THEM="blue"
 VUE_APP_ISSHOWHD='HD'
-# VUE_APP_UPLOAD="http://192.168.0.1/energy-manage-service/api/check/upload"
-VUE_APP_UPLOAD="http://192.168.50.235/energy-manage-service/api/check/upload"
 VUE_APP_TITLE='风电机组健康诊断平台'
+
+#外网
+VUE_APP_MAPVIEW=/tiles/{z}/{x}/{y}.png
+# VUE_APP_UPLOAD="http://192.168.0.1/energy-manage-service/api/check/upload"
+VUE_APP_UPLOAD="http://106.120.102.238:16700/energy-manage-service/api/check/upload"
+VUE_APP_APIPROXY='http://106.120.102.238:16700'
+VUE_APP_MAP=http://106.120.102.238:18080
+VUE_APP_WZLAPIPROXY='http://106.120.102.238:18080/WindTransDev'
+VUE_APP_ETLAPIPROXY='http://106.120.102.238:18080/WindTransDev'
+VUE_APP_AnalysisMultiAPIPROXY='http://106.120.102.238:28999/AnalysisMulti'
+#自定义算法文佳 目前无法使用,可能是服务未启动
+VUE_APP_sAlgorithmAPIPROXY='http://106.120.102.238:58880'
+VUE_APP_databaseApiAPIPROXY='http://106.120.102.238:58880'
+# #暂时不知下载报告内网dev 环境地址
+VUE_APP_downLoadChartAPIPROXY='http://106.120.102.238:58880'
+
+#内网
+# # VUE_APP_UPLOAD="http://192.168.0.1/energy-manage-service/api/check/upload"
+# VUE_APP_UPLOAD="http://192.168.50.235/energy-manage-service/api/check/upload"
+# VUE_APP_MAPVIEW=/tiles/{z}/{x}/{y}.png
+# VUE_APP_MAP=http://192.168.50.235
+# VUE_APP_APIPROXY='http://192.168.50.235:16200'
+# VUE_APP_WZLAPIPROXY='http://192.168.50.241:9001'
+# VUE_APP_ETLAPIPROXY='http://192.168.50.241:9001'
+# # #自定义算法文佳 目前无法使用,可能是服务未启动
+# VUE_APP_sAlgorithmAPIPROXY='http://192.168.50.235:8998/AnalysisMulti'
+# VUE_APP_databaseApiAPIPROXY='http://192.168.50.234:3002'
+# #暂时不知健康评估内网dev 环境地址
+# VUE_APP_AnalysisMultiAPIPROXY='http://192.168.50.235:8998/AnalysisMulti'
+# #暂时不知下载报告内网dev 环境地址
+# VUE_APP_downLoadChartAPIPROXY=''

文件差異過大導致無法顯示
+ 854 - 1735
package-lock.json


+ 2 - 1
package.json

@@ -65,7 +65,8 @@
     "style-resources-loader": "^1.4.1",
     "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
     "vue-cli-plugin-style-resources-loader": "~0.1.5",
-    "vue-template-compiler": "^2.6.14"
+    "vue-template-compiler": "^2.6.14",
+    "webpack-dev-server": "^3.11.3"
   },
   "browserslist": [
     "> 1%",

+ 2 - 2
src/views/overview/components/speed_power/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:09:17
- * @LastEditTime: 2025-07-24 10:50:17
+ * @LastEditTime: 2025-08-07 16:36:47
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/speed_power/index.vue
@@ -128,7 +128,7 @@ import FilterChart from "@/views/overview/components/filterChart/index.vue";
 import DDrawingChart from "@/views/performance/components/chartsCom/3DDrawingChart.vue";
 import TinymceEditor from "@/components/Tinymce.vue";
 //分图
-import Time3DChart from "@/views/performance/components/chartsCom/Time3DBarChart.vue";
+import Time3DChart from "@/views/performance/components/chartsCom/Time3DChart.vue";
 import {
   analysisDetail,
   queryAnalysisedEngine,

+ 17 - 5
src/views/overview/components/speed_torque_power/index.vue

@@ -1,13 +1,13 @@
 <!--
  * @Author: your name
  * @Date: 2025-08-07 10:48:08
- * @LastEditTime: 2025-08-07 14:34:11
+ * @LastEditTime: 2025-08-07 16:08:26
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/speed_torque_power/index.vue
 -->
 <template>
-  <div>
+  <div class="type-variable-speed-torque-power">
     <!-- <div>发电机转速-转矩/发电机转速-有功功率</div> -->
     <el-button type="primary" size="small" @click="handleTabPower(!isPower)">
       {{ isPower ? "查看转速-转矩" : "查看转速-有功功率" }}
@@ -19,7 +19,7 @@
       :batchCodeList="batchCodeList"
       @setInitBathCode="handleSetInitBathCode"
       @setIsShow="handleSetIsShow"
-      @handle2D="handle2D"
+      @handle2D="handleTabPower"
       :isShow="isShow"
       :isShowTinymceEditorCom="true"
     ></SpeedPower>
@@ -30,7 +30,7 @@
       :batchCodeList="batchCodeList"
       @setInitBathCode="handleSetInitBathCode"
       @setIsShow="handleSetIsShow"
-      @handle2D="handle2D"
+      @handle2D="handleTabPower"
       :isShow="isShow"
       :isShowTinymceEditorCom="true"
     ></SpeedTorque>
@@ -75,10 +75,22 @@ export default {
     };
   },
   methods: {
+    handleSetInitBathCode(val) {
+      this.$emit("setInitBathCode", val); // 👈 向爷爷组件传递
+    },
+    handleSetIsShow(val) {
+      this.$emit("setIsShow", val); // 👈 向爷爷组件传递
+    },
     handleTabPower(val) {
       this.isPower = val;
     },
   },
 };
 </script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.type-variable-speed-torque-power {
+  width: 100%;
+  height: 100%;
+  overflow-y: scroll;
+}
+</style>

+ 1 - 4
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2025-06-23 17:15:31
+ * @LastEditTime: 2025-08-08 10:29:01
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -537,9 +537,7 @@ import BoxLineCharts from "./components/chartsCom/BoxLineCharts";
 import HeatmapCharts from "./components/chartsCom/HeatmapCharts.vue";
 import WindRoseChart from "./components/chartsCom/WindRoseChart.vue";
 import PowerMarkers2DCharts from "./components/chartsCom/powerMarkers2DCharts.vue";
-// import JsonMarkerCharts from "./components/JsonMarkerCharts.vue";
 import PlotlyCharts from "./components/PlotlyCharts.vue";
-
 import { downLoadCsvFile } from "@/utils/common";
 import { saveAs } from "file-saver";
 import JSZip from "jszip";
@@ -549,7 +547,6 @@ export default {
   components: {
     // DetailCharts,
     WindRoseChart,
-    // JsonMarkerCharts,
     HeatmapCharts,
     CreateNewChart,
     PlotlyCharts,

+ 0 - 142
src/views/performance/components/JsonMarkerCharts.vue

@@ -1,142 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2024-08-16 16:19:19
- * @LastEditTime: 2024-12-24 10:47:21
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/performance/components/JsonMarkerCharts.vue
--->
-<template>
-  <!-- json 数据渲染plotly散点图  废弃页面-->
-  <div>
-    <div ref="chart" style="width: 100%; height: 500px"></div>
-  </div>
-</template>
-<script>
-import Plotly from "plotly.js-dist";
-import axios from "axios";
-
-export default {
-  data() {
-    return {
-      dataArr: [], // 存储好点标识的数据
-      dataBrr: [], // 存储坏点标识的数据
-      dataCrr: [], // 存储限电点标识的数据
-    };
-  },
-  async mounted() {
-    try {
-      // 从服务器获取数据
-      const response = await axios.get(
-        // "http://localhost:3006/wof053600062/WOF053600062-WOB00021/power_curve/manual/demo.json"
-        "http://localhost:3006/getEchartsData"
-      );
-      this.processData(response.data); // 处理并分类数据
-      this.initChart(); // 初始化图表
-    } catch (error) {
-      console.error("Error fetching data:", error);
-    }
-  },
-  methods: {
-    processData(data) {
-      data.forEach((item) => {
-        switch (item.lab) {
-          case "1":
-            this.dataArr.push({ x: item.wind_velocity, y: item.active_power });
-            break;
-          case "5":
-            this.dataBrr.push({ x: item.wind_velocity, y: item.active_power });
-            break;
-          case "4":
-            this.dataCrr.push({ x: item.wind_velocity, y: item.active_power });
-            break;
-          default:
-            return;
-        }
-      });
-    },
-    initChart() {
-      const chartElement = this.$refs.chart;
-      const trace1 = {
-        x: this.dataArr.map((d) => d.x),
-        y: this.dataArr.map((d) => d.y),
-        mode: "markers",
-        marker: { color: "green" },
-        name: "好点",
-      };
-      const trace2 = {
-        x: this.dataBrr.map((d) => d.x),
-        y: this.dataBrr.map((d) => d.y),
-        mode: "markers",
-        marker: { color: "red" },
-        name: "坏点",
-      };
-      const trace3 = {
-        x: this.dataCrr.map((d) => d.x),
-        y: this.dataCrr.map((d) => d.y),
-        mode: "markers",
-        marker: { color: "blue" },
-        name: "限电点",
-      };
-
-      const data = [trace1, trace2, trace3];
-
-      const layout = {
-        title: "Scatter Plot",
-        xaxis: {
-          title: "Wind Velocity",
-          gridcolor: "rgb(255,255,255)",
-          range: [1, 10],
-          showgrid: true,
-          showline: false,
-          showticklabels: true,
-          tickcolor: "rgb(127,127,127)",
-          ticks: "outside",
-          zeroline: false,
-        },
-        yaxis: {
-          title: "Active Power",
-          gridcolor: "rgb(255,255,255)",
-          showgrid: true,
-          showline: false,
-          showticklabels: true,
-          tickcolor: "rgb(127,127,127)",
-          ticks: "outside",
-          zeroline: false,
-        },
-        showlegend: true,
-        hovermode: "closest",
-        hovermode: "closest",
-        paper_bgcolor: "rgb(255,255,255)",
-        // plot_bgcolor: "rgb(229,229,229)",
-        // paper_bgcolor: "lightgray", // 设置图表外部区域背景色
-        plot_bgcolor: "#e5ecf6", // 设置绘图区背景色
-      };
-
-      Plotly.newPlot(chartElement, data, layout);
-
-      // 响应窗口大小变化
-      window.addEventListener("resize", () => {
-        Plotly.Plots.resize(chartElement);
-      });
-
-      // 处理图表的选择事件
-      chartElement.on("plotly_selected", (eventData) => {
-        if (eventData) {
-          const selectedPoints = [];
-          eventData.points.forEach((pt) => {
-            selectedPoints.push({
-              x: pt.x,
-              y: pt.y,
-              curveNumber: pt.curveNumber,
-            });
-          });
-        }
-      });
-    },
-  },
-};
-</script>
-<style scoped>
-/* 自定义样式 */
-</style>

+ 31 - 32
src/views/performance/components/chartsCom/Time3DBarChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-07-24 10:33:42
- * @LastEditTime: 2025-08-01 13:49:41
+ * @LastEditTime: 2025-08-08 09:33:02
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/Time3DBarChart.vue
@@ -61,8 +61,7 @@
 </template>
 
 <script>
-import Plotly, { doCamera } from "plotly.js-dist";
-import axios from "axios";
+import Plotly from "plotly.js-dist";
 import { myMixin } from "@/mixins/chartRequestMixin";
 import { colorSchemes } from "@/views/overview/js/colors";
 import { mapState } from "vuex";
@@ -149,38 +148,38 @@ export default {
         this.color1 = colorSchemes[0].colors;
       }
 
-      this.chartData.data.forEach((item) => {
-        const fault = item.fault_detail;
-        const yVal = item.fault_time_sum;
-        const zVal = item.count;
+      this.chartData &&
+        this.chartData.data.forEach((item) => {
+          const fault = item.fault_detail;
+          const yVal = item.fault_time_sum;
+          const zVal = item.count;
 
-        // 分配唯一颜色
-        if (!colorMap[fault]) {
-          colorMap[fault] = colorPalette[colorIndex % colorPalette.length];
-          colorIndex++;
-        }
-
-        const trace = {
-          type: "scatter3d",
-          mode: "lines",
-          x: [fault, fault, null],
-          y: [yVal, yVal, null],
-          z: [0, zVal, null],
-          line: {
-            color: colorMap[fault],
-            width: 16,
-          },
-          name: fault,
-          hovertemplate:
-            `故障代码: %{x}<br>` +
-            `累计时间: %{y}<br>` +
-            `出现次数: %{z}<extra></extra>`,
-          showlegend: true,
-        };
+          // 分配唯一颜色
+          if (!colorMap[fault]) {
+            colorMap[fault] = colorPalette[colorIndex % colorPalette.length];
+            colorIndex++;
+          }
 
-        traces.push(trace);
-      });
+          const trace = {
+            type: "scatter3d",
+            mode: "lines",
+            x: [fault, fault, null],
+            y: [yVal, yVal, null],
+            z: [0, zVal, null],
+            line: {
+              color: colorMap[fault],
+              width: 16,
+            },
+            name: fault,
+            hovertemplate:
+              `故障代码: %{x}<br>` +
+              `累计时间: %{y}<br>` +
+              `出现次数: %{z}<extra></extra>`,
+            showlegend: true,
+          };
 
+          traces.push(trace);
+        });
       const layout = {
         title: {
           text: "故障代码出现次数",

部分文件因文件數量過多而無法顯示