Browse Source

特征值

rui.jiang 2 months ago
parent
commit
aa3794b209

+ 151 - 27
src/views/health/components/envelopecharts.vue

@@ -17,18 +17,15 @@
       ></el-input>
       <el-button size="small" @click="chaxun">确定</el-button>
       <div v-if="TZshow" class="eigenvalue">
-        <h5>特征值</h5>
-        <p>有效值:{{ this.Xrms }}</p>
-        <p>平均值:{{ this.envelopeList.mean_value }}</p>
-        <p>最大值:{{ this.envelopeList.max_value }}</p>
-        <p>最小值:{{ this.envelopeList.min_value }}</p>
-        <p>峰值:{{ this.envelopeList.Xp }}</p>
-        <p>峰峰值:{{ this.envelopeList.Xpp }}</p>
-        <p>波形因子:{{ this.envelopeList.Sf }}</p>
-        <p>脉冲指标:{{ this.envelopeList.If }}</p>
-        <p>裕度指标:{{ this.envelopeList.Ce }}</p>
-        <p>偏度指标:{{ this.envelopeList.Cw }}</p>
-        <p>峭度指标:{{ this.envelopeList.Cq }}</p>
+        <el-checkbox-group v-model="checkedValues" @change="handleCheckChange">
+          <el-checkbox
+            v-for="(item, index) in PXcheckList"
+            :key="index"
+            :label="item.val"
+          >
+            {{ item.val }}
+          </el-checkbox>
+        </el-checkbox-group>
       </div>
     </div>
 
@@ -39,7 +36,7 @@
 <script>
 import * as echarts from "echarts"; // 导入 echarts 库
 import axios from "axios";
-import { log } from 'plotly.js-dist';
+import { log } from "plotly.js-dist";
 export default {
   name: "TimedomainCharts", // 组件名称
   props: {
@@ -77,21 +74,34 @@ export default {
       daval: "",
       envelopeList: {},
       TZshow: false,
+
+      PXcheckList: [
+        { val: "Fr", checked: false },
+        { val: "BPFI", checked: false },
+        { val: "BPFO", checked: false },
+        { val: "BSF", checked: false },
+        { val: "FTF", checked: false },
+        { val: "3P", checked: false },
+      ],
+      Fr: [],
+      BPFI: [],
+      BPFO: [],
+      BSF: [],
+      FTF: [],
+      B3P: [],
+
+      checkedGB: [],
+      checkedValues: [],
     };
   },
   watch: {
+    // 移除 envelopeList 的监听
     envelopeListTwo: {
       handler(newValue) {
         this.updateChart(newValue.y, newValue.x); // 更新图表
       },
       deep: true, // 确保监听对象的深层次变化
     },
-    envelopeList: {
-      handler(newValue) {
-        this.updateChart(newValue.y, newValue.x); // 更新图表
-      },
-      deep: true, // 确保监听对象的深层次变化
-    },
   },
   mounted() {
     this.initializeChart();
@@ -116,15 +126,52 @@ export default {
       axios
         .post("/WJapi/analysis/envelope", params)
         .then((res) => {
-        
-          
           this.envelopeList = JSON.parse(res.data);
-          const defaultData = this.envelopeList.y || this.envelopeListTwo.y || [];
-          const defaultLabels = this.envelopeList.x || this.envelopeListTwo.x || [];
+          const XrmsValue = this.envelopeList?.Xrms;
+          this.$emit("updateXrms", XrmsValue);
+          this.PXcheckList.forEach((item) => {
+            if (item.checked) {
+              switch (item.val) {
+                case "Fr":
+                  this.Fr = this.envelopeList.fn_Gen;
+                  console.log(this.Fr);
+                  
+                  break;
+                case "BPFI":
+                  this.BPFI = this.envelopeList.BPFI;
+                  console.log(this.BPFI);
+                  break;
+                case "BPFO":
+                  this.BPFO = this.envelopeList.BPFO;
+                  break;
+                case "BSF":
+                  this.BSF = this.envelopeList.BSF;
+                  break;
+                case "FTF":
+                  this.FTF = this.envelopeList.FTF;
+                  break;
+                case "3P":
+                  this.B3P = Array.isArray(this.envelopeList.B3P)
+                    ? this.envelopeList.B3P
+                    : [{ Xaxis: this.envelopeList.B3P, val: "3P" }];
+                  break;
+                default:
+                  break;
+              }
+            }
+          });
+
+          const defaultData =
+            this.envelopeList.y || this.envelopeListTwo.y || [];
+          const defaultLabels =
+            this.envelopeList.x || this.envelopeListTwo.x || [];
           // 这里是数据采样,减少数据量
           const sampleData = defaultData.filter((_, index) => index % 50 === 0); // 每隔50个数据点采样一次
-          const sampleLabels = defaultLabels.filter((_, index) => index % 50 === 0); // 同样对 X 数据进行采样
-          this.updateChart(sampleData, sampleLabels); // 使用采样数据更新图表
+          const sampleLabels = defaultLabels.filter(
+            (_, index) => index % 50 === 0
+          ); // 同样对 X 数据进行采样
+          // 直接调用 updateChart 方法
+          this.updateChart(sampleData, sampleLabels); 
         })
         .catch((error) => {
           console.error(error);
@@ -134,6 +181,83 @@ export default {
         });
     },
 
+    handleCheckChange() {
+      this.PXcheckList.forEach((item) => {
+        item.checked = this.checkedValues.includes(item.val);
+      });
+
+      // 构建新的特征频率数据
+      const newFeatureLines = {
+        Fr: this.checkedValues.includes("Fr") ? this.envelopeList.fn_Gen : [],
+        BPFI: this.checkedValues.includes("BPFI") ? this.envelopeList.BPFI : [],
+        BPFO: this.checkedValues.includes("BPFO") ? this.envelopeList.BPFO : [],
+        BSF: this.checkedValues.includes("BSF") ? this.envelopeList.BSF : [],
+        FTF: this.checkedValues.includes("FTF") ? this.envelopeList.FTF : [],
+        B3P: this.checkedValues.includes("3P")
+          ? Array.isArray(this.envelopeList.B3P)
+            ? this.envelopeList.B3P
+            : [{ Xaxis: this.envelopeList.B3P, val: "3P" }]
+          : [],
+      };
+
+      // 仅更新 `series`,避免重新渲染整个 ECharts 组件
+      if (this.chartInstance) {
+        this.chartInstance.setOption(
+          {
+            series: this.generateSeries(newFeatureLines),
+          },
+          { replaceMerge: ["series"] }
+        );
+      }
+    },
+
+    generateSeries(featureLines) {
+      const createMarkLine = (dataSource, color) => ({
+        type: "line",
+        markLine: {
+          silent: false,
+          lineStyle: { color, type: "dashed", width:1 },
+          symbol: ["arrow", "none"],
+          label: {
+            show: true,
+            position: "end",
+            formatter: ({ data }) => data.val,
+          },
+          emphasis: {
+            lineStyle: { color: "#FF6A00", width: 2 },
+            label: {
+              show: true,
+              formatter: ({ value }) => `特征值: ${value}`,
+              color: "#000",
+            },
+          },
+          data: dataSource.map(({ Xaxis, val }) => ({ xAxis: Xaxis, val })),
+        },
+      });
+
+      const markLines = [
+        { data: featureLines.Fr, color: "#A633FF" },
+        { data: featureLines.BPFI, color: "#23357e" },
+        { data: featureLines.BPFO, color: "#42a0ae" },
+        { data: featureLines.BSF, color: "#008080" },
+        { data: featureLines.FTF, color: "#af254f" },
+        { data: featureLines.B3P, color: "#FFD700" },
+      ].map(({ data, color }) => createMarkLine(data, color));
+
+      return [
+        {
+          name: "数据系列",
+          type: "line",
+          data: this.envelopeList.x.map((x, i) => [x, this.envelopeList.y[i]]),
+          symbol: "none",
+          lineStyle: { color: "#162961", width: 1 },
+          itemStyle: { color: "#162961", borderColor: "#fff", borderWidth: 1 },
+          large: true,
+        },
+        ...markLines,
+      ];
+    },
+
     initializeChart() {
       // 获取图表容器
       const chartDom = this.$refs.chart;
@@ -183,8 +307,8 @@ export default {
             },
             myCustomTool3: {
               show: true,
-              title: "特征",
-              icon: `image://${require("@/assets/analyse/10.png")}`,
+              title: "特征频率",
+              icon: `image://${require("@/assets/analyse/13.png")}`,
               onclick: () => this.Show(),
             },
           },

+ 247 - 122
src/views/health/components/spectrogramcharts.vue

@@ -1,48 +1,18 @@
 <template>
   <div>
     <div class="FD">
-      <div v-if="TZshow" class="eigenvalue">
-        <el-checkbox-group v-model="checkedCheckList">
-          <el-checkbox
-            v-for="(item, index) in checkList"
-            :key="index"
-            :label="item.val"
-          >
-            {{ item.val }}
-          </el-checkbox>
-        </el-checkbox-group>
-        <!-- <h5>特征值</h5>
-        <p>有效值:{{ this.spectrumList.Xrms }}</p>
-        <p>平均值:{{ this.spectrumList.mean_value }}</p>
-        <p>最大值:{{ this.spectrumList.max_value }}</p>
-        <p>最小值:{{ this.spectrumList.min_value }}</p>
-        <p>峰值:{{ this.spectrumList.Xp }}</p>
-        <p>峰峰值:{{ this.spectrumList.Xpp }}</p>
-        <p>波形因子:{{ this.spectrumList.Sf }}</p>
-        <p>脉冲指标:{{ this.spectrumList.If }}</p>
-        <p>裕度指标:{{ this.spectrumList.Ce }}</p>
-        <p>偏度指标:{{ this.spectrumList.Cw }}</p>
-        <p>峭度指标:{{ this.spectrumList.Cq }}</p> -->
-      </div>
-
+      <!-- 光标 -->
       <div v-if="BGshow" class="eigenvalue">
         <el-checkbox-group v-model="checkedGB">
-          <el-checkbox
-            v-for="(item, index) in GBcheckList"
-            :key="index"
-            :label="item.val"
-          >
+          <el-checkbox v-for="(item, index) in GBcheckList" :key="index" :label="item.val">
             {{ item.val }}
           </el-checkbox>
         </el-checkbox-group>
       </div>
+      <!-- 特征值 -->
       <div v-if="PXshow" class="eigenvalue">
-        <el-checkbox-group v-model="checkedValues">
-          <el-checkbox
-            v-for="(item, index) in PXcheckList"
-            :key="index"
-            :label="item.val"
-          >
+        <el-checkbox-group v-model="checkedValues" @change="handleCheckChange">
+          <el-checkbox v-for="(item, index) in PXcheckList" :key="index" :label="item.val">
             {{ item.val }}
           </el-checkbox>
         </el-checkbox-group>
@@ -57,7 +27,6 @@
 <script>
 import axios from "axios";
 import * as echarts from "echarts"; // 导入 echarts 库
-import { e } from "plotly.js-dist";
 
 export default {
   name: "TimedomainCharts", // 组件名称
@@ -95,12 +64,7 @@ export default {
       BGshow: false,
       PXshow: false,
       spectrumList: {},
-      checkList: [
-        { val: "BPFI" },
-        { val: "BPFO" },
-        { val: "BPO" },
-        { val: "FT" },
-      ],
+
       GBcheckList: [
         { val: "添加光标" },
         { val: "谐波光标" },
@@ -108,29 +72,25 @@ export default {
         { val: "移动峰值" },
       ],
       PXcheckList: [
-        { val: "Fr" },
-        { val: "BPFI" },
-        { val: "BPFO" },
-        { val: "FT" },
-        { val: "GMF" },
-        { val: "±5Fr" },
+        { val: "Fr", checked: false },
+        { val: "BPFI", checked: false },
+        { val: "BPFO", checked: false },
+        { val: "BSF", checked: false },
+        { val: "FTF", checked: false },
+        { val: "3P", checked: false },
       ],
+      Fr: [],
+      BPFI: [],
+      BPFO: [],
+      BSF: [],
+      FTF: [],
+      B3P: [],
 
       checkedGB: [],
-      checkedCheckList: [],
       checkedValues: [],
     };
   },
   watch: {
-    checkedGB(newValues) {
-      console.log("当前选中的复选框值:", newValues);
-    },
-    checkedCheckList(newValues) {
-      console.log("当前选中的复选框值:", newValues);
-    },
-    checkedValues(newValues) {
-      console.log("当前选中的复选框值:", newValues);
-    },
     // 监听 chartData 和 chartLabels 的变化,重新绘制图表
     chartData(newData) {
       this.updateChart(newData, this.chartLabels);
@@ -146,6 +106,8 @@ export default {
     },
     spectrumList: {
       handler(newValue) {
+        if (!newValue) return;
+        console.log(newValue, "newValue");
         if (this.chartInstance) {
           this.updateChart(newValue.y, newValue.x); // 只在 chartInstance 初始化后更新图表
         }
@@ -154,6 +116,7 @@ export default {
     },
   },
   mounted() {
+    
     this.$nextTick(() => {
       setTimeout(() => {
         this.initializeChart(); // 延迟2秒后调用
@@ -179,25 +142,54 @@ export default {
 
     // 更新图表数据
     updateChart(data, labels) {
-      if (!this.chartInstance || !labels || !data) return; // 确保数据存在
-
-      // 确保 labels 是数组
-      if (!Array.isArray(labels)) {
-        console.error("Labels are not an array");
+      if (
+        !this.chartInstance ||
+        !Array.isArray(labels) ||
+        !Array.isArray(data) ||
+        labels.length !== data.length
+      ) {
+        console.error("Invalid data or labels");
         return;
       }
 
-      // 确保 data 和 labels 长度一致
-      if (labels.length !== data.length) {
-        console.error("Data and labels length mismatch");
-        return;
-      }
+      const createMarkLine = (dataSource, color) => ({
+        type: "line",
+        markLine: {
+          silent: false,
+          lineStyle: { color, type: "solid", width: 2 },
+          symbol: ["arrow", "none"],
+          label: {
+            show: true,
+            position: "end",
+            formatter: ({ data }) => data.val,
+          },
+          emphasis: {
+            lineStyle: { color: "#FF6A00", width: 4 },
+            label: {
+              show: true,
+              formatter: ({ value }) => `特征值: ${value}`,
+              color: "#000",
+              backgroundColor: "#FFF",
+              padding: [2, 4],
+              borderRadius: 3,
+              fontSize: 12,
+            },
+          },
+          data: dataSource.map(({ Xaxis, val }) => ({ xAxis: Xaxis, val })),
+        },
+      });
+
+      const markLines = [
+        { data: this.Fr, color: "#A633FF" },
+        { data: this.BPFI, color: "#23357e" },
+        { data: this.BPFO, color: "#42a0ae" },
+        { data: this.BSF, color: "#008080" },
+        { data: this.FTF, color: "#af254f" },
+        { data: this.B3P, color: "#FFD700" },
+      ].map(({ data, color }) => createMarkLine(data, color));
 
       const option = {
-        title: {
-          text: this.spectrumList.title,
-          left: "center",
-        },
+        title: { text: this.spectrumList.title, left: "center" },
         toolbox: {
           feature: {
             dataZoom: { yAxisIndex: "none" },
@@ -215,12 +207,6 @@ export default {
               icon: `image://${require("@/assets/analyse/09.png")}`,
               onclick: () => this.nextRow(),
             },
-            myCustomTool3: {
-              show: true,
-              title: "齿轮特征值",
-              icon: `image://${require("@/assets/analyse/11.png")}`,
-              onclick: () => this.Show("1"),
-            },
             myCustomTool4: {
               show: true,
               title: "光标",
@@ -244,15 +230,6 @@ export default {
             color: "#333",
             padding: [10, 0, 0, 0],
           },
-          axisLabel: {
-            formatter: (value) => value,
-          },
-          axisTick: {
-            show: true,
-          },
-          axisLine: {
-            show: true,
-          },
         },
         yAxis: {
           type: "value",
@@ -262,66 +239,128 @@ export default {
             color: "#333",
             padding: [10, 0, 0, 0],
           },
-          axisLabel: {
-            formatter: (value) => value,
-          },
-          axisTick: {
-            show: true,
-          },
-          axisLine: {
-            show: true,
-          },
         },
         tooltip: {
           trigger: "axis",
-          formatter: (params) => {
-            const xValue = params[0].value[0];
-            const yValue = params[0].value[1];
-            return `X: ${xValue}<br/>Y: ${yValue}`;
-          },
-          axisPointer: {
-            type: "line",
-          },
+          formatter: ([
+            {
+              value: [x, y],
+            },
+          ]) => `X: ${x}<br/>Y: ${y}`,
+          axisPointer: { type: "line" },
         },
         dataZoom: [
+          { type: "inside", start: 0, end: 10 },
           {
-            type: "inside", // 内置型数据区域缩放组件
+            type: "slider",
             start: 0,
-            end: 10, // 初始显示前 10% 的数据
-          },
-          {
-            type: "slider", // 滑动条型数据区域缩放组件
-            start: 0,
-            end: 10, // 初始显示前 10% 的数据
-            handleSize: "80%", // 控制手柄大小
-            showDataShadow: false, // 不显示数据阴影
+            end: 10,
+            handleSize: "80%",
+            showDataShadow: false,
           },
         ],
         series: [
           {
             name: "数据系列",
             type: "line",
-            data: labels.map((item, index) => [item, data[index]]),
+            data: labels.map((x, i) => [x, data[i]]),
             symbol: "none",
-            symbolSize: 8,
-            lineStyle: {
-              color: "#162961",
-              width: 1,
-            },
+            lineStyle: { color: "#162961", width: 1 },
             itemStyle: {
               color: "#162961",
               borderColor: "#fff",
               borderWidth: 1,
             },
-            large: true, // 开启大数据量优化
-            progressive: 2000, // 渐进式渲染,每 2000 个数据点渲染一次
+            large: true,
+            progressive: 2000,
           },
+          ...markLines,
         ],
       };
 
       this.chartInstance.setOption(option);
     },
 
+    handleCheckChange() {
+      this.PXcheckList.forEach((item) => {
+        item.checked = this.checkedValues.includes(item.val);
+      });
+
+      // 构建新的特征频率数据
+      const newFeatureLines = {
+        Fr: this.checkedValues.includes("Fr") ? this.spectrumList.fn_Gen : [],
+        BPFI: this.checkedValues.includes("BPFI") ? this.spectrumList.BPFI : [],
+        BPFO: this.checkedValues.includes("BPFO") ? this.spectrumList.BPFO : [],
+        BSF: this.checkedValues.includes("BSF") ? this.spectrumList.BSF : [],
+        FTF: this.checkedValues.includes("FTF") ? this.spectrumList.FTF : [],
+        B3P: this.checkedValues.includes("3P")
+          ? Array.isArray(this.spectrumList.B3P)
+            ? this.spectrumList.B3P
+            : [{ Xaxis: this.spectrumList.B3P, val: "3P" }]
+          : [],
+      };
+
+      // 仅更新 `series`,避免重新渲染整个 ECharts 组件
+      if (this.chartInstance) {
+        this.chartInstance.setOption(
+          {
+            series: this.generateSeries(newFeatureLines),
+          },
+          { replaceMerge: ["series"] }
+        );
+      }
+    },
+
+    generateSeries(featureLines) {
+      const createMarkLine = (dataSource, color) => ({
+        type: "line",
+        markLine: {
+          silent: false,
+          lineStyle: { color, type: "dashed", width:1 },
+          symbol: ["arrow", "none"],
+          label: {
+            show: true,
+            position: "end",
+            formatter: ({ data }) => data.val,
+          },
+          emphasis: {
+            lineStyle: { color: "#FF6A00", width: 2 },
+            label: {
+              show: true,
+              formatter: ({ value }) => `特征值: ${value}`,
+              color: "#000",
+            },
+          },
+          data: dataSource.map(({ Xaxis, val }) => ({ xAxis: Xaxis, val })),
+        },
+      });
+
+      const markLines = [
+        { data: featureLines.Fr, color: "#A633FF" },
+        { data: featureLines.BPFI, color: "#23357e" },
+        { data: featureLines.BPFO, color: "#42a0ae" },
+        { data: featureLines.BSF, color: "#008080" },
+        { data: featureLines.FTF, color: "#af254f" },
+        { data: featureLines.B3P, color: "#FFD700" },
+      ].map(({ data, color }) => createMarkLine(data, color));
+
+      return [
+        {
+          name: "数据系列",
+          type: "line",
+          data: this.spectrumList.x.map((x, i) => [x, this.spectrumList.y[i]]),
+          symbol: "none",
+          lineStyle: { color: "#162961", width: 1 },
+          itemStyle: { color: "#162961", borderColor: "#fff", borderWidth: 1 },
+          large: true,
+        },
+        ...markLines,
+      ];
+    },
+
+    
+
+
     getTime() {
       this.$emit("handleLoading", null, true, this.activeIndex);
       const params = {
@@ -332,7 +371,40 @@ export default {
       axios
         .post("/WJapi/analysis/frequency", params)
         .then((res) => {
-          this.spectrumList = JSON.parse(res.data);
+          console.log(res, "频谱图数据");
+          this.spectrumList = { ...JSON.parse(res.data) };
+          console.log(this.spectrumList, "频谱图数据1");
+          const XrmsValue = this.spectrumList?.Xrms;
+          // 通过 $emit 传递 XrmsValue 给父组件
+          this.$emit("updateXrms", XrmsValue);
+          this.PXcheckList.forEach((item) => {
+            if (item.checked) {
+              switch (item.val) {
+                case "Fr":
+                  this.Fr = this.spectrumList.fn_Gen;
+                  break;
+                case "BPFI":
+                  this.BPFI = this.spectrumList.BPFI;
+                  break;
+                case "BPFO":
+                  this.BPFO = this.spectrumList.BPFO;
+                  break;
+                case "BSF":
+                  this.BSF = this.spectrumList.BSF;
+                  break;
+                case "FTF":
+                  this.FTF = this.spectrumList.FTF;
+                  break;
+                case "3P":
+                  this.B3P = Array.isArray(this.spectrumList.B3P)
+                    ? this.spectrumList.B3P
+                    : [{ Xaxis: this.spectrumList.B3P, val: "3P" }];
+                  break;
+                default:
+                  break;
+              }
+            }
+          });
         })
         .catch((error) => {
           console.error(error);
@@ -364,6 +436,57 @@ export default {
         this.PXshow = value === "3" ? !this.PXshow : false;
       }
     },
+
+    // handleCheckChange() {
+    //   this.PXcheckList.forEach((item) => {
+    //     // 如果 `checkedValues` 里有这个项,则 checked=true,否则 checked=false
+    //     item.checked = this.checkedValues.includes(item.val);
+    //   });
+
+    //   // 重置数据数组
+    //   this.Fr = [];
+    //   this.BPFI = [];
+    //   this.BPFO = [];
+    //   this.BSF = [];
+    //   this.FTF = [];
+    //   this.B3P = [];
+
+    //   // 找到刚刚被点击的项
+    //   const changedItem = this.PXcheckList.find(
+    //     (item) => !this.checkedValues.includes(item.val) !== item.checked
+    //   );
+
+    //   if (changedItem) {
+    //     console.log("当前点击项:", changedItem);
+    //     // 根据选中状态赋值
+    //     if (this.checkedValues.includes("Fr")) {
+    //       this.Fr = this.spectrumList.fn_Gen;
+    //     }
+    //     if (this.checkedValues.includes("BPFI")) {
+    //       this.BPFI = this.spectrumList.BPFI;
+    //     }
+    //     if (this.checkedValues.includes("BPFO")) {
+    //       this.BPFO = this.spectrumList.BPFO;
+    //     }
+    //     if (this.checkedValues.includes("BSF")) {
+    //       this.BSF = this.spectrumList.BSF;
+    //     }
+    //     if (this.checkedValues.includes("FTF")) {
+    //       this.FTF = this.spectrumList.FTF;
+    //     }
+    //     if (this.checkedValues.includes("3P")) {
+    //       this.B3P = Array.isArray(this.spectrumList.B3P)
+    //         ? this.spectrumList.B3P
+    //         : [{ Xaxis: this.spectrumList.B3P, val: "3P" }];
+    //     }
+    //     // 更新 ECharts 图表数据
+    //     if (this.chartInstance) {
+    //       this.updateChart(this.spectrumList.y, this.spectrumList.x);
+    //     }
+    //   }
+    // },
+
+   
   },
 };
 </script>
@@ -372,6 +495,7 @@ export default {
   width: 100%;
   height: 280px;
 }
+
 .FD {
   width: 100%;
   height: 1px;
@@ -388,6 +512,7 @@ export default {
   padding: 5px;
   background: #fff;
   z-index: 99;
+
   h5 {
     line-height: 16px;
     height: 16px;

+ 21 - 5
src/views/health/vibration.vue

@@ -133,13 +133,17 @@
             }"
             v-loading="item.loading"
           >
-            <!-- {{ item.rowData }} -->
+       <!-- {{ item.rowData }} -->
             <p v-if="item.name != '趋势图'">
               测点路径:{{
                 getDetectionPointCn(item?.rowData?.mesurePointName)
               }}-{{ item?.rowData?.windTurbineNumber }}
+              <span>采样频率: {{ item?.rowData?.samplingFrequency }}(Hz)</span>
+              <span>发电机转速: {{ item?.rowData?.rotationalSpeed }}(rpm) </span>
               <span>采样时间: {{ item?.rowData?.timeStamp }} </span>
+              <span>有效值: {{XrmsValue}} (m/s2)</span>
             </p>
+  
 
             <!-- {{ samplingTime }} -->
             <div v-if="item.name === '时域图'">
@@ -159,6 +163,7 @@
             </div>
             <div v-if="item.name === '频谱图'">
               <spectrogramcharts
+               @updateXrms="handleXrmsUpdate"
                 :spectrumListTwo="item.spectrumListTwo"
                 :currentIndex="currentIndex"
                 :tableDataList="tableDataList"
@@ -174,6 +179,7 @@
             </div>
             <div v-if="item.name === '包络谱图'">
               <envelopecharts
+                   @updateXrms="handleXrmsUpdate"
                 :envelopeListTwo="item.envelopeListTwo"
                 :currentIndex="currentIndex"
                 :tableDataList="tableDataList"
@@ -209,9 +215,9 @@
           :row-class-name="tableRowClassName"
           id="Table1"
         >
-          <el-table-column type="index" label="排序"> </el-table-column>
-          <el-table-column prop="timeStamp" label="时间"> </el-table-column>
-          <el-table-column prop="mesurePointName" label="测点名称">
+          <el-table-column type="index" label="排序"       fixed> </el-table-column>
+          <el-table-column prop="timeStamp" label="采样时间" width="180px"> </el-table-column>
+          <el-table-column prop="mesurePointName" label="测点名称"  width="150px">
             <template slot-scope="scope">
               {{ getDetectionPointCn(scope.row.mesurePointName) }}
             </template>
@@ -220,11 +226,17 @@
             {{ getCompanyLabel(scope.row.companyCode) }}
             
           </el-table-column> -->
-          <el-table-column prop="windTurbineNumber" label="风机" width="180px">
+          <el-table-column prop="windTurbineNumber" label="风机" width="120px">
+          </el-table-column>
+
+          <el-table-column prop="samplingFrequency" label="采样频率(Hz)"       align="center"  width="120px">
+          </el-table-column>
+          <el-table-column prop="rotationalSpeed" label="发电机转速(rpm)"       align="center"  width="150px">
           </el-table-column>
         </el-table>
       </div>
     </div>
+
   </div>
 </template>
 
@@ -294,6 +306,7 @@ export default {
       spectrumListTwo: {},
       envelopeListTwo: {},
       oldCurrentRow: {},
+      XrmsValue: 0, // 默认值
     };
   },
 
@@ -312,6 +325,9 @@ export default {
     },
   },
   methods: {
+    handleXrmsUpdate(value) {
+    this.XrmsValue = value; // 更新有效值
+  },
     handleLoading(currentRow, loading, activeIndex, params) {
       if (loading) {
         this.$set(this.fourList[activeIndex], "loading", loading);

+ 2 - 2
vue.config.js

@@ -66,8 +66,8 @@ module.exports = {
         // target: "http://192.168.5.4:16200", // 石月
         // target: "http://192.168.50.235:16200", // 内网
         // target: "http://192.168.5.15:16200",
-        target: "http://192.168.50.235:16500", //演示环境
-        // target: "http://106.120.102.238:26500", //外网演示环境
+        // target: "http://192.168.50.235:16500", //演示环境
+        target: "http://106.120.102.238:26500", //外网演示环境
         // target: "http://106.120.102.238:16700", // 外网16700  生产16600
         // target: "http://10.96.137.5",
         changeOrigin: true,