rui.jiang 3 semanas atrás
pai
commit
2a98cb0a3e
29 arquivos alterados com 254 adições e 204 exclusões
  1. 1 1
      downLoadServer/.env
  2. BIN
      downLoadServer/src/public/file/副本XXX风电场可靠性和能效双提升数据分析报告(模板).docx
  3. 45 22
      downLoadServer/src/server/utils/chartsCom/Radar.js
  4. 0 1
      downLoadServer/src/test.mjs
  5. 2 3
      src/components/HeaderCom.vue
  6. 5 6
      src/main.js
  7. 2 1
      src/store/themes.js
  8. 19 0
      src/utils/request.js
  9. 3 4
      src/views/health/components/malfunction/bearing.vue
  10. 3 4
      src/views/health/components/malfunction/dissymmetry.vue
  11. 62 62
      src/views/health/components/malfunction/gear.vue
  12. 2 2
      src/views/health/components/malfunction/loose.vue
  13. 16 16
      src/views/health/components/malfunction/misalignment.vue
  14. 2 3
      src/views/health/components/malfunction/temperature.vue
  15. 0 2
      src/views/health/index.vue
  16. 2 2
      src/views/home/components/MenuHD.vue
  17. 2 1
      src/views/login/Index.vue
  18. 7 3
      src/views/overview/components/wind_direction_frequency/index.vue
  19. 8 8
      src/views/overview/index.vue
  20. 4 1
      src/views/performance/assetssMag.vue
  21. 2 3
      src/views/performance/components/analysisEvent.vue
  22. 2 1
      src/views/performance/components/chartsCom/BarChart.vue
  23. 1 1
      src/views/performance/components/chartsCom/Radar.vue
  24. 1 0
      src/views/performance/components/chartsCom/Time3DChart.vue
  25. 12 8
      src/views/performance/components/chartsCom/TwoDMarkersChart1.vue
  26. 1 0
      src/views/performance/components/chartsCom/lineAndChildLine.vue
  27. 1 0
      src/views/performance/components/chartsCom/lineChartsFen.vue
  28. 36 36
      src/views/performance/js/allAnalysisType.js
  29. 13 13
      vue.config.js

+ 1 - 1
downLoadServer/.env

@@ -1,4 +1,4 @@
-API_BASE_URL=http://127.0.0.1:3000
+API_BASE_URL=http://0.0.0.0:3001
 MINIO_ENDPOINT=192.168.50.233
 MINIO_PORT=6900
 MINIO_ACCESS_KEY=haH1vePq7unSp4TG1One

BIN
downLoadServer/src/public/file/副本XXX风电场可靠性和能效双提升数据分析报告(模板).docx


+ 45 - 22
downLoadServer/src/server/utils/chartsCom/Radar.js

@@ -31,25 +31,46 @@ const getHtmlContent = () => `
   <div id="chart"></div>
   <script>
     window.renderChart = function (chartData, itemCsvData,engineTypeCode) {
-      function calcValues(data) {
-        const matrix = data.map((item) => [
-          item.TurbinePowerRate,
-          item.TurbineRunRate,
-          item.WindSpeedAvr,
-          item.Thi,
-          item.Ws,
-        ]);
-        const max = matrix[0].map((_, i) => Math.max(...matrix.map(row => row[i])));
-        const min = matrix[0].map((_, i) => Math.min(...matrix.map(row => row[i])));
-        const median = matrix[0].map((_, i) => {
-          const sorted = matrix.map(row => row[i]).sort((a, b) => a - b);
-          const mid = Math.floor(sorted.length / 2);
-          return sorted.length % 2 === 0
-            ? (sorted[mid - 1] + sorted[mid]) / 2
-            : sorted[mid];
-        });
-        return { max, min, median };
-      }
+     function calcValues(data) {
+  const matrix = data.map((item) => [
+    Number(item.TurbinePowerRate),
+    Number(item.TurbineRunRate),
+    Number(item.WindSpeedAvr),
+    Number(item.Thi),
+    Number(item.Ws),
+  ]);
+
+  if (matrix.length === 0) {
+    return {
+      max: [0, 0, 0, 0, 0],
+      min: [0, 0, 0, 0, 0],
+      median: [0, 0, 0, 0, 0],
+    };
+  }
+
+  const max = matrix[0].map((_, i) =>
+    Math.max(...matrix.map((row) => row[i] ?? 0))
+  );
+
+  const min = matrix[0].map((_, i) =>
+    Math.min(...matrix.map((row) => row[i] ?? 0))
+  );
+
+  const median = matrix[0].map((_, i) => {
+    const sorted = matrix
+      .map((row) => Number(row[i]))
+      .filter((v) => typeof v === "number" && !isNaN(v))
+      .sort((a, b) => a - b);
+    if (sorted.length === 0) return 0;
+    const mid = Math.floor(sorted.length / 2);
+    return sorted.length % 2 === 0
+      ? (sorted[mid - 1] + sorted[mid]) / 2
+      : sorted[mid];
+  });
+
+  return { max, min, median };
+}
+
 
       const { max, min, median } = calcValues(itemCsvData);
       const values = [
@@ -146,9 +167,11 @@ export const getRadarCharts = async (
   );
 
   // 再等待图表渲染完成(给 ECharts 时间)
-  (await page.waitForTimeout)
-    ? page.waitForTimeout(1000)
-    : new Promise((res) => setTimeout(res, 1000));
+  // (await page.waitForTimeout)
+  //   ? page.waitForTimeout(1000)
+  //   : new Promise((res) => setTimeout(res, 1000));
+  (await page.waitForTimeout?.(1000)) ??
+    new Promise((res) => setTimeout(res, 1000));
 
   // 上传逻辑
   // 截图并保存到临时文件

+ 0 - 1
downLoadServer/src/test.mjs

@@ -6,7 +6,6 @@ const testChartGeneration = async () => {
     // const dataUrl = "http://127.0.0.1:3000/testData.json";
     const dataUrl =
       "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/wind_speed_frequency/manual/wind_Speed_Frequency%2303.json";
-
     console.log("开始测试图表生成...");
 
     // 发送请求生成图表

+ 2 - 3
src/components/HeaderCom.vue

@@ -1,12 +1,11 @@
 <template>
   <div class="header">
     <div class="header-logo">
-      
       <!-- <img src="@/assets/datang.png" slot="reference" />
       <h2 class="conversion">中国大唐集团公司</h2> -->
     </div>
     <div class="personalCenter">
-      <p class="current-time">{{ currentDate }}</p>
+      <!-- <p class="current-time">{{ currentDate }}</p> -->
       <el-popover
         placement="bottom"
         width="220"
@@ -177,8 +176,8 @@ export default {
         phone: this.$store.state.auth.userInfo.userInfo.userPhone,
       })
         .then((res) => {
-          this.$store.commit("auth/RESET_USER_STATE");
           this.$router.push("/login");
+          this.$store.commit("auth/RESET_USER_STATE");
         })
         .catch(() => {
           this.$emit("setLoding", false);

+ 5 - 6
src/main.js

@@ -82,22 +82,22 @@ Vue.prototype.$formatDateTWO = function (timestamp) {
   return `${year}-${month}-${day} ${hours}:${minutes}`;
 };
 
-Vue.directive('number-only', {
+Vue.directive("number-only", {
   bind(el) {
-    el.addEventListener('input', (e) => {
+    el.addEventListener("input", (e) => {
       // 正则表达式:允许数字和最多一个小数点
       let inputVal = e.target.value;
       const regex = /^\d*\.?\d*$/;
 
       // 如果不符合格式,移除不合法字符
       if (!regex.test(inputVal)) {
-        inputVal = inputVal.replace(/[^\d.]/g, '');  // 移除非数字和小数点的字符
+        inputVal = inputVal.replace(/[^\d.]/g, ""); // 移除非数字和小数点的字符
       }
 
       // 防止多个小数点
-      const parts = inputVal.split('.');
+      const parts = inputVal.split(".");
       if (parts.length > 2) {
-        inputVal = parts[0] + '.' + parts[1];  // 只保留第一个小数点及其后面的部分
+        inputVal = parts[0] + "." + parts[1]; // 只保留第一个小数点及其后面的部分
       }
 
       // 更新输入框的值
@@ -106,7 +106,6 @@ Vue.directive('number-only', {
   },
 });
 
-
 // man.js
 
 // 注册 convertDMSToDecimal 方法

+ 2 - 1
src/store/themes.js

@@ -3,7 +3,7 @@ import { theme } from "tailwindcss/stubs/defaultConfig.stub";
 /*
  * @Author: your name
  * @Date: 2024-05-27 15:09:27
- * @LastEditTime: 2025-06-10 10:57:45
+ * @LastEditTime: 2025-07-04 09:09:20
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/store/themes.js
@@ -13,6 +13,7 @@ export default {
   namespaced: true,
   state: {
     theme: localStorage.getItem("theme") || "green",
+    // theme: localStorage.getItem("theme") || "blue", //华电默认主题色
     themeColor: [...colorSchemes[0].colors],
   },
   mutations: {

+ 19 - 0
src/utils/request.js

@@ -1,5 +1,7 @@
 import axios from "axios";
 import { Message } from "element-ui";
+import router from "../router/index";
+// request.js 文件中新增接收 router 的能力
 
 const service = axios.create({
   baseURL: window?._BASE_CONFIG?.API || "/api",
@@ -21,6 +23,8 @@ service.interceptors.request.use(
       if (token) {
         config.headers.token = token;
         config.headers.showIp = "106.120.102.238";
+      } else {
+        router.push("/login");
       }
     }
     return config;
@@ -38,6 +42,7 @@ service.interceptors.request.use(
 service.interceptors.response.use(
   async (response) => {
     const { data } = response;
+    // console.log("500", response);
     if (data?.code) {
       if (data.code !== 200) {
         Message({
@@ -46,6 +51,12 @@ service.interceptors.response.use(
           duration: 5 * 1000,
         });
         return Promise.reject(new Error(data.msg || "Error"));
+      } else if (data.code === 500) {
+        Message({
+          message: "查看接口网络连接是否存在问题",
+          type: "error",
+          duration: 5 * 1000,
+        });
       } else {
         return data;
       }
@@ -67,9 +78,17 @@ service.interceptors.response.use(
   },
   (error) => {
     const { response } = error;
+    // console.log("500", error);
     if (response) {
       if (response.status === 401) {
         window.location = response.data;
+      } else if (response.status === 500) {
+        Message({
+          message: "查看网络连接是否存在问题",
+          type: "error",
+          duration: 5 * 1000,
+        });
+        router.push("/login");
       } else {
         Message({
           message: response.data.message || error.message,

+ 3 - 4
src/views/health/components/malfunction/bearing.vue

@@ -36,7 +36,7 @@
           <el-pagination
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            layout="total, prev, pager, next, jumper"
+            layout="total, prev, pager, next"
             :total="totalCount"
             :page-size="10"
             small
@@ -211,13 +211,12 @@ export default {
     },
 
     automaticDiagnosis() {
-   
       if (this.tableData.length === 0) {
         this.$message.warning("当前没有数据,无法进行诊断");
         this.loading = false; // 确保关闭 loading 状态
         return; // 直接返回,不发请求
       }
-   this.loading = true;
+      this.loading = true;
       const ids = this.tableData
         .map((item) => item.id)
         .filter((id) => id !== undefined);
@@ -481,4 +480,4 @@ h4 {
   padding: 2px 0;
   font-size: 12px;
 }
-</style>
+</style>

+ 3 - 4
src/views/health/components/malfunction/dissymmetry.vue

@@ -37,7 +37,7 @@
             small
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            layout="total, prev, pager, next, jumper"
+            layout="total, prev, pager, next"
             :total="totalCount"
             :page-size="10"
           ></el-pagination>
@@ -199,8 +199,7 @@ export default {
       this.$emit("updatePage", this.currentPage); // 通知父组件,把当前页传出去
     },
     automaticDiagnosis() {
-
-           if (this.tableData.length === 0) {
+      if (this.tableData.length === 0) {
         this.$message.warning("当前没有数据,无法进行诊断");
         this.loading = false; // 确保关闭 loading 状态
         return; // 直接返回,不发请求
@@ -430,4 +429,4 @@ h4 {
   padding: 2px 0;
   font-size: 12px;
 }
-</style>
+</style>

+ 62 - 62
src/views/health/components/malfunction/gear.vue

@@ -36,7 +36,7 @@
           <el-pagination
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            layout="total, prev, pager, next, jumper"
+            layout="total, prev, pager, next"
             :total="totalCount"
             :page-size="10"
             small
@@ -202,7 +202,7 @@ export default {
     },
 
     automaticDiagnosis() {
-            if (this.tableData.length === 0) {
+      if (this.tableData.length === 0) {
         this.$message.warning("当前没有数据,无法进行诊断");
         this.loading = false; // 确保关闭 loading 状态
         return; // 直接返回,不发请求
@@ -228,52 +228,52 @@ export default {
         background: "rgba(0, 0, 0, 0.7)",
       });
 
-  axios
-  .post(`/AnalysisMulti/autodiag/${autodiagType}`, params)
-  .then((res) => {
-    if (res.data.code === 400) {
-      this.$message({
-        message: '当前测点无法进行齿轮箱诊断',
-        type: 'warning',
-      });
-    } else if (res.data.code === 405) {
-      this.$message({
-        message: '当前采集频率不适合进行诊断分析',
-        type: 'warning',
-      });
-    } else {
-      const result = res.data.results || {};
-      this.statistics = res.data.statistics || {};
-      // x轴数据,时间戳
-      this.xData = this.tableData.map((item) => item.timeStamp);
-      // y轴数据,状态码二维数组
-      this.yData = [
-        result.crack?.status_codes || [],
-        result.wear?.status_codes || [],
-      ];
-      // 设置颜色函数(根据 max_status)
-      const setColor = (status) => {
-        switch (status) {
-          case 0:
-            return '#8ae359'; // 正常
-          case 1:
-            return '#eecb5f'; // 报警
-          case 2:
-            return '#f7715f'; // 危险
-          default:
-            return '#80808057'; // 未知或缺失
-        }
-      };
-
-      // 根据 max_status 设置颜色
-      this.bearingStateColors.innerRing = setColor(
-        result.crack?.max_status ?? -1
-      );
-      this.bearingStateColors.outerRing = setColor(
-        result.wear?.max_status ?? -1
-      );
-    }
-  })
+      axios
+        .post(`/AnalysisMulti/autodiag/${autodiagType}`, params)
+        .then((res) => {
+          if (res.data.code === 400) {
+            this.$message({
+              message: "当前测点无法进行齿轮箱诊断",
+              type: "warning",
+            });
+          } else if (res.data.code === 405) {
+            this.$message({
+              message: "当前采集频率不适合进行诊断分析",
+              type: "warning",
+            });
+          } else {
+            const result = res.data.results || {};
+            this.statistics = res.data.statistics || {};
+            // x轴数据,时间戳
+            this.xData = this.tableData.map((item) => item.timeStamp);
+            // y轴数据,状态码二维数组
+            this.yData = [
+              result.crack?.status_codes || [],
+              result.wear?.status_codes || [],
+            ];
+            // 设置颜色函数(根据 max_status)
+            const setColor = (status) => {
+              switch (status) {
+                case 0:
+                  return "#8ae359"; // 正常
+                case 1:
+                  return "#eecb5f"; // 报警
+                case 2:
+                  return "#f7715f"; // 危险
+                default:
+                  return "#80808057"; // 未知或缺失
+              }
+            };
+
+            // 根据 max_status 设置颜色
+            this.bearingStateColors.innerRing = setColor(
+              result.crack?.max_status ?? -1
+            );
+            this.bearingStateColors.outerRing = setColor(
+              result.wear?.max_status ?? -1
+            );
+          }
+        })
 
         .catch((err) => {
           console.error("诊断失败:", err);
@@ -285,19 +285,19 @@ export default {
     },
 
     reset() {
-  this.tableData = []
-  this.xData = []
-  this.yData = []
-  this.statistics = {}
-  this.result = {}
-  this.currentPage = 1
-  this.bearingStateColors = {
-    innerRing: '#80808057',
-    outerRing: '#80808057',
-    rollingElement: '#80808057',
-    cage: '#80808057',
-  }
-}
+      this.tableData = [];
+      this.xData = [];
+      this.yData = [];
+      this.statistics = {};
+      this.result = {};
+      this.currentPage = 1;
+      this.bearingStateColors = {
+        innerRing: "#80808057",
+        outerRing: "#80808057",
+        rollingElement: "#80808057",
+        cage: "#80808057",
+      };
+    },
   },
 };
 </script>
@@ -472,4 +472,4 @@ h4 {
   padding: 2px 0;
   font-size: 12px;
 }
-</style>
+</style>

+ 2 - 2
src/views/health/components/malfunction/loose.vue

@@ -37,7 +37,7 @@
             small
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            layout="total, prev, pager, next, jumper"
+            layout="total, prev, pager, next"
             :total="totalCount"
             :page-size="10"
           ></el-pagination>
@@ -428,4 +428,4 @@ h4 {
   padding: 2px 0;
   font-size: 12px;
 }
-</style>
+</style>

+ 16 - 16
src/views/health/components/malfunction/misalignment.vue

@@ -37,7 +37,7 @@
             small
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            layout="total, prev, pager, next, jumper"
+            layout="total, prev, pager, next"
             :total="totalCount"
             :page-size="10"
           ></el-pagination>
@@ -199,7 +199,7 @@ export default {
       this.$emit("updatePage", this.currentPage); // 通知父组件,把当前页传出去
     },
     automaticDiagnosis() {
-            if (this.tableData.length === 0) {
+      if (this.tableData.length === 0) {
         this.$message.warning("当前没有数据,无法进行诊断");
         this.loading = false; // 确保关闭 loading 状态
         return; // 直接返回,不发请求
@@ -273,19 +273,19 @@ export default {
           this.loading = false;
         });
     },
-         reset() {
-    // 重置状态
-    this.xData = []
-    this.yData = []
-    this.statistics = {}
-    this.bearingStateColors = {
-      innerRing: '#80808057',
-      outerRing: '#80808057',
-      rollingElement: '#80808057',
-      cage: '#80808057',
-    }
-    this.tableData = []
-  },
+    reset() {
+      // 重置状态
+      this.xData = [];
+      this.yData = [];
+      this.statistics = {};
+      this.bearingStateColors = {
+        innerRing: "#80808057",
+        outerRing: "#80808057",
+        rollingElement: "#80808057",
+        cage: "#80808057",
+      };
+      this.tableData = [];
+    },
   },
 };
 </script>
@@ -428,4 +428,4 @@ h4 {
   padding: 2px 0;
   font-size: 12px;
 }
-</style>
+</style>

+ 2 - 3
src/views/health/components/malfunction/temperature.vue

@@ -23,7 +23,7 @@
           <el-pagination
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            layout="total, prev, pager, next, jumper"
+            layout="total, prev, pager, next"
             :total="totalCount"
             :page-size="500"
           />
@@ -277,7 +277,6 @@ export default {
 };
 </script>
 
-
 <style lang="scss" scoped>
 h4 {
   margin-bottom: 5px;
@@ -390,4 +389,4 @@ h4 {
   overflow-y: auto;
   height: 70vh;
 }
-</style>
+</style>

+ 0 - 2
src/views/health/index.vue

@@ -473,5 +473,3 @@ export default {
   }
 }
 </style>
-
-

+ 2 - 2
src/views/home/components/MenuHD.vue

@@ -377,10 +377,10 @@ export default {
 </style>
 
 <!-- /* 华电时的菜单打开这个 */ -->
-<!-- <style lang="scss" >
+<!-- <style lang="scss">
 .el-menu--popup {
   width: 100% !important;
-    min-width: 120px !important;
+  min-width: 120px !important;
   .el-menu-item {
     width: 100% !important;
     min-width: unset !important;

+ 2 - 1
src/views/login/Index.vue

@@ -3,6 +3,8 @@
     <div class="border">
       <div class="leftLogin">
         <h1>机组功率曲线异常检测数据分析系统</h1>
+        <!-- 华电 -->
+        <!-- <h1>风电机组健康诊断平台</h1> -->
         <el-divider></el-divider>
         <div class="loginText">
           <el-form
@@ -128,7 +130,6 @@ export default {
   box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.4);
   margin: auto;
 
-
   .leftLogin {
     align-items: center;
 

+ 7 - 3
src/views/overview/components/wind_direction_frequency/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:11:12
- * @LastEditTime: 2025-04-11 16:53:34
- * @LastEditors: bogon
+ * @LastEditTime: 2025-07-02 14:36:23
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/wind_direction_frequency/index.vue
 -->
@@ -47,7 +47,10 @@
           :fileAddr="item.fileAddr"
         ></WindRoseChart>
       </VirtualList> -->
-      <div class="scroller">
+      <div
+        class="scroller"
+        v-if="diagramRelationsDatas && diagramRelationsDatas.length > 0"
+      >
         <template>
           <el-row>
             <el-col
@@ -70,6 +73,7 @@
           </el-row>
         </template>
       </div>
+      <el-empty description="暂无分析记录" v-else></el-empty>
       <el-dialog
         v-if="isShowDescription"
         title="添加评论"

+ 8 - 8
src/views/overview/index.vue

@@ -60,21 +60,21 @@
                   ? 'fault_unit'
                   : submenuItem.typeName === '全场故障统计'
                   ? 'fault_all'
-                  : submenuItem.typeName === '齿轮箱-高速轴温度分析'
+                  : submenuItem.typeName === '齿轮箱-高速轴温度'
                   ? 'temperature_large_components_hig'
-                  : submenuItem.typeName === '齿轮箱-中速轴温度分析'
+                  : submenuItem.typeName === '齿轮箱-中速轴温度'
                   ? 'temperature_large_components_mid'
-                  : submenuItem.typeName === '齿轮箱-低速轴温度分析'
+                  : submenuItem.typeName === '齿轮箱-低速轴温度'
                   ? 'temperature_large_components_low'
-                  : submenuItem.typeName === '主轴承温度分析'
+                  : submenuItem.typeName === '主轴承温度'
                   ? 'temperature_large_components_min'
-                  : submenuItem.typeName === '发电机-驱动端轴承温度分析'
+                  : submenuItem.typeName === '发电机-驱动端轴承温度'
                   ? 'temperature_large_components_adriven'
-                  : submenuItem.typeName === '发电机-非驱动端轴承温度分析'
+                  : submenuItem.typeName === '发电机-非驱动端轴承温度'
                   ? 'temperature_large_components_undriven'
-                  : submenuItem.typeName === '发电机-轴承温度偏差分析'
+                  : submenuItem.typeName === '发电机-轴承温度偏差'
                   ? 'temperature_large_components_tem_deviation'
-                  : submenuItem.typeName === '发电机-绕组温度分析'
+                  : submenuItem.typeName === '发电机-绕组温度'
                   ? 'temperature_large_components_Winding_tem'
                   : submenuItem.typeCode
               "

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

@@ -181,7 +181,6 @@
           min-width="200"
         >
         </el-table-column>
-
         <el-table-column
           v-hasPermi="['home:performance:autoAssetss']"
           prop="onOffCall"
@@ -682,6 +681,8 @@ export default {
       }
     },
     async handleDownLoadChart(row) {
+      this.progress.current = 0;
+      this.progress.total = 0;
       this.fileDataList = {};
       this.setDownloadDisabled(true);
       this.$notify.warning("开始生成 Word 文档...");
@@ -695,6 +696,7 @@ export default {
           const filterAnalysis = allAnalysisType.filter(
             (itemType) => itemType.typeName === itemAnalysis.analysisTypeName
           )[0];
+
           if (itemAnalysis.generalFiles) {
             //这里过滤的是发电机温度的类型 在url 中是否能找到filterFileAddr
             for (const itemField of filterAnalysis.filterFileAddr
@@ -871,6 +873,7 @@ export default {
         this.$notify.success("🎉 Word 文档生成并已下载!");
         this.setDownloadDisabled(false);
       } catch (error) {
+        console.log(error, "error");
         this.$notify.error("🎉 Word 文档生成并下载失败!");
         this.setDownloadDisabled(false);
       }

+ 2 - 3
src/views/performance/components/analysisEvent.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2025-05-08 10:43:34
+ * @LastEditTime: 2025-07-01 16:02:54
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -473,8 +473,6 @@ export default {
       // 时间范围数组
       timeRanges: [
         // { start: '2024-12-01 00:00:00', end: '2024-12-30 23:59:59' },
-        // { start: '2024-10-01 00:00:00', end: '2024-10-30 23:59:59' },
-        // { start: '2024-05-01 00:00:00', end: '2024-05-30 23:59:59' },
       ],
     };
   },
@@ -890,6 +888,7 @@ export default {
     }
   }
 }
+
 ::v-deep.drawerOption {
   .el-drawer {
     width: 33% !important;

+ 2 - 1
src/views/performance/components/chartsCom/BarChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:30:17
- * @LastEditTime: 2025-06-12 09:09:57
+ * @LastEditTime: 2025-06-25 10:13:48
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/BarChart.vue
@@ -140,6 +140,7 @@ export default {
           type: this.chartData.xaixs === "机组" ? "category" : undefined, // 让 Y 轴按类别均匀分布
           tickcolor: "rgb(255,255,255)",
           backgroundcolor: "#e5ecf6",
+          dtick: this.chartData.xaixs === "风速(m/s)" ? 1 : undefined,
         },
         yaxis: {
           title: this.chartData.yaixs || "Y轴", // 纵坐标标题

+ 1 - 1
src/views/performance/components/chartsCom/Radar.vue

@@ -19,7 +19,7 @@ export default {
       default: [],
     },
     machineTypeCode: {
-      type: Object,
+      type: String,
       default: "",
     },
   },

+ 1 - 0
src/views/performance/components/chartsCom/Time3DChart.vue

@@ -229,6 +229,7 @@ export default {
             tickcolor: "black",
             zeroline: false,
             tickangle: -10,
+            dtick: this.chartData.xaixs === "风速(m/s)" ? 1 : undefined,
             // range:
             //   this.chartData.xaixs === "发电机转速(r/min)" ||
             //   this.chartData.xaixs === "发电机转速(r/min)"

+ 12 - 8
src/views/performance/components/chartsCom/TwoDMarkersChart1.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:32:12
- * @LastEditTime: 2025-06-23 15:42:51
+ * @LastEditTime: 2025-07-01 16:56:47
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/powerMarkers2DCharts.vue
@@ -218,12 +218,12 @@ export default {
       } else {
         colorValues = data.color.map((date, index) => timeMapping[date]);
       }
-      console.log(
-        colorValues,
-        uniqueTimeLabels,
-        "colorValues",
-        "uniqueTimeLabels2"
-      );
+      // console.log(
+      //   colorValues,
+      //   uniqueTimeLabels,
+      //   "colorValues",
+      //   "uniqueTimeLabels2"
+      // );
       let scatterTrace = {}; // 用于存放散点图的 trace
       let lineTrace = {}; // 用于存放折线图的 trace
 
@@ -295,10 +295,14 @@ export default {
         },
         xaxis: {
           title: this.chartData.xaixs,
-          gridcolor: "rgb(255,255,255)", // 网格线颜色
+          tickmode: "linear",
+          gridcolor: "rgb(255,255,255)",
+          showgrid: true,
+          zeroline: false,
           tickcolor: "rgb(255,255,255)",
           backgroundcolor: "#e5ecf6",
           showbackground: true, // 显示背景
+          dtick: 1,
         },
         yaxis: {
           title: this.chartData.yaixs,

+ 1 - 0
src/views/performance/components/chartsCom/lineAndChildLine.vue

@@ -205,6 +205,7 @@ export default {
           gridcolor: "rgb(255,255,255)",
           tickcolor: "rgb(255,255,255)",
           backgroundcolor: "#e5ecf6",
+          dtick: this.chartData.xaixs === "风速" ? 1 : undefined,
           range:
             this.chartData.analysisTypeCode === "风电机组风能利用系数分析" &&
             this.chartData.contract_Cp_curve_xData

+ 1 - 0
src/views/performance/components/chartsCom/lineChartsFen.vue

@@ -197,6 +197,7 @@ export default {
           gridcolor: "rgb(255,255,255)",
           tickcolor: "rgb(255,255,255)",
           backgroundcolor: "#e5ecf6",
+          dtick: this.chartData.xaixs === "风速" ? 1 : undefined,
           range:
             this.chartData.analysisTypeCode === "风电机组风能利用系数分析" &&
             this.chartData.contract_Cp_curve_xData

+ 36 - 36
src/views/performance/js/allAnalysisType.js

@@ -1,14 +1,14 @@
 /*
  * @Author: your name
  * @Date: 2025-05-06 17:01:14
- * @LastEditTime: 2025-05-26 09:20:04
+ * @LastEditTime: 2025-07-01 09:58:51
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/js/allAnalysisType.js
  */
 export const allAnalysisType = [
   {
-    typeName: "分钟级SCADA数据记录完整度分析",
+    typeName: "分钟级SCADA数据记录完整度",
     id: 101,
     parentId: 1,
     typeCode: "data_integrity_minute",
@@ -22,7 +22,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "秒级SCADA数据记录完整度分析",
+    typeName: "秒级SCADA数据记录完整度",
     id: 102,
     parentId: 1,
     typeCode: "data_integrity_second",
@@ -36,7 +36,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "风速频率分析",
+    typeName: "风速频率",
     id: 103,
     parentId: 2,
     typeCode: "wind_speed_frequency",
@@ -50,7 +50,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "风向玫瑰分析",
+    typeName: "风向玫瑰",
     id: 104,
     parentId: 2,
     typeCode: "wind_direction_frequency",
@@ -64,7 +64,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "风速均值分析",
+    typeName: "风速均值",
     id: 105,
     parentId: 2,
     typeCode: "wind_speed",
@@ -78,7 +78,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "有功功率曲线分析",
+    typeName: "有功功率曲线",
     id: 106,
     parentId: 3,
     typeCode: "power_curve",
@@ -92,7 +92,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "逐月有功功率散点2D分析",
+    typeName: "逐月有功功率散点2D",
     id: 107,
     parentId: 3,
     typeCode: "power_scatter_2D",
@@ -106,7 +106,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "逐月有功功率散点3D分析",
+    typeName: "逐月有功功率散点3D",
     id: 108,
     parentId: 3,
     typeCode: "power_scatter",
@@ -120,7 +120,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "额定功率和风速分析",
+    typeName: "额定功率-风速",
     id: 109,
     parentId: 4,
     typeCode: "rated_power_windspeed",
@@ -134,7 +134,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "额定风速分析",
+    typeName: "额定风速",
     id: 110,
     parentId: 4,
     typeCode: "rated_windspeed",
@@ -148,7 +148,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "风能利用系数和有功功率分析",
+    typeName: "风能利用系数-有功功率",
     id: 111,
     parentId: 5,
     typeCode: "cp",
@@ -162,7 +162,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "风能利用系数和风速分析",
+    typeName: "风能利用系数-风速",
     id: 112,
     parentId: 5,
     typeCode: "cp_windspeed",
@@ -176,7 +176,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "风能利用系数时序分析",
+    typeName: "风能利用系数时序",
     id: 113,
     parentId: 5,
     typeCode: "cp_trend",
@@ -190,7 +190,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "叶尖速比和有功功率分析",
+    typeName: "叶尖速比-有功功率",
     id: 114,
     parentId: 5,
     typeCode: "tsr",
@@ -204,7 +204,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "叶尖速比和风速分析",
+    typeName: "叶尖速比-风速",
     id: 115,
     parentId: 5,
     typeCode: "tsr_windspeed",
@@ -218,7 +218,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "叶尖速比时序分析",
+    typeName: "叶尖速比时序",
     id: 116,
     parentId: 5,
     typeCode: "tsr_trend",
@@ -232,7 +232,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "叶尖速比-Cp-功率分析",
+    typeName: "叶尖速比-风能利用系数-功率",
     id: 117,
     parentId: 5,
     typeCode: "tsr_cp_power",
@@ -246,7 +246,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "叶尖速比-Cp-功率散点分析",
+    typeName: "叶尖速比-风能利用系数-功率散点",
     id: 118,
     parentId: 5,
     typeCode: "tsr_cp_power_scatter",
@@ -260,7 +260,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "变桨和叶尖速比及风能利用系数分析",
+    typeName: "变桨-叶尖速比-风能利用系数",
     id: 127,
     parentId: 5,
     typeCode: "pitch_tsr_cp",
@@ -274,7 +274,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "静态偏航误差分析",
+    typeName: "静态偏航误差",
     id: 121,
     parentId: 6,
     typeCode: "yaw_error",
@@ -288,7 +288,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "动态偏航误差分析",
+    typeName: "动态偏航误差",
     id: 129,
     parentId: 6,
     typeCode: "yaw_error_density",
@@ -303,7 +303,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "最小桨距角分析",
+    typeName: "最小桨距角",
     id: 122,
     parentId: 7,
     typeCode: "min_pitch",
@@ -317,7 +317,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "发电机转速和有功功率分析",
+    typeName: "发电机转速-有功功率",
     id: 119,
     parentId: 8,
     typeCode: "speed_power",
@@ -332,7 +332,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "发电机转速和转矩分析",
+    typeName: "发电机转速-转矩",
     id: 120,
     parentId: 8,
     typeCode: "speed_torque",
@@ -347,7 +347,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "变桨和有功功率协调性分析",
+    typeName: "变桨-有功功率协调性",
     id: 123,
     parentId: 8,
     typeCode: "pitch_power",
@@ -362,7 +362,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "变桨和发电机转速协调性分析",
+    typeName: "变桨-发电机转速协调性",
     id: 124,
     parentId: 8,
     typeCode: "pitch_generator_speed",
@@ -376,7 +376,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "环境温度传感器分析",
+    typeName: "环境温度传感器",
     id: 125,
     parentId: 9,
     typeCode: "temperature_environment",
@@ -390,7 +390,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "齿轮箱-高速轴温度分析",
+    typeName: "齿轮箱-高速轴温度",
     id: 131,
     parentId: 9,
     typeCode: "temperature_large_components",
@@ -405,7 +405,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "齿轮箱-中速轴温度分析",
+    typeName: "齿轮箱-中速轴温度",
     id: 132,
     parentId: 9,
     typeCode: "temperature_large_components",
@@ -420,7 +420,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "齿轮箱-低速轴温度分析",
+    typeName: "齿轮箱-低速轴温度",
     id: 133,
     parentId: 9,
     typeCode: "temperature_large_components",
@@ -435,7 +435,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "主轴承温度分析",
+    typeName: "主轴承温度",
     id: 134,
     parentId: 9,
     typeCode: "temperature_large_components",
@@ -451,7 +451,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "发电机-驱动端轴承温度分析",
+    typeName: "发电机-驱动端轴承温度",
     id: 135,
     parentId: 9,
     typeCode: "temperature_large_components",
@@ -466,7 +466,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "发电机-非驱动端轴承温度分析",
+    typeName: "发电机-非驱动端轴承温度",
     id: 136,
     parentId: 9,
     typeCode: "temperature_large_components",
@@ -481,7 +481,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "发电机-轴承温度偏差分析",
+    typeName: "发电机-轴承温度偏差",
     id: 137,
     parentId: 9,
     typeCode: "temperature_large_components",
@@ -496,7 +496,7 @@ export const allAnalysisType = [
     },
   },
   {
-    typeName: "发电机-绕组温度分析",
+    typeName: "发电机-绕组温度",
     id: 138,
     parentId: 9,
     typeCode: "temperature_large_components",

+ 13 - 13
vue.config.js

@@ -66,8 +66,8 @@ module.exports = {
         // target: "http://192.168.5.4:16200", // 石月
         // target: "http://192.168.50.235:16200", // 内网
         // target: "http://192.168.5.15:16200",
-        // target: "http://192.168.50.235:16500", //演示环境
-        target: "http://106.120.102.238:26500", //外网演示环境
+        target: "http://192.168.50.235:16500", //演示环境
+        // target: "http://106.120.102.238:26500", //外网演示环境
         // target: "http://106.120.102.238:16700", // 外网16700  生产16600
         // target: "http://10.96.137.5",
         changeOrigin: true,
@@ -102,28 +102,28 @@ module.exports = {
 
       // 文佳
       "/WJapi": {
-        target: "http://106.120.102.238:18888", 
+        target: "http://106.120.102.238:18888",
         changeOrigin: true,
         pathRewrite: {
-          "^/WJapi": "", 
+          "^/WJapi": "",
         },
       },
 
       // 王娇娇健康评估
       "/AnalysisMulti": {
-        target: "http://106.120.102.238:28999/AnalysisMulti", 
+        target: "http://106.120.102.238:28999/AnalysisMulti",
         changeOrigin: true,
         pathRewrite: {
-          "^/AnalysisMulti": "", 
+          "^/AnalysisMulti": "",
         },
       },
-      
+
       // 故障诊断
       "/WJJdiag": {
         target: "http://106.120.102.238:28999/WJJdiag",
         changeOrigin: true,
         pathRewrite: {
-          "^/WJJdiag": "", 
+          "^/WJJdiag": "",
         },
       },
 
@@ -134,7 +134,7 @@ module.exports = {
         // target: "http://192.168.50.235:8999/transDataWeb", //测试
         changeOrigin: true,
         pathRewrite: {
-          "^/transDataWeb": "", 
+          "^/transDataWeb": "",
         },
       },
       //自定义算法文佳
@@ -143,7 +143,7 @@ module.exports = {
         target: "http://106.120.102.238:58880", //这个代理会走两次代理转发
         changeOrigin: true,
         pathRewrite: {
-          "^/sAlgorithm": "", 
+          "^/sAlgorithm": "",
         },
       },
       //nodejs 数据库数据
@@ -157,12 +157,12 @@ module.exports = {
       },
       //nodejs 数据库数据
       "/downLoadChart": {
-        // target: "http://127.0.0.1:3000",
-        target: "http://192.168.50.235:8999/downLoadChart", //内网演示
+        target: "http://0.0.0.0:3001",
+        // target: "http://192.168.50.235:8999/downLoadChart", //内网演示
         // target: "http://106.120.102.238:28999/downLoadChart", //外网演示
         changeOrigin: true,
         pathRewrite: {
-          "^/downLoadChart": "", 
+          "^/downLoadChart": "",
         },
       },
     },