rui.jiang hai 1 mes
pai
achega
7b7f9081a5

BIN=BIN
src/assets/003.png


+ 2 - 0
src/assets/js/eventBus.js

@@ -0,0 +1,2 @@
+import Vue from 'vue';
+export const eventBus = new Vue();

+ 1 - 1
src/components/HeaderCom.vue

@@ -119,7 +119,7 @@ export default {
         { lable: "黄色", value: "light", color: "#82780ccf" },
         { lable: "深色", value: "dark", color: "#607d8b" },
         { lable: "绿色", value: "green", color: "#008080" },
-        { lable: "蓝色", value: "blue", color: "#409eff" },
+        { lable: "蓝色", value: "blue", color: "#1B3B7F" },
       ],
     };
   },

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

@@ -223,11 +223,11 @@ export default {
       layers: [
         new TileLayer({
           source: new XYZ({
-            // url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
+            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://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.0.1/tiles/{z}/{x}/{y}.png", //华电
           }),
         }),
         new VectorLayer({

+ 2 - 1
src/router/index.js

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

+ 2 - 2
src/themes/blue.scss

@@ -1,5 +1,5 @@
-$primary-color: #409eff;
-$background-color: #409eff;
+$primary-color: #1B3B7F;
+$background-color: #1B3B7F;
 $text-color: #ffffff;
 $bgopacity-color: rgba(0, 187, 212, 0.145);
 :root {

+ 67 - 129
src/views/admin/cockpitManage/IndexBeiF.vue → src/views/admin/cockpitManage/HD.vue

@@ -1,68 +1,23 @@
 <template>
   <div class="map-ditu">
     <Tmap ref="map" :maplist="maplist" @feature-click="featureClick"></Tmap>
-    <div class="ledata">
+    <bottom-data :maplistArr="maplistArr" :defaultdata="defaultdata" />
+    <div class="zuobian">
       <selecttree
-        placeholder="请选择所属公司"
-        :list="parentOpt"
-        type="1"
-        v-model="companyCode"
-        @change="parentChange"
-        :defaultParentProps="{
-          children: 'children',
-          label: 'companyName',
-          value: 'codeNumber',
-        }"
-      >
-      </selecttree>
-
-      <p>
-        <span class="SpText">登录人风场总数:</span>
-        {{ totalList?.fieldSumNumber ? totalList.fieldSumNumber : 0 }}
-        个
-      </p>
-      <p>
-        <span class="SpText">已完成分析风场:</span>
-        {{
-          totalList?.analysisFinishNumber ? totalList.analysisFinishNumber : 0
-        }}
-        个
-      </p>
-      <p>
-        <span class="SpText">未完成分析风场:</span>
-        {{
-          totalList?.analysisUnFinishedNumber
-            ? totalList.analysisUnFinishedNumber
-            : 0
-        }}
-        个
-      </p>
-      <p>
-        <span class="SpText">风机数量:</span>
-        {{ totalList?.engineGroupNumber ? totalList.engineGroupNumber : 0 }}
-        个
-      </p>
-      <p>
-        <span class="SpText">风场状态:</span>
-        <span class="red"></span>
-        <span class="yellow"></span>
-        <span class="green"></span>
-      </p>
-      <el-switch
-        v-model="value1"
-        active-text="显示"
-        inactive-text="隐藏"
-        @change="handleSwitchChange"
-      >
-      </el-switch>
+      placeholder="请选择所属公司"
+      :list="parentOpt"
+      type="1"
+      v-model="companyCode"
+      @change="parentChange"
+      :defaultParentProps="{
+        children: 'children',
+        label: 'companyName',
+        value: 'codeNumber',
+      }"
+    >
+    </selecttree>
     </div>
-    <Rightdata
-      v-show="ShowRi"
-      ref="childRef"
-      :maplistArr="maplistArr"
-      :defaultdata="defaultdata"
-      class="ridata"
-    ></Rightdata>
+
     <router-view></router-view>
   </div>
 </template>
@@ -74,14 +29,19 @@ import {
   getSysOrganizationAuthTreeByRoleId,
 } from "@/api/ledger.js";
 import Tmap from "@/components/map";
-import Rightdata from "./component/rightdata.vue";
+import BottomData from "./component/bottomData.vue";
+
 export default {
   name: "Index",
   components: {
     Tmap,
-    Rightdata,
+    BottomData,
     selecttree,
   },
+  props: {
+    fieldCode: "",
+    batchCode: "",
+  },
   data() {
     return {
       ShowRi: true,
@@ -89,9 +49,7 @@ export default {
       value1: true,
       treeval: "", // 绑定的输入框值
       showTree: false, // 控制树列表显示
-      treeData: [
-
-      ],
+      treeData: [],
       maplist: [],
       maplistArr: {},
       totalList: [],
@@ -103,12 +61,6 @@ export default {
   created() {
     this.GETtree();
     this.GETtotal();
-
-    // 页面初始化时手动触发一次赋值操作
-    this.$watch("defaultdata", (newValue) => {
-      this.maplistArr = newValue; // 将defaultdata的值赋给maplistArr
-    });
-    this.maplistArr = this.defaultdata;
   },
   mounted() {
     //模拟地图上的点位
@@ -118,7 +70,6 @@ export default {
     //   // this.$refs.map.addMarker({ point: [116.40740,39.90420], val: "1" });
     // });
   },
-
   methods: {
     // 获取总数
     GETtotal() {
@@ -133,8 +84,12 @@ export default {
       const processedData = this.processTreeData(treedata);
       this.parentOpt = processedData;
       this.defaultdata = res.data[0];
+      this.parentChange(this.defaultdata);
+      // const firstLayer = this.findFirstFieldLayer(processedData);
+      // if (firstLayer) {
+      //   this.parentChange(  this.defaultdata);
+      // }
     },
-
     //过滤数据
     processTreeData(treeData) {
       const processedData = [];
@@ -152,13 +107,16 @@ export default {
         processNode(root);
         processedData.push(root);
       });
-
       return processedData;
     },
+    handleTreeData() {
+      this.treeData = this.processTreeData(this.treeData);
+    },
     parseCoordinates(input) {
       if (input && typeof input === "string") {
         return input.split(",").map(Number);
       }
+      // debugger;
       return [];
     },
     parentChange(data) {
@@ -197,22 +155,37 @@ export default {
         });
       }
     },
-
+    findFirstFieldLayer(data) {
+      for (const item of data) {
+        if (item.codeType === "field") {
+          return item;
+        }
+        if (item.children && item.children.length > 0) {
+          const childResult = this.findFirstFieldLayer(item.children);
+          if (childResult) {
+            return childResult;
+          }
+        }
+      }
+      return null;
+    },
     featureClick(data) {
       console.log(data, "featureClick");
       const val = data.val;
-      if (val === "-1" || val === -1) {
-        this.$message.error("当前风场未进行分析");
+      if (val === "-1" || val === -1 || val === 10) {
+        this.$message.error("当前风场未完成分析");
       } else if (val === "0" || val === 0) {
         this.$message({
           message: "当前风场正在分析中",
           type: "warning",
         });
-      } else if (val === "1" || val === 1) {
+      } else if (val === "1" || val === 1 || val === "30" || val === 30) {
+        console.log("打包成功");
         this.$router.push({
           path: "cockpitManage/electronic-map",
           query: {
             fieldCode: data.codeNumber,
+            batchCode: data.batchCode,
           },
         });
       }
@@ -226,62 +199,27 @@ export default {
 
 <style lang="scss" scoped>
 .map-ditu {
-  // min-width: 86.9vw;
-  // max-width: 94.9vw;
-  height: 93vh;
-  position: relative;
+  height: 93.3vh;
+  display: flex;
+  flex-direction: column;
 }
 
-.ridata {
-  position: absolute;
-  top: 20px;
-  right: 20px;
+// 动态计算 Tmap 组件高度
+Tmap {
+  height: calc(93.3vh - 230px);
+  min-height: 0; // 防止 flex 项溢出
 }
 
-.ledata {
-  font-size: 14px;
-  width: 300px;
-  position: absolute;
-  top: 20px;
-  left: 60px;
-  background: #008080;
-  padding: 10px;
-  color: #fff;
-  border-radius: 5px;
-
-  p {
-    line-height: 24px;
-
-    .SpText {
-      display: inline-block;
-      width: 120px;
-      text-align: right;
-    }
-
-    .red,
-    .yellow,
-    .green {
-      display: inline-block;
-      width: 30px;
-      height: 12px;
-      margin-right: 5px;
-    }
-
-    .red {
-      background-color: #e16757;
-    }
-
-    .yellow {
-      background-color: #eecb5f;
-    }
-
-    .green {
-      background-color: #7ecf51;
-    }
-  }
+// 设置 bottom-data 组件高度为 230px
+bottom-data {
+  height: 230px;
+  flex-shrink: 0; // 防止组件缩小
 }
 
-::v-deep .el-switch__label.is-active {
-  color: #fff;
+.zuobian{
+  width: 180px;
+  position: absolute;
+  top: 10px;
+  left: 10px;
 }
 </style>

+ 796 - 0
src/views/admin/cockpitManage/component/bottomData.vue

@@ -0,0 +1,796 @@
+<template>
+  <div class="bottom-data">
+    <div class="Box1">
+      <h3 style="margin: 8px 0">风场分析完成率</h3>
+      <el-date-picker
+        size="mini"
+        v-model="value1"
+        type="datetimerange"
+        format="yyyy-MM-dd"
+        range-separator="至"
+        start-placeholder="开始日期"
+        end-placeholder="结束日期"
+        @change="onDateChange"
+      >
+      </el-date-picker>
+      <div id="main" style="width: 260px; height: 160px"></div>
+    </div>
+    <div class="Box2">
+      <div>
+        <h3 style="margin: 8px 0" >任务统计</h3>
+        <div class="BOXsan">
+          <div class="YC02" @click="getwgl">
+            <strong class="texyellow">
+              {{ onrelevance ? onrelevance : 0 }}</strong
+            >
+            <span>待分析任务</span>
+          </div>
+          <div class="YC02" @click="getwfx">
+            <strong class="textred"> {{ abnormal ? abnormal : 0 }}</strong>
+            <span>异常任务</span>
+          </div>
+
+          <div class="YC02" @click="getpd">
+            <strong class="textred">
+              {{ queueNumber ? queueNumber : 0 }}</strong
+            >
+            <span>排队任务</span>
+          </div>
+        </div>
+      </div>
+      <div>
+        <h3 style="margin: 8px 0">异常设备概览</h3>
+        <div class="BOX">
+          <div style="display: flex">
+            <div class="YC02">
+              <strong>
+                {{ equipment?.errCounrt ? equipment.errCounrt : 0 }}</strong
+              >
+              <span>异常总数</span>
+            </div>
+            <div class="YC02">
+              <strong>
+                {{
+                  equipment?.errCountInCurrentMonth
+                    ? equipment.errCountInCurrentMonth
+                    : 0
+                }}</strong
+              >
+              <span>本月异常</span>
+            </div>
+            <div class="YC02">
+              <strong class="textred">
+                {{
+                  equipment?.errCountNotDeal ? equipment.errCountNotDeal : 0
+                }}</strong
+              >
+              <span>未处理异常</span>
+            </div>
+            <div class="YC02">
+              <strong class="texyellow">
+                {{
+                  equipment?.errDeviceCount ? equipment.errDeviceCount : 0
+                }}</strong
+              >
+              <span>异常设备数</span>
+            </div>
+          </div>
+        </div>
+      </div>
+
+
+      <el-dialog title="待分析任务统计表" :visible.sync="glShow" width="45%">
+        <!-- 外部容器设置最大高度和滚动条 -->
+        <div style="max-height: 400px; overflow-y: auto">
+          <el-table :data="glData" style="width: 100%">
+            <el-table-column
+              prop="fieldName"
+              label="风场名称"
+              width="180"
+            ></el-table-column>
+            <el-table-column
+              prop="analysisName"
+              label="分析名称"
+            ></el-table-column>
+            <el-table-column
+              prop="createTime"
+              label="创建时间"
+              width="180"
+            ></el-table-column>
+
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click="handleClick(scope.row)"
+                  type="text"
+                  size="small"
+                  >编辑</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </el-dialog>
+
+      <el-dialog title="异常任务统计表" :visible.sync="YCShow" width="45%">
+        <div style="max-height: 400px; overflow-y: auto">
+          <el-table :data="FXData" style="width: 100%">
+            <el-table-column prop="fieldName" label="风场名称" width="180">
+            </el-table-column>
+            <el-table-column prop="analysisName" label="分析名称">
+            </el-table-column>
+            <el-table-column prop="createTime" label="创建时间" width="180">
+            </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click="YChandleClick(scope.row)"
+                  type="text"
+                  size="small"
+                  >编辑</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </el-dialog>
+
+      <el-dialog title="排队任务统计表" :visible.sync="PdShow" width="45%">
+        <div style="max-height: 400px; overflow-y: auto">
+          <el-table :data="PdData" style="width: 100%">
+            <el-table-column prop="fieldName" label="风场名称" width="180">
+            </el-table-column>
+            <el-table-column prop="analysisName" label="分析名称">
+            </el-table-column>
+            <el-table-column prop="createTime" label="创建时间" width="180">
+            </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="PDClick(scope.row)" type="text" size="small"
+                  >编辑</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </el-dialog>
+
+      <el-dialog
+        title="入库信息"
+        width="70%"
+        :visible.sync="dialogTableVisible"
+      >
+        <el-button size="small" @click="importdata">导入数据</el-button>
+        <el-table :data="gridData" style="max-height: 400px; overflow: auto">
+          <el-table-column
+            property="windFarmName"
+            label="风场名称"
+            show-overflow-tooltip
+            width="150px"
+          ></el-table-column>
+          <el-table-column
+            property="minuteTimeAreaList"
+            label="SCADA分钟级"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            property="secondTimeAreaList"
+            label="SCADA秒级"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            property="faultTimeAreaList"
+            label="故障数据"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            property="warnTimeAreaList"
+            label="报警数据"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            property="vibrationTimeAreaList"
+            label="振动数据"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </el-dialog>
+    </div>
+    <div class="Box3">
+      <div class="BOX" v-hasPermi="['home:offlinedata']">
+        <h3 class="centeredh3" style="margin: 8px 0">
+          入库数据
+          <span>
+            <span style="cursor: pointer" @click="importdata">导入数据</span>
+            <span style="cursor: pointer" @click="more">更多</span>
+          </span>
+        </h3>
+        <div>
+          <p class="titleYC"><span>风场名称</span><span>入库时间</span></p>
+          <tabrollHD
+            :table-data="RKtableData"
+            :shujuloading="shujuloading"
+            :columns="RKtableColumns"
+            :column-widths="RKcolumnWidths"
+            :max-height="140"
+          ></tabrollHD>
+        </div>
+      </div>
+    </div>
+    <div class="Box4">
+      <h3 style="margin: 8px 0">性能分析操作记录</h3>
+      <p class="titleJQ">
+        <span>名字</span><span>日期</span><span>操作记录</span>
+      </p>
+      <tabrollHD
+        :table-data="tableData"
+        :shujuloading="shujuloading"
+        :columns="tableColumns"
+        :max-height="140"
+        :column-widths="columnWidths"
+      ></tabrollHD>
+    </div>
+    <div class="Box5">
+      <h3 style="margin: 8px 0">异常数据信息</h3>
+      <p class="titleYC"><span>风场名称</span><span>风机信息</span></p>
+      <tabrollHD
+        :table-data="YCtableData"
+        :shujuloading="shujuloading"
+        :columns="YCtableColumns"
+        :column-widths="YCcolumnWidths"
+        :max-height="140"
+      ></tabrollHD>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  queryStatistics,
+  queryOptionRecords,
+  queryWaitTask,
+  analysisResultList,
+  getWindFieldNames,
+} from "@/api/ledger.js";
+import * as echarts from "echarts";
+import tabrollHD from "../component/tabrollHD.vue";
+import axios from "axios";
+export default {
+  props: {
+    maplistArr: {
+      type: Object,
+      default: () => ({}),
+    },
+    defaultdata: {
+      type: Object,
+      default: () => ({}),
+    },
+  },
+  components: {
+    tabrollHD,
+  },
+  watch: {
+    maplistArr: {
+      handler(newVal) {
+        if (Object.keys(newVal).length > 0) {
+          // 检查maplistArr是否有值
+          console.log("Map list updated:", newVal);
+          this.getStatistics();
+          this.getOptionRecords();
+        }
+      },
+      immediate: true, // 立即执行一次handler
+      deep: true, // 深度监听对象内部变化
+    },
+  },
+  created() {
+
+  },
+  data() {
+    return {
+      myChart: null,
+      YCtableData: [
+
+      ],
+      shujuloading: false,
+      YCtableColumns: [{ prop: "fieldName" }, { prop: "engineName" }],
+      YCcolumnWidths: {
+        fieldName: 120,
+      },
+      // 。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
+      tableData: [],
+      tableColumns: [
+        { prop: "optionByName" },
+        { prop: "createTime" },
+        { prop: "optionContent" },
+      ],
+      columnWidths: {
+        optionByName: 60,
+        createTime: 100,
+      },
+      equipment: {
+        analysisedCount: 0,
+        analysisingCount: 0,
+        noAnalysisCount: 0,
+      },
+      value1: "",
+      startTime: "",
+      endTime: "",
+
+      // 任务统计
+      onrelevance: "",
+      abnormal: "",
+      queueNumber: "",
+      glShow: false,
+      YCShow: false,
+      PdShow: false,
+      glData: [],
+      FXData: [],
+      PdData: [],
+      dialogTableVisible: false,
+      gridData: [],
+      RKtableData: [],
+      RKtableColumns: [{ prop: "windFarmName" }, { prop: "createTime" }],
+      RKcolumnWidths: {
+        windFarmName: 130,
+        createTime: 150,
+      },
+    };
+  },
+  mounted() {
+    this.initChart();
+    const currentTime = new Date();
+    const halfYearAgo = new Date();
+    halfYearAgo.setMonth(currentTime.getMonth() - 6);
+    this.value1 = [halfYearAgo, currentTime];
+    // 同时更新 startTime 和 endTime
+    this.startTime = this.$formatDate(halfYearAgo);
+    this.endTime = this.$formatDate(currentTime);
+  },
+  created() {
+    this.getbacklog();
+    this.ruku();
+  },
+  methods: {
+    initChart() {
+      var chartDom = document.getElementById("main");
+      this.myChart = echarts.init(chartDom);
+      this.updateChart();
+    },
+    updateChart() {
+      var option = {
+        tooltip: {
+          trigger: "item",
+          formatter: function (params) {
+            var percent = params.percent.toFixed(2) + "%";
+            return `${params.name}: ${params.value} (${percent})`;
+          },
+        },
+        legend: {
+          orient: "vertical",
+          left: "left",
+          top: "30%",
+          textStyle: {
+            // Add this for white legend text
+            color: "#fff",
+          },
+        },
+        series: [
+          {
+            type: "pie",
+            radius: ["40%", "80%"],
+            avoidLabelOverlap: false,
+            label: {
+              show: false,
+              position: "center",
+            },
+            labelLine: {
+              show: false,
+            },
+            center: ["60%", "50%"],
+            data: [
+              {
+                value: this.equipment.analysisedCount,
+                name: "已完成",
+                itemStyle: { color: "#7ECF51" },
+              },
+              {
+                value: this.equipment.analysisingCount,
+                name: "进行中",
+                itemStyle: { color: "#EECB5F" },
+              },
+              {
+                value: this.equipment.noAnalysisCount,
+                name: "未开始",
+                itemStyle: { color: "#E16757" },
+              },
+            ],
+          },
+        ],
+      };
+      this.myChart.setOption(option);
+    },
+
+    getStatistics() {
+      const startTime =
+        this.startTime ||
+        this.$formatDate(
+          new Date(new Date().setMonth(new Date().getMonth() - 6))
+        ); // 半年前的时间
+      const endTime = this.endTime || this.$formatDate(new Date()); // 当前时间
+      // halfYearAgo.setMonth(currentTime.getMonth() - 6)
+
+      let DataObject = {
+        codeNumber: this.maplistArr.codeNumber,
+        codeType: this.maplistArr.codeType,
+        startTime: startTime,
+        endTime: endTime,
+      };
+      queryStatistics(DataObject).then((res) => {
+        this.YCtableData = res.data.errList || [];
+        this.equipment = res.data || {};
+        this.updateChart(); // Update chart after data is received
+      });
+    },
+    getOptionRecords() {
+      let DataObject = {
+        codeNumber: this.maplistArr.codeNumber,
+        codeType: this.maplistArr.codeType,
+      };
+      queryOptionRecords(DataObject).then((res) => {
+        this.tableData = res.data || [];
+        console.log(   this.tableData, );
+        
+      });
+    },
+
+    onDateChange(date) {
+      if (Array.isArray(date)) {
+        this.startTime = this.$formatDate(date[0]);
+        this.endTime = this.$formatDate(date[1]);
+        if (this.endDate < this.startTime) {
+          this.endTime = this.startTime;
+        }
+        this.getStatistics();
+      } else {
+        this.startTime = null;
+        this.endTime = null;
+      }
+    },
+
+    // 。。。。。。。。。。。。。。。。。。。。。。。任务统计
+    getwgl() {
+      const arr = {
+        pageSize: 999,
+        analysisState: "-1",
+      };
+      analysisResultList(arr).then((res) => {
+        this.glData = res.data.list;
+        this.glShow = true;
+      });
+    },
+    getwfx() {
+      const arr = {
+        pageSize: 999,
+        errState: 1,
+      };
+      analysisResultList(arr).then((res) => {
+        this.FXData = res.data.list;
+        this.YCShow = true;
+      });
+    },
+    getpd() {
+      const arr = {
+        pageSize: 999,
+        analysisState: "10",
+      };
+      analysisResultList(arr).then((res) => {
+        this.PdData = res.data.list;
+        this.PdShow = true;
+      });
+    },
+    getbacklog() {
+      queryWaitTask().then((res) => {
+        this.abnormal = res.data.errCount;
+        this.onrelevance = res.data.uncorrelatedCount;
+        this.queueNumber = res.data.queueNumber;
+      });
+    },
+    handleClick(row) {
+      const fieldName = row.fieldName; // 获取当前行的 fieldName 数据
+      const analysisState = "-1";
+      // 打开新窗口
+      const newWindow = window.open(
+        "/home/performance/assetssMag?id=195",
+        "_blank"
+      );
+      // 等待窗口加载完成后发送消息
+      newWindow.onload = () => {
+        newWindow.postMessage({ fieldName, analysisState }, "*");
+      };
+    },
+
+    YChandleClick(row) {
+      const fieldName = row.fieldName; // 获取当前行的 fieldName 数据
+      const errState = 1;
+      const analysisState = "30";
+      // 打开新窗口
+      const newWindow = window.open(
+        "/home/performance/assetssMag?id=195",
+        "_blank"
+      );
+      // 等待窗口加载完成后发送消息
+      newWindow.onload = () => {
+        newWindow.postMessage({ fieldName, errState, analysisState }, "*");
+      };
+    },
+
+    // 。。。。。。。。。。。。。。。。。。。入库数据
+    importdata() {
+      window.open(this.$router.resolve({ path: "/transition" }).href, "_blank");
+    },
+    more() {
+      this.dialogTableVisible = true;
+      axios
+        .post(`/ETLapi/dataTransfer/pltIndexMore`)
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.gridData = res.data.datas.map((item) => {
+              // 合并数组中的元素,用 '/' 分隔
+              if (
+                item.secondTimeAreaList &&
+                item.secondTimeAreaList.length > 0
+              ) {
+                item.secondTimeAreaList = [item.secondTimeAreaList.join(" / ")];
+              }
+              if (item.faultTimeAreaList && item.faultTimeAreaList.length > 0) {
+                item.faultTimeAreaList = [item.faultTimeAreaList.join(" / ")];
+              }
+              if (
+                item.minuteTimeAreaList &&
+                item.minuteTimeAreaList.length > 0
+              ) {
+                item.minuteTimeAreaList = [item.minuteTimeAreaList.join(" / ")];
+              }
+              if (
+                item.vibrationTimeAreaList &&
+                item.vibrationTimeAreaList.length > 0
+              ) {
+                item.vibrationTimeAreaList = [
+                  item.vibrationTimeAreaList.join(" / "),
+                ];
+              }
+              if (item.warnTimeAreaList && item.warnTimeAreaList.length > 0) {
+                item.warnTimeAreaList = [item.warnTimeAreaList.join(" / ")];
+              }
+
+              return item;
+            });
+          }
+          if (res.data.code === 500) {
+            this.$message.error(res.data.message);
+          }
+        })
+        .catch((error) => {
+          console.error("Error fetching data:", error);
+        });
+    },
+
+    ruku() {
+      axios
+        .post(`/ETLapi/dataTransfer/recentlyImportedSuccessful5Data`)
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.RKtableData = res.data.datas;
+          }
+          if (res.data.code === 500) {
+            this.$message.error(res.data.message);
+          }
+        })
+        .catch((error) => {
+          console.error("Error fetching data:", error);
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.bottom-data {
+  height: 230px;
+  background-color: #1b3b7f;
+  display: flex;
+  justify-content: space-around;
+}
+.Box1,
+.Box2,
+.Box4,
+.Box5 {
+  H3 {
+    color: #fff;
+  }
+}
+
+.Box1 {
+}
+.Box2 {
+  .BOX {
+    display: flex;
+    padding-left: 10px;
+    flex-wrap: wrap;
+    padding-bottom: 15px;
+    .YC02 {
+      width: 70px;
+      height: 60px;
+      background-image: url("../../../../assets/003.png");
+      background-size: 70px 60px;
+      background-repeat: no-repeat;
+      background-position: center;
+      margin-right: 15px;
+      margin-top: 0px;
+      text-align: center;
+
+
+      .textred {
+        color: #d9001b;
+      }
+
+      .texyellow {
+        color: #facd91;
+      }
+
+      strong {
+        display: block;
+        font-size: 26px;
+        color: #4bffff;
+      }
+
+      span {
+        display: block;
+        color: #fff;
+        font-size: 12px;
+      }
+    }
+  }
+
+  .BOXsan {
+    width: 255px;
+    display: flex;
+    justify-content: space-around;
+ 
+
+    .YC02 {
+      width: 70px;
+      height: 60px;
+      background-image: url("../../../../assets/003.png");
+      background-size: 70px 60px;
+      background-repeat: no-repeat;
+      background-position: center;
+
+      margin-top: 15px;
+      text-align: center;
+      cursor: pointer;
+
+      .textred {
+        color: #d9001b;
+      }
+
+      .texyellow {
+        color: #facd91;
+      }
+
+      strong {
+        display: block;
+        font-size: 26px;
+        color: #4bffff;
+      }
+
+      span {
+        display: block;
+        font-size: 12px;
+        color: #fff;
+      }
+    }
+
+
+  }
+}
+
+.Box3 {
+  width: 290px;
+  .BOX {
+    display: flex;
+    padding-left: 10px;
+    flex-wrap: wrap;
+    padding-bottom: 15px;
+    color: #fff;
+    border-radius: 5px;
+    margin-bottom: 10px;
+
+    h3 {
+      margin-top: 5px;
+    }
+
+    .centeredh3 {
+      width: 100%;
+      display: flex;
+      justify-content: space-between;
+      margin-bottom: 5px;
+
+      span:nth-child(1) {
+        font-size: 12px;
+
+      }
+      span:nth-child(2) {
+        font-size: 12px;
+        padding-left: 10px;
+      }
+    }
+    .titleYC {
+      font-size: 14px;
+      background: #51a7e3;
+      padding: 5px 0;
+      color: #fff;
+
+      span:nth-child(1) {
+        margin: 0 70px 0 10px;
+      }
+    }
+  }
+}
+.Box4 {
+  width: 260px;
+  .titleJQ {
+    font-size: 14px;
+    background: #51a7e3;
+    padding: 5px 0;
+    color: #fff;
+
+    span:nth-child(1) {
+      margin: 0 15px 0 10px;
+    }
+
+    span:nth-child(2) {
+      margin: 0 45px 0 30px;
+    }
+  }
+}
+.Box5 {
+  width: 260px;
+  .titleYC {
+    font-size: 14px;
+    background: #51a7e3;
+    padding: 5px 0;
+    color: #fff;
+
+    span:nth-child(1) {
+      margin: 0 70px 0 10px;
+    }
+  }
+}
+
+
+
+.Tabtab {
+  font-size: 12px;
+}
+
+::v-deep.el-table__cell {
+  padding: 2px 0 !important;
+}
+
+::v-deep.el-table .el-table__cell {
+  padding: 2px 0 !important;
+}
+
+::v-deep.el-table--scrollable-y .el-table__body-wrapper {
+  overflow-y: clip !important;
+}
+
+
+
+.el-date-editor--datetimerange.el-input,
+.el-date-editor--datetimerange.el-input__inner {
+  width: 250px;
+}
+</style>

+ 131 - 0
src/views/admin/cockpitManage/component/tabrollHD.vue

@@ -0,0 +1,131 @@
+<template>
+  <div>
+    <el-table
+    :show-header="false"
+      v-loading="shujuloading"
+      :data="tableData"
+      :max-height="maxHeight"
+ 
+      ref="shujuscroll_Table"
+      strip
+      @mouseenter.native="shujuautoScroll(true)"
+      @mouseleave.native="shujuautoScroll(false)"
+      id="Tabtab"
+      :header-cell-style="{ backgroundColor: 'red' }"
+    >
+      <el-table-column
+        v-for="(column, index) in columns"
+        :key="index"
+        :prop="column.prop"
+        :label="column.label"
+        show-overflow-tooltip
+        :width="getColumnWidth(column.prop)" 
+      ></el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    tableData: {
+      type: Array,
+      default: () => [],
+    },
+    shujuloading: {
+      type: Boolean,
+      default: false,
+    },
+    tableTitle: {
+      type: String,
+      default: "",
+    },
+    columns: {
+      type: Array,
+      default: () => [],
+    },
+    maxHeight: {
+      type: Number,
+      default: 150,
+    },
+    height: {
+      type: Number,
+      default: 140,
+    },
+    columnWidths: {
+      type: Object,
+      default: () => ({}),
+    },
+    YCcolumnWidths: {
+      type: Object,
+      default: () => ({}),
+    },
+  },
+  mounted() {
+    this.shujuautoScroll();
+  },
+  beforeDestroy() {
+    this.shujuautoScroll(true);
+  },
+  methods: {
+    shujuautoScroll(stop) {
+      const table = this.$refs.shujuscroll_Table;
+      const divData = table.$refs.bodyWrapper;
+      if (stop) {
+        window.clearInterval(this.scrolltimer);
+      } else {
+        this.scrolltimer = window.setInterval(() => {
+          divData.scrollTop += 1;
+          if (
+            divData.clientHeight + divData.scrollTop ==
+            divData.scrollHeight
+          ) {
+            divData.scrollTop = 0;
+          }
+        }, 150);
+      }
+    },
+    getColumnWidth(prop) {
+      return this.columnWidths[prop] + 'px'; // 根据传入的属性(prop)获取对应的列宽度
+      return this.YCcolumnWidths[prop] + 'px'; // 根据传入的属性(prop)获取对应的列宽度
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if (rowIndex % 2 === 1) {
+        return "warning-row";
+      } else {
+        return "success-row";
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+#Tabtab {
+  font-size: 12px;
+}
+
+::v-deep.el-table .el-table__cell {
+  padding: 2px 0 !important;
+}
+
+/* 去掉最下面的那一条线 */
+.el-table::before {
+  height: 0px;
+}
+
+/* 滚动条样式 */
+::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
+  background-color: #004f5f;
+}
+
+::v-deep .el-table__body-wrapper::-webkit-scrollbar {
+  width: 0px;
+  opacity: 0.5;
+}
+
+::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
+  border-radius: 15px;
+  // background-color: rgba(0, 79, 95, 0.75);
+}
+</style>

+ 7 - 2
src/views/home/Index.vue

@@ -4,7 +4,8 @@
       <el-main>
         <el-header>
           <div class="headerHDBox">
-            <HeaderCom class="headerRight" @setLoding="setLoding"></HeaderCom>
+            <div class="headerLeft"></div>
+            <!-- <HeaderCom class="headerRight" @setLoding="setLoding"></HeaderCom> -->
             <MenuHD class="menuBox"></MenuHD>
             <HeaderCom class="headerRight" @setLoding="setLoding"></HeaderCom>
           </div>
@@ -51,7 +52,7 @@ export default {
   data() {
     return {
       loading: false,
-      isShowHd: false, //true 则展示华电的菜单样式,false 则展示默认的左侧边栏菜单
+      isShowHd: true, //true 则展示华电的菜单样式,false 则展示默认的左侧边栏菜单
     };
   },
   methods: {
@@ -118,4 +119,8 @@ export default {
   transform: translateX(50px);
   opacity: 0;
 }
+
+.headerLeft{
+  width: 190px;
+}
 </style>

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

@@ -1,4 +1,4 @@
-<template>
+56<template>
   <el-menu
     collapse-transition
     ref="menu"
@@ -10,6 +10,7 @@
     :router="true"
     :default-active="defaultActive"
     :default-openeds="openMenus"
+
   >
     <template v-for="(item, indexMenu) in routerList">
       <!-- 判断是否是中间位置 -->
@@ -366,7 +367,14 @@ export default {
   display: block !important;
 }
 
-.el-menu-item {
-  margin-left: 18px;
+
+
+
+/* 当前选中项的颜色 */
+.el-menu--horizontal .el-menu-item.is-active {
+  color: #fff !important;
+
 }
+
+
 </style>

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

@@ -52,7 +52,7 @@
 
         <el-form-item class="right-align">
           <el-button @click="Newanalyse" size="small">创建分析</el-button>
-          <el-button @click="examine" size="small">查看导入数据</el-button>
+          <el-button @click="examine" size="small" v-hasPermi="['home:offlinedata']" >查看导入数据</el-button>
           <!-- <el-button @click="handleAutoAsstessList" size="small"
             >查看自动分析列表</el-button
           > -->

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