瀏覽代碼

温度新增

rui.jiang 2 周之前
父節點
當前提交
be50e98e71

+ 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", //中广核

+ 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/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 项溢出
 }
 

+ 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>

+ 3 - 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,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;

+ 56 - 22
src/views/home/components/MenuHD.vue

@@ -13,7 +13,6 @@
       background-color="#1b3b7f"
       text-color="#fff"
       active-text-color="#ffd04b"
-
     >
       <!--     :active-text-color="activeTextColor" -->
       <template v-for="(item, indexMenu) in routerList">
@@ -245,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;
@@ -269,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;
@@ -288,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;
@@ -375,10 +373,46 @@ export default {
 .el-menu--horizontal .el-menu-item.is-active {
   color: #ffffff !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 lang="scss">
+ <!-- /* 华电时的菜单打开这个 */ -->
+ <style lang="scss">
 .el-menu--popup {
   width: 100% !important;
   min-width: 120px !important;
@@ -390,9 +424,9 @@ export default {
   }
 }
 .el-submenu__title * {
-  font-size: 16px;
+  font-size: 20px;
 }
 .el-menu-item * {
-  font-size: 16px;
+  font-size: 20px;
 }
-</style>
+</style>