فهرست منبع

华电部署报告添加3D图

liujiejie 2 هفته پیش
والد
کامیت
69ccdde526

+ 2 - 2
downLoadServer/src/server/utils/chartsCom/BoxLineCharts.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2025-05-12 17:40:10
- * @LastEditTime: 2025-07-09 14:29:58
+ * @LastEditTime: 2025-07-10 13:45:58
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /downLoadServer/src/server/utils/chartsCom/BoxLineCharts.js
@@ -234,5 +234,5 @@ const isInDateRange = (timestamp) => {
   const date = new Date(timestamp);
   return date >= new Date(startDate) && date <= new Date(endDate);
 };
-
+//5500+3000+2700=11200+
 // ... existing code ...

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

@@ -257,9 +257,9 @@ export default {
       layers: [
         new TileLayer({
           source: new XYZ({
-            url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
+            // url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
             // url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
-            // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
+            url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
             // url: "http://10.96.137.5:9080/tiles/{z}/{x}/{y}.png", //大~#@唐
             // url: "http://192.168.0.1/tiles/{z}/{x}/{y}.png", //华电
             // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //中广核

+ 4 - 2
src/views/overview/components/data_integrity_minute/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 17:54:02
- * @LastEditTime: 2025-06-06 16:18:38
+ * @LastEditTime: 2025-07-10 11:32:36
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/data_integrity_minute/index.vue
@@ -133,7 +133,7 @@ export default {
       type: String,
     },
     batchCodeList: {
-      default: "",
+      default: [],
       type: Array,
     },
   },
@@ -299,6 +299,7 @@ export default {
       const index = this.batchCodeList.findIndex(
         (item) => item === this.initBatchCode
       );
+      // console.log(index, this.batchCodeList, "this.batchCodeList");
       if (index === this.batchCodeList.length - 1) {
         this.$message.warning("已经是最后一个分析结果了");
         return;
@@ -310,6 +311,7 @@ export default {
       const index = this.batchCodeList.findIndex(
         (item) => item === this.initBatchCode
       );
+      // console.log(index, this.batchCodeList, "this.batchCodeList");
       if (index === 0) {
         this.$message.warning("没有上一条了");
         return;

+ 16 - 7
src/views/overview/index.vue

@@ -254,6 +254,7 @@ export default {
         const res = await getAnalysisCodeInfo(); // API 请求
         if (res.code === 200) {
           this.loading = false;
+          this.batchCodeList = [];
           this.data = this.formatData(res.data); // 赋值树数据
         }
       } catch (err) {
@@ -273,11 +274,21 @@ export default {
               codeNumber: child.codeNumber,
               levelstate: "2",
               children: child.batchCodes
-                ? child.batchCodes.map((bc) => ({
-                    fieldOrCompanyName: bc.analysisName,
-                    codeNumber: bc.batchCode,
-                    levelstate: "3",
-                  }))
+                ? child.batchCodes.map((bc) => {
+                    if (this.initBatchCode === "") {
+                      this.initBatchCode = bc.batchCode; // 初始化选中的节点
+                    }
+                    this.batchCodeList.push(bc.batchCode);
+                    this.batchList.push({
+                      batchCode: bc.batchCode,
+                      batchName: bc.analysisName,
+                    });
+                    return {
+                      fieldOrCompanyName: bc.analysisName,
+                      codeNumber: bc.batchCode,
+                      levelstate: "3",
+                    };
+                  })
                 : [],
             }));
           }
@@ -368,14 +379,12 @@ export default {
     //   return data.fieldOrCompanyName.indexOf(value) !== -1;
     // },
     setInitBathCode(val) {
-      // this.initBatchCode = val;
       this.isShowComment = true;
       this.dialogInitBatchCode = val;
       const batchObj = this.batchList.find((item) =>
         item.batchCode === val ? item.batchName : ""
       );
       this.batchTitle = batchObj.batchName;
-      console.log(this.batchTitle, "this.batchTitle");
     },
     // 关闭上一条、下一条弹窗展示组件设置
     handleClose() {

+ 65 - 5
src/views/performance/components/chartsCom/3DDrawingChart.vue

@@ -339,12 +339,33 @@ export default {
             click: () => this.resetCamera(),
           },
         ],
+        responsive: true,
         modeBarButtonsToRemove: [
           "sendDataToCloud",
           // "autoScale2d",
-          "hoverClosest3d",
+          // "hoverClosest3d",
           "resetCameraLastSave3d",
           "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          // "pan2d", // 平移按钮
+          "zoom2d", // 缩放按钮
+          // "zoom",
+          "zoom3d",
+          // "select2d", // 选择框
+          // "lasso2d", // 套索选择
+          // "resetScale2d", // 重置轴
+          // // "zoomIn", // 放大
+          // // "zoomOut", // 缩小
+          // "home", // 重置
+          // "toImage", // 导出为图片
+          // "hoverClosestCartesian", // 悬浮信息
+          // "zoomIn2d", // 缩放按钮(详细版本)
+          // "zoomOut2d", // 缩放按钮(详细版本)
+          // "autoScale2D",
+          "plotlylogo2D",
+          "plotlylogo3D",
+          // "Produced with Plotly.js(v2.35.2)", // 删除 Plotly logo
         ],
         displaylogo: false, // 可选:隐藏 Plotly logo
       };
@@ -372,15 +393,54 @@ export default {
 
       try {
         // 假设这里是 WebGL 的相关初始化代码
-        Plotly.react(`plotly-3d-chart-` + this.index, traces, layout).catch(
-          (err) => {
+        Plotly.react(
+          `plotly-3d-chart-` + this.index,
+          traces,
+          {
+            ...layout,
+            displaylogo: false,
+          },
+          {
+            ...config,
+          }
+        )
+          .then(function (gd) {
+            // 获取工具栏按钮
+            const toolbar = gd.querySelector(".modebar");
+            const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+            // 定义一个映射对象,方便修改按钮提示
+            const titleMap = {
+              "Download plot as a png": "保存图片",
+              Autoscale: "缩放",
+              Pan: "平移",
+              "Zoom out": "放大",
+              "Zoom in": "缩小",
+              "Box Select": "选择框操作",
+              "Lasso Select": "套索选择操作",
+              "Reset axes": "重置操作",
+              "Reset camera to default": "重置相机视角",
+              "Turntable rotation": "转台式旋转",
+              "Orbital rotation": "轨道式旋转",
+            };
+
+            // 遍历所有按钮,修改它们的 title
+            buttons.forEach(function (button) {
+              const dataTitle = button.getAttribute("data-title");
+
+              // 如果标题匹配,修改属性值
+              if (titleMap[dataTitle]) {
+                button.setAttribute("data-title", titleMap[dataTitle]);
+              }
+            });
+          })
+          .catch((err) => {
             console.error("WebGL 错误: ", err);
             // 你可以根据错误类型做更多处理
             if (err.message.includes("shaderSource")) {
               // alert("着色器编译失败!");
             }
-          }
-        );
+          });
         // 监听图表的 relayout 事件,获取并输出相机视角
         const plotElement = document.getElementById(
           `plotly-3d-chart-` + this.index

+ 3 - 2
src/views/performance/components/chartsCom/BarChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:30:17
- * @LastEditTime: 2025-06-25 10:13:48
+ * @LastEditTime: 2025-07-10 10:38:19
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/BarChart.vue
@@ -214,8 +214,9 @@ export default {
 
         // [trace, normalRangeLine, normalRangeMaxLine],
         [trace],
-        { ...layout, displaylogo: false },
+        { ...layout },
         {
+          displaylogo: false,
           responsive: true,
           modeBarButtonsToRemove: [
             // "pan2d", // 平移按钮

+ 60 - 1
src/views/performance/components/chartsCom/BoxLineCharts.vue

@@ -247,7 +247,66 @@ export default {
       this.$nextTick(() => {
         const plotDiv = document.getElementById(`plotDivBox-${this.index}`);
         if (plotDiv) {
-          Plotly.newPlot(plotDiv, [trace, trace2], layout);
+          Plotly.newPlot(plotDiv, [trace, trace2], layout, {
+            responsive: true,
+            modeBarButtonsToRemove: [
+              "sendDataToCloud",
+              // "autoScale2d",
+              // "hoverClosest3d",
+              "resetCameraLastSave3d",
+              "resetCameraDefault3d",
+              "resetCameraLastSave",
+              "sendDataToCloud",
+              // "pan2d", // 平移按钮
+              "zoom2d", // 缩放按钮
+              // "zoom",
+              "zoom3d",
+              // "select2d", // 选择框
+              // "lasso2d", // 套索选择
+              // "resetScale2d", // 重置轴
+              // // "zoomIn", // 放大
+              // // "zoomOut", // 缩小
+              // "home", // 重置
+              // "toImage", // 导出为图片
+              // "hoverClosestCartesian", // 悬浮信息
+              // "zoomIn2d", // 缩放按钮(详细版本)
+              // "zoomOut2d", // 缩放按钮(详细版本)
+              // "autoScale2D",
+              "plotlylogo2D",
+              "plotlylogo3D",
+              // "Produced with Plotly.js(v2.35.2)", // 删除 Plotly logo
+            ],
+            displaylogo: false,
+          }).then(function (gd) {
+            // 获取工具栏按钮
+            const toolbar = gd.querySelector(".modebar");
+            const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+            // 定义一个映射对象,方便修改按钮提示
+            const titleMap = {
+              "Download plot as a png": "保存图片",
+              Autoscale: "缩放",
+              Pan: "平移",
+              "Zoom out": "放大",
+              "Zoom in": "缩小",
+              "Box Select": "选择框操作",
+              "Lasso Select": "套索选择操作",
+              "Reset axes": "重置操作",
+              "Reset camera to default": "重置相机视角",
+              "Turntable rotation": "转台式旋转",
+              "Orbital rotation": "轨道式旋转",
+            };
+
+            // 遍历所有按钮,修改它们的 title
+            buttons.forEach(function (button) {
+              const dataTitle = button.getAttribute("data-title");
+
+              // 如果标题匹配,修改属性值
+              if (titleMap[dataTitle]) {
+                button.setAttribute("data-title", titleMap[dataTitle]);
+              }
+            });
+          });
         }
       });
     },

+ 44 - 1
src/views/performance/components/chartsCom/BoxMarkersCharts.vue

@@ -205,7 +205,50 @@ export default {
         layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
       }
 
-      Plotly.newPlot(chartContainer, [...traces, ...medianMarkers], layout);
+      Plotly.newPlot(chartContainer, [...traces, ...medianMarkers], layout, {
+        responsive: true,
+        modeBarButtonsToRemove: [
+          "sendDataToCloud",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          "zoom2d", // 缩放按钮
+          "zoom3d",
+          "plotlylogo2D",
+          "plotlylogo3D",
+        ],
+        displaylogo: false,
+      }).then(function (gd) {
+        // 获取工具栏按钮
+        const toolbar = gd.querySelector(".modebar");
+        const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+        // 定义一个映射对象,方便修改按钮提示
+        const titleMap = {
+          "Download plot as a png": "保存图片",
+          Autoscale: "缩放",
+          Pan: "平移",
+          "Zoom out": "放大",
+          "Zoom in": "缩小",
+          "Box Select": "选择框操作",
+          "Lasso Select": "套索选择操作",
+          "Reset axes": "重置操作",
+          "Reset camera to default": "重置相机视角",
+          "Turntable rotation": "转台式旋转",
+          "Orbital rotation": "轨道式旋转",
+        };
+
+        // 遍历所有按钮,修改它们的 title
+        buttons.forEach(function (button) {
+          const dataTitle = button.getAttribute("data-title");
+
+          // 如果标题匹配,修改属性值
+          if (titleMap[dataTitle]) {
+            button.setAttribute("data-title", titleMap[dataTitle]);
+          }
+        });
+      });
     },
   },
 };

+ 56 - 2
src/views/performance/components/chartsCom/ColorbarInitTwoDmarkersChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-03-14 10:30:00
- * @LastEditTime: 2025-06-11 10:45:29
+ * @LastEditTime: 2025-07-10 10:56:09
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/colorbarInitTwoDmarkersChart.vue
@@ -388,9 +388,34 @@ export default {
         modeBarButtonsToRemove: [
           // 移除不需要的工具按钮
           "lasso2d",
+          "sendDataToCloud",
+          // "autoScale2d",
+          // "hoverClosest3d",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          // "pan2d", // 平移按钮
+          "zoom2d", // 缩放按钮
+          // "zoom",
+          "zoom3d",
+          // "select2d", // 选择框
+          // "lasso2d", // 套索选择
+          // "resetScale2d", // 重置轴
+          // // "zoomIn", // 放大
+          // // "zoomOut", // 缩小
+          // "home", // 重置
+          // "toImage", // 导出为图片
+          // "hoverClosestCartesian", // 悬浮信息
+          // "zoomIn2d", // 缩放按钮(详细版本)
+          // "zoomOut2d", // 缩放按钮(详细版本)
+          // "autoScale2D",
+          "plotlylogo2D",
+          "plotlylogo3D",
         ],
         displaylogo: false,
         editable: true,
+        responsive: true,
         scrollZoom: false,
       };
       this.$nextTick(() => {
@@ -403,7 +428,36 @@ export default {
         ).then(() => {
           // 确保在图表加载完成后设置工具栏按钮
           const plotElement = this.$refs[`plotlyChart-${this.index}`];
-          Plotly.relayout(plotElement, layout); // 使用 relayout 来确保自定义按钮应用
+          Plotly.relayout(plotElement, layout).then(function (gd) {
+            // 获取工具栏按钮
+            const toolbar = gd.querySelector(".modebar");
+            const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+            // 定义一个映射对象,方便修改按钮提示
+            const titleMap = {
+              "Download plot as a png": "保存图片",
+              Autoscale: "缩放",
+              Pan: "平移",
+              "Zoom out": "放大",
+              "Zoom in": "缩小",
+              "Box Select": "选择框操作",
+              "Lasso Select": "套索选择操作",
+              "Reset axes": "重置操作",
+              "Reset camera to default": "重置相机视角",
+              "Turntable rotation": "转台式旋转",
+              "Orbital rotation": "轨道式旋转",
+            };
+
+            // 遍历所有按钮,修改它们的 title
+            buttons.forEach(function (button) {
+              const dataTitle = button.getAttribute("data-title");
+
+              // 如果标题匹配,修改属性值
+              if (titleMap[dataTitle]) {
+                button.setAttribute("data-title", titleMap[dataTitle]);
+              }
+            });
+          }); // 使用 relayout 来确保自定义按钮应用
         });
       });
     },

+ 47 - 2
src/views/performance/components/chartsCom/FaultAll.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-15 14:24:59
- * @LastEditTime: 2025-06-12 18:06:31
+ * @LastEditTime: 2025-07-10 11:01:20
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/FaultAll.vue
@@ -146,7 +146,52 @@ export default {
       };
 
       // 渲染图表
-      Plotly.newPlot(this.$refs.chart, [barTrace, lineTrace], layout);
+      Plotly.newPlot(this.$refs.chart, [barTrace, lineTrace], layout, {
+        modeBarButtonsToRemove: [
+          // 移除不需要的工具按钮
+          "lasso2d",
+          "sendDataToCloud",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          "zoom2d", // 缩放按钮
+          "zoom3d",
+          "plotlylogo2D",
+          "plotlylogo3D",
+        ],
+        displaylogo: false,
+        responsive: true,
+      }).then(function (gd) {
+        // 获取工具栏按钮
+        const toolbar = gd.querySelector(".modebar");
+        const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+        // 定义一个映射对象,方便修改按钮提示
+        const titleMap = {
+          "Download plot as a png": "保存图片",
+          Autoscale: "缩放",
+          Pan: "平移",
+          "Zoom out": "放大",
+          "Zoom in": "缩小",
+          "Box Select": "选择框操作",
+          "Lasso Select": "套索选择操作",
+          "Reset axes": "重置操作",
+          "Reset camera to default": "重置相机视角",
+          "Turntable rotation": "转台式旋转",
+          "Orbital rotation": "轨道式旋转",
+        };
+
+        // 遍历所有按钮,修改它们的 title
+        buttons.forEach(function (button) {
+          const dataTitle = button.getAttribute("data-title");
+
+          // 如果标题匹配,修改属性值
+          if (titleMap[dataTitle]) {
+            button.setAttribute("data-title", titleMap[dataTitle]);
+          }
+        });
+      });
     },
   },
 };

+ 46 - 1
src/views/performance/components/chartsCom/FaultUnit.vue

@@ -112,7 +112,52 @@ export default {
         },
       };
 
-      Plotly.newPlot(this.$refs.chart, data, layout);
+      Plotly.newPlot(this.$refs.chart, data, layout, {
+        modeBarButtonsToRemove: [
+          // 移除不需要的工具按钮
+          "lasso2d",
+          "sendDataToCloud",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          "zoom2d", // 缩放按钮
+          "zoom3d",
+          "plotlylogo2D",
+          "plotlylogo3D",
+        ],
+        displaylogo: false,
+        responsive: true,
+      }).then(function (gd) {
+        // 获取工具栏按钮
+        const toolbar = gd.querySelector(".modebar");
+        const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+        // 定义一个映射对象,方便修改按钮提示
+        const titleMap = {
+          "Download plot as a png": "保存图片",
+          Autoscale: "缩放",
+          Pan: "平移",
+          "Zoom out": "放大",
+          "Zoom in": "缩小",
+          "Box Select": "选择框操作",
+          "Lasso Select": "套索选择操作",
+          "Reset axes": "重置操作",
+          "Reset camera to default": "重置相机视角",
+          "Turntable rotation": "转台式旋转",
+          "Orbital rotation": "轨道式旋转",
+        };
+
+        // 遍历所有按钮,修改它们的 title
+        buttons.forEach(function (button) {
+          const dataTitle = button.getAttribute("data-title");
+
+          // 如果标题匹配,修改属性值
+          if (titleMap[dataTitle]) {
+            button.setAttribute("data-title", titleMap[dataTitle]);
+          }
+        });
+      });
     },
   },
 };

+ 43 - 1
src/views/performance/components/chartsCom/GeneratorTemperature.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 11:18:49
- * @LastEditTime: 2025-06-20 14:15:46
+ * @LastEditTime: 2025-07-10 11:02:51
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/GeneratorTemperature.vue
@@ -324,6 +324,48 @@ export default {
         // 使用 Plotly.react 来更新图表
         Plotly.react(`bar-chart${this.index}`, data, layout, {
           responsive: true,
+          modeBarButtonsToRemove: [
+            // 移除不需要的工具按钮
+            "lasso2d",
+            "sendDataToCloud",
+            "resetCameraLastSave3d",
+            "resetCameraDefault3d",
+            "resetCameraLastSave",
+            "sendDataToCloud",
+            "zoom2d", // 缩放按钮
+            "zoom3d",
+            "plotlylogo2D",
+            "plotlylogo3D",
+          ],
+          displaylogo: false,
+        }).then(function (gd) {
+          // 获取工具栏按钮
+          const toolbar = gd.querySelector(".modebar");
+          const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+          // 定义一个映射对象,方便修改按钮提示
+          const titleMap = {
+            "Download plot as a png": "保存图片",
+            Autoscale: "缩放",
+            Pan: "平移",
+            "Zoom out": "放大",
+            "Zoom in": "缩小",
+            "Box Select": "选择框操作",
+            "Lasso Select": "套索选择操作",
+            "Reset axes": "重置操作",
+            "Reset camera to default": "重置相机视角",
+            "Turntable rotation": "转台式旋转",
+            "Orbital rotation": "轨道式旋转",
+          };
+          // 遍历所有按钮,修改它们的 title
+          buttons.forEach(function (button) {
+            const dataTitle = button.getAttribute("data-title");
+
+            // 如果标题匹配,修改属性值
+            if (titleMap[dataTitle]) {
+              button.setAttribute("data-title", titleMap[dataTitle]);
+            }
+          });
         });
       });
     },

+ 43 - 0
src/views/performance/components/chartsCom/HeatmapCharts.vue

@@ -154,6 +154,49 @@ export default {
 
       Plotly.newPlot(`chart-${this.inds}`, [trace], layout, {
         responsive: true,
+        modeBarButtonsToRemove: [
+          // 移除不需要的工具按钮
+          "lasso2d",
+          "sendDataToCloud",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          "zoom2d", // 缩放按钮
+          "zoom3d",
+          "plotlylogo2D",
+          "plotlylogo3D",
+        ],
+        displaylogo: false,
+      }).then(function (gd) {
+        // 获取工具栏按钮
+        const toolbar = gd.querySelector(".modebar");
+        const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+        // 定义一个映射对象,方便修改按钮提示
+        const titleMap = {
+          "Download plot as a png": "保存图片",
+          Autoscale: "缩放",
+          Pan: "平移",
+          "Zoom out": "放大",
+          "Zoom in": "缩小",
+          "Box Select": "选择框操作",
+          "Lasso Select": "套索选择操作",
+          "Reset axes": "重置操作",
+          "Reset camera to default": "重置相机视角",
+          "Turntable rotation": "转台式旋转",
+          "Orbital rotation": "轨道式旋转",
+        };
+
+        // 遍历所有按钮,修改它们的 title
+        buttons.forEach(function (button) {
+          const dataTitle = button.getAttribute("data-title");
+
+          // 如果标题匹配,修改属性值
+          if (titleMap[dataTitle]) {
+            button.setAttribute("data-title", titleMap[dataTitle]);
+          }
+        });
       });
     },
   },

+ 43 - 2
src/views/performance/components/chartsCom/lineAndChildLine.vue

@@ -244,13 +244,11 @@ export default {
       const getChartSetUp = (axisTitle) => {
         return this.setUpImgData.find((item) => item.text.includes(axisTitle));
       };
-
       const xChartSetUp = getChartSetUp(layout.xaxis.title);
       if (xChartSetUp) {
         layout.xaxis.dtick = xChartSetUp.dtick;
         layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
       }
-
       const yChartSetUp = getChartSetUp(layout.yaxis.title);
       if (yChartSetUp) {
         layout.yaxis.dtick = yChartSetUp.dtick;
@@ -275,6 +273,49 @@ export default {
       // 使用 Plotly.react 来更新图表
       Plotly.react(`bar-chart${this.index}`, data, layout, {
         responsive: true,
+        modeBarButtonsToRemove: [
+          // 移除不需要的工具按钮
+          "lasso2d",
+          "sendDataToCloud",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          "zoom2d", // 缩放按钮
+          "zoom3d",
+          "plotlylogo2D",
+          "plotlylogo3D",
+        ],
+        displaylogo: false,
+      }).then(function (gd) {
+        // 获取工具栏按钮
+        const toolbar = gd.querySelector(".modebar");
+        const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+        // 定义一个映射对象,方便修改按钮提示
+        const titleMap = {
+          "Download plot as a png": "保存图片",
+          Autoscale: "缩放",
+          Pan: "平移",
+          "Zoom out": "放大",
+          "Zoom in": "缩小",
+          "Box Select": "选择框操作",
+          "Lasso Select": "套索选择操作",
+          "Reset axes": "重置操作",
+          "Reset camera to default": "重置相机视角",
+          "Turntable rotation": "转台式旋转",
+          "Orbital rotation": "轨道式旋转",
+        };
+
+        // 遍历所有按钮,修改它们的 title
+        buttons.forEach(function (button) {
+          const dataTitle = button.getAttribute("data-title");
+
+          // 如果标题匹配,修改属性值
+          if (titleMap[dataTitle]) {
+            button.setAttribute("data-title", titleMap[dataTitle]);
+          }
+        });
       });
     },
 

+ 43 - 0
src/views/performance/components/chartsCom/lineChartsFen.vue

@@ -251,6 +251,49 @@ export default {
 
       Plotly.react(`line-chart-fen-${this.index}`, finalData, layout, {
         responsive: true,
+        modeBarButtonsToRemove: [
+          // 移除不需要的工具按钮
+          "lasso2d",
+          "sendDataToCloud",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          "zoom2d", // 缩放按钮
+          "zoom3d",
+          "plotlylogo2D",
+          "plotlylogo3D",
+        ],
+        displaylogo: false,
+      }).then(function (gd) {
+        // 获取工具栏按钮
+        const toolbar = gd.querySelector(".modebar");
+        const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+        // 定义一个映射对象,方便修改按钮提示
+        const titleMap = {
+          "Download plot as a png": "保存图片",
+          Autoscale: "缩放",
+          Pan: "平移",
+          "Zoom out": "放大",
+          "Zoom in": "缩小",
+          "Box Select": "选择框操作",
+          "Lasso Select": "套索选择操作",
+          "Reset axes": "重置操作",
+          "Reset camera to default": "重置相机视角",
+          "Turntable rotation": "转台式旋转",
+          "Orbital rotation": "轨道式旋转",
+        };
+
+        // 遍历所有按钮,修改它们的 title
+        buttons.forEach(function (button) {
+          const dataTitle = button.getAttribute("data-title");
+
+          // 如果标题匹配,修改属性值
+          if (titleMap[dataTitle]) {
+            button.setAttribute("data-title", titleMap[dataTitle]);
+          }
+        });
       });
     },
     // 切换图表类型

+ 42 - 2
src/views/performance/components/chartsCom/powerMarkers2DCharts.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:32:12
- * @LastEditTime: 2025-07-08 16:42:29
+ * @LastEditTime: 2025-07-10 11:09:31
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/powerMarkers2DCharts.vue
@@ -360,6 +360,17 @@ export default {
         ],
         modeBarButtonsToRemove: [
           "lasso2d", // 移除不需要的工具按钮
+          // 移除不需要的工具按钮
+          "lasso2d",
+          "sendDataToCloud",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+          "resetCameraLastSave",
+          "sendDataToCloud",
+          "zoom2d", // 缩放按钮
+          "zoom3d",
+          "plotlylogo2D",
+          "plotlylogo3D",
         ],
         displaylogo: false,
         editable: true,
@@ -380,7 +391,36 @@ export default {
         ).then(() => {
           // 确保图表加载完成后设置工具栏按钮
           const plotElement = this.$refs[`plotlyChart-${this.index}`];
-          Plotly.relayout(plotElement, layout); // 使用 relayout 来确保自定义按钮应用
+          Plotly.relayout(plotElement, layout).then(function (gd) {
+            // 获取工具栏按钮
+            const toolbar = gd.querySelector(".modebar");
+            const buttons = toolbar.querySelectorAll(".modebar-btn");
+
+            // 定义一个映射对象,方便修改按钮提示
+            const titleMap = {
+              "Download plot as a png": "保存图片",
+              Autoscale: "缩放",
+              Pan: "平移",
+              "Zoom out": "放大",
+              "Zoom in": "缩小",
+              "Box Select": "选择框操作",
+              "Lasso Select": "套索选择操作",
+              "Reset axes": "重置操作",
+              "Reset camera to default": "重置相机视角",
+              "Turntable rotation": "转台式旋转",
+              "Orbital rotation": "轨道式旋转",
+            };
+
+            // 遍历所有按钮,修改它们的 title
+            buttons.forEach(function (button) {
+              const dataTitle = button.getAttribute("data-title");
+
+              // 如果标题匹配,修改属性值
+              if (titleMap[dataTitle]) {
+                button.setAttribute("data-title", titleMap[dataTitle]);
+              }
+            });
+          }); // 使用 relayout 来确保自定义按钮应用
         });
       });
     },

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