rui.jiang 2 týždňov pred
rodič
commit
14ae12b35b

+ 2 - 2
src/router/index.js

@@ -28,8 +28,8 @@ const createRouter = () =>
             iconName: "gps",
             component: () =>
               import(
-                /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/Index.vue"
-                // /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/HD.vue" //华电选择这个
+                // /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/Index.vue"
+                /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/HD.vue" //华电选择这个
               ),
           },
           {

+ 3 - 3
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-07-04 16:46:45
+ * @LastEditTime: 2025-07-07 10:49:54
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/store/themes.js
@@ -12,8 +12,8 @@ import { colorSchemes } from "@/views/overview/js/colors";
 export default {
   namespaced: true,
   state: {
-    theme: localStorage.getItem("theme") || "green",
-    // theme: localStorage.getItem("theme") || "blue", //华电默认主题色
+    // theme: localStorage.getItem("theme") || "green",
+    theme: localStorage.getItem("theme") || "blue", //华电默认主题色
     themeColor: [...colorSchemes[0].colors],
   },
   mutations: {

+ 2 - 2
src/views/admin/cockpitManage/HD.vue

@@ -197,7 +197,7 @@ export default {
 
 <style lang="scss" scoped>
 .map-ditu {
-  height: 93.3vh;
+  height: 91vh;
   display: flex;
   flex-direction: column;
 }
@@ -217,7 +217,7 @@ bottom-data {
 .zuobian {
   width: 150px;
   position: absolute;
-  top: 15px;
+  top: 30px;
   left: 10px;
 }
 </style>

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

@@ -91,8 +91,10 @@
           :lineType="item.lineType"
           :lineColor="item.lineColor"
           :chartData="item.data"
-           :fieldCode="fieldCode"
-        :windTurbineNumber="windTurbineNumber"
+          :fieldCode="fieldCode"
+          :windTurbineNumber="windTurbineNumber"
+            :bearingKey="item.bearingKey"
+          
         />
       </div>
     </div>
@@ -159,20 +161,24 @@ export default {
           data: this.echartsdata.main_bearing,
           lineType: "line",
           lineColor: "#02aae9",
+          bearingKey: "innerRing",
         },
         {
           title: "发电机驱动端轴承温度趋势图",
           data: this.echartsdata.generator_drive_end,
+          bearingKey: "rollingElement",
         },
         {
           title: "齿轮箱油温趋势图",
           data: this.echartsdata.gearbox_oil,
           lineType: "line",
           lineColor: "#02aae9",
+          bearingKey: "outerRing",
         },
         {
           title: "发电机非驱动端轴承温度趋势图",
           data: this.echartsdata.generator_nondrive_end,
+          bearingKey: "cage",
         },
       ];
 

+ 131 - 23
src/views/health/components/malfunction/zhexian.vue

@@ -1,13 +1,26 @@
 <template>
   <div>
     <div ref="chartRef" style="width: 100%; height: 320px"></div>
-    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
-      <el-table :data="tableData" style="width: 100%">
-        <el-table-column prop="date" label="日期" width="180">
-        </el-table-column>
-        <el-table-column prop="name" label="姓名" width="180">
-        </el-table-column>
-        <el-table-column prop="address" label="地址"> </el-table-column>
+    <el-dialog
+      title="机组运行数据"
+      :visible.sync="dialogVisible"
+      width="50%"
+      v-dialogDrag
+      :modal="false"
+      ref="myDialog"
+      @open="resetDialogPosition"
+      @closed="resetDialogPosition"
+    >
+      <el-table :data="records" style="width: 100%">
+        <el-table-column
+          v-for="(col, index) in columns"
+          :key="index"
+          :prop="col"
+          :label="col"
+          :min-width="140"
+          show-overflow-tooltip
+          align="center"
+        />
       </el-table>
     </el-dialog>
   </div>
@@ -48,35 +61,98 @@ export default {
       type: String,
       default: "",
     },
+    bearingKey: {
+      type: String,
+      default: "",
+    },
   },
   data() {
     return {
       myChart: null,
       dialogVisible: false,
-      tableData: [
-        {
-          date: "2016-05-02",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
+
+      records: [
         {
-          date: "2016-05-04",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1517 弄",
+          风机名称: "36",
+          时间戳: "2023-12-31 20:00:00",
+          有功功率: 406.67,
+          风轮转速: 5.95,
+          发电机转速: 5.95,
+          风速: 4.35,
+          桨距角1: -1,
+          桨距角2: -1,
+          桨距角3: -1,
+          机舱位置: 249.35,
+          对风角度: -6.29,
+          发电机驱动端轴承温度: 43.57,
+          机舱内温度: 8.48,
+          环境温度: 3.9,
+          主轴承轴承温度: 43.57,
+          主轴承轴承温度2: 0,
+          发电机绕组1温度: 50.59,
+          发电机绕组2温度: 50.12,
+          发电机绕组3温度: 48.65,
+          电网A相电流: 349.7,
+          电网B相电流: 350.4,
+          电网C相电流: 351.25,
         },
         {
-          date: "2016-05-01",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1519 弄",
+          风机名称: "36",
+          时间戳: "2023-12-31 20:10:00",
+          有功功率: 448.99,
+          风轮转速: 6.15,
+          发电机转速: 6.15,
+          风速: 4.56,
+          桨距角1: -1,
+          桨距角2: -1,
+          桨距角3: -1,
+          机舱位置: 246.5,
+          对风角度: -0.68,
+          发电机驱动端轴承温度: 43.62,
+          机舱内温度: 8.11,
+          环境温度: 3.86,
+          主轴承轴承温度: 43.62,
+          主轴承轴承温度2: 0,
+          发电机绕组1温度: 51.15,
+          发电机绕组2温度: 50.53,
+          发电机绕组3温度: 49.02,
+          电网A相电流: 384.95,
+          电网B相电流: 385.41,
+          电网C相电流: 388.41,
         },
         {
-          date: "2016-05-03",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1516 弄",
+          风机名称: "36",
+          时间戳: "2023-12-31 20:20:00",
+          有功功率: 523.07,
+          风轮转速: 6.46,
+          发电机转速: 6.46,
+          风速: 4.84,
+          桨距角1: -1,
+          桨距角2: -1,
+          桨距角3: -1,
+          机舱位置: 246.5,
+          对风角度: -4.87,
+          发电机驱动端轴承温度: 43.69,
+          机舱内温度: 7.76,
+          环境温度: 3.8,
+          主轴承轴承温度: 43.69,
+          主轴承轴承温度2: 0,
+          发电机绕组1温度: 51.67,
+          发电机绕组2温度: 50.95,
+          发电机绕组3温度: 49.39,
+          电网A相电流: 449.76,
+          电网B相电流: 446.67,
+          电网C相电流: 450.7,
         },
       ],
     };
   },
+  computed: {
+    columns() {
+      // 如果 records 为空则返回空数组
+      return this.records.length > 0 ? Object.keys(this.records[0]) : [];
+    },
+  },
   watch: {
     chartData: {
       deep: true,
@@ -94,6 +170,18 @@ export default {
     }
   },
   methods: {
+    resetDialogPosition() {
+      this.$nextTick(() => {
+        const dialogEl = this.$refs.myDialog?.$el?.querySelector(".el-dialog");
+        if (dialogEl) {
+          // 清除拖拽遗留位置样式,恢复居中
+          dialogEl.style.left = "0px";
+          dialogEl.style.top = "150px";
+          dialogEl.style.transform = "0px";
+        }
+      });
+    },
+
     initChart() {
       this.myChart = echarts.init(this.$refs.chartRef);
       this.updateChart();
@@ -123,12 +211,32 @@ export default {
         if (closestIndex !== -1) {
           const value = this.chartData.values[closestIndex];
           const time = this.chartData.timestamps[closestIndex];
+  this.myChart.setOption({
+    series: [
+      {
+        markLine: {
+          symbol: 'none',
+          lineStyle: {
+            type: 'dashed',
+            color: '#FF0000',
+          },
+          data: [
+            {
+              xAxis: time,
+            },
+          ],
+        },
+      },
+    ],
+  });
           if (value === 1) {
             console.log("点击对应的values值:", value);
             console.log("对应的timestamps:", time);
             console.log("fieldCode:", this.fieldCode);
             console.log("windTurbineNumber:", this.windTurbineNumber);
-            // this.dialogVisible = !this.dialogVisible
+            console.log("bearingKey:", this.bearingKey);
+
+            this.dialogVisible = !this.dialogVisible;
           }
         }
       });

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

@@ -768,8 +768,6 @@ export default {
             // ② 将 "NaN" 或裸 NaN 替换为 null(更安全的方式)
             jsonStr = jsonStr.replace(/\bNaN\b/g, "null"); // 替换裸 NaN
           }
-          console.log(jsonStr, "jsonStr");
-          
           // ③ 再解析为对象
           this.qsList = JSON.parse(jsonStr);
           this.fourList.push(newItem);

+ 5 - 3
src/views/home/Index.vue

@@ -2,7 +2,7 @@
   <div class="homeWrap" v-loading="loading">
     <el-container v-if="isShowHd">
       <el-main>
-        <el-header>
+        <el-header >
           <div class="headerHDBox">
             <div class="headerLeft"></div>
             <!-- <HeaderCom class="headerRight" @setLoding="setLoding"></HeaderCom> -->
@@ -52,7 +52,7 @@ export default {
   data() {
     return {
       loading: false,
-      isShowHd: false, //true 则展示华电的菜单样式,false 则展示默认的左侧边栏菜单
+      isShowHd: true, //true 则展示华电的菜单样式,false 则展示默认的左侧边栏菜单
     };
   },
   methods: {
@@ -89,6 +89,7 @@ export default {
   padding: 0 !important;
   background: #1b3b7f;
   color: #fff !important;
+height: 80px !important;
   .headerHDBox {
     display: flex;
     justify-content: space-between;
@@ -125,6 +126,7 @@ export default {
 }
 
 .headerLeft {
-  width: 170px;
+  // width: 170px;
+  width: 52px;
 }
 </style>

+ 10 - 3
src/views/home/components/MenuHD.vue

@@ -13,6 +13,7 @@
       background-color="#1b3b7f"
       text-color="#fff"
       active-text-color="#ffd04b"
+
     >
       <!--     :active-text-color="activeTextColor" -->
       <template v-for="(item, indexMenu) in routerList">
@@ -258,7 +259,7 @@ export default {
   background-repeat: no-repeat !important;
   background-position: center !important;
   background-size: 100%, 100% !important;
-  height: 60px !important;
+  height: 80px !important;
   width: 140px !important;
   display: flex !important;
   align-items: center !important;
@@ -377,7 +378,7 @@ export default {
 </style>
 
 <!-- /* 华电时的菜单打开这个 */ -->
-<!-- <style lang="scss">
+<style lang="scss">
 .el-menu--popup {
   width: 100% !important;
   min-width: 120px !important;
@@ -388,4 +389,10 @@ export default {
     padding: 0 5px !important;
   }
 }
-</style> -->
+.el-submenu__title * {
+  font-size: 16px;
+}
+.el-menu-item * {
+  font-size: 16px;
+}
+</style>

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

@@ -45,7 +45,6 @@
 </template>
 
 <script>
-import { resetRouter } from "@/router/index.js";
 export default {
   data() {
     var validatePass = (rule, value, callback) => {

+ 23 - 3
src/views/overview/components/pitch_power/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:09:41
- * @LastEditTime: 2025-03-14 17:47:44
+ * @LastEditTime: 2025-07-07 10:12:47
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/pitch_power/index.vue
@@ -33,9 +33,14 @@
         </div>
       </el-alert>
       <div></div>
-      <div class="titleCharts">分析分图 :</div>
+      <div class="titleCharts">
+        分析分图 :
+        <el-button size="small" type="primary" @click="handleChartsType">{{
+          chartsType === "2D" ? "查看3D图" : "查看2D图"
+        }}</el-button>
+      </div>
       <VirtualList
-        :list="diagramRelationsDatas"
+        :list="filteredDiagramList"
         keyField="fileAddr"
         :itemSize="700"
         v-slot="{ item, index }"
@@ -149,6 +154,7 @@ export default {
   },
   data() {
     return {
+      chartsType: "2D",
       form: {
         value2: "",
       },
@@ -192,7 +198,20 @@ export default {
       this.fetchData(); // 调用合并后的函数
     }
   },
+  computed: {
+    filteredDiagramList() {
+      return this.diagramRelationsDatas.filter((item) => {
+        const type = this.getFileTypeFromUrl(item.fileAddr);
+        return this.chartsType === "2D"
+          ? type === "pitch_power"
+          : type === "3D";
+      });
+    },
+  },
   methods: {
+    handleChartsType() {
+      this.chartsType = this.chartsType === "2D" ? "3D" : "2D";
+    },
     getFileTypeFromUrl(url) {
       // 判断文件名或路径是否包含关键字
       if (url.includes("3D")) {
@@ -375,5 +394,6 @@ export default {
   font-size: 16px;
   font-weight: 500;
   margin-top: 20px;
+  margin-bottom: 20px;
 }
 </style>

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:32:12
- * @LastEditTime: 2025-07-04 16:23:28
+ * @LastEditTime: 2025-07-07 10:22:15
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/powerMarkers2DCharts.vue
@@ -255,7 +255,6 @@ export default {
               x: 1.05, // x 控制横向位置(1 是右边,>1 就更靠右)
               y: 1.04, // y=1 是顶部
               // len: 0.4, // 高度(0~1之间)
-              thickness: 15, // 宽度(像素)
               xanchor: "left", // x锚点从左对齐
               yanchor: "top", // y锚点从顶部对齐
             },