liujiejie 3 settimane fa
parent
commit
a3c07c3b0e

+ 8 - 8
.env.dt

@@ -45,15 +45,15 @@ VUE_APP_MAPVIEW=/tiles/{z}/{x}/{y}.png
 # # 乡镇/街道/村注记:nginx 需单独 alias 到 map/tiles/places/
 # VUE_APP_MAPVIEW_PLACES=/tiles_map/places/{z}/{x}/{y}.png
 # 公司配置——————————————————————————————————————————————————————————————
-# VUE_APP_MAP="http://192.168.50.235:8000"
-# VUE_APP_APIPROXY='http://192.168.50.235:16200'
-# VUE_APP_HEALTH_APIPROXY='http://192.168.50.235:16880'
-# VUE_APP_DatangEnosData_APIPROXY='http://192.168.50.235:8899'
+VUE_APP_MAP="http://192.168.50.235:8000"
+VUE_APP_APIPROXY='http://192.168.50.235:16200'
+VUE_APP_HEALTH_APIPROXY='http://192.168.50.235:16880'
+VUE_APP_DatangEnosData_APIPROXY='http://192.168.50.235:8899'
 # 大唐配置——————————————————————————————————————————————————————————————
-VUE_APP_APIPROXY='http://10.172.12.211:16200'
-VUE_APP_MAP="http://10.172.12.211:8899"
-VUE_APP_HEALTH_APIPROXY='http://10.172.12.211:16880'
-VUE_APP_DatangEnosData_APIPROXY='http://10.172.12.212:8101'
+# VUE_APP_APIPROXY='http://10.172.12.211:16200'
+# VUE_APP_MAP="http://10.172.12.211:8899"
+# VUE_APP_HEALTH_APIPROXY='http://10.172.12.211:16880'
+# VUE_APP_DatangEnosData_APIPROXY='http://10.172.12.212:8101'
 # —————————————————————————————————————————————————————————————————————
 VUE_APP_WZLAPIPROXY='http://192.168.50.241:9002'
 # VUE_APP_ETLAPIPROXY='http://192.168.50.241:9002'

+ 70 - 0
.env.gzly

@@ -0,0 +1,70 @@
+###
+ # @Author: your name
+ # @Date: 2026-03-06 11:19:04
+ # @LastEditTime: 2026-07-29 11:14:50
+ # @LastEditors: milo-MacBook-Pro.local
+ # @Description: In User Settings Edit
+ # @FilePath: /performance-test/.env.dt
+### 
+#这里需要在router/index.js 文件中进行判断cockpitComponent;
+VUE_APP_HOME_COM="../views/admin/cockpitManage/Index.vue"
+VUE_APP_THEM="tech-blue"
+VUE_APP_ISSHOWHD='default'
+VUE_APP_Helath='dev'
+VUE_APP_TITLE='机组健康评估与性能检测系统'
+VUE_APP_PROJECT='dt'
+# 本地开发页面 IP/端口(改后需重启 npm run serve:dt)
+# 0.0.0.0:可用本机局域网 IP 访问;127.0.0.1:仅本机
+VUE_APP_DEV_HOST=0.0.0.0
+VUE_APP_DEV_PORT=8080
+# #外网
+# VUE_APP_MAPVIEW=/tiles/{z}/{x}/{y}.png
+# VUE_APP_MAPVIEW= "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png" # 地图废除
+# VUE_APP_UPLOAD="http://106.120.102.238:16700/energy-manage-service/api/check/upload"
+# VUE_APP_APIPROXY='http://106.120.102.238:16700'
+# VUE_APP_HEALTH_APIPROXY='http://106.120.102.238:16880'
+# VUE_APP_DatangEnosData_APIPROXY='http://106.120.102.238:8899'
+# VUE_APP_MAP='http://106.120.102.238:18080'
+# VUE_APP_WZLAPIPROXY='http://106.120.102.238:18080/WindTransDev'
+# VUE_APP_ETLAPIPROXY='http://106.120.102.238:18080/WindTransDev'
+# VUE_APP_AnalysisMultiAPIPROXY='http://106.120.102.238:28999/AnalysisMulti'
+# #自定义算法文佳 目前无法使用,可能是服务未启动
+# VUE_APP_sAlgorithmAPIPROXY='http://106.120.102.238:58880'
+# VUE_APP_databaseApiAPIPROXY='http://106.120.102.238:58880'
+# VUE_APP_downLoadChartAPIPROXY='http://127.0.0.1:3001'
+# #暂时不知下载报告内网dev 环境地址
+# VUE_APP_downLoadChartAPIPROXY='http://106.120.102.238:58880/downLoadChart'
+
+#内网
+
+VUE_APP_MAPVIEW=/tiles/{z}/{x}/{y}.png
+# 卫星底图:nginx 若 alias 到 map/tiles/s2/,保持此路径
+# VUE_APP_MAPVIEW=/tiles_map/{z}/{x}/{y}.jpg
+# # 行政区划叠加:nginx 需单独 alias 到 map/tiles/admin/
+# VUE_APP_MAPVIEW_ADMIN=/tiles_map/admin/{z}/{x}/{y}.png
+# # 乡镇/街道/村注记:nginx 需单独 alias 到 map/tiles/places/
+# VUE_APP_MAPVIEW_PLACES=/tiles_map/places/{z}/{x}/{y}.png
+# 公司配置——————————————————————————————————————————————————————————————
+VUE_APP_MAP="http://192.168.50.235:8000"
+VUE_APP_APIPROXY='http://192.168.50.235:16200'
+VUE_APP_HEALTH_APIPROXY='http://192.168.50.235:16880'
+VUE_APP_DatangEnosData_APIPROXY='http://192.168.50.235:8899'
+# 贵州配置——————————————————————————————————————————————————————————————
+VUE_APP_UPLOAD="http://10.172.12.211:16200/energy-manage-service/api/check/upload"
+# VUE_APP_APIPROXY='http://10.172.12.211:16200'
+# VUE_APP_MAP="http://10.172.12.211:8899"
+# VUE_APP_HEALTH_APIPROXY='http://10.172.12.211:16880'
+# VUE_APP_DatangEnosData_APIPROXY='http://10.172.12.212:8101'
+# —————————————————————————————————————————————————————————————————————
+VUE_APP_WZLAPIPROXY='http://192.168.50.241:9002'
+# VUE_APP_ETLAPIPROXY='http://192.168.50.241:9002'
+VUE_APP_ETLAPIPROXY='http://192.168.50.241:9000/transDataWebProd/'
+# #自定义算法文佳 目前无法使用,可能是服务未启动
+VUE_APP_sAlgorithmAPIPROXY='http://192.168.50.235:8998/AnalysisMulti'
+VUE_APP_databaseApiAPIPROXY='http://192.168.50.234:3002'
+#暂时不知健康评估内网dev 环境地址
+VUE_APP_AnalysisMultiAPIPROXY='http://192.168.50.235:8998/AnalysisMulti'
+#暂时不知下载报告内网dev 环境地址
+# VUE_APP_downLoadChartAPIPROXY='http://10.172.12.211:16200/downLoadChart'
+# 本地 downLoadServer:target 不要带 /downLoadChart(vue.config 会 pathRewrite 去掉前缀)
+VUE_APP_downLoadChartAPIPROXY='http://127.0.0.1:3001'

+ 174 - 0
src/views/windResourceWake/components/WrwFilterBar.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="wrw-filter-bar">
+    <div class="wrw-filter-item wrw-filter-item--farm">
+      <span class="wrw-filter-label">风场:</span>
+      <selecttree
+        class="wrw-filter-selecttree"
+        size="small"
+        filterable
+        popper-class="wrw-tree-popper"
+        placeholder="请选择风场"
+        :list="parentOpt"
+        v-model="localFarm"
+        @change="handleSelectChange"
+        :defaultParentProps="defaultParentProps"
+      />
+    </div>
+    <div class="wrw-filter-item">
+      <span class="wrw-filter-label">时间:</span>
+      <el-date-picker
+        v-model="localDate"
+        type="date"
+        placeholder="选择日期"
+        size="small"
+        value-format="yyyy-MM-dd"
+        class="wrw-filter-date"
+        clearable
+        popper-class="wrw-date-popper"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import selecttree from "@/components/selecttree.vue";
+import { getSysOrganizationAuthTreeByRoleId } from "@/api/ledger.js";
+
+export default {
+  name: "WrwFilterBar",
+  components: {
+    selecttree,
+  },
+  props: {
+    farm: { type: String, default: "" },
+    date: { type: String, default: "2024-04-28" },
+  },
+  data() {
+    return {
+      localFarm: this.farm,
+      localDate: this.date,
+      parentOpt: [],
+      defaultParentProps: {
+        children: "children",
+        label: "companyName",
+        value: "codeNumber",
+      },
+    };
+  },
+  watch: {
+    farm(val) {
+      this.localFarm = val;
+    },
+    date(val) {
+      this.localDate = val;
+    },
+    localFarm(val) {
+      this.$emit("update:farm", val);
+    },
+    localDate(val) {
+      this.$emit("update:date", val);
+    },
+  },
+  created() {
+    this.loadTree();
+  },
+  methods: {
+    async loadTree() {
+      try {
+        const res = await getSysOrganizationAuthTreeByRoleId();
+        const processedData = this.processTreeData(res.data || []);
+        this.parentOpt = processedData;
+
+        const defaultNode = this.getDefaultTreeNode(processedData);
+        if (defaultNode) {
+          this.$nextTick(() => {
+            this.handleSelectChange(defaultNode);
+          });
+        }
+      } catch (error) {
+        console.error("加载组织树失败:", error);
+      }
+    },
+    getDefaultTreeNode(treeData) {
+      return (
+        this.findFirstFieldNode(treeData) ||
+        this.findFirstLeafNode(treeData)
+      );
+    },
+    /** 默认选择风场(第三级 field 节点),不选择二级公司节点 */
+    findFirstFieldNode(nodes) {
+      const list = Array.isArray(nodes) ? nodes : [];
+      for (const node of list) {
+        if (node?.codeType === "field") return node;
+        const fieldNode = this.findFirstFieldNode(node?.children);
+        if (fieldNode) return fieldNode;
+      }
+      return null;
+    },
+    /** 兼容无 codeType 的组织树数据,兜底选择第一个叶子节点 */
+    findFirstLeafNode(nodes) {
+      const list = Array.isArray(nodes) ? nodes : [];
+      for (const node of list) {
+        if (!node?.children?.length) return node;
+        const leafNode = this.findFirstLeafNode(node.children);
+        if (leafNode) return leafNode;
+      }
+      return null;
+    },
+    processTreeData(treeData) {
+      const processedData = [];
+      const processNode = (node) => {
+        if (node.codeType === "field") {
+          node.companyName = node.fieldName;
+        }
+        if (node.children && node.children.length > 0) {
+          node.children.forEach(processNode);
+        }
+      };
+      treeData.forEach((root) => {
+        processNode(root);
+        processedData.push(root);
+      });
+      return processedData;
+    },
+    handleSelectChange(data) {
+      if (!data || !data.codeNumber) return;
+      this.localFarm = data.codeNumber;
+      this.$emit("update:farm", data.codeNumber);
+      this.$emit("farm-change", data);
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.wrw-filter-item--farm {
+  gap: 6px;
+}
+
+.wrw-filter-farm-icon {
+  color: #5ab3dc;
+  font-size: 14px;
+  flex-shrink: 0;
+}
+
+.wrw-filter-selecttree {
+  width: 180px;
+
+  ::v-deep .el-input__inner {
+    background: transparent !important;
+    border: none !important;
+    color: #d9efff !important;
+    padding-left: 0 !important;
+    padding-right: 28px !important;
+    height: 28px;
+    line-height: 28px;
+    cursor: text;
+  }
+
+  ::v-deep .el-input__icon {
+    color: #5ab3dc !important;
+    cursor: pointer;
+  }
+}
+</style>

+ 238 - 0
src/views/windResourceWake/components/WrwOverviewTab.vue

@@ -0,0 +1,238 @@
+<template>
+  <div class="wrw-overview-tab">
+    <div class="wrw-overview-section">
+      <div class="wrw-overview-section-head">
+        <div>
+          <div class="wrw-overview-section-title">各机组风速分布</div>
+          <p class="wrw-overview-section-desc">各机组风速概率密度对比</p>
+        </div>
+      </div>
+      <div class="wrw-card wrw-overview-card">
+        <div
+          v-if="hasWindDistData"
+          ref="windDistRef"
+          class="wrw-overview-chart"
+        ></div>
+        <div v-else class="wrw-chart-empty">暂无风速分布数据</div>
+      </div>
+    </div>
+    <div class="wrw-overview-section">
+      <div class="wrw-overview-section-head">
+        <div>
+          <div class="wrw-overview-section-title">风向玫瑰图</div>
+          <p class="wrw-overview-section-desc">{{ roseRangeDesc }}</p>
+        </div>
+        <div class="wrw-overview-section-actions">
+          <div class="wrw-rose-range-tabs">
+            <button
+              v-for="tab in roseRangeTabs"
+              :key="tab.key"
+              type="button"
+              class="wrw-tab-btn"
+              :class="{ active: roseRange === tab.key }"
+              @click="switchRoseRange(tab.key)"
+            >
+              {{ tab.label }}
+            </button>
+          </div>
+          <div v-if="displayTurbines.length" class="wrw-overview-sort">
+            <span class="wrw-overview-sort__label">风机名称排序</span>
+            <select v-model="roseSortOrder" class="wrw-overview-sort__select">
+              <option value="asc">升序</option>
+              <option value="desc">降序</option>
+            </select>
+          </div>
+        </div>
+      </div>
+      <div class="wrw-card wrw-overview-card">
+        <template v-if="displayTurbines.length">
+          <div class="wrw-wind-rose-legend">
+            <span
+              v-for="(band, index) in roseSpeedBands"
+              :key="band"
+              class="wrw-wind-rose-legend-item"
+            >
+              <i :style="{ backgroundColor: roseColors[index] }"></i>
+              {{ band }}
+            </span>
+          </div>
+          <div class="wrw-wind-rose-grid">
+            <div
+              v-for="(turbine, index) in displayTurbines"
+              :key="turbine.engineId || turbine.engineName || index"
+              class="wrw-wind-rose-cell"
+            >
+              <div
+                :ref="'windRoseRef' + index"
+                class="wrw-wind-rose-cell-chart"
+              ></div>
+              <div class="wrw-wind-rose-cell-title">
+                {{ turbineLabel(turbine) }}
+              </div>
+            </div>
+          </div>
+        </template>
+        <div v-else class="wrw-chart-empty">暂无风向玫瑰图数据</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from "echarts";
+import {
+  getWindDistOption,
+  getSingleWindRoseOption,
+  ROSE_SPEED_BANDS,
+  ROSE_COLORS,
+} from "../utils/overviewChartOptions";
+import { sortByTurbineName } from "../utils/wrwTableUtils";
+
+export default {
+  name: "WrwOverviewTab",
+  props: {
+    chartData: {
+      type: Object,
+      default: () => ({}),
+    },
+  },
+  data() {
+    return {
+      roseColors: ROSE_COLORS,
+      roseSortOrder: "asc",
+      roseRange: "day",
+      roseRangeTabs: [
+        { key: "day", label: "当天" },
+        { key: "30d", label: "30天" },
+      ],
+      charts: {},
+      inited: false,
+    };
+  },
+  computed: {
+    turbineList() {
+      return this.chartData?.getWakeTurbineList || [];
+    },
+    hasWindDistData() {
+      return (this.chartData?.windSpeedDistribution?.turbines || []).length > 0;
+    },
+    activeRoseData() {
+      return this.roseRange === "30d"
+        ? this.chartData?.wakeRose30d
+        : this.chartData?.wakeRose;
+    },
+    roseRangeDesc() {
+      return this.roseRange === "30d"
+        ? "各机组近30天风向与风速段分布"
+        : "各机组当日风向与风速段分布";
+    },
+    roseSpeedBands() {
+      const bands = this.activeRoseData?.speedBands;
+      return Array.isArray(bands) && bands.length ? bands : ROSE_SPEED_BANDS;
+    },
+    displayTurbines() {
+      const roseTurbines = this.activeRoseData?.turbines;
+      if (!Array.isArray(roseTurbines) || !roseTurbines.length) return [];
+      return sortByTurbineName(
+        roseTurbines,
+        (item) => this.turbineLabel(item),
+        this.roseSortOrder,
+      );
+    },
+  },
+  watch: {
+    chartData: {
+      deep: true,
+      handler() {
+        this.refreshCharts();
+      },
+    },
+    roseSortOrder() {
+      this.refreshCharts();
+    },
+    roseRange() {
+      this.refreshCharts();
+    },
+  },
+  mounted() {
+    window.addEventListener("resize", this.handleResize);
+  },
+  beforeDestroy() {
+    window.removeEventListener("resize", this.handleResize);
+    this.disposeCharts();
+  },
+  methods: {
+    switchRoseRange(range) {
+      if (this.roseRange === range) return;
+      this.roseRange = range;
+    },
+    turbineLabel(turbine, turbineList = this.turbineList) {
+      const engineId = turbine?.engineId;
+      const hit = (turbineList || []).find(
+        (item) => String(item?.engineId) === String(engineId),
+      );
+      return (
+        turbine?.engineName ||
+        hit?.engineName ||
+        turbine?.displayName ||
+        turbine?.engineId ||
+        turbine?.name ||
+        "—"
+      );
+    },
+    refreshCharts() {
+      this.disposeCharts();
+      this.$nextTick(() => {
+        this.$nextTick(() => {
+          this.initCharts();
+        });
+      });
+    },
+    initCharts() {
+      if (this.hasWindDistData) {
+        this.initChart(
+          "windDist",
+          this.$refs.windDistRef,
+          getWindDistOption(this.chartData?.windSpeedDistribution, {
+            turbineList: this.turbineList,
+            sortOrder: "asc",
+          }),
+        );
+      }
+      this.displayTurbines.forEach((turbine, index) => {
+        const ref = this.$refs[`windRoseRef${index}`];
+        const el = Array.isArray(ref) ? ref[0] : ref;
+        this.initChart(
+          `windRose${index}`,
+          el,
+          getSingleWindRoseOption(index, this.activeRoseData, turbine),
+        );
+      });
+
+      this.inited = true;
+    },
+    initChart(key, el, option) {
+      if (!el) return;
+      if (this.charts[key]) {
+        this.charts[key].dispose();
+      }
+      this.charts[key] = echarts.init(el);
+      this.charts[key].setOption(option);
+    },
+    disposeCharts() {
+      Object.keys(this.charts).forEach((key) => {
+        if (this.charts[key]) {
+          this.charts[key].dispose();
+        }
+      });
+      this.charts = {};
+      this.inited = false;
+    },
+    handleResize() {
+      Object.values(this.charts).forEach((chart) => {
+        if (chart) chart.resize();
+      });
+    },
+  },
+};
+</script>

+ 166 - 0
src/views/windResourceWake/components/WrwWakeTab.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="wrw-wake-tab">
+    <div class="wrw-section-title">速度与损失分布</div>
+
+    <div class="wrw-row">
+      <div class="wrw-col wrw-card">
+        <el-image
+          v-if="scatter1Image"
+          class="wrw-chart wrw-chart--image"
+          :src="scatter1Image"
+          fit="contain"
+          :preview-src-list="[scatter1Image]"
+        />
+        <div
+          v-else-if="hasScatter1Data"
+          ref="scatter1Ref"
+          class="wrw-chart"
+        ></div>
+        <div v-else class="wrw-chart-empty wrw-chart">暂无数据</div>
+      </div>
+      <div class="wrw-col wrw-card">
+        <div v-if="hasScatter2Data" ref="scatter2Ref" class="wrw-chart"></div>
+        <div v-else class="wrw-chart-empty wrw-chart">暂无分析结果</div>
+      </div>
+    </div>
+
+    <div class="wrw-section-title">尾流影响评估</div>
+
+    <div class="wrw-card">
+      <div v-if="hasBarData" class="wrw-bar-charts">
+        <div ref="barLossRef" class="wrw-chart wrw-chart--bar"></div>
+        <div ref="barTurbulenceRef" class="wrw-chart wrw-chart--bar"></div>
+      </div>
+      <div v-else class="wrw-chart-empty wrw-chart wrw-chart--bar">
+        暂无数据
+      </div>
+      <WrwWakeTable
+        v-if="hasBarData || tableData.length"
+        :table-data="tableData"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from "echarts";
+import WrwWakeTable from "./WrwWakeTable.vue";
+import {
+  getScatter1Option,
+  getScatter2Option,
+  getLossDelLossBarOption,
+  getLossDelTurbulenceBarOption,
+} from "../utils/wakeChartOptions";
+
+export default {
+  name: "WrwWakeTab",
+  components: { WrwWakeTable },
+  props: {
+    chartData: {
+      type: Object,
+      default: () => ({}),
+    },
+    tableData: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      charts: {},
+      inited: false,
+    };
+  },
+  computed: {
+    scatter1Image() {
+      return this.chartData?.wakeDistribute?.__imageUrl || "";
+    },
+    hasScatter1Data() {
+      const points = this.chartData?.wakeDistribute?.points;
+      return Array.isArray(points) && points.length > 0;
+    },
+    hasScatter2Data() {
+      const points = this.chartData?.wakeLossConfident?.points;
+      return Array.isArray(points) && points.length > 0;
+    },
+    hasBarData() {
+      const items = this.chartData?.velocityDeficitBar?.items;
+      return Array.isArray(items) && items.length > 0;
+    },
+  },
+  watch: {
+    chartData: {
+      deep: true,
+      handler() {
+        this.refreshCharts();
+      },
+    },
+  },
+  mounted() {
+    window.addEventListener("resize", this.handleResize);
+  },
+  beforeDestroy() {
+    window.removeEventListener("resize", this.handleResize);
+    this.disposeCharts();
+  },
+  methods: {
+    refreshCharts() {
+      this.disposeCharts();
+      this.$nextTick(() => {
+        this.initCharts();
+      });
+    },
+    initCharts() {
+      if (!this.scatter1Image && this.hasScatter1Data) {
+        this.initChart(
+          "scatter1",
+          this.$refs.scatter1Ref,
+          getScatter1Option(this.chartData?.wakeDistribute),
+        );
+      }
+      if (this.hasScatter2Data) {
+        this.initChart(
+          "scatter2",
+          this.$refs.scatter2Ref,
+          getScatter2Option(this.chartData?.wakeLossConfident),
+        );
+      }
+      if (this.hasBarData) {
+        this.initChart(
+          "barLoss",
+          this.$refs.barLossRef,
+          getLossDelLossBarOption(this.chartData?.velocityDeficitBar),
+        );
+        this.initChart(
+          "barTurbulence",
+          this.$refs.barTurbulenceRef,
+          getLossDelTurbulenceBarOption(this.chartData?.velocityDeficitBar),
+        );
+      }
+      this.inited = true;
+    },
+    initChart(key, el, option) {
+      if (!el) return;
+      if (this.charts[key]) {
+        this.charts[key].dispose();
+      }
+      this.charts[key] = echarts.init(el);
+      this.charts[key].setOption(option);
+    },
+    disposeCharts() {
+      Object.keys(this.charts).forEach((key) => {
+        if (this.charts[key]) {
+          this.charts[key].dispose();
+        }
+      });
+      this.charts = {};
+      this.inited = false;
+    },
+    handleResize() {
+      Object.values(this.charts).forEach((chart) => {
+        if (chart) chart.resize();
+      });
+    },
+  },
+};
+</script>

+ 373 - 0
src/views/windResourceWake/components/WrwWakeTable.vue

@@ -0,0 +1,373 @@
+<template>
+  <div class="wrw-wake-table">
+    <template v-if="tableData.length">
+      <div class="wrw-table-toolbar">
+        <div class="wrw-table-toolbar__group">
+          <span class="wrw-table-toolbar__label">筛选</span>
+          <select v-model="affectedFilter" class="wrw-table-toolbar__select">
+            <option value="">全部</option>
+            <option value="yes">受尾流影响</option>
+            <option value="no">不受尾流影响</option>
+          </select>
+        </div>
+      </div>
+      <div class="wrw-table-wrapper">
+        <table class="wrw-table">
+          <thead>
+            <tr>
+              <th>
+                <span class="wrw-table-th">
+                  <span>风机名称</span>
+                  <button
+                    type="button"
+                    class="wrw-table-sort-btn"
+                    :class="{ active: sortKey === 'name' }"
+                    :title="sortTitle('name')"
+                    @click="toggleSort('name')"
+                  >
+                    <i :class="sortIconClass('name')"></i>
+                  </button>
+                </span>
+              </th>
+              <th>是否受尾流影响</th>
+              <th>
+                <span class="wrw-table-th">
+                  <span>附加湍流强度</span>
+                  <button
+                    type="button"
+                    class="wrw-table-sort-btn"
+                    :class="{ active: sortKey === 'turbulence' }"
+                    :title="sortTitle('turbulence')"
+                    @click="toggleSort('turbulence')"
+                  >
+                    <i :class="sortIconClass('turbulence')"></i>
+                  </button>
+                </span>
+              </th>
+              <th>
+                <span class="wrw-table-th">
+                  <span>尾流速度损耗(m/s)</span>
+                  <button
+                    type="button"
+                    class="wrw-table-sort-btn"
+                    :class="{ active: sortKey === 'loss' }"
+                    :title="sortTitle('loss')"
+                    @click="toggleSort('loss')"
+                  >
+                    <i :class="sortIconClass('loss')"></i>
+                  </button>
+                </span>
+              </th>
+              <th>
+                <span class="wrw-table-th">
+                  <span>置信度</span>
+                  <button
+                    type="button"
+                    class="wrw-table-sort-btn"
+                    :class="{ active: sortKey === 'confidence' }"
+                    :title="sortTitle('confidence')"
+                    @click="toggleSort('confidence')"
+                  >
+                    <i :class="sortIconClass('confidence')"></i>
+                  </button>
+                </span>
+              </th>
+              <th>尾流速度亏损分布图</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr v-for="item in pageData" :key="item.engineId || item.name">
+              <td>{{ item.name }}</td>
+              <td>
+                <span
+                  :class="
+                    item.affected === 'yes' ? 'wrw-status-yes' : 'wrw-status-no'
+                  "
+                >
+                  {{ item.affected === "yes" ? "是" : "否" }}
+                </span>
+              </td>
+              <td :class="getTurbulenceClass(item.turbulence)">
+                {{ item.turbulence }}
+              </td>
+              <td :class="getLossClass(item.loss)">{{ item.loss }}</td>
+              <td :class="getConfidenceClass(item.confidence)">
+                {{ item.confidence }}
+              </td>
+              <td>
+                <div class="wrw-image-container" title="点击查看大图">
+                  <el-image
+                    class="wrw-table-thumb"
+                    :src="item.image"
+                    :preview-src-list="[item.image]"
+                    fit="cover"
+                  >
+                    <div slot="error" class="wrw-table-thumb-error">
+                      <i class="el-icon-picture-outline"></i>
+                    </div>
+                  </el-image>
+                </div>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="wrw-pagination">
+        <button
+          type="button"
+          :disabled="currentPage === 1"
+          @click="goToPage(1)"
+        >
+          首页
+        </button>
+        <button type="button" :disabled="currentPage === 1" @click="prevPage">
+          上一页
+        </button>
+        <span class="wrw-page-info"
+          >第 {{ currentPage }} 页 / 共 {{ totalPages }} 页</span
+        >
+        <button
+          type="button"
+          :disabled="currentPage === totalPages"
+          @click="nextPage"
+        >
+          下一页
+        </button>
+        <button
+          type="button"
+          :disabled="currentPage === totalPages"
+          @click="goToPage(totalPages)"
+        >
+          末页
+        </button>
+        <select
+          v-model.number="pageSize"
+          class="wrw-page-size-select"
+          @change="handlePageSizeChange"
+        >
+          <option :value="3">每页3条</option>
+          <option :value="5">每页5条</option>
+          <option :value="10">每页10条</option>
+        </select>
+      </div>
+    </template>
+    <div v-else class="wrw-table-empty">暂无数据</div>
+  </div>
+</template>
+
+<script>
+import {
+  compareTurbineName,
+  getTurbulenceClass,
+  getLossClass,
+  getConfidenceClass,
+} from "../utils/wrwTableUtils";
+
+const SORT_LABELS = {
+  name: "风机名称",
+  turbulence: "附加湍流强度",
+  loss: "尾流速度损耗",
+  confidence: "置信度",
+};
+
+export default {
+  name: "WrwWakeTable",
+  props: {
+    tableData: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      currentPage: 1,
+      pageSize: 5,
+      affectedFilter: "",
+      sortKey: "name",
+      sortDirection: "asc",
+    };
+  },
+  computed: {
+    totalPages() {
+      return Math.max(1, Math.ceil(this.viewTableData.length / this.pageSize));
+    },
+    viewTableData() {
+      const list = Array.isArray(this.tableData) ? [...this.tableData] : [];
+      const filtered = this.affectedFilter
+        ? list.filter(
+            (item) => String(item.affected || "") === this.affectedFilter,
+          )
+        : list;
+      const direction = this.sortDirection === "desc" ? -1 : 1;
+      return filtered.sort((a, b) => this.compareRows(a, b) * direction);
+    },
+    pageData() {
+      const start = (this.currentPage - 1) * this.pageSize;
+      return this.viewTableData.slice(start, start + this.pageSize);
+    },
+  },
+  watch: {
+    tableData() {
+      this.currentPage = 1;
+    },
+    affectedFilter() {
+      this.currentPage = 1;
+    },
+    sortKey() {
+      this.currentPage = 1;
+    },
+    sortDirection() {
+      this.currentPage = 1;
+    },
+    pageSize() {
+      if (this.currentPage > this.totalPages) {
+        this.currentPage = this.totalPages;
+      }
+    },
+  },
+  methods: {
+    getTurbulenceClass,
+    getLossClass,
+    getConfidenceClass,
+    sortTitle(key) {
+      const label = SORT_LABELS[key] || key;
+      if (this.sortKey !== key) {
+        return `按${label}排序`;
+      }
+      return this.sortDirection === "asc"
+        ? `${label}升序,点击切换降序`
+        : `${label}降序,点击切换升序`;
+    },
+    sortIconClass(key) {
+      if (this.sortKey !== key) {
+        return "el-icon-d-caret";
+      }
+      return this.sortDirection === "asc"
+        ? "el-icon-caret-top"
+        : "el-icon-caret-bottom";
+    },
+    toggleSort(key) {
+      if (this.sortKey === key) {
+        this.sortDirection = this.sortDirection === "asc" ? "desc" : "asc";
+        return;
+      }
+      this.sortKey = key;
+      this.sortDirection = "asc";
+    },
+    compareRows(a, b) {
+      switch (this.sortKey) {
+        case "name":
+          return compareTurbineName(a?.name, b?.name);
+        case "turbulence":
+          return this.compareNumber(a?.turbulence, b?.turbulence);
+        case "loss":
+          return this.compareNumber(a?.loss, b?.loss);
+        case "confidence":
+          return this.compareNumber(
+            this.parseConfidence(a?.confidence),
+            this.parseConfidence(b?.confidence),
+          );
+        default:
+          return 0;
+      }
+    },
+    compareNumber(left, right) {
+      const safeLeft = Number(left);
+      const safeRight = Number(right);
+      const numLeft = Number.isFinite(safeLeft) ? safeLeft : -Infinity;
+      const numRight = Number.isFinite(safeRight) ? safeRight : -Infinity;
+      return numLeft - numRight;
+    },
+    parseConfidence(value) {
+      const raw = String(value ?? "").replace("%", "").trim();
+      const num = Number(raw);
+      return Number.isFinite(num) ? num : NaN;
+    },
+    goToPage(page) {
+      if (page < 1 || page > this.totalPages) return;
+      this.currentPage = page;
+    },
+    prevPage() {
+      if (this.currentPage > 1) this.currentPage -= 1;
+    },
+    nextPage() {
+      if (this.currentPage < this.totalPages) this.currentPage += 1;
+    },
+    handlePageSizeChange() {
+      this.currentPage = 1;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.wrw-table-toolbar {
+  display: flex;
+  align-items: center;
+  justify-content: flex-start;
+  gap: 10px;
+  margin: 10px 0 6px;
+}
+
+.wrw-table-toolbar__group {
+  display: inline-flex;
+  align-items: center;
+  gap: 6px;
+}
+
+.wrw-table-toolbar__label {
+  font-size: 12px;
+  color: var(--wrw-chart-text, #8fa3c8);
+}
+
+.wrw-table-toolbar__select {
+  height: 26px;
+  min-width: 140px;
+  border-radius: 6px;
+  border: 1px solid var(--wrw-chart-axis, rgba(111, 239, 252, 0.3));
+  background: rgba(7, 29, 51, 0.75);
+  color: var(--wrw-chart-text, #8fa3c8);
+  font-size: 12px;
+  padding: 0 8px;
+}
+
+.wrw-table-th {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  gap: 4px;
+  white-space: nowrap;
+}
+
+.wrw-table-sort-btn {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  width: 18px;
+  height: 18px;
+  padding: 0;
+  border: none;
+  border-radius: 4px;
+  background: transparent;
+  color: inherit;
+  cursor: pointer;
+  opacity: 0.75;
+  transition: opacity 0.2s ease, background 0.2s ease;
+
+  &:hover {
+    opacity: 1;
+    background: rgba(255, 255, 255, 0.08);
+  }
+
+  &.active {
+    opacity: 1;
+    color: #6efffc;
+  }
+
+  i {
+    font-size: 12px;
+    line-height: 1;
+  }
+}
+</style>

+ 153 - 0
src/views/windResourceWake/index.vue

@@ -0,0 +1,153 @@
+<template>
+  <div
+    v-loading="loading"
+    class="wind-resource-wake-page"
+    element-loading-background="rgba(0, 12, 24, 0.45)"
+  >
+    <WrwFilterBar
+      :farm.sync="selectedFarm"
+      :date.sync="selectedDate"
+      @farm-change="handleFarmChange"
+    />
+
+    <div class="wrw-tab-bar">
+      <button
+        v-for="tab in tabs"
+        :key="tab.key"
+        type="button"
+        class="wrw-tab-btn"
+        :class="{ active: activeTab === tab.key }"
+        @click="switchTab(tab.key)"
+      >
+        {{ tab.label }}
+      </button>
+    </div>
+
+    <WrwOverviewTab
+      v-show="activeTab === 'overview'"
+      ref="overviewTab"
+      :chart-data="wakeChartData"
+    />
+    <WrwWakeTab
+      v-show="activeTab === 'wake'"
+      ref="wakeTab"
+      :chart-data="wakeChartData"
+      :table-data="wakeTableData"
+    />
+  </div>
+</template>
+
+<script>
+import WrwFilterBar from "./components/WrwFilterBar.vue";
+import WrwOverviewTab from "./components/WrwOverviewTab.vue";
+import WrwWakeTab from "./components/WrwWakeTab.vue";
+import { getWakeWindFarm } from "@/api/wakeAnalyse";
+import { loadWakePageData } from "./utils/wrwWakeMapper";
+
+function getYesterday() {
+  const date = new Date();
+  date.setDate(date.getDate() - 1);
+  const year = date.getFullYear();
+  const month = String(date.getMonth() + 1).padStart(2, "0");
+  const day = String(date.getDate()).padStart(2, "0");
+  return `${year}-${month}-${day}`;
+}
+
+export default {
+  name: "WindResourceWake",
+  components: {
+    WrwFilterBar,
+    WrwOverviewTab,
+    WrwWakeTab,
+  },
+  data() {
+    return {
+      activeTab: "overview",
+      selectedFarm: "",
+      selectedDate: getYesterday(),
+      loading: false,
+      wakeChartData: {},
+      wakeTableData: [],
+      tabs: [
+        { key: "overview", label: "资源概览" },
+        { key: "wake", label: "尾流情况" },
+      ],
+    };
+  },
+  watch: {
+    selectedFarm() {
+      this.fetchWakeData();
+    },
+    selectedDate() {
+      this.fetchWakeData();
+    },
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.initActiveTabCharts();
+      window.dispatchEvent(new Event("resize"));
+    });
+  },
+  methods: {
+    switchTab(tabKey) {
+      this.activeTab = tabKey;
+      this.$nextTick(() => {
+        this.initActiveTabCharts();
+      });
+    },
+    initActiveTabCharts() {
+      if (this.activeTab === "overview" && this.$refs.overviewTab) {
+        this.$refs.overviewTab.initCharts();
+      }
+      if (this.activeTab === "wake" && this.$refs.wakeTab) {
+        this.$refs.wakeTab.initCharts();
+      }
+    },
+    handleFarmChange() {
+      // selectedFarm 由 .sync 更新,watch 触发请求
+    },
+    async fetchWakeData() {
+      if (!this.selectedFarm) return;
+
+      this.loading = true;
+      try {
+        const params = { fieldCode: this.selectedFarm };
+        if (this.selectedDate) {
+          params.datatime = this.selectedDate;
+        }
+        const res = await getWakeWindFarm(params);
+        console.log(res?.data, "尾流表格数据");
+        const pageData = await loadWakePageData(res?.data);
+        this.wakeChartData = {
+          ...(pageData.charts || {}),
+          getWakeTurbineList:
+            pageData.turbineList || res?.data?.getWakeTurbineList || [],
+        };
+
+        this.wakeTableData = pageData.tableData || [];
+        console.log(this.wakeTableData, "尾流表格数据1");
+
+        if (pageData.meta?.dataDate && !this.selectedDate) {
+          this.selectedDate = pageData.meta.dataDate;
+        }
+
+        this.$nextTick(() => {
+          this.$nextTick(() => {
+            this.initActiveTabCharts();
+          });
+        });
+      } catch (error) {
+        console.error("加载尾流分析数据失败:", error);
+        this.wakeChartData = {};
+        this.wakeTableData = [];
+      } finally {
+        this.loading = false;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+@import "./styles/windResourceWake.scss";
+</style>

+ 964 - 0
src/views/windResourceWake/styles/windResourceWake.scss

@@ -0,0 +1,964 @@
+.wind-resource-wake-page {
+  height: 100%;
+  min-height: 0;
+  overflow-y: auto;
+  overflow-x: hidden;
+  padding: 20px;
+  box-sizing: border-box;
+  font-family: "Microsoft YaHei", system-ui, sans-serif;
+
+  *,
+  *::before,
+  *::after {
+    box-sizing: border-box;
+  }
+
+  .wrw-filter-date {
+    .el-input__prefix {
+      display: none !important;
+    }
+
+    &.el-input--prefix .el-input__inner {
+      padding-left: 0 !important;
+    }
+  }
+}
+
+.wrw-tab-bar {
+  display: flex;
+  gap: 12px;
+  margin: 16px 0 8px;
+}
+
+.wrw-row {
+  display: flex;
+  gap: 20px;
+  flex-wrap: wrap;
+}
+
+.wrw-col {
+  flex: 1;
+  min-width: 320px;
+}
+
+.wrw-chart {
+  height: 300px;
+  width: 100%;
+}
+
+.wrw-chart--bar {
+  height: 350px;
+}
+
+.wrw-bar-charts {
+  display: grid;
+  grid-template-columns: 1fr;
+  gap: 20px;
+}
+
+.wrw-chart--image {
+  display: block;
+  min-height: 300px;
+  background: var(--wrw-chart-grid-bg, rgba(6, 28, 48, 0.4));
+}
+
+.wrw-chart-empty {
+  min-height: 180px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: var(--wrw-chart-empty, #8db6d1);
+  font-size: 13px;
+}
+
+.wrw-table-empty {
+  min-height: 120px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: var(--wrw-chart-empty, #8db6d1);
+  font-size: 13px;
+  padding: 24px 0;
+}
+
+.wrw-overview-section {
+  margin-top: 18px;
+}
+
+.wrw-overview-section:first-child {
+  margin-top: 8px;
+}
+
+.wrw-overview-section-head {
+  display: flex;
+  align-items: flex-start;
+  justify-content: space-between;
+  gap: 12px;
+  flex-wrap: wrap;
+}
+
+.wrw-overview-section-actions {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+  flex-wrap: wrap;
+  flex-shrink: 0;
+  margin-top: 4px;
+}
+
+.wrw-rose-range-tabs {
+  display: inline-flex;
+  gap: 8px;
+}
+
+.wrw-rose-range-tabs .wrw-tab-btn {
+  padding: 4px 14px;
+  font-size: 12px;
+}
+
+.wrw-overview-sort {
+  display: inline-flex;
+  align-items: center;
+  gap: 6px;
+  flex-shrink: 0;
+}
+
+.wrw-overview-sort__label {
+  font-size: 12px;
+  color: var(--wrw-section-desc, #909399);
+}
+
+.wrw-overview-sort__select {
+  width: 108px;
+  height: 28px;
+  padding: 0 8px;
+  border-radius: 6px;
+  border: 1px solid var(--wrw-card-border, #dcdfe6);
+  background: var(--wrw-card-bg, #ffffff);
+  color: var(--wrw-section-title, #303133);
+  font-size: 12px;
+}
+
+.wrw-overview-chart {
+  width: 100%;
+  height: 400px;
+}
+
+.wrw-overview-chart-large {
+  height: 920px;
+  padding-bottom: 4px;
+}
+
+.wrw-wind-rose-grid {
+  display: grid;
+  grid-template-columns: repeat(3, minmax(0, 1fr));
+  gap: 12px 16px;
+}
+
+.wrw-wind-rose-cell {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  min-width: 0;
+  padding: 6px 4px 10px;
+  border-radius: 12px;
+  border: 1px solid var(--wrw-rose-cell-border, rgba(0, 0, 0, 0.08));
+}
+
+.wrw-wind-rose-cell-chart {
+  width: 100%;
+  height: 260px;
+}
+
+.wrw-wind-rose-legend {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: center;
+  gap: 12px 20px;
+  margin: 0 0 10px;
+  padding: 4px 12px 8px;
+}
+
+.wrw-wind-rose-legend-item {
+  display: inline-flex;
+  align-items: center;
+  gap: 6px;
+  font-size: 11px;
+
+  i {
+    display: inline-block;
+    width: 22px;
+    height: 10px;
+    border-radius: 2px;
+  }
+}
+
+.wrw-table-wrapper {
+  overflow-x: auto;
+  border-radius: 8px;
+  margin-top: 20px;
+}
+
+.wrw-table {
+  width: 100%;
+  border-collapse: separate;
+  border-spacing: 0;
+  border-radius: 8px;
+  overflow: hidden;
+}
+
+.wrw-table th {
+  font-weight: 600;
+  font-size: 13px;
+  padding: 14px 12px;
+  text-align: center;
+  letter-spacing: 0.5px;
+  position: relative;
+}
+
+.wrw-table tbody tr {
+  transition: all 0.3s ease;
+}
+
+.wrw-table td {
+  padding: 12px;
+  text-align: center;
+  font-size: 13px;
+}
+
+.wrw-table tbody tr:last-child td {
+  border-bottom: none;
+}
+
+.wrw-table tbody tr td:first-child {
+  border-left: 2px solid transparent;
+  transition: border-color 0.3s ease;
+}
+
+.wrw-status-yes {
+  display: inline-block;
+  padding: 4px 12px;
+  border-radius: 12px;
+  background: rgba(76, 175, 80, 0.2);
+  color: #4caf50;
+  font-weight: 500;
+  font-size: 12px;
+  border: 1px solid rgba(76, 175, 80, 0.3);
+}
+
+.wrw-status-no {
+  display: inline-block;
+  padding: 4px 12px;
+  border-radius: 12px;
+  background: rgba(255, 152, 0, 0.15);
+  color: #ff9800;
+  font-weight: 500;
+  font-size: 12px;
+  border: 1px solid rgba(255, 152, 0, 0.3);
+}
+
+.wrw-value-high {
+  color: #f56c6c;
+  font-weight: 600;
+}
+
+.wrw-value-medium {
+  color: #e6a23c;
+  font-weight: 600;
+}
+
+.wrw-value-low {
+  color: #67c23a;
+  font-weight: 600;
+}
+
+.wrw-image-container {
+  display: inline-block;
+  padding: 4px;
+  border-radius: 6px;
+  transition: all 0.3s ease;
+  cursor: pointer;
+}
+
+.wrw-image-container img,
+.wrw-table-thumb {
+  width: 45px;
+  height: 45px;
+  border-radius: 4px;
+  display: block;
+}
+
+.wrw-table-thumb-error {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 45px;
+  height: 45px;
+  border-radius: 4px;
+  font-size: 18px;
+}
+
+.wrw-pagination {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  gap: 8px;
+  margin-top: 16px;
+  padding: 12px;
+  border-radius: 8px;
+}
+
+.wrw-pagination button {
+  min-width: 36px;
+  height: 36px;
+  padding: 0 12px;
+  border: none;
+  border-radius: 6px;
+  font-size: 13px;
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+
+.wrw-pagination button:disabled {
+  opacity: 0.4;
+  cursor: not-allowed;
+}
+
+.wrw-page-info {
+  font-size: 12px;
+  padding: 0 8px;
+}
+
+.wrw-page-size-select {
+  border-radius: 4px;
+  padding: 6px 10px;
+  font-size: 12px;
+  cursor: pointer;
+  outline: none;
+  margin-left: 8px;
+}
+
+@media (max-width: 900px) {
+  .wrw-wind-rose-grid {
+    grid-template-columns: repeat(2, minmax(0, 1fr));
+  }
+
+  .wrw-wind-rose-cell-chart {
+    height: 220px;
+  }
+}
+
+/* —— 非科技蓝:浅色业务主题 —— */
+html:not([data-theme="tech-blue"]) {
+  .wind-resource-wake-page {
+    background: var(--wrw-page-bg, var(--content-bg, #f5f7fa));
+    color: var(--wrw-page-text, #303133);
+
+    .el-loading-mask {
+      background-color: var(
+        --wrw-loading-bg,
+        rgba(255, 255, 255, 0.72)
+      ) !important;
+    }
+  }
+
+  .wrw-filter-bar {
+    background: var(--wrw-filter-bg, #ffffff);
+    border-radius: 12px;
+    border: 1px solid var(--wrw-filter-border, #dcdfe6);
+    padding: 0 15px;
+    display: flex;
+    align-items: center;
+    gap: 20px;
+    height: 52px;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+  }
+
+  .wrw-filter-item {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    padding: 0 20px;
+    height: 36px;
+    border-radius: 6px;
+    border: 1px solid var(--wrw-filter-border, #dcdfe6);
+    background: var(--wrw-filter-item-bg, #f5f7fa);
+  }
+
+  .wrw-filter-label {
+    color: var(--wrw-filter-label, #606266);
+    font-size: 13px;
+    white-space: nowrap;
+  }
+
+  .wrw-filter-select,
+  .wrw-filter-date {
+    width: 160px;
+  }
+
+  .wrw-tab-btn {
+    padding: 8px 18px;
+    border-radius: 20px;
+    border: 1px solid var(--wrw-tab-border, #dcdfe6);
+    background: var(--wrw-tab-bg, #ffffff);
+    color: var(--wrw-tab-text, #606266);
+    font-size: 13px;
+    cursor: pointer;
+    transition: all 0.25s ease;
+  }
+
+  .wrw-tab-btn:hover {
+    border-color: var(--primary-color, #82780c);
+    color: var(--primary-color, #82780c);
+  }
+
+  .wrw-tab-btn.active {
+    color: var(--wrw-tab-active-text, #ffffff);
+    border-color: var(--wrw-tab-active-border, var(--primary-color, #82780c));
+    background: var(--wrw-tab-active-bg, var(--primary-color, #82780c));
+  }
+
+  .wrw-section-title,
+  .wrw-overview-section-title {
+    margin: 20px 0 10px;
+    padding-left: 10px;
+    border-left: 4px solid
+      var(--wrw-section-accent, var(--primary-color, #82780c));
+    color: var(--wrw-section-title, #303133);
+    font-size: 14px;
+    font-weight: 600;
+  }
+
+  .wrw-overview-section-title {
+    margin: 0 0 10px 4px;
+    border-left-width: 3px;
+    letter-spacing: 0.5px;
+  }
+
+  .wrw-overview-section-desc {
+    margin: -6px 0 10px 14px;
+    color: var(--wrw-section-desc, #909399);
+    font-size: 11px;
+  }
+
+  .wrw-card,
+  .wrw-overview-card {
+    background: var(--wrw-card-bg, #ffffff);
+    border-radius: 16px;
+    border: 1px solid var(--wrw-card-border, #ebeef5);
+    box-shadow: var(--wrw-card-shadow, 0 2px 12px rgba(0, 0, 0, 0.06));
+    padding: 15px;
+  }
+
+  .wrw-overview-card {
+    padding: 12px 12px 8px;
+    overflow: hidden;
+  }
+
+  .wrw-wind-rose-cell-title {
+    margin-top: 8px;
+    margin-bottom: 0;
+    padding: 3px 12px;
+    border-radius: 10px;
+    background: var(--wrw-rose-title-bg, #f5f7fa);
+    color: var(--wrw-rose-title-text, #303133);
+    font-size: 11px;
+    font-weight: 600;
+    line-height: 1.4;
+    text-align: center;
+  }
+
+  .wrw-wind-rose-legend-item {
+    color: var(--wrw-legend-text, #909399);
+  }
+
+  .wrw-table-wrapper {
+    box-shadow: none;
+    border: 1px solid var(--wrw-table-border, #ebeef5);
+  }
+
+  .wrw-table {
+    background: var(--wrw-table-row-bg, #ffffff);
+  }
+
+  .wrw-table thead {
+    background: var(--wrw-table-header-bg, var(--primary-color, #82780c));
+  }
+
+  .wrw-table th {
+    color: var(--wrw-table-header-text, #ffffff);
+    border-bottom: none;
+  }
+
+  .wrw-table th::after {
+    display: none;
+  }
+
+  .wrw-table tbody tr:hover {
+    background: var(--wrw-table-row-hover, #f5f7fa);
+  }
+
+  .wrw-table td {
+    border-bottom: 1px solid var(--wrw-table-border, #ebeef5);
+    color: var(--wrw-table-row-text, #606266);
+  }
+
+  .wrw-table tbody tr:hover td:first-child {
+    border-left-color: var(--primary-color, #82780c);
+  }
+
+  .wrw-image-container {
+    border: 1px solid var(--wrw-card-border, #ebeef5);
+    background: var(--wrw-filter-item-bg, #f5f7fa);
+  }
+
+  .wrw-image-container:hover {
+    border-color: var(--primary-color, #82780c);
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
+    transform: scale(1.05);
+  }
+
+  .wrw-table-thumb-error {
+    background: var(--wrw-filter-item-bg, #f5f7fa);
+    color: var(--wrw-section-desc, #909399);
+  }
+
+  .wrw-pagination {
+    background: var(--wrw-pagination-bg, #ffffff);
+    border: 1px solid var(--wrw-pagination-border, #ebeef5);
+  }
+
+  .wrw-pagination button {
+    background: var(--wrw-pagination-btn-bg, #f5f7fa);
+    color: var(--wrw-pagination-btn-text, #606266);
+  }
+
+  .wrw-pagination button:hover:not(:disabled) {
+    background: var(--bgopacity-color, rgba(0, 0, 0, 0.06));
+    color: var(--primary-color, #82780c);
+  }
+
+  .wrw-page-info {
+    color: var(--wrw-section-desc, #909399);
+  }
+
+  .wrw-page-size-select {
+    background: #ffffff;
+    border: 1px solid var(--wrw-filter-border, #dcdfe6);
+    color: var(--wrw-page-text, #303133);
+  }
+
+  .wrw-table-wrapper::-webkit-scrollbar-track {
+    background: #f5f7fa;
+    border-radius: 3px;
+  }
+
+  .wrw-table-wrapper::-webkit-scrollbar-thumb {
+    background: rgba(0, 0, 0, 0.15);
+    border-radius: 3px;
+  }
+
+  .wind-resource-wake-page {
+    .wrw-filter-date,
+    .wrw-filter-selecttree {
+      .el-input__inner {
+        background: transparent !important;
+        border: none !important;
+        color: var(--wrw-filter-input-text, #606266) !important;
+        padding-left: 0 !important;
+        padding-right: 28px !important;
+      }
+
+      .el-input__suffix,
+      .el-input__icon {
+        color: var(--wrw-filter-icon, var(--primary-color, #82780c)) !important;
+      }
+    }
+  }
+
+  .wrw-tree-popper.selecttree-popper {
+    background: #ffffff !important;
+    border: 1px solid #dcdfe6 !important;
+
+    .popper__arrow::after {
+      border-bottom-color: #ffffff !important;
+    }
+
+    .el-select-dropdown__item.hasTree {
+      background: #ffffff !important;
+
+      &.hover,
+      &:hover,
+      &.selected {
+        background: #ffffff !important;
+      }
+    }
+
+    .el-tree {
+      background: transparent !important;
+      color: #606266 !important;
+    }
+
+    .el-tree-node__label {
+      color: #606266 !important;
+    }
+
+    .el-tree-node__content:hover {
+      background: var(--bgopacity-color, rgba(0, 0, 0, 0.04)) !important;
+    }
+
+    .el-tree-node.is-current > .el-tree-node__content,
+    .el-tree--highlight-current
+      .el-tree-node.is-current
+      > .el-tree-node__content {
+      background: var(--primary-color, #82780c) !important;
+      color: #ffffff !important;
+    }
+
+    .el-tree-node.is-current > .el-tree-node__content .el-tree-node__label {
+      color: #ffffff !important;
+    }
+  }
+}
+
+/* —— 科技蓝大屏(保持不变) —— */
+html[data-theme="tech-blue"] {
+  .wind-resource-wake-page {
+    background: radial-gradient(circle at 20% 20%, #0f2a44, #050b16);
+    color: #e6f1ff;
+  }
+
+  .wrw-filter-bar {
+    background: rgba(4, 28, 51, 0.95);
+    border-radius: 12px;
+    border: 1px solid rgba(90, 179, 220, 0.35);
+    padding: 0 15px;
+    display: flex;
+    align-items: center;
+    gap: 20px;
+    height: 52px;
+    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
+  }
+
+  .wrw-filter-item {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    padding: 0 20px;
+    height: 36px;
+    border-radius: 6px;
+    border: 1px solid rgba(90, 179, 220, 0.35);
+    background: rgba(6, 34, 59, 0.84);
+  }
+
+  .wrw-filter-label {
+    color: #9bc8e2;
+    font-size: 13px;
+    white-space: nowrap;
+  }
+
+  .wrw-filter-select,
+  .wrw-filter-date {
+    width: 160px;
+  }
+
+  .wrw-tab-btn {
+    padding: 8px 18px;
+    border-radius: 20px;
+    border: 1px solid rgba(111, 239, 252, 0.3);
+    background: rgba(6, 34, 59, 0.65);
+    color: #9bc8e2;
+    font-size: 13px;
+    cursor: pointer;
+    transition: all 0.25s ease;
+  }
+
+  .wrw-tab-btn:hover {
+    border-color: rgba(111, 239, 252, 0.5);
+    color: #d9efff;
+  }
+
+  .wrw-tab-btn.active {
+    color: #e6f1ff;
+    border-color: rgba(111, 239, 252, 0.45);
+    background: linear-gradient(
+      180deg,
+      rgba(111, 239, 252, 0.18),
+      rgba(90, 179, 220, 0.08)
+    );
+  }
+
+  .wrw-section-title {
+    margin: 20px 0 10px;
+    padding-left: 10px;
+    border-left: 4px solid #6feffc;
+    color: #b7dff5;
+    font-size: 14px;
+    font-weight: 600;
+  }
+
+  .wrw-card {
+    background: linear-gradient(145deg, #0f1b2d, #0b1424);
+    border-radius: 16px;
+    border: 1px solid rgba(111, 239, 252, 0.15);
+    box-shadow: 0 0 20px rgba(111, 239, 252, 0.1);
+    padding: 15px;
+  }
+
+  .wrw-overview-section-title {
+    margin: 0 0 10px 4px;
+    padding-left: 10px;
+    border-left: 3px solid #6feffc;
+    color: #b7dff5;
+    font-size: 14px;
+    font-weight: 600;
+    letter-spacing: 0.5px;
+  }
+
+  .wrw-overview-section-desc {
+    margin: -6px 0 10px 14px;
+    color: #6a8299;
+    font-size: 11px;
+  }
+
+  .wrw-overview-sort__label {
+    color: #6a8299;
+  }
+
+  .wrw-overview-sort__select {
+    border-color: rgba(111, 239, 252, 0.25);
+    background: rgba(8, 18, 32, 0.9);
+    color: #e6f1ff;
+  }
+
+  .wrw-overview-card {
+    padding: 12px 12px 8px;
+    overflow: hidden;
+    background: linear-gradient(
+      160deg,
+      rgba(15, 27, 45, 0.95),
+      rgba(8, 18, 32, 0.98)
+    );
+    border: 1px solid rgba(111, 239, 252, 0.12);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
+  }
+
+  .wrw-wind-rose-cell-title {
+    margin-top: 8px;
+    margin-bottom: 0;
+    padding: 3px 12px;
+    border-radius: 10px;
+    background: rgba(111, 239, 252, 0.12);
+    color: #e6f1ff;
+    font-size: 11px;
+    font-weight: 600;
+    line-height: 1.4;
+    text-align: center;
+  }
+
+  .wrw-wind-rose-legend-item {
+    color: #8fa3c8;
+  }
+
+  .wrw-table-wrapper {
+    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
+  }
+
+  .wrw-table {
+    background: rgba(6, 34, 59, 0.4);
+  }
+
+  .wrw-table thead {
+    background: linear-gradient(
+      180deg,
+      rgba(111, 239, 252, 0.15),
+      rgba(90, 179, 220, 0.1)
+    );
+  }
+
+  .wrw-table th {
+    color: #6feffc;
+    border-bottom: 2px solid rgba(111, 239, 252, 0.3);
+  }
+
+  .wrw-table th::after {
+    content: "";
+    position: absolute;
+    bottom: -2px;
+    left: 0;
+    right: 0;
+    height: 2px;
+    background: linear-gradient(
+      90deg,
+      transparent,
+      rgba(111, 239, 252, 0.6),
+      transparent
+    );
+  }
+
+  .wrw-table tbody tr:hover {
+    background: rgba(111, 239, 252, 0.08);
+  }
+
+  .wrw-table td {
+    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
+    color: #e6f1ff;
+  }
+
+  .wrw-table tbody tr:hover td:first-child {
+    border-left-color: #6feffc;
+  }
+
+  .wrw-value-high {
+    color: #ff5252;
+  }
+
+  .wrw-value-medium {
+    color: #ff9800;
+  }
+
+  .wrw-value-low {
+    color: #4caf50;
+  }
+
+  .wrw-image-container {
+    border: 1px solid rgba(111, 239, 252, 0.2);
+    background: rgba(6, 34, 59, 0.6);
+  }
+
+  .wrw-image-container:hover {
+    border-color: #6feffc;
+    box-shadow: 0 0 12px rgba(111, 239, 252, 0.3);
+    transform: scale(1.1);
+  }
+
+  .wrw-table-thumb-error {
+    background: rgba(6, 34, 59, 0.8);
+    color: #6a8299;
+  }
+
+  .wrw-pagination {
+    background: rgba(6, 34, 59, 0.4);
+    border: 1px solid rgba(111, 239, 252, 0.15);
+  }
+
+  .wrw-pagination button {
+    background: rgba(111, 239, 252, 0.1);
+    color: #8fa3c8;
+  }
+
+  .wrw-pagination button:hover:not(:disabled) {
+    background: rgba(111, 239, 252, 0.25);
+    color: #6feffc;
+  }
+
+  .wrw-page-info {
+    color: #8fa3c8;
+  }
+
+  .wrw-page-size-select {
+    background: rgba(6, 34, 59, 0.8);
+    border: 1px solid rgba(111, 239, 252, 0.2);
+    color: #e6f1ff;
+  }
+
+  .wrw-table-wrapper::-webkit-scrollbar {
+    width: 6px;
+    height: 6px;
+  }
+
+  .wrw-table-wrapper::-webkit-scrollbar-track {
+    background: rgba(6, 34, 59, 0.3);
+    border-radius: 3px;
+  }
+
+  .wrw-table-wrapper::-webkit-scrollbar-thumb {
+    background: rgba(111, 239, 252, 0.4);
+    border-radius: 3px;
+  }
+
+  .wind-resource-wake-page {
+    .wrw-filter-date {
+      .el-input__inner {
+        background: transparent !important;
+        border: none !important;
+        color: #d9efff !important;
+        padding-left: 0 !important;
+        padding-right: 28px !important;
+      }
+
+      .el-input__suffix,
+      .el-input__icon {
+        color: #5ab3dc !important;
+      }
+    }
+
+    .wrw-filter-selecttree {
+      .el-input__inner {
+        background: transparent !important;
+        border: none !important;
+        color: #d9efff !important;
+        padding-left: 0 !important;
+        padding-right: 28px !important;
+      }
+
+      .el-input__suffix,
+      .el-input__icon {
+        color: #5ab3dc !important;
+      }
+    }
+
+    .wrw-wind-rose-cell {
+      border-color: rgba(111, 239, 252, 0.18);
+      background: rgba(5, 20, 40, 0.85);
+    }
+  }
+
+  .wrw-tree-popper.selecttree-popper {
+    background: #0d1930 !important;
+    border: 1px solid rgba(0, 242, 255, 0.25) !important;
+
+    .popper__arrow::after {
+      border-bottom-color: #0d1930 !important;
+    }
+
+    .el-select-dropdown__item.hasTree {
+      background: #0d1930 !important;
+
+      &.hover,
+      &:hover,
+      &.selected {
+        background: #0d1930 !important;
+      }
+    }
+
+    .el-tree {
+      background: transparent !important;
+      color: #b7dff5 !important;
+    }
+
+    .el-tree-node__label {
+      color: #b7dff5 !important;
+    }
+
+    .el-tree-node__content:hover {
+      background: rgba(0, 170, 255, 0.15) !important;
+    }
+
+    .el-tree-node__content:hover .el-tree-node__label {
+      color: #ffffff !important;
+    }
+
+    .el-tree-node.is-current > .el-tree-node__content,
+    .el-tree--highlight-current
+      .el-tree-node.is-current
+      > .el-tree-node__content {
+      background: #1890ff !important;
+      color: #ffffff !important;
+    }
+
+    .el-tree-node.is-current > .el-tree-node__content .el-tree-node__label {
+      color: #ffffff !important;
+    }
+  }
+}

+ 426 - 0
src/views/windResourceWake/utils/overviewChartOptions.js

@@ -0,0 +1,426 @@
+import { readCssVar } from "@/utils/chartTheme";
+import { formatWakeMetric, sortByTurbineName } from "./wrwTableUtils";
+
+function getOverviewTheme() {
+  return {
+    title: readCssVar("--wrw-chart-title", "#b7dff5"),
+    text: readCssVar("--wrw-chart-text", "#8FA3C8"),
+    axis: readCssVar("--wrw-chart-axis", "rgba(111, 239, 252, 0.35)"),
+    split: readCssVar("--wrw-chart-split", "rgba(255, 255, 255, 0.07)"),
+    polarSplit: readCssVar(
+      "--wrw-chart-polar-split",
+      "rgba(111, 239, 252, 0.1)",
+    ),
+    tooltipBg: readCssVar("--wrw-chart-tooltip-bg", "rgba(6, 22, 42, 0.96)"),
+    tooltipBorder: readCssVar(
+      "--wrw-chart-tooltip-border",
+      "rgba(111, 239, 252, 0.4)",
+    ),
+    tooltipText: readCssVar("--wrw-chart-tooltip-text", "#e6f1ff"),
+    gridBg: readCssVar("--wrw-chart-grid-bg", "rgba(6, 28, 48, 0.4)"),
+    gridBorder: readCssVar(
+      "--wrw-chart-grid-border",
+      "rgba(111, 239, 252, 0.12)",
+    ),
+    emptyText: readCssVar("--wrw-chart-empty", "#8db6d1"),
+    pointerCross: readCssVar("--wrw-chart-axis", "rgba(111, 239, 252, 0.35)"),
+  };
+}
+
+function getOverviewTooltip(theme, options = {}) {
+  return {
+    backgroundColor: theme.tooltipBg,
+    borderColor: theme.tooltipBorder,
+    borderWidth: 1,
+    padding: [10, 14],
+    textStyle: { color: theme.tooltipText, fontSize: 12 },
+    appendToBody: true,
+    confine: false,
+    enterable: true,
+    hideDelay: 200,
+    extraCssText:
+      "box-shadow: 0 8px 24px rgba(0,0,0,0.45); border-radius: 8px; max-width: 360px; max-height: 240px; overflow-y: auto; z-index: 999999 !important; pointer-events: auto;",
+    ...options,
+  };
+}
+
+/** 风速分布图:跟随鼠标并避让边界,内容过多时可进入浮层滚动 */
+function getWindDistTooltipPosition() {
+  return (pos, _params, _dom, rect, size) => {
+    const gap = 14;
+    const contentSize = size?.contentSize || [180, 120];
+    const viewSize = size?.viewSize || [0, 0];
+    const point = Array.isArray(pos) ? pos : [0, 0];
+    const boxW = contentSize[0];
+    const boxH = contentSize[1];
+    const area = rect || {
+      x: 0,
+      y: 0,
+      width: viewSize[0] || point[0] + boxW + gap * 2,
+      height: viewSize[1] || point[1] + boxH + gap * 2,
+    };
+    let x = point[0] + gap;
+    let y = point[1] - boxH / 2;
+    if (x + boxW > area.x + area.width - gap) {
+      x = point[0] - boxW - gap;
+    }
+    if (y + boxH > area.y + area.height - gap) {
+      y = area.y + area.height - boxH - gap;
+    }
+    if (x < area.x + gap) x = area.x + gap;
+    if (y < area.y + gap) y = area.y + gap;
+    return [x, y];
+  };
+}
+
+const WIND_DIST_DECIMALS = 3;
+const formatWindDistMetric = (value) =>
+  formatWakeMetric(value, WIND_DIST_DECIMALS);
+
+function formatWindSpeed(value) {
+  if (value == null || value === "") return "";
+  const num = Number(value);
+  if (!Number.isFinite(num)) return String(value);
+  return Number.isInteger(num) ? String(num) : String(Number(num.toFixed(3)));
+}
+
+function formatWindDistTooltip(params) {
+  const list = Array.isArray(params) ? params : [params];
+  const first = list[0] || {};
+  const windSpeed =
+    first.axisValue ??
+    (Array.isArray(first.value) ? first.value[0] : first.value);
+  const rows = list
+    .map((item) => {
+      const value = Array.isArray(item.value) ? item.value[1] : item.value;
+      return `${item.marker}${
+        item.seriesName
+      }<span style="float:right;margin-left:18px;font-weight:600">${formatWindDistMetric(
+        value,
+      )}</span>`;
+    })
+    .join("<br/>");
+  return `<div style="font-weight:600;margin-bottom:8px">风速:${formatWindSpeed(
+    windSpeed,
+  )} m/s</div>${rows}`;
+}
+
+const colorList = [
+  "#6feffc",
+  "#4D8BFF",
+  "#E85D5D",
+  "#66BB6A",
+  "#E8966A",
+  "#C0A882",
+  "#9a7ce6",
+  "#8FA3C8",
+  "#D4B86A",
+];
+
+function resolveOverviewTurbineLabel(turbine, turbineList = []) {
+  const engineId = turbine?.engineId;
+  const hit = (turbineList || []).find(
+    (item) => String(item?.engineId) === String(engineId),
+  );
+  return (
+    hit?.engineName ||
+    turbine?.engineName ||
+    turbine?.displayName ||
+    turbine?.engineId ||
+    turbine?.name ||
+    ""
+  );
+}
+
+function sortWindDistTurbines(data, turbineList, sortOrder = "asc") {
+  if (!data?.turbines?.length) return data;
+  return {
+    ...data,
+    turbines: sortByTurbineName(
+      data.turbines,
+      (item) => resolveOverviewTurbineLabel(item, turbineList),
+      sortOrder,
+    ),
+  };
+}
+
+function buildDistSeriesFromApi(data, turbineList = []) {
+  if (!data?.turbines?.length) return null;
+  return data.turbines.map((turbine, idx) => ({
+    name:
+      resolveOverviewTurbineLabel(turbine, turbineList) ||
+      turbine.displayName ||
+      turbine.engineId ||
+      `机组${idx + 1}`,
+    type: "line",
+    step: "middle",
+    symbol: "none",
+    lineStyle: {
+      width: idx === data.turbines.length - 1 ? 2.2 : 1.8,
+      color: turbine.color || colorList[idx % colorList.length],
+      cap: "round",
+      join: "round",
+    },
+    emphasis: {
+      focus: "series",
+      lineStyle: {
+        width: 2.8,
+        shadowBlur: 12,
+        shadowColor: `${turbine.color || colorList[idx % colorList.length]}66`,
+      },
+    },
+    blur: { lineStyle: { opacity: 0.2 } },
+    data: Array.isArray(turbine.points) ? turbine.points : [],
+  }));
+}
+
+export function getWindDistOption(data, options = {}) {
+  const { turbineList = [], sortOrder = "asc" } = options;
+  const sortedData = sortWindDistTurbines(data, turbineList, sortOrder);
+  const overviewTheme = getOverviewTheme();
+  const overviewTooltip = getOverviewTooltip(overviewTheme);
+  const apiSeries = buildDistSeriesFromApi(sortedData, turbineList);
+
+  return {
+    animationDuration: 800,
+    animationEasing: "cubicOut",
+    color: colorList,
+    legend: {
+      type: "scroll",
+      bottom: 8,
+      left: "center",
+      orient: "horizontal",
+      itemWidth: 18,
+      itemHeight: 8,
+      itemGap: 16,
+      pageIconColor: overviewTheme.text,
+      pageTextStyle: { color: overviewTheme.text },
+      textStyle: { color: overviewTheme.text, fontSize: 11 },
+    },
+    tooltip: {
+      ...overviewTooltip,
+      trigger: "axis",
+      position: getWindDistTooltipPosition(),
+      valueFormatter: (value) => formatWindDistMetric(value),
+      formatter: formatWindDistTooltip,
+      axisPointer: {
+        type: "line",
+        lineStyle: {
+          color: overviewTheme.pointerCross,
+          type: "dashed",
+        },
+        label: {
+          show: false,
+        },
+      },
+    },
+    grid: {
+      left: 56,
+      right: 24,
+      top: 28,
+      bottom: 72,
+      show: true,
+      borderColor: overviewTheme.gridBorder,
+      backgroundColor: overviewTheme.gridBg,
+    },
+    xAxis: {
+      type: "value",
+      // min: data?.xAxis?.min ?? 0,
+      // max: data?.xAxis?.max ?? 25,
+      // interval: data?.xAxis?.interval ?? 5,
+      name: data?.xAxis?.name || "风速 (m/s)",
+      nameLocation: "middle",
+      nameGap: 32,
+      nameTextStyle: { color: overviewTheme.text, fontSize: 12 },
+      axisLine: { lineStyle: { color: overviewTheme.axis } },
+      axisTick: { show: true, lineStyle: { color: overviewTheme.axis } },
+      axisLabel: {
+        color: overviewTheme.text,
+        fontSize: 10,
+        formatter: (value) => Math.round(Number(value)),
+      },
+      splitLine: {
+        lineStyle: { color: overviewTheme.split, type: "dashed" },
+      },
+    },
+    yAxis: {
+      type: "value",
+      name: data?.yAxis?.name || "概率密度",
+      nameTextStyle: { color: overviewTheme.text, fontSize: 12 },
+      // min: data?.yAxis?.min ?? 0,
+      // max: data?.yAxis?.max ?? 0.24,
+      // interval: data?.yAxis?.interval ?? 0.05,
+      axisLine: { show: true, lineStyle: { color: overviewTheme.axis } },
+      axisTick: { show: true, lineStyle: { color: overviewTheme.axis } },
+      axisLabel: {
+        color: overviewTheme.text,
+        fontSize: 10,
+        formatter: (value) => formatWindDistMetric(value),
+      },
+      splitLine: {
+        lineStyle: { color: overviewTheme.split, type: "dashed" },
+      },
+    },
+    series: apiSeries || [],
+  };
+}
+
+const ROSE_DIRECTIONS = [
+  "N",
+  "",
+  "NE",
+  "",
+  "E",
+  "",
+  "SE",
+  "",
+  "S",
+  "",
+  "SW",
+  "",
+  "W",
+  "",
+  "NW",
+  "",
+];
+
+export const ROSE_SPEED_BANDS = [
+  "0~3 m/s",
+  "3~6 m/s",
+  "6~9 m/s",
+  "9~12 m/s",
+  ">12 m/s",
+];
+
+export const ROSE_COLORS = [
+  "#4A72B0",
+  "#92C1E9",
+  "#FFDF92",
+  "#F58D66",
+  "#E86B45",
+];
+
+function getRoseRadiusMax(turbineRose) {
+  if (!turbineRose?.bands?.length) return 14;
+  let max = 0;
+  turbineRose.bands.forEach((band) => {
+    (band.values || []).forEach((value) => {
+      const num = Number(value);
+      if (Number.isFinite(num) && num > max) max = num;
+    });
+  });
+  if (max <= 0) return 14;
+  const interval = max <= 5 ? 1 : max <= 20 ? 3.5 : Math.ceil(max / 4);
+  return Math.ceil(max / interval) * interval;
+}
+
+function getRoseBandValues(turbineRose, bandName, bandIdx) {
+  const bands = turbineRose?.bands || [];
+  const matched = bands.find((item) => item.band === bandName);
+  if (matched && Array.isArray(matched.values)) return matched.values;
+  return bands[bandIdx]?.values || [];
+}
+
+export function getSingleWindRoseOption(turbineIndex, roseData, turbineItem) {
+  const overviewTheme = getOverviewTheme();
+  const overviewTooltip = getOverviewTooltip(overviewTheme);
+
+  const speedBands = roseData?.speedBands || ROSE_SPEED_BANDS;
+  const directions = roseData?.directions || ROSE_DIRECTIONS;
+  const turbineRose =
+    turbineItem ||
+    (Array.isArray(roseData?.turbines)
+      ? roseData.turbines[turbineIndex]
+      : null);
+  const radiusMax = getRoseRadiusMax(turbineRose);
+  const radiusInterval =
+    radiusMax <= 5 ? 1 : radiusMax <= 20 ? 3.5 : radiusMax / 4;
+
+  const series = speedBands.map((band, bandIdx) => ({
+    name: band,
+    type: "bar",
+    coordinateSystem: "polar",
+    stack: "wind",
+    barWidth: "78%",
+    itemStyle: {
+      color: ROSE_COLORS[bandIdx % ROSE_COLORS.length],
+      opacity: 0.96,
+      borderColor: "rgba(255, 255, 255, 0.32)",
+      borderWidth: 0.4,
+      shadowBlur: 2,
+      shadowColor: "rgba(0, 0, 0, 0.2)",
+    },
+    emphasis: {
+      focus: "self",
+      itemStyle: {
+        opacity: 1,
+        shadowBlur: 10,
+        shadowColor: "rgba(146, 193, 233, 0.5)",
+      },
+    },
+    data: getRoseBandValues(turbineRose, band, bandIdx),
+  }));
+
+  return {
+    animationDuration: 600,
+    animationEasing: "cubicOut",
+    color: ROSE_COLORS,
+    polar: {
+      center: ["50%", "54%"],
+      radius: "72%",
+    },
+    angleAxis: {
+      type: "category",
+      data: directions,
+      boundaryGap: false,
+      clockwise: true,
+      startAngle: 90,
+      axisLine: { lineStyle: { color: overviewTheme.axis } },
+      axisTick: { show: false },
+      axisLabel: {
+        color: overviewTheme.text,
+        fontSize: 9,
+        interval: 0,
+        margin: 4,
+        formatter: (v) => v || "",
+      },
+      splitLine: {
+        show: true,
+        lineStyle: { color: overviewTheme.polarSplit },
+      },
+    },
+    radiusAxis: {
+      min: 0,
+      max: radiusMax,
+      interval: radiusInterval,
+      axisLabel: {
+        color: overviewTheme.text,
+        fontSize: 8,
+        showMinLabel: false,
+        formatter: (value) => formatWakeMetric(value),
+      },
+      axisLine: { show: false },
+      axisTick: { show: false },
+      splitLine: {
+        lineStyle: { color: overviewTheme.polarSplit, type: "dashed" },
+      },
+      splitArea: {
+        show: true,
+        areaStyle: {
+          color: ["rgba(111, 239, 252, 0.04)", "transparent"],
+        },
+      },
+    },
+    tooltip: {
+      ...overviewTooltip,
+      trigger: "item",
+      formatter: (p) => {
+        const dir = p.name || "—";
+        return `${p.marker}${
+          p.seriesName
+        }<br/>方向 ${dir} · 频次 ${formatWakeMetric(p.value)}`;
+      },
+    },
+    series,
+  };
+}

+ 487 - 0
src/views/windResourceWake/utils/wakeChartOptions.js

@@ -0,0 +1,487 @@
+import { readCssVar } from "@/utils/chartTheme";
+import { formatWakeBarAxisLabel, formatWakeMetric, formatWakePercent } from "./wrwTableUtils";
+
+function getWakeChartTheme() {
+  return {
+    title: readCssVar("--wrw-chart-title", "#8FA3C8"),
+    text: readCssVar("--wrw-chart-text", "#8FA3C8"),
+    axis: readCssVar("--wrw-chart-axis", "rgba(111, 239, 252, 0.3)"),
+    split: readCssVar("--wrw-chart-split", "rgba(255, 255, 255, 0.05)"),
+  };
+}
+
+function getWakeTooltip() {
+  return {
+    appendToBody: true,
+    confine: false,
+    extraCssText: "z-index: 999999 !important; pointer-events: none;",
+  };
+}
+
+const SCATTER1_X_AXIS_NAME = "东西方向坐标(千米)";
+const SCATTER1_Y_AXIS_NAME = "南北方向坐标(千米)";
+
+function formatScatter1AxisValue(value) {
+  return formatWakeMetric(Number(value) / 1000);
+}
+
+function mapLayoutScatterPoints(points) {
+  if (!Array.isArray(points) || !points.length) return [];
+  return points.map((item) => ({
+    name: item.engineId || item.name || "",
+    value: [
+      item.east ?? item.value?.[0] ?? 0,
+      item.north ?? item.value?.[1] ?? 0,
+      item.lossPercent ?? item.velocityDeficit ?? item.value?.[2] ?? 0,
+    ],
+  }));
+}
+
+function mapWakeLossConfidentPoints(points) {
+  if (!Array.isArray(points) || !points.length) return [];
+  return points.map((item) => {
+    const confidenceRaw =
+      item.confidencePercent ?? item.confidentLevel ?? item.value?.[1] ?? 0;
+    const confidenceNum = Number(confidenceRaw);
+    const confidencePercent =
+      confidenceNum <= 1 ? confidenceNum * 100 : confidenceNum;
+    const loss =
+      item.velocityDeficit ?? item.lossPercent ?? item.value?.[0] ?? 0;
+    return {
+      name: item.engineId || item.name || "",
+      value: [loss, confidencePercent],
+    };
+  });
+}
+
+function shortEngineLabel(name) {
+  return formatWakeBarAxisLabel(name);
+}
+
+const SCATTER2_QUADRANT_LABEL_LEFT = "72%";
+
+function computeScatter2Bounds(points, data = {}) {
+  const losses = points
+    .map((item) => Number(item.value?.[0]))
+    .filter((num) => Number.isFinite(num));
+  const confidences = points
+    .map((item) => Number(item.value?.[1]))
+    .filter((num) => Number.isFinite(num));
+
+  const lossMaxRaw = losses.length ? Math.max(...losses) : 30;
+  const confMinRaw = confidences.length ? Math.min(...confidences) : 65;
+  const confMaxRaw = confidences.length ? Math.max(...confidences) : 100;
+
+  return {
+    xMin: data?.xAxis?.min ?? 0,
+    xMax: data?.xAxis?.max ?? Math.ceil(lossMaxRaw * 1.15),
+    yMin:
+      data?.yAxis?.min ??
+      Math.max(0, Math.floor(confMinRaw - Math.max(5, confMinRaw * 0.05))),
+    yMax:
+      data?.yAxis?.max ??
+      Math.min(100, Math.ceil(confMaxRaw + Math.max(2, confMaxRaw * 0.02))),
+  };
+}
+
+function mapLossDelBarItems(items) {
+  if (!Array.isArray(items) || !items.length) {
+    return {
+      categories: [],
+      fullNames: [],
+      lossPercentData: [],
+      turbulenceData: [],
+    };
+  }
+  const labels = items.map((item) => {
+    const full = item.engineName || item.name || item.engineId || "";
+    return {
+      full,
+      short: formatWakeBarAxisLabel(full),
+    };
+  });
+  return {
+    categories: labels.map((item) => item.short),
+    fullNames: labels.map((item) => item.full),
+    lossPercentData: items.map(
+      (item) => item.lossPercent ?? item.velocityDeficit ?? item.loss ?? 0,
+    ),
+    turbulenceData: items.map(
+      (item) =>
+        item.turbulenceIntensity ?? item.turbulence ?? item.delPercent ?? 0,
+    ),
+  };
+}
+
+function buildLossDelSingleBarOption({
+  theme,
+  title,
+  categories,
+  fullNames = [],
+  data,
+  seriesName,
+  color,
+  yAxisName,
+  tooltipUnit = "",
+}) {
+  return {
+    title: {
+      text: title,
+      left: "center",
+      top: 10,
+      textStyle: { color: theme.title, fontSize: 14, fontWeight: "bold" },
+    },
+    tooltip: {
+      ...getWakeTooltip(),
+      trigger: "axis",
+      axisPointer: { type: "shadow" },
+      formatter(params) {
+        const list = Array.isArray(params) ? params : [params];
+        const first = list[0] || {};
+        const idx = first.dataIndex ?? 0;
+        const titleText = fullNames[idx] || first.axisValue || "";
+        const lines = list
+          .map((item) => {
+            const valueText = tooltipUnit
+              ? `${formatWakeMetric(item.value)}${tooltipUnit}`
+              : formatWakeMetric(item.value);
+            return `${item.marker || ""}${item.seriesName}: ${valueText}`;
+          })
+          .join("<br/>");
+        return titleText
+          ? `<div style="font-weight:600;margin-bottom:4px">${titleText}</div>${lines}`
+          : lines;
+      },
+    },
+    grid: {
+      left: "3%",
+      right: "4%",
+      bottom: "18%",
+      top: "18%",
+      containLabel: true,
+    },
+    dataZoom: [
+      {
+        type: "slider",
+        show: true,
+        xAxisIndex: 0,
+        height: 18,
+        bottom: 4,
+        start: 0,
+        end:
+          categories.length > 0
+            ? Math.min(100, (12 / categories.length) * 100)
+            : 100,
+        textStyle: {
+          color: theme.text,
+        },
+        brushSelect: false,
+        handleSize: 12,
+      },
+      {
+        type: "inside",
+        xAxisIndex: 0,
+        zoomOnMouseWheel: true,
+        moveOnMouseMove: true,
+      },
+    ],
+    xAxis: {
+      type: "category",
+      data: categories,
+      axisLabel: {
+        color: theme.text,
+        rotate: categories.length > 16 ? 45 : 0,
+        fontSize: 11,
+        interval: 0,
+        hideOverlap: true,
+        margin: 12,
+      },
+      axisLine: { lineStyle: { color: theme.axis } },
+    },
+    yAxis: {
+      type: "value",
+      name: yAxisName,
+      nameTextStyle: { color, fontSize: 12 },
+      min: 0,
+      axisLabel: { color, formatter: (value) => formatWakeMetric(value) },
+      splitLine: { lineStyle: { color: theme.split } },
+    },
+    series: [
+      {
+        name: seriesName,
+        type: "bar",
+        barWidth: "45%",
+        data,
+        itemStyle: { color },
+        label: {
+          show: true,
+          position: "top",
+          color,
+          fontSize: 10,
+          formatter: (params) => formatWakeMetric(params.value),
+        },
+      },
+    ],
+  };
+}
+
+export function getLossDelLossBarOption(data) {
+  const theme = getWakeChartTheme();
+  const barMapped = mapLossDelBarItems(data?.items);
+
+  return buildLossDelSingleBarOption({
+    theme,
+    title: data?.lossTitle || "各机组日尺度发电量损失",
+    categories: barMapped.categories,
+    fullNames: barMapped.fullNames,
+    data: barMapped.lossPercentData,
+    seriesName: "发电量损失",
+    color: "#E85D5D",
+    yAxisName: "发电量损失(%)",
+    tooltipUnit: "%",
+  });
+}
+
+export function getLossDelTurbulenceBarOption(data) {
+  const theme = getWakeChartTheme();
+  const barMapped = mapLossDelBarItems(data?.items);
+
+  return buildLossDelSingleBarOption({
+    theme,
+    title: data?.turbulenceTitle || "各机组附加湍流强度",
+    categories: barMapped.categories,
+    fullNames: barMapped.fullNames,
+    data: barMapped.turbulenceData,
+    seriesName: "附加湍流强度",
+    color: "#4D8BFF",
+    yAxisName: "附加湍流强度",
+  });
+}
+
+export function getScatter1Option(data) {
+  const theme = getWakeChartTheme();
+  const points = mapLayoutScatterPoints(data?.points);
+  const visualMax = data?.visualMap?.max ?? 85;
+
+  return {
+    backgroundColor: "transparent",
+    title: {
+      text: data?.title || "风电场布局与机组日尺度发电量损失图",
+      left: "center",
+      top: 10,
+      textStyle: { color: theme.title, fontSize: 14, fontWeight: "bold" },
+    },
+    tooltip: {
+      ...getWakeTooltip(),
+      formatter(params) {
+        const val = params.value || params.data?.value || [];
+        const east = Array.isArray(val) ? val[0] : 0;
+        const north = Array.isArray(val) ? val[1] : 0;
+        const loss = Array.isArray(val) ? val[2] : val;
+        return [
+          params.name,
+          `${SCATTER1_X_AXIS_NAME}: ${formatScatter1AxisValue(east)}`,
+          `${SCATTER1_Y_AXIS_NAME}: ${formatScatter1AxisValue(north)}`,
+          `损失: ${formatWakeMetric(loss)}%`,
+        ].join("<br/>");
+      },
+    },
+    grid: { left: "12%", right: "15%", bottom: "13%", top: "15%" },
+    xAxis: {
+      name: SCATTER1_X_AXIS_NAME,
+      nameTextStyle: {
+        color: theme.text,
+        fontSize: 12,
+        padding: [10, 0, 0, 0],
+      },
+      nameLocation: "middle",
+      min: data?.xAxis?.min,
+      max: data?.xAxis?.max,
+      axisLabel: {
+        color: theme.text,
+        formatter: formatScatter1AxisValue,
+      },
+      axisLine: { lineStyle: { color: theme.axis } },
+      axisTick: { show: true },
+      splitLine: { lineStyle: { color: theme.split } },
+    },
+    yAxis: {
+      name: SCATTER1_Y_AXIS_NAME,
+      nameTextStyle: {
+        color: theme.text,
+        fontSize: 12,
+        padding: [-50, 0, 35, 0],
+      },
+      nameLocation: "middle",
+      min: data?.yAxis?.min,
+      max: data?.yAxis?.max,
+      axisLabel: {
+        color: theme.text,
+        formatter: formatScatter1AxisValue,
+      },
+      axisLine: { lineStyle: { color: theme.axis } },
+      axisTick: { show: true },
+      splitLine: { lineStyle: { color: theme.split } },
+    },
+    visualMap: {
+      type: "continuous",
+      orient: "vertical",
+      right: 0,
+      top: "center",
+      min: data?.visualMap?.min ?? 0,
+      max: visualMax,
+      inRange: {
+        color: ["#E8DFD9", "#DCB699", "#E8966A", "#DC4E4E", "#B82E2E"],
+      },
+      textStyle: { color: theme.text, fontSize: 11 },
+      text: ["发电量损失(%)", "0%"],
+      calculable: true,
+      dimension: 2,
+      itemWidth: 15,
+    },
+    series: [
+      {
+        type: "scatter",
+        symbolSize: 20,
+        label: {
+          show: true,
+          position: "top",
+          color: theme.text,
+          fontSize: 9,
+          formatter: "{b}",
+        },
+        data: points,
+        itemStyle: { borderColor: "#999", borderWidth: 1 },
+      },
+    ],
+  };
+}
+
+export function getScatter2Option(data) {
+  const theme = getWakeChartTheme();
+  const points = mapWakeLossConfidentPoints(data?.points);
+  const bounds = computeScatter2Bounds(points, data);
+
+  return {
+    title: {
+      text: data?.title || "尾流速度损耗与置信度散点图",
+      left: "center",
+      top: 10,
+      textStyle: { color: theme.title, fontSize: 14 },
+    },
+    tooltip: {
+      ...getWakeTooltip(),
+      formatter(params) {
+        const val = params.value || [];
+        return `${params.name}<br/>尾流速度损耗(m/s): ${formatWakeMetric(val[0])}<br/>结果可信度: ${formatWakePercent(val[1])}`;
+      },
+    },
+    grid: { left: "8%", right: "15%", bottom: "13%", top: "15%" },
+    xAxis: {
+      name: data?.xAxis?.name || "尾流速度损耗",
+      nameTextStyle: {
+        color: theme.text,
+        fontSize: 12,
+        padding: [10, 0, 0, 0],
+      },
+      nameLocation: "middle",
+      min: bounds.xMin,
+      max: bounds.xMax,
+      axisLabel: {
+        color: theme.text,
+        formatter: (value) => formatWakeMetric(value),
+      },
+      splitLine: { lineStyle: { color: theme.split } },
+      axisLine: { lineStyle: { color: theme.axis } },
+    },
+    yAxis: {
+      name: data?.yAxis?.name || "结果可信度(%)",
+      nameTextStyle: { color: theme.text, fontSize: 12 },
+      min: bounds.yMin,
+      max: bounds.yMax,
+      axisLabel: {
+        color: theme.text,
+        formatter: (value) => formatWakeMetric(value),
+      },
+      splitLine: { lineStyle: { color: theme.split } },
+      axisLine: { lineStyle: { color: theme.axis } },
+    },
+    visualMap: {
+      type: "continuous",
+      orient: "vertical",
+      right: 0,
+      top: "center",
+      min: bounds.yMin,
+      max: bounds.yMax,
+      dimension: 1,
+      inRange: {
+        color: ["#E85D5D", "#E8966A", "#98d268", "#6bbf63", "#4CAF50", "#006837"],
+      },
+      textStyle: { color: theme.text, fontSize: 11 },
+      text: [
+        `结果可信度 ${formatWakeMetric(bounds.yMax)}%`,
+        `${formatWakeMetric(bounds.yMin)}%`,
+      ],
+      calculable: true,
+      itemWidth: 15,
+    },
+    graphic: [
+      {
+        type: "text",
+        left: SCATTER2_QUADRANT_LABEL_LEFT,
+        top: "22%",
+        style: {
+          text: "高损失 高可信度",
+          fill: "#4CAF50",
+          fontSize: 14,
+          fontWeight: "bold",
+          textAlign: "left",
+        },
+      },
+      {
+        type: "text",
+        left: SCATTER2_QUADRANT_LABEL_LEFT,
+        top: "72%",
+        style: {
+          text: "高损失 低可信度",
+          fill: "#E85D5D",
+          fontSize: 14,
+          fontWeight: "bold",
+          textAlign: "left",
+        },
+      },
+    ],
+    series: [
+      {
+        type: "scatter",
+        symbolSize: 16,
+        label: {
+          show: true,
+          position: "top",
+          color: theme.text,
+          fontSize: 9,
+          formatter: (params) => shortEngineLabel(params.name),
+        },
+        labelLayout: {
+          hideOverlap: false,
+          moveOverlap: "shiftY",
+        },
+        emphasis: {
+          scale: 1.2,
+          label: {
+            show: true,
+            formatter: (params) => params.name,
+          },
+        },
+        data: points,
+        itemStyle: {
+          borderColor: "rgba(255, 255, 255, 0.45)",
+          borderWidth: 1,
+          shadowBlur: 8,
+          shadowColor: "rgba(0, 0, 0, 0.3)",
+        },
+      },
+    ],
+  };
+}
+

+ 51 - 0
src/views/windResourceWake/utils/wrwRemoteData.js

@@ -0,0 +1,51 @@
+export function isRemoteImageUrl(url) {
+  return /\.(png|jpe?g|gif|webp|svg)(\?.*)?$/i.test(String(url || ""));
+}
+
+function getHealthApiBase() {
+  if (process.env.NODE_ENV === "development") {
+    return "/healthApi";
+  }
+  return window?._BASE_CONFIG?.HEALTH_API || "/healthApi";
+}
+
+export function resolveResourceUrl(path) {
+  if (!path) return "";
+  const str = String(path).trim();
+  if (/^https?:\/\//i.test(str)) return str;
+  if (str.startsWith("//")) {
+    return `${window.location.protocol}${str}`;
+  }
+  if (str.startsWith("/healthApi")) {
+    return str;
+  }
+
+  const base = getHealthApiBase();
+  const normalizedPath = str.startsWith("/") ? str : `/${str}`;
+  return `${String(base).replace(/\/$/, "")}${normalizedPath}`;
+}
+
+function unwrapApiJsonPayload(json) {
+  if (!json || typeof json !== "object") return json;
+  if (json.code === 200 && json.data != null) {
+    return json.data;
+  }
+  return json;
+}
+
+export async function fetchRemoteJson(pathOrUrl) {
+  if (!pathOrUrl) return null;
+  const resolved = resolveResourceUrl(pathOrUrl);
+  if (!resolved) return null;
+
+  const response = await fetch(resolved, {
+    method: "GET",
+    credentials: "include",
+  });
+  if (!response.ok) {
+    throw new Error(`请求失败: ${response.status}`);
+  }
+
+  const json = await response.json();
+  return unwrapApiJsonPayload(json);
+}

+ 83 - 0
src/views/windResourceWake/utils/wrwTableUtils.js

@@ -0,0 +1,83 @@
+/** 尾流页指标统一保留 2 位小数;digits 可覆盖小数位 */
+export function formatWakeMetric(value, digits = 2) {
+  if (value == null || value === "") return "";
+  const num = Number(value);
+  if (!Number.isFinite(num)) return String(value);
+  return num.toFixed(digits);
+}
+
+/** 置信度:接口 0~1 为小数比例,>1 为百分数 */
+export function formatWakePercent(value) {
+  if (value == null || value === "") return "";
+  const num = Number(value);
+  if (!Number.isFinite(num)) return String(value);
+  const pct = num <= 1 ? num * 100 : num;
+  return `${pct.toFixed(2)}%`;
+}
+
+function parseWakePercent(value) {
+  const raw = String(value).replace("%", "").trim();
+  const num = Number(raw);
+  return Number.isFinite(num) ? num : NaN;
+}
+
+/** 风机名称自然排序:纯数字按数值比,其余 localeCompare */
+export function compareTurbineName(a, b) {
+  const left = String(a ?? "").trim();
+  const right = String(b ?? "").trim();
+  const numLeft = Number(left);
+  const numRight = Number(right);
+  if (
+    Number.isFinite(numLeft) &&
+    Number.isFinite(numRight) &&
+    /^\d+(\.\d+)?$/.test(left) &&
+    /^\d+(\.\d+)?$/.test(right)
+  ) {
+    return numLeft - numRight;
+  }
+  return left.localeCompare(right, "zh-CN", { numeric: true });
+}
+
+/** 按风机名称排序列表,order: asc | desc */
+export function sortByTurbineName(list, getLabel, order = "asc") {
+  const direction = order === "desc" ? -1 : 1;
+  return [...(list || [])].sort(
+    (a, b) => compareTurbineName(getLabel(a), getLabel(b)) * direction,
+  );
+}
+
+/** 柱状图 X 轴短标签:如「内蒙绿源风电场3号风机」→「3号风机」 */
+export function formatWakeBarAxisLabel(name) {
+  const text = String(name || "").trim();
+  if (!text) return "";
+  const turbineMatch = text.match(/(\d+号风机)/);
+  if (turbineMatch) return turbineMatch[1];
+  const numUnitMatch = text.match(/(\d+号)/);
+  if (numUnitMatch) return numUnitMatch[1];
+  if (/^\d+$/.test(text)) return `${text}号`;
+  return text;
+}
+
+export function getTurbulenceClass(value) {
+  const num = Number(value);
+  if (!Number.isFinite(num)) return "";
+  if (num >= 10) return "wrw-value-high";
+  if (num >= 1) return "wrw-value-medium";
+  return "wrw-value-low";
+}
+
+export function getLossClass(value) {
+  const num = Number(value);
+  if (!Number.isFinite(num)) return "";
+  if (num >= 0.5) return "wrw-value-high";
+  if (num >= 0.2) return "wrw-value-medium";
+  return "wrw-value-low";
+}
+
+export function getConfidenceClass(value) {
+  const num = parseWakePercent(value);
+  if (!Number.isFinite(num)) return "";
+  if (num >= 90) return "wrw-value-high";
+  if (num >= 80) return "wrw-value-medium";
+  return "wrw-value-low";
+}

+ 473 - 0
src/views/windResourceWake/utils/wrwWakeMapper.js

@@ -0,0 +1,473 @@
+import {
+  fetchRemoteJson,
+  isRemoteImageUrl,
+  resolveResourceUrl,
+} from "./wrwRemoteData";
+import {
+  compareTurbineName,
+  formatWakeMetric,
+  formatWakePercent,
+} from "./wrwTableUtils";
+
+/** 接口 *Path 字段 → 前端图表数据 key */
+const CHART_PATH_MAP = [
+  { chartKey: "windSpeedDistribution", pathKey: "windSpeedDistributionChart" },
+  { chartKey: "wakeRose", pathKey: "wakeRoseDiagramPath" },
+  { chartKey: "wakeDistribute", pathKey: "wakeDistributePath" },
+  { chartKey: "wakeLossConfident", pathKey: "wakeLossConfidentPath" },
+  { chartKey: "velocityDeficitBar", pathKey: "velocityDeficitPath" },
+];
+
+const CHART_PAYLOAD_ALIASES = {
+  windSpeedDistribution: [
+    "windSpeedDistribution",
+    "windSpeedDistributionChart",
+  ],
+  wakeRose: ["wakeRose", "windRose"],
+  wakeDistribute: ["wakeDistribute", "layoutLossScatter"],
+  wakeLossConfident: ["wakeLossConfident", "lossConfidenceScatter"],
+  velocityDeficitBar: ["velocityDeficitBar", "velocityDeficit", "lossDelBar"],
+};
+
+function emptyPageData() {
+  return {
+    charts: {},
+    tableData: [],
+    turbineNames: [],
+    wakeDescription: "",
+    meta: {},
+  };
+}
+
+function unwrapWindRosePayload(payload) {
+  if (!payload || typeof payload !== "object") return null;
+
+  let current = payload;
+  for (let depth = 0; depth < 4; depth += 1) {
+    if (current.windRose && typeof current.windRose === "object") {
+      current = current.windRose;
+      continue;
+    }
+    if (current.wakeRose && typeof current.wakeRose === "object") {
+      current = current.wakeRose;
+      continue;
+    }
+    if (current.data && typeof current.data === "object") {
+      const nested =
+        current.data.windRose || current.data.wakeRose || current.data;
+      if (nested && nested !== current) {
+        current = nested;
+        continue;
+      }
+    }
+    break;
+  }
+
+  return current;
+}
+
+function normalizeChartPayload(chartKey, payload) {
+  if (!payload || typeof payload !== "object") return null;
+  if (chartKey === "wakeRose") {
+    return unwrapWindRosePayload(payload);
+  }
+  const aliases = CHART_PAYLOAD_ALIASES[chartKey] || [chartKey];
+  for (let i = 0; i < aliases.length; i += 1) {
+    if (payload[aliases[i]]) {
+      return payload[aliases[i]];
+    }
+  }
+  if (Array.isArray(payload.turbines) || Array.isArray(payload.points)) {
+    return payload;
+  }
+  if (Array.isArray(payload.items)) {
+    return payload;
+  }
+  if (Array.isArray(payload.bands)) {
+    return payload;
+  }
+  return payload;
+}
+
+function hasChartPayload(chartKey, data) {
+  if (!data || typeof data !== "object") return false;
+  if (data.__imageUrl) return true;
+  if (Array.isArray(data.points) && data.points.length) return true;
+  if (Array.isArray(data.items) && data.items.length) return true;
+  if (Array.isArray(data.turbines) && data.turbines.length) return true;
+  if (chartKey === "wakeRose" && !isEmptyWakeRose(data)) return true;
+  return false;
+}
+
+function normalizeChartsObject(rawCharts = {}, vo = {}) {
+  const charts = { ...(rawCharts || {}) };
+
+  Object.keys(CHART_PAYLOAD_ALIASES).forEach((chartKey) => {
+    if (hasChartPayload(chartKey, charts[chartKey])) return;
+
+    const aliases = CHART_PAYLOAD_ALIASES[chartKey] || [chartKey];
+    for (let i = 0; i < aliases.length; i += 1) {
+      const alias = aliases[i];
+      const sources = [charts[alias], vo[alias]];
+      for (let j = 0; j < sources.length; j += 1) {
+        const source = sources[j];
+        if (!source) continue;
+        const normalized = normalizeChartPayload(chartKey, source);
+        if (hasChartPayload(chartKey, normalized)) {
+          charts[chartKey] = normalized;
+          return;
+        }
+      }
+    }
+  });
+
+  return charts;
+}
+
+async function loadChartFromPath(chartKey, path) {
+  if (!path) return null;
+  const resolved = resolveResourceUrl(path);
+  if (isRemoteImageUrl(resolved)) {
+    return chartKey === "wakeDistribute" ? { __imageUrl: resolved } : null;
+  }
+  try {
+    const json = await fetchRemoteJson(resolved);
+    return normalizeChartPayload(chartKey, json);
+  } catch (error) {
+    console.warn(`加载尾流图表资源失败 [${chartKey}]:`, path, error);
+    return null;
+  }
+}
+
+async function loadDescriptionText(path) {
+  if (!path) return "";
+  const resolved = resolveResourceUrl(path);
+  if (isRemoteImageUrl(resolved)) return "";
+  try {
+    const response = await fetch(resolved, {
+      method: "GET",
+      credentials: "include",
+    });
+    if (!response.ok) return "";
+    return response.text();
+  } catch (error) {
+    console.warn("加载尾流描述文本失败:", path, error);
+    return "";
+  }
+}
+
+function formatConfidence(confidentLevel) {
+  return formatWakePercent(confidentLevel);
+}
+
+function formatNumber(value) {
+  return formatWakeMetric(value);
+}
+
+function getWakeTurbinePath(item) {
+  const path = item?.wakeTurbinePath || item?.image || "";
+  return typeof path === "string" ? path.trim() : path ? String(path) : "";
+}
+
+export function mapWakeTurbineList(list) {
+  if (!Array.isArray(list)) return [];
+  return list
+    .filter((item) => getWakeTurbinePath(item) !== "")
+    .map((item) => ({
+      name: item.engineName || item.engineId || item.name || "—",
+      engineId: item.engineId || "",
+      affected: item.isWake === 1 || item.isWake === true ? "yes" : "no",
+      turbulence: formatNumber(item.turbulenceIntensity),
+      loss: formatNumber(item.velocityDeficit),
+      confidence: formatConfidence(item.confidentLevel),
+      image: resolveResourceUrl(getWakeTurbinePath(item)),
+    }));
+}
+
+function extractTurbineNames(charts, turbineList) {
+  const names = [];
+  const pushName = (id) => {
+    if (id && !names.includes(id)) names.push(id);
+  };
+
+  charts.windSpeedDistribution?.turbines?.forEach((item) => {
+    pushName(item.displayName || item.engineId);
+  });
+  charts.wakeRose?.turbines?.forEach((item) => {
+    pushName(item.engineId);
+  });
+  charts.wakeRose30d?.turbines?.forEach((item) => {
+    pushName(item.engineId);
+  });
+  if (Array.isArray(turbineList)) {
+    turbineList.forEach((item) => pushName(item.engineId));
+  }
+  return names;
+}
+
+function formatDataDate(dataDate) {
+  if (!dataDate) return "";
+  return String(dataDate).slice(0, 10);
+}
+
+function isEmptyWakeRose(rose) {
+  return !rose || !Array.isArray(rose.turbines) || !rose.turbines.length;
+}
+
+function hasRoseBands(turbine) {
+  return (
+    turbine &&
+    Array.isArray(turbine.bands) &&
+    turbine.bands.some(
+      (band) => Array.isArray(band.values) && band.values.length,
+    )
+  );
+}
+
+function normalizeTurbineRoseData(engineId, payload) {
+  const normalized = unwrapWindRosePayload(payload);
+  if (!normalized || typeof normalized !== "object") return null;
+
+  const meta = {
+    speedBands: normalized.speedBands,
+    directions: normalized.directions,
+  };
+
+  if (Array.isArray(normalized.turbines) && normalized.turbines.length) {
+    const matched =
+      normalized.turbines.find((item) => item.engineId === engineId) ||
+      normalized.turbines[0];
+    if (!hasRoseBands(matched)) return null;
+    return {
+      engineId: matched.engineId || engineId,
+      bands: matched.bands,
+      speedBands: meta.speedBands,
+      directions: meta.directions,
+    };
+  }
+
+  if (hasRoseBands(normalized)) {
+    return {
+      engineId: normalized.engineId || engineId,
+      bands: normalized.bands,
+      speedBands: meta.speedBands,
+      directions: meta.directions,
+    };
+  }
+
+  return null;
+}
+
+const DAILY_ROSE_PATH_KEYS = [
+  "wakeRoseDiagramPath",
+  "windRoseDiagramPath",
+  "wakeRosePath",
+];
+const ROSE_30D_PATH_KEYS = ["wakeRoseDiagram30dPath"];
+
+function getTurbineRosePath(item, pathKeys = DAILY_ROSE_PATH_KEYS) {
+  const keys = Array.isArray(pathKeys) && pathKeys.length ? pathKeys : DAILY_ROSE_PATH_KEYS;
+  for (let i = 0; i < keys.length; i += 1) {
+    const path = item?.[keys[i]];
+    if (typeof path === "string" && path.trim()) return path.trim();
+  }
+  return "";
+}
+
+function getInlineTurbineRoseSource(
+  item,
+  { pathKeys = DAILY_ROSE_PATH_KEYS, includeInlineAliases = true } = {},
+) {
+  if (!item || typeof item !== "object") return null;
+
+  const keys = Array.isArray(pathKeys) && pathKeys.length ? pathKeys : DAILY_ROSE_PATH_KEYS;
+  for (let i = 0; i < keys.length; i += 1) {
+    const pathField = item[keys[i]];
+    if (pathField && typeof pathField === "object") {
+      return normalizeTurbineRoseData(item.engineId, pathField);
+    }
+  }
+
+  if (includeInlineAliases && (item.windRose || item.wakeRose)) {
+    return normalizeTurbineRoseData(
+      item.engineId,
+      item.windRose || item.wakeRose,
+    );
+  }
+
+  return null;
+}
+
+async function loadTurbineRoseFromItem(item, options = {}) {
+  const engineId = item?.engineId || "";
+  const inlineRose = getInlineTurbineRoseSource(item, options);
+  if (inlineRose) return inlineRose;
+
+  const rosePath = getTurbineRosePath(item, options.pathKeys);
+  if (!rosePath || isRemoteImageUrl(resolveResourceUrl(rosePath))) {
+    return null;
+  }
+
+  try {
+    const json = await fetchRemoteJson(rosePath);
+    return normalizeTurbineRoseData(engineId, json);
+  } catch (error) {
+    console.warn(`加载机组玫瑰图失败 [${engineId}]:`, rosePath, error);
+    return null;
+  }
+}
+
+async function loadTurbineRoseDiagrams(turbineList, options = {}) {
+  if (!Array.isArray(turbineList) || !turbineList.length) {
+    return [];
+  }
+
+  const results = await Promise.all(
+    turbineList.map((item) => loadTurbineRoseFromItem(item, options)),
+  );
+
+  return results.filter(Boolean);
+}
+
+async function resolveWakeRoseChart({
+  existing,
+  farmPath,
+  turbineList,
+  perTurbineRoses,
+}) {
+  const mergedWakeRose = mergeWakeRoseData(null, turbineList, perTurbineRoses);
+  if (mergedWakeRose?.turbines?.length) return mergedWakeRose;
+  if (!isEmptyWakeRose(existing)) return existing;
+  const farmRose = await loadChartFromPath("wakeRose", farmPath);
+  if (farmRose && !isEmptyWakeRose(farmRose)) return farmRose;
+  return existing || null;
+}
+
+function resolveRoseTurbineName(turbine, turbineList) {
+  const engineId = turbine?.engineId;
+  const hit = (turbineList || []).find(
+    (item) => String(item?.engineId) === String(engineId),
+  );
+  return (
+    hit?.engineName ||
+    turbine?.engineName ||
+    turbine?.displayName ||
+    turbine?.engineId ||
+    turbine?.name ||
+    ""
+  );
+}
+
+function sortRoseTurbines(turbines, turbineList) {
+  return [...(turbines || [])]
+    .map((item) => {
+      const { speedBands, directions, ...rest } = item || {};
+      return {
+        ...rest,
+        engineName: resolveRoseTurbineName(item, turbineList),
+      };
+    })
+    .sort((a, b) =>
+      compareTurbineName(
+        a.engineName || a.engineId,
+        b.engineName || b.engineId,
+      ),
+    );
+}
+
+function mergeWakeRoseData(farmRose, turbineList, perTurbineRoses) {
+  const roseMap = new Map();
+
+  (farmRose?.turbines || []).forEach((item) => {
+    if (item?.engineId) roseMap.set(item.engineId, item);
+  });
+  perTurbineRoses.forEach((item) => {
+    if (item?.engineId) roseMap.set(item.engineId, item);
+  });
+
+  if (!roseMap.size) return farmRose || null;
+
+  const turbines = [];
+  if (Array.isArray(turbineList)) {
+    turbineList.forEach((item) => {
+      const id = item?.engineId;
+      if (id && roseMap.has(id)) {
+        turbines.push(roseMap.get(id));
+        roseMap.delete(id);
+      }
+    });
+  }
+  roseMap.forEach((item) => turbines.push(item));
+
+  const metaSource =
+    perTurbineRoses.find((item) => item.speedBands || item.directions) ||
+    farmRose ||
+    {};
+
+  return {
+    speedBands: metaSource.speedBands || farmRose?.speedBands,
+    directions: metaSource.directions || farmRose?.directions,
+    turbines: sortRoseTurbines(turbines, turbineList),
+  };
+}
+
+export async function loadWakePageData(vo) {
+  if (!vo || typeof vo !== "object") {
+    return emptyPageData();
+  }
+
+  const turbineList = Array.isArray(vo.getWakeTurbineList)
+    ? vo.getWakeTurbineList
+    : [];
+  let charts = normalizeChartsObject(
+    vo.charts && typeof vo.charts === "object" ? vo.charts : {},
+    vo,
+  );
+
+  const [wakeDescription, perTurbineRoses, perTurbineRoses30d] =
+    await Promise.all([
+      loadDescriptionText(vo.wakeDiscriptionPath),
+      loadTurbineRoseDiagrams(turbineList),
+      loadTurbineRoseDiagrams(turbineList, {
+        pathKeys: ROSE_30D_PATH_KEYS,
+        includeInlineAliases: false,
+      }),
+      ...CHART_PATH_MAP.filter(({ chartKey }) => chartKey !== "wakeRose").map(
+        async ({ chartKey, pathKey }) => {
+          if (charts[chartKey]) return;
+          const loaded = await loadChartFromPath(chartKey, vo[pathKey]);
+          if (loaded) {
+            charts[chartKey] = loaded;
+          }
+        },
+      ),
+    ]);
+
+  charts.wakeRose = await resolveWakeRoseChart({
+    existing: charts.wakeRose,
+    farmPath: vo.wakeRoseDiagramPath,
+    turbineList,
+    perTurbineRoses,
+  });
+  charts.wakeRose30d = await resolveWakeRoseChart({
+    existing: charts.wakeRose30d,
+    farmPath: vo.wakeRoseDiagram30dPath,
+    turbineList,
+    perTurbineRoses: perTurbineRoses30d,
+  });
+
+  const tableData = mapWakeTurbineList(turbineList);
+  const turbineNames = extractTurbineNames(charts, turbineList);
+
+  return {
+    charts,
+    tableData,
+    turbineNames,
+    wakeDescription,
+    turbineList,
+    meta: {
+      fieldId: vo.fieldId || "",
+      dataDate: formatDataDate(vo.dataDate),
+    },
+  };
+}

BIN
项目截图/项目截图.docx