Browse Source

修改更新

rui.jiang 5 tháng trước cách đây
mục cha
commit
712b1bd108

BIN
src.zip


+ 11 - 0
src/api/ledger.js

@@ -573,3 +573,14 @@ export function analysisResultList(data) {
 
 
 
+// 陈风场
+
+export function queryFloatingWindowInfo(data) {
+  return request({
+    url: "/energy-manage-service/homePage/queryFloatingWindowInfo",
+    method: "get",
+    data,
+  });
+}
+
+

BIN
src/assets/img/iconFC.png


BIN
src/assets/img/iconFJ.png


+ 104 - 59
src/components/map/index.vue

@@ -8,31 +8,49 @@
           <span>风场编号</span><span>{{ hoverInfo.codeNumber }}</span>
         </p>
         <p>
-          <span>空气密度</span><span>{{ hoverInfo.density }} kg/m3</span>
+          <span>风机数量</span><span>{{ newWind.engineTotalCount }} 台</span>
         </p>
         <p>
-          <span>总额定容量</span
-          ><span
-            >{{
-              hoverInfo?.ratedCapacityNumber
-                ? hoverInfo.ratedCapacityNumber
-                : 0
-            }}/KW</span
-          >
+          <span>总容量</span><span>{{
+            newWind?.ratedCapacityNumber ? newWind.ratedCapacityNumber : 0
+          }}/KW</span>
         </p>
         <p>
-          <span>经度</span><span>{{ hoverInfo.longitude }}</span>
+          <span>经度</span><span>{{ hoverInfo.longitude }}°</span>
         </p>
         <p>
-          <span>纬度</span><span>{{ hoverInfo.latitude }}</span>
+          <span>纬度</span><span>{{ hoverInfo.latitude }}°</span>
         </p>
         <p>
-          <span>海拔高度</span><span>{{ hoverInfo.elevationHeight }} /米</span>
+          <span>分析类型数</span><span>{{
+            hoverInfo.analysisTypeCount ? hoverInfo.analysisTypeCount : 0
+          }}
+            个</span>
         </p>
         <p>
-          <span>最新分析时间</span
-          ><span> {{ $formatDateTWO(hoverInfo.wfbrCreateTime) }}</span>
+          <span>分析开始时间</span>
+          <span>{{
+            newWind.analysisStartTime
+              ? $formatDateTWO(newWind.analysisStartTime)
+              : "暂无数据"
+          }}</span>
         </p>
+        <p>
+  <span>分析结束时间</span>
+  <span>{{ newWind.analysisEndTime ? $formatDateTWO(newWind.analysisEndTime) : '暂无数据' }}</span>
+</p>
+<p>
+  <span>数据开始时间</span>
+  <span>{{ newWind.dataStartTime ? $formatDateTWO(newWind.dataStartTime) : '暂无数据' }}</span>
+</p>
+<p>
+  <span>数据结束时间</span>
+  <span>{{ newWind.dataEndTime ? $formatDateTWO(newWind.dataEndTime) : '暂无数据' }}</span>
+</p>
+
+        <!-- <p>
+          <span>最新分析时间</span><span> {{ $formatDateTWO(hoverInfo.wfbrCreateTime) }}</span>
+        </p> -->
       </div>
     </div>
 
@@ -43,17 +61,13 @@
           <span>风机编号</span><span>{{ hoverfengji.engineCode }}</span>
         </p>
         <p>
-          <span>额定容量</span
-          ><span
-            >{{
-              hoverfengji?.ratedCapacity ? hoverfengji?.ratedCapacity : 0
-            }}
-            /KW</span
-          >
+          <span>额定容量</span><span>{{
+            hoverfengji?.ratedCapacity ? hoverfengji?.ratedCapacity : 0
+          }}
+            /KW</span>
         </p>
         <p>
-          <span>海拔高度</span
-          ><span>{{ hoverfengji.elevationHeight }} /米</span>
+          <span>海拔高度</span><span>{{ hoverfengji.elevationHeight }} /米</span>
         </p>
         <p>
           <span>轮毂高度</span><span>{{ hoverfengji.hubHeight }} /米</span>
@@ -72,12 +86,10 @@
           <span>额定风速</span><span>{{ hoverfengji.ratedWindSpeed }} m/s</span>
         </p>
         <p>
-          <span>切入风速</span
-          ><span>{{ hoverfengji.ratedCutInWindspeed }} m/s</span>
+          <span>切入风速</span><span>{{ hoverfengji.ratedCutInWindspeed }} m/s</span>
         </p>
         <p>
-          <span>切出风速</span
-          ><span>{{ hoverfengji.ratedCutOutWindspeed }} m/s</span>
+          <span>切出风速</span><span>{{ hoverfengji.ratedCutOutWindspeed }} m/s</span>
         </p>
       </div>
     </div>
@@ -98,8 +110,7 @@
           <span>状态</span><span>{{  }}</span>
         </p> -->
         <p>
-          <span>测风塔高度</span
-          ><span>{{ hoverta.anemometerHeightStrings }}/米</span>
+          <span>测风塔高度</span><span>{{ hoverta.anemometerHeightStrings }}/米</span>
         </p>
       </div>
     </div>
@@ -127,14 +138,15 @@ import { Icon, Style } from "ol/style";
 import ZoomSlider from "ol/control/ZoomSlider.js";
 import { defaults as defaultControls } from "ol/control.js";
 
-import icon01 from "../../assets/img/icon01.png";
-import icon02 from "../../assets/img/icon02.png";
-import icon03 from "../../assets/img/icon03.png";
-import icon04 from "../../assets/img/icon04.png";
+import icon01 from "../../assets/img/iconFC.png";
+import icon02 from "../../assets/img/iconFC.png";
+import icon03 from "../../assets/img/iconFC.png";
+import icon04 from "../../assets/img/iconFJ.png";
 import icon05 from "../../assets/img/icon05.png";
-import icon06 from "../../assets/img/icon06.png";
-import defaultIcon from "../../assets/img/icon01.png";
-import { queryErrDescByEngine } from "@/api/ledger.js";
+import icon06 from "../../assets/img/iconFJ.png";
+import defaultIcon from "../../assets/img/iconFJ.png";
+import { queryErrDescByEngine, queryFloatingWindowInfo } from "@/api/ledger.js";
+import { login } from "@/api/login";
 
 export default {
   props: {
@@ -168,6 +180,7 @@ export default {
         left: "0px",
         top: "0px",
       },
+      newWind: {},
     };
   },
   watch: {
@@ -196,8 +209,8 @@ export default {
         new TileLayer({
           source: new XYZ({
             // 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://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
+            // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
+            url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
             // url: "http://10.96.137.5:9080/tiles/{z}/{x}/{y}.png", //大~#@唐
           }),
         }),
@@ -295,40 +308,52 @@ export default {
      * 初始化地图事件
      */
     initEvent() {
+      let lastHoveredFeature = null; // 用来记录上一次悬停的 feature
+
       this.map.on("pointermove", (evt) => {
         const features = this.map.getFeaturesAtPixel(evt.pixel, {
           hitTolerance: 1,
         });
+
         if (features && features.length > 0) {
           const feature = features.at(0);
           const val = feature.get("data").val;
-          if (val == "1" || val == "30") {
-            this.hoverInfo = feature.get("data");
-            this.hoverStyle.left = `${evt.pixel[0] + 10}px`;
-            this.hoverStyle.top = `${evt.pixel[1] - 150}px`;
-          } else if (val == "4") {
-            this.hoverfengji = feature.get("data");
-            this.hoverfengjiStyle.left = `${evt.pixel[0] + 10}px`;
-            this.hoverfengjiStyle.top = `${evt.pixel[1] - 150}px`;
-            this.currentFeatureData = feature.get("data");
-          } else if (val == "5") {
-            this.hoverta = feature.get("data");
-            this.hovertaStyle.left = `${evt.pixel[0] + 10}px`;
-            this.hovertaStyle.top = `${evt.pixel[1] - 150}px`;
-            this.currentFeatureData = feature.get("data");
-          } else if (val == "6") {
-            this.currentFeatureData = feature.get("data");
-          } else {
-            this.hoverInfo = null;
-            this.hoverfengji = false;
-            this.hoverta = false;
-            this.currentFeatureData = null;
+
+          // 只有当当前悬停的 feature 和上次的不同,才触发操作
+          if (lastHoveredFeature !== feature) {
+            if (val == "1" || val == "30"||val == "-1") {
+              this.hoverInfo = feature.get("data");
+              this.hoverStyle.left = `${evt.pixel[0] + 10}px`;
+              this.hoverStyle.top = `${evt.pixel[1] - 150}px`;
+              this.getwind();
+            } else if (val == "4") {
+              this.hoverfengji = feature.get("data");
+              this.hoverfengjiStyle.left = `${evt.pixel[0] + 10}px`;
+              this.hoverfengjiStyle.top = `${evt.pixel[1] - 150}px`;
+              this.currentFeatureData = feature.get("data");
+            } else if (val == "5") {
+              this.hoverta = feature.get("data");
+              this.hovertaStyle.left = `${evt.pixel[0] + 10}px`;
+              this.hovertaStyle.top = `${evt.pixel[1] - 150}px`;
+              this.currentFeatureData = feature.get("data");
+            } else if (val == "6") {
+              this.currentFeatureData = feature.get("data");
+            } else {
+              this.hoverInfo = null;
+              this.hoverfengji = false;
+              this.hoverta = false;
+              this.currentFeatureData = null;
+            }
+
+            // 更新 lastHoveredFeature
+            lastHoveredFeature = feature;
           }
         } else {
           this.hoverInfo = null;
           this.hoverfengji = false;
           this.hoverta = false;
           this.currentFeatureData = null;
+          lastHoveredFeature = null; // 没有特征时清空记录
         }
       });
 
@@ -352,6 +377,7 @@ export default {
         }
       });
     },
+
     handleFeatureClick(featureData) {
       let dateArr = {
         batchCode: this.$route.query.batchCode,
@@ -363,6 +389,25 @@ export default {
       });
     },
 
+    getwind() {
+      if (this.hoverInfo && this.hoverInfo.batchCode) {
+        const param = {
+          batchcode: this.hoverInfo.batchCode,
+          fieldCode: this.hoverInfo.codeNumber,
+        }; // 确保传递一个对象
+        queryFloatingWindowInfo(param)
+          .then((res) => {
+            // 处理响应数据
+            this.newWind = res.data;
+          })
+          .catch((err) => {
+            console.error("获取风信息失败", err);
+          });
+      } else {
+        console.warn("hoverInfo 或 batchCode 未定义");
+      }
+    },
+
     /**
      * 平移缩放
      * @param data

+ 51 - 8
src/views/admin/cockpitManage/component/leftdata.vue

@@ -7,20 +7,20 @@
           <strong class="texyellow">
             {{ onrelevance ? onrelevance : 0 }}</strong
           >
-          <span>分析异常数</span>
+          <span>未分析任务</span>
         </div>
         <div class="YC02" @click="getwfx">
           <strong class="textred"> {{ abnormal ? abnormal : 0 }}</strong>
-          <span>失败分析数</span>
+          <span>失败任务</span>
         </div>
 
-        <div class="YC03">
-          <strong class="textred"> {{ abnormal ? abnormal : 0 }}</strong>
+        <div class="YC03" @click="getpd">
+          <strong class="textred"> {{ queueNumber ? queueNumber : 0 }}</strong>
           <span>排队任务数</span>
         </div>
       </div>
 
-      <el-dialog title="未关联任务统计表" :visible.sync="glShow" width="40%">
+      <el-dialog title="未关联任务统计表" :visible.sync="glShow" width="45%">
         <!-- 外部容器设置最大高度和滚动条 -->
         <div style="max-height: 400px; overflow-y: auto">
           <el-table :data="glData" style="width: 100%">
@@ -53,7 +53,7 @@
         </div>
       </el-dialog>
 
-      <el-dialog title="分析异常统计表" :visible.sync="YCShow" width="40%">
+      <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">
@@ -75,6 +75,26 @@
           </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="分析名称" width="180">
+            </el-table-column>
+            <el-table-column prop="createTime" label="创建时间">
+            </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>
     </div>
 
     <!-- 入库信息 -->
@@ -90,7 +110,7 @@
       <div>
         <p class="titleYC"><span>风场名称</span><span>入库时间</span></p>
         <tabroll
-              :table-data="tableData"
+          :table-data="tableData"
           :shujuloading="shujuloading"
           :columns="YCtableColumns"
           :column-widths="YCcolumnWidths"
@@ -190,11 +210,14 @@ export default {
     return {
       onrelevance: "",
       abnormal: "",
+      queueNumber: "",
       glShow: false,
       YCShow: false,
+      PdShow: false,
       dialogTableVisible: false,
       glData: [],
       FXData: [],
+      PdData: [],
       tableData: [],
       maxHeight: "200",
       gridData: [],
@@ -216,6 +239,7 @@ export default {
       queryWaitTask().then((res) => {
         this.abnormal = res.data.errCount;
         this.onrelevance = res.data.uncorrelatedCount;
+        this.queueNumber = res.data.queueNumber;
       });
     },
     getwgl() {
@@ -234,11 +258,30 @@ export default {
         this.YCShow = true;
       });
     },
+    getpd() {
+      analysisResultList({ analysisState: 10 }).then((res) => {
+        this.PdData = res.data.list;
+        this.PdShow = true;
+      });
+    },
+
+    PDClick(row) {
+      const fieldName = row.fieldName; // 获取当前行的 fieldName 数据
+      const analysisState = 10;
+      // 打开新窗口
+      const newWindow = window.open(
+        "/home/performance/assetssMag?id=195",
+        "_blank"
+      );
+      // 等待窗口加载完成后发送消息
+      newWindow.onload = () => {
+        newWindow.postMessage({ fieldName, analysisState }, "*");
+      };
+    },
 
     handleClick(row) {
       const fieldName = row.fieldName; // 获取当前行的 fieldName 数据
       const analysisState = -1;
-
       // 打开新窗口
       const newWindow = window.open(
         "/home/performance/assetssMag?id=195",

+ 63 - 29
src/views/overview/components/analysis_information/index.vue

@@ -4,20 +4,23 @@
       <h4>分析介绍:</h4>
       <div class="box-header-min">
         <el-descriptions>
-          <el-descriptions-item label="分析主题">{{}}</el-descriptions-item>
+          <el-descriptions-item label="分析主题">{{
+            analysisInfo.analysisName
+          }}</el-descriptions-item>
           <el-descriptions-item label="分析人">{{
             analysisInfo.updateByName
           }}</el-descriptions-item>
-          <el-descriptions-item label="分析简述">{{}}</el-descriptions-item>
+          <el-descriptions-item label="分析简述">{{
+            analysisInfo.sketch
+          }}</el-descriptions-item>
           <el-descriptions-item label="分析创建时间">
-            {{}}
+            {{ analysisInfo.createTime }}
           </el-descriptions-item>
-          <el-descriptions-item
-            label="分析开始执行时间"
-            >{{
+          <el-descriptions-item label="分析开始执行时间">{{
+            analysisInfo.analysisStartTime
           }}</el-descriptions-item>
           <el-descriptions-item label="分析完成时间">{{
-            analysisInfo.analysisFinishTime
+            analysisInfo.analysisEndTime
           }}</el-descriptions-item>
         </el-descriptions>
         <!-- <div v-if="analysisInfo.dataEndTime || analysisInfo.dataStartTime">
@@ -86,52 +89,57 @@
               v-for="itemData in analysisInfo.windEngineGroups"
               :key="itemData.engineCode"
             >
-              <el-popover placement="right" width="400" trigger="hover">
+              <el-popover
+                placement="right"
+                width="600"
+                trigger="hover"
+                @show="getEngineInfo(itemData.engineCode)"
+              >
                 <el-descriptions class="margin-top" size="mini" border>
                   <!-- :column="3" -->
                   <el-descriptions-item>
                     <template slot="label"> 风机名称 </template>
-                    {{}}
+                    {{ windDetail.engineName }}
                   </el-descriptions-item>
-                  <el-descriptions-item>
+                  <!-- <el-descriptions-item>
                     <template slot="label"> 机型编号 </template>
-                    {{}}
-                  </el-descriptions-item>
+                    {{ windDetail.millTypeCode }}
+                  </el-descriptions-item> -->
                   <el-descriptions-item>
                     <template slot="label"> 额定容量 </template>
-                    {{}}
+                    {{ windDetail.ratedCapacity }}/KW
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 轮毂高度 </template>
-                    {{}}
+                    {{ windDetail.hubHeight }}/米
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 海拔高度 </template>
-                    {{}}
+                    {{ windDetail.elevationHeight }}/米
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 经度 </template>
-                    {{}}
+                    {{ windDetail.longitude }}
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 纬度 </template>
-                    {{}}
+                    {{ windDetail.latitude }}
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 是否标杆风机 </template>
-                    {{}}
+                    {{ windDetail.sightcing == 1 ? "是" : "否" }}
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 额定风速 </template>
-                    {{}}
+                    {{ windDetail.rated_wind_speed }} m/s
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 切入风速 </template>
-                    {{}}
+                    {{ windDetail.ratedCutInWindspeed }} m/s
                   </el-descriptions-item>
                   <el-descriptions-item>
                     <template slot="label"> 切出风速 </template>
-                    {{}}
+                    {{ windDetail.ratedCutOutWindspeed }} m/s
                   </el-descriptions-item>
                 </el-descriptions>
                 <div slot="reference">
@@ -158,13 +166,20 @@
     <div class="box-min">
       <h4>完成分析类型:</h4>
       <template v-if="analysisInfo && analysisInfo.analysisTypes?.length > 0">
-        <div class="completeAssetssType">
-          <el-tag
-            v-for="analysis in analysisInfo.analysisTypes"
-            :key="analysis.analysisTypeName"
-            type="warning"
-            >{{ analysis.analysisTypeName }}
-          </el-tag>
+        <div
+          class="analysisTypes"
+          v-for="analysis in analysisInfo.analysisTypes"
+          :key="analysis.id"
+        >
+          <h6>{{ analysis.typeName }}:</h6>
+          <div class="completeAssetssType">
+            <el-tag
+              v-for="analysisChild in analysis.children"
+              :key="analysisChild.id"
+              type="warning"
+              >{{ analysisChild.typeName }}
+            </el-tag>
+          </div>
         </div>
       </template>
 
@@ -177,6 +192,7 @@
 import Map from "../map/index.vue";
 import { getFieldInfo } from "@/api/overview";
 import { getWindEngineGroup } from "@/api/ledger";
+import { aW } from "plotly.js-dist";
 export default {
   name: "AnalysisInformation",
   components: {
@@ -200,6 +216,7 @@ export default {
       data: [
         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
       ],
+      windDetail: {},
     };
   },
   watch: {
@@ -223,6 +240,16 @@ export default {
     }
   },
   methods: {
+    //获取风机信息
+    async getEngineInfo(engineCode) {
+      console.log(engineCode, "engineCode");
+      await getWindEngineGroup({ engineCode }).then((res) => {
+        console.log(res, "res");
+        if (res.code === 200) {
+          this.windDetail = res.data;
+        }
+      });
+    },
     async getWindEngList() {
       this.loading = true;
       try {
@@ -300,7 +327,14 @@ export default {
     font-weight: 500;
     margin-bottom: 10px;
   }
-  .completeAssetssType {
+  ::v-deep .analysisTypes {
+    h6 {
+      font-weight: 500 !important;
+      font-size: 12px;
+      margin: 5px 0;
+    }
+  }
+  .analysisTypes:last-child {
     margin-bottom: 50px;
   }
 }

+ 1 - 3
src/views/overview/components/production_indicator_all/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 13:45:50
- * @LastEditTime: 2025-02-10 14:51:27
+ * @LastEditTime: 2025-02-11 13:51:12
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/production_indicator_all/index.vue
@@ -101,7 +101,6 @@
 <script>
 import DicCard from "@/views/overview/components/dicCard/index.vue";
 import FilterChart from "@/views/overview/components/filterChart/index.vue";
-import Rader from "@/views/performance/components/chartsCom/Radar.vue";
 import TinymceEditor from "@/components/Tinymce.vue";
 import {
   analysisDetail,
@@ -115,7 +114,6 @@ export default {
   components: {
     DicCard,
     FilterChart,
-    Rader,
     TinymceEditor,
   },
   props: {

+ 42 - 2
src/views/overview/components/production_indicator_unit/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 13:44:56
- * @LastEditTime: 2025-02-10 14:51:35
+ * @LastEditTime: 2025-02-12 11:29:24
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/production_indicator_unit/index.vue
@@ -40,6 +40,7 @@
             border
             style="width: 100%"
             align="center"
+            @row-click="handleRowClick(itemCsv.data, $event)"
           >
             <el-table-column prop="wind_turbine_name" label="机组">
             </el-table-column>
@@ -93,7 +94,11 @@
               v-for="(chantItem, chartInd) in itemCsv.data"
               :key="chartInd + 'chantItem' + itemind"
             >
-              <Rader :chartData="chantItem"></Rader>
+              <Rader
+                :ref="itemind + 'chart' + chartInd"
+                :chartData="chantItem"
+                :itemCsvData="itemCsv.data"
+              ></Rader>
             </el-col>
           </el-row>
         </template>
@@ -134,6 +139,23 @@
           </el-col>
         </el-row>
       </el-dialog>
+      <el-dialog
+        title="雷达图表"
+        :visible="radarIsShow"
+        width="450px"
+        v-dialogDrag
+        :modal="false"
+        :lock-scroll="false"
+        :modal-append-to-body="false"
+        @close="radarHandleClose"
+        class="radarDialog"
+      >
+        <Rader
+          ref="dialogChart"
+          :chartData="chartItem"
+          :itemCsvData="handleTableData"
+        ></Rader>
+      </el-dialog>
     </div>
     <div class="right">
       <DicCard
@@ -189,6 +211,9 @@ export default {
       form: {
         value2: "",
       },
+      handleTableData: [], //点击查看雷达图浮窗数据,用于计算中位值
+      chartItem: {}, //点击查看雷达图浮窗数据
+      radarIsShow: false,
       commentDescriptionVos: [], //评论列表
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
@@ -262,6 +287,13 @@ export default {
     }
   },
   methods: {
+    handleRowClick(data, row) {
+      this.chartItem = row;
+      this.handleTableData = data;
+      this.radarIsShow = true;
+
+      console.log(data, row, "handleRowClick 点击表格行");
+    },
     onSubmit() {
       console.log("submit!");
     },
@@ -269,6 +301,9 @@ export default {
       //关闭评论弹框
       this.$emit("setIsShow");
     },
+    radarHandleClose() {
+      this.radarIsShow = false;
+    },
     async handleComment() {
       try {
         await analysisCommentEdit({
@@ -486,4 +521,9 @@ export default {
   left: 50%;
   transform: translate(0, -50%);
 }
+
+::v-deep .radarDialog .el-dialog__body > div:first-child {
+  display: flex;
+  justify-content: center;
+}
 </style>

+ 63 - 12
src/views/performance/assetssMag.vue

@@ -14,6 +14,13 @@
         class="demo-form-inline"
         :rules="rules"
       >
+        <el-form-item label="分析主题:" prop="analysisName">
+          <el-input
+            size="small"
+            v-model="formInline.analysisName"
+            placeholder="请输入分析主题"
+          ></el-input>
+        </el-form-item>
         <el-form-item label="风场名称:" prop="fieldName">
           <el-input
             size="small"
@@ -21,7 +28,21 @@
             placeholder="请输入风场名称"
           ></el-input>
         </el-form-item>
-
+        <el-form-item label="分析状态:" prop="analysisState">
+          <el-select
+            size="small"
+            v-model="formInline.analysisState"
+            placeholder="请选择分析状态"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="onSubmit" size="small"
             >查询</el-button
@@ -49,11 +70,16 @@
           min-width="200"
           fixed
         >
-        <template slot-scope="scope">
-          <el-tooltip class="item" effect="dark" :content="scope.row.sketch || '暂无分析简述'" placement="top">
-      <span>{{ scope.row.analysisName }}</span>
-    </el-tooltip>
-  </template>
+          <template slot-scope="scope">
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="scope.row.sketch || '暂无分析简述'"
+              placement="top"
+            >
+              <span>{{ scope.row.analysisName }}</span>
+            </el-tooltip>
+          </template>
         </el-table-column>
         <el-table-column
           align="center"
@@ -70,7 +96,7 @@
           min-width="150"
         >
           <template slot-scope="scope">
-            <span v-if="scope.row.analysisState == -1">未分析</span>
+            <span v-if="scope.row.analysisState == -1">未关联</span>
             <span
               v-else-if="
                 scope.row.analysisState == 20 && scope.row.errState == 0
@@ -440,6 +466,24 @@ export default {
       loadingView: false,
       loading: false, //数据加载中
       errorInfo: "",
+      options: [
+        {
+          value: "-1",
+          label: "未关联",
+        },
+        {
+          value: "10",
+          label: "排队中",
+        },
+        {
+          value: "20",
+          label: "分析中",
+        },
+        {
+          value: "30",
+          label: "已分析",
+        },
+      ],
       addRules: {
         fieldCode: [
           { required: true, message: "请选择关联风场", trigger: "change" },
@@ -459,6 +503,8 @@ export default {
         pageNum: 1,
         pageSize: 10,
         totalSize: 0,
+        analysisName: undefined,
+        analysisState: undefined,
       },
       tableData: [],
       rowInfo: {},
@@ -510,7 +556,6 @@ export default {
         }
       });
     },
-
     AddHandleCloses(done) {
       this.$confirm("确认关闭?")
         .then((_) => {
@@ -676,7 +721,6 @@ export default {
 
     // 改进 handleMessage,避免频繁请求
     handleMessage(event) {
-      // console.log(event, "请求分析页面");
       // 确保消息来自当前域
       if (event.origin !== window.location.origin) {
         return;
@@ -697,7 +741,13 @@ export default {
       }
 
       // 如果当前没有请求中,才调用 getTableList
-      if (!this.loading && fieldName && analysisState) {
+      // console.log(
+      //   this.loading,
+      //   fieldName,
+      //   analysisState,
+      //   "如果当前没有请求中,才调用"
+      // );
+      if (!this.loading) {
         this.getTableList();
         // this.startPolling();
       }
@@ -707,15 +757,16 @@ export default {
     },
     // 查询
     onSubmit() {
-      this.getTableList();
+      this.fetchData();
     },
     // 重置
     reset(formName) {
       this.$refs[formName].resetFields();
       this.formInline.fieldName = "";
+      this.formInline.analysisName = "";
       this.formInline.analysisState = "";
       this.formInline.errState = "";
-      this.getTableList();
+      this.fetchData();
     },
     // fetchData 方法在轮询中调用
     async fetchData() {

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2025-02-07 15:05:03
+ * @LastEditTime: 2025-02-11 11:16:24
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -703,7 +703,7 @@ export default {
         configAnalysis: null, //分析类型
         powerFarmID: null, //风场编号//通过路由获取的默认传递的
         dataBatchNum: null, //批次号
-        scada: "minute", //scada数类型
+        scada: "", //scada数类型
         turbines: [], //机组编号
         beginTime: null, //开始时间
         endTime: null, //结束时间
@@ -1029,7 +1029,7 @@ export default {
         configAnalysis: null, //分析类型
         powerFarmID: this.$route.query.fieldEngineCode, //风场编号//通过路由获取的默认传递的
         dataBatchNum: this.$route.query.batchCode, //批次号
-        scada: "minute", //scada数类型
+        scada: "", //scada数类型
         turbines: [], //机组编号
         beginTime: null, //开始时间
         endTime: null, //结束时间

+ 174 - 69
src/views/performance/components/chartsCom/Radar.vue

@@ -1,13 +1,12 @@
 <template>
-  <div>
-    <!-- Chart container -->
-    <div ref="radarChart" style="width: 100%; height: 400px"></div>
-    <!-- Button to trigger dynamic chart update -->
-  </div>
+  <div
+    ref="radarChart"
+    style="width: 100%; height: 400px; min-width: 400px"
+  ></div>
 </template>
 
 <script>
-import Plotly from "plotly.js-dist-min";
+import * as echarts from "echarts";
 
 export default {
   props: {
@@ -15,86 +14,192 @@ export default {
       type: Object,
       default: {},
     },
+    itemCsvData: {
+      type: Array,
+      default: [],
+    },
+  },
+  watch: {
+    chartData: {
+      deep: true,
+      // immediate: true,
+      handler() {
+        if (this.chartData && this.itemCsvData.length > 0) {
+          this.calculateValues();
+          this.drawRadarChart();
+        }
+      },
+    },
+    itemCsvData: {
+      handler() {
+        if (this.chartData && this.itemCsvData.length > 0) {
+          this.calculateValues();
+          this.drawRadarChart();
+        }
+      },
+      deep: true,
+      // immediate: true,
+    },
   },
   data() {
     return {
-      //   chartData: {
-      //     Qp: "87955465.05833334",
-      //     Thc: "2094.177739484127",
-      //     Rdr: "12",
-      //     Qdr: "-87955465.05833334",
-      //     fs: "12333",
-      //   },
+      maxValues: [],
+      minValues: [],
+      medianValues: [],
     };
   },
   mounted() {
-    if (this.chartData) {
-      this.drawRadarChart();
-    }
+    this.$nextTick(() => {
+      if (this.chartData && this.itemCsvData.length > 0) {
+        this.calculateValues();
+        this.drawRadarChart();
+      }
+    });
+
+    // 监听窗口大小变化,手动调用 resize 方法
+    window.addEventListener("resize", this.resizeChart);
+  },
+  beforeDestroy() {
+    // 清除事件监听
+    window.removeEventListener("resize", this.resizeChart);
   },
   methods: {
-    drawRadarChart() {
-      console.log("this.chartData 雷达图设置", this.chartData);
-      // 获取动态数据的 keys 和 values
-      const keys = Object.keys(this.chartData);
-      const values = Object.values(this.chartData).map((val) =>
-        val === "" ? 0 : parseFloat(val)
+    // 计算最大值、最小值和中位值
+    calculateValues() {
+      const data = this.itemCsvData.map((item) => [
+        item.TurbinePowerRate,
+        item.TurbineRunRate,
+        item.WindSpeedAvr,
+        item.Thi,
+        item.Ws,
+      ]);
+
+      // 计算最大值
+      this.maxValues = data[0].map((_, colIndex) =>
+        Math.max(...data.map((row) => row[colIndex]))
       );
 
-      // 构造 Plotly 雷达图数据
-      const trace = {
-        type: "scatterpolar",
-        r: [
-          this.chartData.TurbinePowerRate,
-          this.chartData.TurbineRunRate,
-          this.chartData.WindSpeedAvr,
-          this.chartData.Thi,
-          this.chartData.Ws,
-        ],
-        theta: [
-          "风机能量利用率",
-          "风机可利用率",
-          "平均风速",
-          "利用小时",
-          "功率曲线一致性系数",
-        ],
-        // r: [...values, values[0]], // 闭合多边形,起点与终点一致
-        // theta: [...keys, keys[0]], // 闭合多边形,起点与终点一致
-        fill: "toself", // 填充多边形区域
-        name: this.chartData.wind_turbine_name + "机组指标",
-        marker: {
-          color: "#636efc",
+      // 计算最小值
+      this.minValues = data[0].map((_, colIndex) =>
+        Math.min(...data.map((row) => row[colIndex]))
+      );
+
+      // 计算中位值
+      this.medianValues = this.calculateMedian(data);
+    },
+    // 计算每列的中位值
+    calculateMedian(data) {
+      return data[0].map((_, colIndex) => {
+        const columnData = data
+          .map((row) => parseFloat(row[colIndex])) // 将字符串转换为数字
+          .sort((a, b) => a - b); // 数字排序
+        const mid = Math.floor(columnData.length / 2);
+        return columnData.length % 2 === 0
+          ? (columnData[mid - 1] + columnData[mid]) / 2
+          : columnData[mid];
+      });
+    },
+    // 渲染雷达图
+    drawRadarChart() {
+      // 获取数据
+      const values = [
+        this.chartData.TurbinePowerRate,
+        this.chartData.TurbineRunRate,
+        this.chartData.WindSpeedAvr,
+        this.chartData.Thi,
+        this.chartData.Ws,
+      ];
+
+      // 雷达图的指示器,使用最大值、最小值和中位值来动态设置
+      const indicators = [
+        {
+          name: "风机能量利用率",
+          max: this.maxValues[0],
+          min: this.minValues[0],
         },
-        line: {
-          color: "#636efc", // 多边形边框颜色
-          width: 2, // 边框宽度
+        {
+          name: "风机可利用率",
+          max: this.maxValues[1],
+          min: this.minValues[1],
         },
-      };
+        { name: "平均风速", max: this.maxValues[2], min: this.minValues[2] },
+        { name: "利用小时", max: this.maxValues[3], min: this.minValues[3] },
+        {
+          name: "功率曲线一致性系数",
+          max: this.maxValues[4],
+          min: this.minValues[4],
+        },
+      ];
 
-      // 雷达图布局
-      const layout = {
-        polar: {
-          bgcolor: "#e5ecf6", // 设置背景色为黄色
-          radialaxis: {
-            showline: false,
-            visible: false,
-            range: [Math.min(...values) * 1.1, Math.max(...values) * 1.1], // 设置范围
-            gridcolor: "white", // 设置径向网格线为白色
-          },
-          gridshape: "linear", //设置形状默认圆形,可以设置为linear多边形
-          angularaxis: {
-            showline: false, // 隐藏 `angularaxis` 线
-            showticklabels: true, // 隐藏角度标签
-            ticks: false, // 隐藏刻度
-            gridcolor: "white", // 设置角度网格线为白色
+      // 构建 ECharts 配置项
+      const option = {
+        title: {
+          text: this.chartData.wind_turbine_name + "机组指标",
+          left: "center",
+        },
+        tooltip: {
+          trigger: "item",
+        },
+        radar: {
+          indicator: indicators,
+          center: ["45%", "45%"], // 雷达图的位置
+          radius: "50%", // 设置雷达图的半径
+          splitNumber: 5, // 设置雷达图网格的数量
+        },
+        toolbox: {
+          feature: {
+            saveAsImage: { show: true },
           },
         },
-        showlegend: false, // 隐藏图例
-        title: this.chartData.wind_turbine_name + "机组指标",
+        series: [
+          {
+            name: this.chartData.wind_turbine_name + "机组指标",
+            type: "radar",
+            data: [
+              {
+                value: values,
+                name: this.chartData.wind_turbine_name + "机组指标",
+                lineStyle: {
+                  width: 2, // 边框宽度
+                  color: "#636efc", // 边框颜色
+                },
+                areaStyle: {
+                  color: "rgba(99, 110, 252, 0.3)", // 填充区域的颜色
+                },
+              },
+            ],
+          },
+          {
+            name: "中位值",
+            type: "radar",
+            data: [
+              {
+                value: this.medianValues,
+                name: "中位值",
+                lineStyle: {
+                  width: 2, // 边框宽度
+                  color: "#f39c12", // 中位值线条颜色
+                  type: "dashed", // 中位值线条类型(虚线)
+                },
+                areaStyle: {
+                  color: "rgba(243, 156, 18, 0.3)", // 中位值的填充区域颜色
+                },
+              },
+            ],
+          },
+        ],
       };
 
-      // 渲染图表
-      Plotly.react(this.$refs.radarChart, [trace], layout);
+      // 使用 ECharts 渲染雷达图
+      const chart = echarts.init(this.$refs.radarChart);
+      chart.setOption(option);
+    },
+    // 图表调整大小
+    resizeChart() {
+      const chart = echarts.getInstanceByDom(this.$refs.radarChart);
+      if (chart) {
+        chart.resize();
+      }
     },
   },
 };

+ 2 - 2
vue.config.js

@@ -67,8 +67,8 @@ module.exports = {
         // 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://106.120.102.238:16700", // 外网16700  生产16600
+        target: "http://106.120.102.238:26500", //外网演示环境
+        // target: "http://106.120.102.238:16700", // 外网16700  生产16600
         // target: "http://10.96.137.5",
         changeOrigin: true,
         pathRewrite: {