liujiejie 6 месяцев назад
Родитель
Сommit
d508d48416



+ 8 - 7
src/views/overview/components/filterChart/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 14:53:21
- * @LastEditTime: 2025-01-14 13:44:55
- * @LastEditors: bogon
+ * @LastEditTime: 2025-01-20 17:24:03
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/filterChart/index.vue
 -->
@@ -54,11 +54,12 @@ export default {
   methods: {
     onSearch() {
       console.log(this.form.value2);
-      if (this.form.value2 && this.form.value2.length > 0) {
-        this.$emit("getEnfineList", this.form.value2);
-      } else {
-        this.$message.warning("请选择风机后进行查询");
-      }
+      // if (this.form.value2 && this.form.value2.length > 0) {
+      this.$emit("getEnfineList", this.form.value2);
+      // }
+      // else {
+      //   this.$message.warning("请选择风机后进行查询");
+      // }
     },
     onSubmit(type) {
       if (type === "handlePrevious") {

+ 2 - 1
src/views/overview/components/rated_power_windspeed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:10:47
- * @LastEditTime: 2025-01-20 13:39:28
+ * @LastEditTime: 2025-01-20 17:52:54
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/rated_power_windspeed/index.vue
@@ -217,6 +217,7 @@ export default {
         this.diagramRelationsDatas =
           result.data &&
           result.data[0] &&
+          result.data[0].diagramRelations &&
           result.data[0].diagramRelations.filter((item) =>
             item.fileAddr.endsWith(".json")
           );

+ 20 - 20
src/views/overview/components/rated_windspeed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:08:56
- * @LastEditTime: 2025-01-20 09:23:01
+ * @LastEditTime: 2025-01-20 17:30:51
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/rated_windspeed/index.vue
@@ -41,7 +41,7 @@
       >
         <BarChart
           :key="item.batchCode + index"
-          :inds="index"
+          :inds="index + 'barChart'"
           :ref="item.batchCode"
           :fileAddr="item.fileAddr"
         >
@@ -275,27 +275,27 @@ export default {
     overflow: auto;
     padding: 20px;
     flex: 1;
-      /* 滚动条整体样式 */
-  &::-webkit-scrollbar {
-    width: 6px; /* 滚动条宽度 */
-  }
+    /* 滚动条整体样式 */
+    &::-webkit-scrollbar {
+      width: 6px; /* 滚动条宽度 */
+    }
 
-  /* 滚动条轨道 */
-  &::-webkit-scrollbar-track {
-    background: #f5f7fa;
-    border-radius: 3px;
-  }
+    /* 滚动条轨道 */
+    &::-webkit-scrollbar-track {
+      background: #f5f7fa;
+      border-radius: 3px;
+    }
 
-  /* 滚动条滑块 */
-  &::-webkit-scrollbar-thumb {
-    background: #c0c4cc;
-    border-radius: 3px;
-  }
+    /* 滚动条滑块 */
+    &::-webkit-scrollbar-thumb {
+      background: #c0c4cc;
+      border-radius: 3px;
+    }
 
-  /* 滚动条滑块悬停时 */
-  &::-webkit-scrollbar-thumb:hover {
-    background: #909399;
-  }
+    /* 滚动条滑块悬停时 */
+    &::-webkit-scrollbar-thumb:hover {
+      background: #909399;
+    }
   }
 
   .right {

+ 15 - 34
src/views/overview/components/speed_power/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:09:17
- * @LastEditTime: 2025-01-20 16:33:59
+ * @LastEditTime: 2025-01-20 17:16:59
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/speed_power/index.vue
@@ -31,17 +31,7 @@
           在风力发电机组中,转速-功率散点图展示了风机发电机转速与风机产生的功率之间的关系。这种散点图能够揭示在不同转速速和操作条件下,发电机转速调整是如何影响风机的功率和转矩输出的。
         </div>
       </el-alert>
-      <!-- <div class="titleCharts">分析总图 :</div> -->
-      <!-- <div v-for="(item, index) in generalFilesDatas">
-            <DDrawingChart
-              :key="item.batchCode + index"
-              :index="index + 'zong'"
-              :ref="item.batchCode + index"
-              :fileAddr="item.fileAddr"
-            >
-            </DDrawingChart>
-          </div> -->
-
+      <div class="titleCharts">分析总图 :</div>
       <VirtualList
         :list="generalFilesDatas"
         keyField="batchCode"
@@ -56,30 +46,23 @@
         >
         </DDrawingChart>
       </VirtualList>
-
-      <!-- <div class="titleCharts">分析分图 :</div> -->
-
+      <div class="titleCharts">分析分图 :</div>
       <VirtualList
-        :list="diagramRelationsDatas2D"
+        :list="diagramRelationsDatas"
         keyField="fieldEngineCode"
         :itemSize="452"
         v-slot="{ item, index }"
       >
         <TwoDMarkersChart
+          v-if="getFileTypeFromUrl(item.fileAddr) === 'speed_torque'"
           :index="index + 'TwoDMarkersChart'"
           :key="item.fieldEngineCode + 'TwoDMarkersChart'"
           :ref="item.fieldEngineCode"
           :fileAddr="item.fileAddr"
         >
         </TwoDMarkersChart>
-      </VirtualList>
-      <VirtualList
-        :list="diagramRelationsDatas3D"
-        keyField="fieldEngineCode"
-        :itemSize="452"
-        v-slot="{ item, index }"
-      >
         <DDrawingChart
+          v-if="getFileTypeFromUrl(item.fileAddr) === '3D'"
           :key="item.fieldEngineCode + 'DDrawingChart'"
           :index="index + 'fen'"
           :ref="item.fieldEngineCode + 'DDrawingChart'"
@@ -163,8 +146,6 @@ export default {
       requestRecord: [],
       commentDescriptionVos: [], //评论列表
       editableTabs: [],
-      diagramRelationsDatas2D: [],
-      diagramRelationsDatas3D: [],
     };
   },
   watch: {
@@ -288,15 +269,15 @@ export default {
         console.log(this.generalFilesDatas, "总图数据");
 
         if (result.data && result.data[0] && result.data[0].diagramRelations) {
-          const diagramRelationsDatas = result.data[0].diagramRelations.filter(
-            (item) => item.fileAddr.endsWith(".json")
-          );
-          this.diagramRelationsDatas2D = diagramRelationsDatas.filter(
-            (item) => this.getFileTypeFromUrl(item.fileAddr) === "speed_torque"
-          );
-          this.diagramRelationsDatas3D = diagramRelationsDatas.filter(
-            (item) => this.getFileTypeFromUrl(item.fileAddr) === "3D"
-          );
+          // const diagramRelationsDatas = result.data[0].diagramRelations.filter(
+          //   (item) => item.fileAddr.endsWith(".json")
+          // );
+          // this.diagramRelationsDatas2D = diagramRelationsDatas.filter(
+          //   (item) => this.getFileTypeFromUrl(item.fileAddr) === "speed_torque"
+          // );
+          // this.diagramRelationsDatas3D = diagramRelationsDatas.filter(
+          //   (item) => this.getFileTypeFromUrl(item.fileAddr) === "3D"
+          // );
         }
         this.diagramRelationsDatas =
           result.data &&

+ 20 - 20
src/views/overview/components/temperature_environment/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:09:46
- * @LastEditTime: 2025-01-20 09:19:35
+ * @LastEditTime: 2025-01-20 17:31:10
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_environment/index.vue
@@ -41,7 +41,7 @@
       >
         <BarChart
           :key="item.batchCode + index"
-          :inds="index"
+          :inds="index + 'barChart'"
           :ref="item.batchCode"
           :fileAddr="item.fileAddr"
         >
@@ -290,27 +290,27 @@ export default {
     overflow: auto;
     padding: 20px;
     flex: 1;
-      /* 滚动条整体样式 */
-  &::-webkit-scrollbar {
-    width: 6px; /* 滚动条宽度 */
-  }
+    /* 滚动条整体样式 */
+    &::-webkit-scrollbar {
+      width: 6px; /* 滚动条宽度 */
+    }
 
-  /* 滚动条轨道 */
-  &::-webkit-scrollbar-track {
-    background: #f5f7fa;
-    border-radius: 3px;
-  }
+    /* 滚动条轨道 */
+    &::-webkit-scrollbar-track {
+      background: #f5f7fa;
+      border-radius: 3px;
+    }
 
-  /* 滚动条滑块 */
-  &::-webkit-scrollbar-thumb {
-    background: #c0c4cc;
-    border-radius: 3px;
-  }
+    /* 滚动条滑块 */
+    &::-webkit-scrollbar-thumb {
+      background: #c0c4cc;
+      border-radius: 3px;
+    }
 
-  /* 滚动条滑块悬停时 */
-  &::-webkit-scrollbar-thumb:hover {
-    background: #909399;
-  }
+    /* 滚动条滑块悬停时 */
+    &::-webkit-scrollbar-thumb:hover {
+      background: #909399;
+    }
   }
 
   .right {

+ 20 - 21
src/views/overview/components/wind_speed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:11:23
- * @LastEditTime: 2025-01-20 09:19:52
+ * @LastEditTime: 2025-01-20 17:31:50
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/wind_spee/index.vue
@@ -41,7 +41,7 @@
       >
         <BarChart
           :key="item.batchCode + index"
-          :inds="index"
+          :inds="index + 'barChart'"
           :ref="item.batchCode"
           :fileAddr="item.fileAddr"
         ></BarChart>
@@ -274,28 +274,27 @@ export default {
     padding: 20px;
     flex: 1;
 
-      /* 滚动条整体样式 */
-  &::-webkit-scrollbar {
-    width: 6px; /* 滚动条宽度 */
-  }
-
-  /* 滚动条轨道 */
-  &::-webkit-scrollbar-track {
-    background: #f5f7fa;
-    border-radius: 3px;
-  }
+    /* 滚动条整体样式 */
+    &::-webkit-scrollbar {
+      width: 6px; /* 滚动条宽度 */
+    }
 
-  /* 滚动条滑块 */
-  &::-webkit-scrollbar-thumb {
-    background: #c0c4cc;
-    border-radius: 3px;
-  }
+    /* 滚动条轨道 */
+    &::-webkit-scrollbar-track {
+      background: #f5f7fa;
+      border-radius: 3px;
+    }
 
-  /* 滚动条滑块悬停时 */
-  &::-webkit-scrollbar-thumb:hover {
-    background: #909399;
-  }
+    /* 滚动条滑块 */
+    &::-webkit-scrollbar-thumb {
+      background: #c0c4cc;
+      border-radius: 3px;
+    }
 
+    /* 滚动条滑块悬停时 */
+    &::-webkit-scrollbar-thumb:hover {
+      background: #909399;
+    }
   }
   .right {
     width: 250px;

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:11:34
- * @LastEditTime: 2025-01-20 13:52:16
+ * @LastEditTime: 2025-01-20 17:32:09
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/wind_speed_frequency/index.vue
@@ -39,7 +39,7 @@
       >
         <BarChart
           :key="item.fieldEngineCode + index"
-          :inds="index"
+          :inds="index + 'barChart'"
           :ref="item.fieldEngineCode"
           :fileAddr="item.fileAddr"
         ></BarChart>

+ 2 - 2
src/views/performance/components/EditAnalysis.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:14:23
- * @LastEditTime: 2025-01-14 10:39:56
+ * @LastEditTime: 2025-01-20 16:47:34
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
@@ -11,7 +11,7 @@
   <div v-loading="loading">
     <el-form ref="form" :model="form" label-width="120px">
       <el-collapse v-model="activeNames">
-        <el-collapse-item title="基础筛选:" name="1">
+        <el-collapse-item title="数据关联:" name="1">
           <el-row class="flex-wrap-row" :gutter="5">
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
               <el-form-item label="分析类型" prop="configAnalysis">

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2025-01-10 16:04:27
+ * @LastEditTime: 2025-01-20 16:47:46
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -33,7 +33,7 @@
         </el-col>
       </el-row>
       <el-collapse v-model="activeNames">
-        <el-collapse-item title="基础筛选:" name="1">
+        <el-collapse-item title="数据关联:" name="1">
           <el-row class="flex-wrap-row" :gutter="5">
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
               <el-form-item

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:30:17
- * @LastEditTime: 2025-01-20 09:16:32
+ * @LastEditTime: 2025-01-20 17:31:39
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/BarChart.vue
@@ -51,7 +51,7 @@ export default {
       type: String,
     },
     inds: {
-      type: Number,
+      type: String,
       default() {
         return 0;
       },

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:32:51
- * @LastEditTime: 2025-01-16 18:29:08
+ * @LastEditTime: 2025-01-20 17:50:11
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/BoxLineCharts.vue
@@ -158,7 +158,11 @@ export default {
 <template>
   <div>
     <!-- boxLineCharts -->
-    <div v-loading="loading" :id="`plotDivBox-${index}`" style="width: 100%; height: 550px">
+    <div
+      v-loading="loading"
+      :id="`plotDivBox-${index}`"
+      style="width: 100%; height: 550px"
+    >
       <el-empty v-if="isError" description="请求失败"></el-empty>
     </div>
   </div>
@@ -191,18 +195,18 @@ export default {
     async getData() {
       if (this.fileAddr !== "") {
         try {
-          this.loading = true
+          this.loading = true;
           this.cancelToken = axios.CancelToken.source();
           const resultChartsData = await axios.get(this.fileAddr, {
-            cancelToken: this.cancelToken.token
+            cancelToken: this.cancelToken.token,
           });
           this.chartData = resultChartsData.data;
           this.drawBoxPlot();
-          this.loading = false
-          this.isError = false
+          this.loading = false;
+          this.isError = false;
         } catch (error) {
-          this.loading = false
-          this.isError = true
+          this.loading = false;
+          this.isError = true;
         }
       }
     },

+ 18 - 3
src/views/performance/components/chartsCom/lineAndChildLine.vue

@@ -56,6 +56,21 @@ export default {
       color1: "#406DAB", // 默认颜色
       loading: false,
       isError: false,
+      colors: [
+        "#DFEDC1",
+        "#DBEEBC",
+        "#A8D7BE",
+        "#8ECAC1",
+        "#77BDC2",
+        "#64ADC2",
+        "#559ABE",
+        "#4884B7",
+        "#406DAB",
+        "#3856A0",
+        "#314291",
+        "#28357A",
+        "#1A285E",
+      ],
     };
   },
   mounted() {
@@ -96,9 +111,9 @@ export default {
           x: turbine.xData, // X 数据
           y: turbine.yData, // Y 数据
           name: turbine.engineName, // 使用机组名称
-          // line: {
-          //   color: this.colors[index % this.colors.length], // 为每个机组分配不同的颜色
-          // },
+          line: {
+            color: this.colors[index % this.colors.length], // 为每个机组分配不同的颜色
+          },
         };
 
         if (this.chartType === "line") {