Browse Source

Merge branch 'master' of http://192.168.50.233:3000/rui.jiang/performance-test

liujiejie 1 week ago
parent
commit
777df40099

+ 1 - 1
src/components/map/index.vue

@@ -259,7 +259,7 @@ export default {
           source: new XYZ({
             url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
             // url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
-            url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
+            // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
             // url: "http://10.96.137.5:9080/tiles/{z}/{x}/{y}.png", //大~#@唐
             // url: "http://192.168.0.1/tiles/{z}/{x}/{y}.png", //华电
             // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //中广核

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

@@ -4,7 +4,7 @@
     <bottom-data :maplistArr="maplistArr" :defaultdata="defaultdata" />
     <div class="zuobian">
       <selecttree
-        size="mini"
+
         placeholder="请选择所属公司"
         :list="parentOpt"
         type="1"
@@ -197,14 +197,14 @@ export default {
 
 <style lang="scss" scoped>
 .map-ditu {
-  height: 91vh;
+  height: calc(100vh - 100px);
   display: flex;
   flex-direction: column;
 }
 
 // 动态计算 Tmap 组件高度
 Tmap {
-  height: calc(93.3vh - 230px);
+  height: calc(88.9vh - 230px);
   min-height: 0; // 防止 flex 项溢出
 }
 

+ 28 - 10
src/views/health/components/envelopecharts.vue

@@ -28,9 +28,14 @@
         </el-checkbox-group>
       </div>
       <!-- 光标 -->
-      <div v-if="BGshow" class="eigenvalue">
+      <div v-if="BGshow" class="eigenvalue eigenvalue--first">
         <el-checkbox-group v-model="checkedGB" @change="handlecursor">
-          <el-checkbox v-for="(item, index) in GBcheckList" :key="index" :label="item.val" :disabled="item.disabled">
+          <el-checkbox
+            v-for="(item, index) in GBcheckList"
+            :key="index"
+            :label="item.val"
+            :disabled="item.disabled"
+          >
             {{ item.val }}
           </el-checkbox>
         </el-checkbox-group>
@@ -266,11 +271,21 @@ export default {
 
       // 构建新的特征频率数据
       const newFeatureLines = {
-        Fr: this.checkedValues.includes("转速频率") ? this.envelopeList.fn_Gen : [],
-        BPFI: this.checkedValues.includes("内圈故障频率") ? this.envelopeList.BPFI : [],
-        BPFO: this.checkedValues.includes("外圈故障频率") ? this.envelopeList.BPFO : [],
-        BSF: this.checkedValues.includes("滚动体故障频率") ? this.envelopeList.BSF : [],
-        FTF: this.checkedValues.includes("保持架频率") ? this.envelopeList.FTF : [],
+        Fr: this.checkedValues.includes("转速频率")
+          ? this.envelopeList.fn_Gen
+          : [],
+        BPFI: this.checkedValues.includes("内圈故障频率")
+          ? this.envelopeList.BPFI
+          : [],
+        BPFO: this.checkedValues.includes("外圈故障频率")
+          ? this.envelopeList.BPFO
+          : [],
+        BSF: this.checkedValues.includes("滚动体故障频率")
+          ? this.envelopeList.BSF
+          : [],
+        FTF: this.checkedValues.includes("保持架频率")
+          ? this.envelopeList.FTF
+          : [],
         B3P: this.checkedValues.includes("叶片频率")
           ? Array.isArray(this.envelopeList.B3P)
             ? this.envelopeList.B3P
@@ -366,7 +381,7 @@ export default {
           text: this.envelopeList.title || this.envelopeListTwo.title,
           left: "center",
         },
-       grid: {
+        grid: {
           left: 60, // 原来是100,适当缩小左右边距
           right: 20,
           bottom: 90, // 给推拽条和坐标轴腾出空间
@@ -514,11 +529,11 @@ export default {
   right: 0;
   font-size: 10px;
   width: 146px;
-  border: 1px solid black;
+  border: 1px solid rgb(182, 182, 182);
   padding: 5px;
   background: #fff;
   z-index: 99;
-
+  border-radius: 5px;
   h5 {
     line-height: 16px;
     height: 16px;
@@ -536,4 +551,7 @@ export default {
     margin-left: 10px;
   }
 }
+.eigenvalue--first {
+  width: 100px;
+}
 </style>

+ 74 - 110
src/views/health/components/malfunction/zhexian.vue

@@ -11,23 +11,35 @@
       @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>
+      <div style="overflow-x: auto">
+        <el-table
+          :data="records"
+          height="400"
+          border
+          style="min-width: max-content"
+          :fit="false"
+        >
+          <el-table-column
+            v-for="(col, index) in columns"
+            :key="index"
+            :prop="col"
+            :label="col"
+            :width="col === '时间' ? 150 : getTextWidth(col) + 40"
+            :label-class-name="'nowrap-header'"
+            :class-name="'nowrap-cell'"
+            align="center"
+            :show-overflow-tooltip="false"
+            :resizable="true"
+          />
+        </el-table>
+      </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
 import * as echarts from "echarts";
+import axios from "axios";
 
 export default {
   name: "LargeAreaChart",
@@ -71,80 +83,7 @@ export default {
       myChart: null,
       dialogVisible: false,
 
-      records: [
-        {
-          风机名称: "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,
-        },
-        {
-          风机名称: "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,
-        },
-        {
-          风机名称: "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,
-        },
-      ],
+      records: [],
     };
   },
   computed: {
@@ -211,32 +150,39 @@ 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,
-            },
-          ],
-        },
-      },
-    ],
-  });
+          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);
-            console.log("bearingKey:", this.bearingKey);
-
-            this.dialogVisible = !this.dialogVisible;
+            const params = {
+              windCode: this.fieldCode,
+              windTurbineNumber: this.windTurbineNumber,
+              timestamp: time,
+            };
+            axios
+              .post("/AnalysisMulti/temperature/dataquery", params)
+              .then((res) => {
+                this.records = res.data.data.records;
+                this.dialogVisible = !this.dialogVisible;
+              })
+              .catch((error) => {
+                this.$message.error("数据异常");
+              });
           }
         }
       });
@@ -305,9 +251,27 @@ export default {
 
       this.myChart.setOption(option);
     },
+
+    getTextWidth(text) {
+      const span = document.createElement("span");
+      span.style.visibility = "hidden";
+      span.style.position = "fixed";
+      span.style.whiteSpace = "nowrap";
+      span.innerText = text;
+      document.body.appendChild(span);
+      const width = span.offsetWidth;
+      document.body.removeChild(span);
+      return width;
+    },
   },
 };
 </script>
 
 <style scoped>
+.nowrap-header {
+  white-space: nowrap !important;
+}
+.nowrap-cell .cell {
+  white-space: nowrap !important;
+}
 </style>

+ 7 - 4
src/views/health/components/spectrogramcharts.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="FD">
       <!-- 光标 -->
-      <div v-if="BGshow" class="eigenvalue">
+      <div v-if="BGshow" class="eigenvalue eigenvalue--first">
         <el-checkbox-group v-model="checkedGB" @change="handlecursor">
           <el-checkbox v-for="(item, index) in GBcheckList" :key="index" :label="item.val" :disabled="item.disabled">
             {{ item.val }}
@@ -528,18 +528,21 @@ export default {
 
 .eigenvalue {
   position: absolute;
-  top: 30px;
+  top: 60px;
   right: 0;
   font-size: 10px;
   width: 146px;
-  border: 1px solid black;
+  border: 1px solid rgb(182, 182, 182);
   padding: 5px;
   background: #fff;
   z-index: 99;
-
+  border-radius: 5px;
   h5 {
     line-height: 16px;
     height: 16px;
   }
 }
+.eigenvalue--first {
+  width: 100px;
+}
 </style>

+ 1 - 1
src/views/health/vibration.vue

@@ -221,7 +221,7 @@
           <el-table-column type="index" label="排序" fixed> </el-table-column>
           <el-table-column prop="timeStamp" label="采样时间" width="180px">
           </el-table-column>
-          <el-table-column label="测点名称" width="150px">
+          <el-table-column label="测点名称" width="200px">
             <template slot-scope="scope">
               {{
                 pointNameMap[scope.row.mesurePointName] ||

+ 1 - 1
src/views/home/Index.vue

@@ -89,7 +89,7 @@ export default {
   padding: 0 !important;
   background: #1b3b7f;
   color: #fff !important;
-  height: 80px !important;
+  height: 100px !important;
   .headerHDBox {
     display: flex;
     justify-content: space-between;

+ 63 - 28
src/views/home/components/MenuHD.vue

@@ -244,22 +244,22 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep.menuParentItem .el-submenu__title,
-::v-deep.menuParentItem .el-submenu__title:hover {
+::v-deep.menuParentItem .el-submenu__title{
   background: #eff1f300 !important;
   color: #fff !important;
 }
 :v-deep.menuParentItem .el-submenu__title:hover {
   color: #eee !important;
 }
-::v-deep .menuParentItem,
-::v-deep .menuParentItem:hover {
+::v-deep .menuParentItem{
   background-image: url("../../../assets/head-tab.png") !important;
   background-repeat: no-repeat !important;
   background-position: center !important;
-  background-size: 100%, 100% !important;
-  height: 80px !important;
-  width: 140px !important;
+
+  background-size: 100% 60% !important;
+
+  height: 100px !important;
+  width: 160px !important;
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
@@ -268,16 +268,14 @@ export default {
 ::v-deep.el-menu {
   background-color: #eff1f300 !important;
 }
-::v-deep.hdMenuTitle,
-::v-deep.hdMenuTitle:hover {
-  background-color: #1b3b7f !important;
+::v-deep.hdMenuTitle{
+  background-color: transparent !important;
   padding: 0px !important;
 }
 
-::v-deep.titles,
-::v-deep.titles:hover {
+::v-deep.titles{
   width: 100% !important;
-  background-image: url("../../../assets/headerBorder.png") !important;
+  // background-image: url("../../../assets/headerBorder.png") !important;
   background-size: 35%, 100% !important;
   background-repeat: repeat-x !important;
   padding: 0px !important;
@@ -287,13 +285,14 @@ export default {
   background-image: url("../../../assets/headerText.png") !important;
   background-size: 100% 100%;
   color: #fff;
-  font-size: 18px;
+  font-size: 26px;
   font-weight: 600;
   text-align: center;
   display: block;
   width: 100%;
-  height: 45px;
-  padding: 0px 30px;
+
+  height: 70px;
+  padding: 0px 50px;
   display: flex;
   align-items: center;
   justify-content: center;
@@ -374,24 +373,60 @@ export default {
 .el-menu--horizontal .el-menu-item.is-active {
   color: #ffffff !important;
 }
-</style>
 
-<!-- /* 华电时的菜单打开这个 */ -->
-<!-- <style lang="scss">
-.el-menu--popup {
-  width: 100% !important;
-  min-width: 120px !important;
-  .el-menu-item {
-    width: 100% !important;
-    min-width: unset !important;
-    text-align: center;
-    padding: 0 5px !important;
+
+// 默认样式(大屏)
+::v-deep .menuParentItem {
+  width: 160px !important;
+  height: 100px !important;
+  // 其他样式
+}
+
+::v-deep .headerText {
+  font-size: 26px;
+  height: 70px;
+  // 其他样式
+}
+
+// 平板设备(小于1200px)
+@media screen and (max-width: 1650px) {
+  ::v-deep .menuParentItem {
+    width: 140px !important;
+    height: 100px !important;
+  }
+
+  ::v-deep .headerText {
+    font-size: 22px;
+    height: 50px;
   }
 }
+
+
+// 非华电公司放开这个注释下面的
 .el-submenu__title * {
   font-size: 16px;
 }
 .el-menu-item * {
   font-size: 16px;
 }
-</style> -->
+</style>
+
+ <!-- /* 华电时的菜单打开这个 */ -->
+ <style lang="scss">
+// .el-menu--popup {
+//   width: 100% !important;
+//   min-width: 120px !important;
+//   .el-menu-item {
+//     width: 100% !important;
+//     min-width: unset !important;
+//     text-align: center;
+//     padding: 0 5px !important;
+//   }
+// }
+// .el-submenu__title * {
+//   font-size: 20px;
+// }
+// .el-menu-item * {
+//   font-size: 20px;
+// }
+</style>