浏览代码

fix图表样式3D

liujiejie 2 月之前
父节点
当前提交
5fcae658e3

+ 2 - 2
src/components/HeaderCom.vue

@@ -139,7 +139,7 @@ export default {
   },
 
   methods: {
-    ...mapActions("themes", ["themeChange"]),
+    ...mapActions("themes", ["themeChange", "switchTheme"]),
     updateChartColor() {
       // console.log("this.color1", this.color1);
       this.themeChange(this.color1);
@@ -157,7 +157,7 @@ export default {
       };
     },
     changeTheme(theme) {
-      this.$store.dispatch("switchTheme", theme);
+      this.$store.dispatch("themes/switchTheme", theme);
     },
     updateCurrentDateTime() {
       const now = new Date();

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

@@ -223,9 +223,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", //大~#@唐
           }),
         }),

+ 1 - 1
src/store/themes.js

@@ -3,7 +3,7 @@ import { theme } from "tailwindcss/stubs/defaultConfig.stub";
 /*
  * @Author: your name
  * @Date: 2024-05-27 15:09:27
- * @LastEditTime: 2025-02-24 15:24:11
+ * @LastEditTime: 2025-03-18 16:51:12
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/store/themes.js

+ 2 - 2
src/views/overview/components/pitch_tsr_cp/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:09:55
- * @LastEditTime: 2025-03-14 18:17:14
+ * @LastEditTime: 2025-03-18 16:41:29
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/pitch_tsr_cp/index.vue
@@ -35,7 +35,7 @@
       <VirtualList
         :list="diagramRelationsDatas"
         keyField="fileAddr"
-        :itemSize="600"
+        :itemSize="700"
         v-slot="{ item, index }"
       >
         <TwoDMarkersChart

+ 2 - 2
src/views/overview/js/colors.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2025-02-17 15:31:57
- * @LastEditTime: 2025-03-14 13:43:27
+ * @LastEditTime: 2025-03-18 14:43:34
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/js/colors.js
@@ -10,7 +10,7 @@ export const colorSchemes = [
   {
     label: "默认",
     colors: [
-      "#FFFFDF",
+      // "#FFFFDF",
       "#DFEDC1",
       "#EBF6C1",
       "#DBEEBC",

+ 2 - 0
src/views/performance/assetssMag.vue

@@ -657,6 +657,8 @@ export default {
           batchCode: row.batchCode,
           analysisTypeCode: row.analysisTypeCode,
           fieldEngineCode: row.fieldCode,
+          fieldName: row.fieldName,
+          analysisName: row.analysisName,
         },
       });
     },

+ 21 - 2
src/views/performance/components/analysisEvent.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2025-02-25 14:36:02
+ * @LastEditTime: 2025-03-17 16:21:23
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -14,10 +14,21 @@
       :model="form"
       label-position="right"
       label-width="100px"
+      inline
     >
       <el-row type="flex" justify="end">
-        <el-col :span="5">
+        <el-col :span="12">
+          <el-form-item label="分析主题:">
+            <span>{{ analysisName }}</span>
+          </el-form-item>
+          <el-form-item label="分析风场:">
+            <span>{{ fieldName }}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" style="display: flex; justify-content: end">
           <el-form-item class="searchFrom">
+            <!-- <span>分析主题:{{ analysisName }}</span>
+            <span>分析风场:{{ fieldName }}</span> -->
             <el-button type="primary" @click="onSubmit" size="small"
               >分析</el-button
             >
@@ -687,6 +698,14 @@ export default {
   },
   props: {
     activeName: String,
+    fieldName: {
+      type: String,
+      default: "",
+    },
+    analysisName: {
+      type: String,
+      default: "",
+    },
   },
   data() {
     return {

+ 53 - 47
src/views/performance/components/chartsCom/3DDrawingChart.vue

@@ -44,12 +44,12 @@
     </div>
 
     <!-- 图表展示区域 -->
-    <div style="height: 500px">
+    <div style="height: 600px">
       <div
         v-loading="loading"
         :id="`plotly-3d-chart-` + index"
         ref="plotlyChart"
-        style="height: 500px; background-color: #e5ecf6"
+        style="height: 600px; background-color: #e5ecf6"
       >
         <el-empty v-if="isError" description="请求失败"></el-empty>
       </div>
@@ -238,6 +238,7 @@ export default {
             linewidth: 2, // 轴线宽度
             linecolor: "black", // 轴线颜色
             ticks: "outside", // 设置刻度线在轴线外
+            fixedrange: true, // 防止缩放
             tickwidth: 2,
             tickcolor: "black",
           },
@@ -247,6 +248,7 @@ export default {
             ticktext: [...new Set(this.chartData.data[0].yData)],
             gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
+            fixedrange: true, // 防止缩放
             backgroundcolor: "#e5ecf6",
             showbackground: true,
             linewidth: 2, // 轴线宽度
@@ -261,6 +263,7 @@ export default {
             tickcolor: "rgb(255,255,255)",
             backgroundcolor: "#e5ecf6",
             showbackground: true,
+            fixedrange: true, // 防止缩放
             linewidth: 2, // 轴线宽度
             linecolor: "black", // 轴线颜色
             ticks: "outside", // 设置刻度线在轴线外
@@ -275,49 +278,6 @@ export default {
           plot_bgcolor: "#e5ecf6",
           gridcolor: "#fff",
           bgcolor: "#e5ecf6", // 设置背景颜色
-          // camera: {
-          //   //原始1
-          //   center: { x: -0.233946, y: -0.319396, z: 0.483055 },
-          //   eye: { x: -1.729102, y: -3.506569, z: -1.296184 },
-          //   up: { x: 0.12359, y: 0.43886022, z: -0.89001518 },
-          //   projection: {
-          //     type: "perspective",
-          //   },
-          // },
-          // camera: {
-          //   //原始3
-          //   center: {
-          //     x: -0.375472972541404,
-          //     y: -0.5585992748989729,
-          //     z: -0.02739771471583052,
-          //   },
-          //   eye: {
-          //     x: -0.5046744702181177,
-          //     y: -3.1376489494672195,
-          //     z: 1.7379514809127419,
-          //   },
-          //   up: {
-          //     x: 0.036764743754523974,
-          //     y: 0.5632076795906327,
-          //     z: 0.8254971007016315,
-          //   },
-          //   projection: {
-          //     type: "perspective",
-          //   },
-          // },
-          // aspectmode: "auto", // 让坐标轴自动适配
-          // camera: {
-          //   eye: {
-          //     x: 1.25, // 控制 Azimuth 角度(对应 MATLAB -37.5°)
-          //     y: -1.25, // 负值可以旋转相机方向
-          //     z: 1.25, // 控制 Elevation 角度(对应 MATLAB 38°)
-          //   },
-          //   up: {
-          //     x: 0,
-          //     y: 0,
-          //     z: 1, // 确保 z 轴朝上
-          //   },
-          // },
           camera: {
             up: {
               x: -0.0014269369124665849,
@@ -335,7 +295,7 @@ export default {
               z: 1.0941053354561574,
             },
             projection: {
-              type: "perspective",
+              type: "orthographic",
             },
           },
         },
@@ -348,6 +308,23 @@ export default {
           },
         },
       };
+      const config = {
+        modeBarButtonsToAdd: [
+          {
+            name: "还原", // 自定义按钮
+            icon: Plotly.Icons.home,
+            click: () => this.resetCamera(),
+          },
+        ],
+        modeBarButtonsToRemove: [
+          "sendDataToCloud",
+          "autoScale2d",
+          "hoverClosest3d",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+        ],
+        displaylogo: false, // 可选:隐藏 Plotly logo
+      };
       // 获取x轴和y轴的设置
       const getChartSetUp = (axisTitle) => {
         return this.setUpImgData.find((item) => item.text.includes(axisTitle));
@@ -402,6 +379,35 @@ export default {
       }
       // Plotly.newPlot(`plotly-3d-chart-` + this.index, traces, layout);
     },
+    resetCamera() {
+      Plotly.relayout(`plotly-3d-chart-` + this.index, {
+        "scene.camera": {
+          up: {
+            x: -0.0014269369124665849,
+            y: 0.0012146694366401958,
+            z: 0.9999982442130624,
+          },
+          center: {
+            x: -0.4418147101642839,
+            y: 0.11636199495350043,
+            z: -0.4133154056555356,
+          },
+          eye: {
+            x: -2.482948029595208,
+            y: -2.2792871251589983,
+            z: 1.0941053354561574,
+          },
+          projection: {
+            type: "perspective",
+          },
+        },
+        "scene.aspectratio": {
+          x: 3,
+          y: 1.5,
+          z: 1,
+        },
+      });
+    },
   },
 };
 </script>
@@ -417,7 +423,7 @@ export default {
 /* 样式可以根据需求自定义 */
 #plotly-3d-chart {
   width: 100%;
-  height: 500px;
+  height: 600px;
 }
 
 ::v-deep canvas {

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:30:17
- * @LastEditTime: 2025-03-14 17:36:30
+ * @LastEditTime: 2025-03-17 14:25:46
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/BarChart.vue
@@ -75,7 +75,7 @@ export default {
         ],
       },
       chartType: "bar", // 当前图表类型 ('bar' 或 'scatter')
-      color1: "#406DAB", // 默认颜色
+      color1: "#588CF0", // 默认颜色
       // normalRangeMin: 5, // 最低范围
       // normalRangeMax: 18, // 最高范围
     };

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

@@ -215,7 +215,7 @@ export default {
           tickcolor: "rgb(255,255,255)",
           backgroundcolor: "#e5ecf6",
         },
-        showlegend: true,
+        showlegend: false,
         plot_bgcolor: "#e5ecf6",
         gridcolor: "#fff",
         bgcolor: "#e5ecf6", // 设置背景颜色

+ 3 - 3
src/views/performance/components/chartsCom/ColorbarInitTwoDmarkersChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-03-14 10:30:00
- * @LastEditTime: 2025-03-14 18:42:17
+ * @LastEditTime: 2025-03-17 14:58:28
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/colorbarInitTwoDmarkersChart.vue
@@ -45,12 +45,12 @@
         <span style="margin-left: 10px">自定义颜色</span>
       </div>
       <!-- 图表类型切换按钮 -->
-      <div>
+      <!-- <div>
         <el-button size="small" @click="setChartType('scatter')"
           >散点图</el-button
         >
         <el-button size="small" @click="setChartType('line')">折线图</el-button>
-      </div>
+      </div> -->
     </div>
     <!-- 点大小控制 -->
     <div style="display: flex; align-items: center">

+ 20 - 15
src/views/performance/components/chartsCom/Radar.vue

@@ -147,21 +147,26 @@ export default {
           },
         },
         tooltip: {
-  trigger: 'item',
-  z: 999999999999,
-  appendToBody: true, // 强制添加到 body
-  formatter: (params) => {
-    const indicators = ["风机能量利用率", "风机可利用率", "平均风速", "利用小时", "功率曲线一致性系数"];
-    const values = params.value;
-    const medianValues = window.medianValues || [];
-    let content = `<strong>${params.seriesName}</strong><br/>`;
-    for (let i = 0; i < indicators.length; i++) {
-      content += `${indicators[i]}: ${values[i]}<br/>中位值: ${medianValues[i]}<br/><br/>`;
-    }
-    return content;
-  }
-}
-,
+          trigger: "item",
+          z: 999999999999,
+          appendToBody: true, // 强制添加到 body
+          formatter: (params) => {
+            const indicators = [
+              "风机能量利用率",
+              "风机可利用率",
+              "平均风速",
+              "利用小时",
+              "功率曲线一致性系数",
+            ];
+            const values = params.value;
+            const medianValues = window.medianValues || [];
+            let content = `<strong>${params.seriesName}</strong><br/>`;
+            for (let i = 0; i < indicators.length; i++) {
+              content += `${indicators[i]}: ${values[i]}<br/>中位值: ${medianValues[i]}<br/><br/>`;
+            }
+            return content;
+          },
+        },
         radar: {
           indicator: indicators,
           center: ["45%", "45%"],

+ 114 - 56
src/views/performance/components/chartsCom/Time3DChart.vue

@@ -52,7 +52,7 @@
 </template>
 
 <script>
-import Plotly from "plotly.js-dist";
+import Plotly, { doCamera } from "plotly.js-dist";
 import axios from "axios";
 import { myMixin } from "@/mixins/chartRequestMixin";
 import { colorSchemes } from "@/views/overview/js/colors";
@@ -105,8 +105,12 @@ export default {
   },
   watch: {
     themeColor: {
-      handler() {
-        this.color1 = this.themeColor;
+      handler(newval) {
+        if (newval.length === 0) {
+          this.color1 = colorSchemes[0].colors;
+        } else {
+          this.color1 = newval;
+        }
         this.updateChartColor();
       },
       deep: true,
@@ -120,7 +124,11 @@ export default {
   },
   async mounted() {
     this.getData();
-    this.color1 = this.themeColor;
+    if (this.themeColor.length === 0) {
+      this.color1 = colorSchemes[0].colors;
+    } else {
+      this.color1 = this.themeColor;
+    }
   },
 
   methods: {
@@ -154,7 +162,6 @@ export default {
         }
       }
     },
-
     // 格式化日期为 YY-MM 格式
     formatDate(dateString) {
       const date = new Date(dateString);
@@ -191,6 +198,14 @@ export default {
           marker: {
             size: this.pointSize,
             color: monthColors[monthIndex],
+            opacity: 0.8,
+            lighting: {
+              ambient: 0.3, // 环境光(影响整体亮度)
+              diffuse: 1, // 漫反射光(增加真实感)
+              specular: 0.5, // 镜面反射(增强高光)
+              roughness: 0.5, // 低值=光滑表面,高值=粗糙表面
+              fresnel: 0.2, // 边缘高光强度
+            },
           },
           name: month, // 图例项名称,格式为 YY-MM
           legendgroup: `month-${monthIndex}`, // 图例分组
@@ -216,91 +231,88 @@ export default {
         },
         scene: {
           xaxis: {
-            title: this.chartData.xaixs, // X 轴标题
-            gridcolor: "rgb(255,255,255)",
-            tickcolor: "rgb(255,255,255)",
-            backgroundcolor: "#e5ecf6",
+            tickangle: 30,
+            title: {
+              text: this.chartData.xaixs,
+              standoff: 100, // 调整标题与轴线之间的间距(单位:像素)
+            }, // X 轴标题
+            gridcolor: "#fff",
+            backgroundcolor: "#rgba(0, 0, 0, 0.1)",
             showbackground: true,
             linewidth: 2, // 轴线宽度
             linecolor: "black", // 轴线颜色
             ticks: "outside", // 设置刻度线在轴线外
             tickwidth: 2,
+            //刻度线长度
+            ticklen: 10,
             tickcolor: "black",
+            zeroline: false, // 显示 X 轴的中轴线
           },
           yaxis: {
-            title: this.chartData.yaixs, // Y 轴标题
+            title: {
+              text: this.chartData.yaixs,
+              standoff: 20,
+            },
             tickformat: "%y-%m", // 设置 Y 轴的时间格式为 YY-MM
-            gridcolor: "rgb(255,255,255)",
-            tickcolor: "rgb(255,255,255)",
-            backgroundcolor: "#e5ecf6",
+            gridcolor: "#fff",
+            tickcolor: "#e5ecf6",
+            // backgroundcolor: "#E6E6E6",
+            backgroundcolor: "#rgba(0, 0, 0, 0.1)",
             showbackground: true,
             linewidth: 2, // 轴线宽度
             linecolor: "black", // 轴线颜色
             ticks: "outside", // 设置刻度线在轴线外
             tickwidth: 2,
             tickcolor: "black",
+            ticklen: 10,
+            zeroline: false, // 显示 X 轴的中轴线
+            // tickangle: 70, // 设置Z轴刻度值的角度
           },
           zaxis: {
-            title: this.chartData.zaixs, // Z 轴标题
-            gridcolor: "rgb(255,255,255)",
-            tickcolor: "rgb(255,255,255)",
-            backgroundcolor: "#e5ecf6",
+            title: {
+              text: this.chartData.zaixs,
+            },
+            gridcolor: "#fff",
+            tickcolor: "#fff",
+            // backgroundcolor: "#E6E6E6",
+            backgroundcolor: "#rgba(0, 0, 0, 0.1)",
             showbackground: true,
             linewidth: 2, // 轴线宽度
             linecolor: "black", // 轴线颜色
             ticks: "outside", // 设置刻度线在轴线外
             tickwidth: 2,
             tickcolor: "black",
+            zeroline: false, // 显示 X 轴的中轴线
+            tickangle: 270, // 设置Z轴刻度值的角度
           },
+          margin: { l: 300, r: 500, t: 100, b: 100 }, // ✅ 增加底部间距
+          // aspectmode: "cube", // 确保X/Y/Z轴比例固定,防止变形
           bgcolor: "#e5ecf6", // 设置背景颜色
           aspectratio: {
-            x: 3,
-            y: 1.5,
+            x: 2.2,
+            y: 1.8,
             z: 1,
           },
-          plot_bgcolor: "#e5ecf6",
+          aspectmode: "manual", // ✅ 让 XYZ 轴比例不同
           gridcolor: "#fff",
-          backgroundcolor: "#e5ecf6", // 设置背景颜色为白色
-          // camera: {
-          //   //原始3
-          //   center: {
-          //     x: -0.375472972541404,
-          //     y: -0.5585992748989729,
-          //     z: -0.02739771471583052,
-          //   },
-          //   eye: {
-          //     x: -0.5046744702181177,
-          //     y: -3.1376489494672195,
-          //     z: 1.7379514809127419,
-          //   },
-          //   up: {
-          //     x: 0.036764743754523974,
-          //     y: 0.5632076795906327,
-          //     z: 0.8254971007016315,
-          //   },
-          //   projection: {
-          //     type: "perspective",
-          //   },
-          // },
-          // aspectmode: "auto", // 让坐标轴自动适配
           camera: {
             up: {
-              x: -0.0014269369124665849,
-              y: 0.0012146694366401958,
-              z: 0.9999982442130624,
+              x: 0,
+              y: 0,
+              z: 1,
             },
             center: {
-              x: -0.4418147101642839,
-              y: 0.11636199495350043,
-              z: -0.4133154056555356,
+              x: 0,
+              y: 0,
+              z: 0,
             },
             eye: {
-              x: -2.482948029595208,
-              y: -2.2792871251589983,
-              z: 1.0941053354561574,
+              x: -1.9411806339437676,
+              y: -1.0688695891896567,
+              z: 0.47888991188707036,
             },
             projection: {
-              type: "perspective",
+              type: "orthographic",
             },
           },
         },
@@ -313,6 +325,23 @@ export default {
           },
         },
       };
+      const config = {
+        modeBarButtonsToAdd: [
+          {
+            name: "还原", // 自定义按钮
+            icon: Plotly.Icons.home,
+            click: () => this.resetCamera(),
+          },
+        ],
+        modeBarButtonsToRemove: [
+          "sendDataToCloud",
+          "autoScale2d",
+          "hoverClosest3d",
+          "resetCameraLastSave3d",
+          "resetCameraDefault3d",
+        ],
+        displaylogo: false, // 可选:隐藏 Plotly logo
+      };
       // 获取x轴和y轴的设置
       const getChartSetUp = (axisTitle) => {
         return this.setUpImgData.find((item) => item.text.includes(axisTitle));
@@ -333,7 +362,7 @@ export default {
         layout.scene.zaxis.dtick = zChartSetUp.dtick;
         layout.scene.zaxis.range = [zChartSetUp.min, zChartSetUp.max];
       }
-      Plotly.newPlot(`plotly-3d-chart-` + this.index, traces, layout);
+      Plotly.newPlot(`plotly-3d-chart-` + this.index, traces, layout, config);
       // 监听图表的 relayout 事件,获取并输出相机视角
       const plotElement = document.getElementById(
         `plotly-3d-chart-` + this.index
@@ -349,7 +378,36 @@ export default {
         }
       });
     },
-
+    // 还原视角
+    resetCamera() {
+      Plotly.relayout(`plotly-3d-chart-` + this.index, {
+        "scene.camera": {
+          up: {
+            x: -0.0014269369124665849,
+            y: 0.0012146694366401958,
+            z: 0.9999982442130624,
+          },
+          center: {
+            x: -0.4418147101642839,
+            y: 0.11636199495350043,
+            z: -0.4133154056555356,
+          },
+          eye: {
+            x: -2.482948029595208,
+            y: -2.2792871251589983,
+            z: 1.0941053354561574,
+          },
+          projection: {
+            type: "perspective",
+          },
+        },
+        "scene.aspectratio": {
+          x: 3,
+          y: 1.5,
+          z: 1,
+        },
+      });
+    },
     updateChartColor() {
       this.renderChart(); // 当配色方案或点大小发生变化时重新渲染图表
     },
@@ -374,7 +432,7 @@ export default {
 /* 样式可以根据需求自定义 */
 #plotly-3d-chart {
   width: 100%;
-  height: 500px;
+  height: 600px;
 }
 
 ::v-deep canvas {

+ 2 - 2
src/views/performance/components/chartsCom/TwoDMarkersChart.vue

@@ -30,12 +30,12 @@
         <span style="margin-left: 10px">自定义颜色</span>
       </div>
       <!-- 图表类型切换按钮 -->
-      <div>
+      <!-- <div>
         <el-button size="small" @click="setChartType('scatter')"
           >散点图</el-button
         >
         <el-button size="small" @click="setChartType('line')">折线图</el-button>
-      </div>
+      </div> -->
     </div>
     <!-- 点大小控制 -->
     <div style="display: flex; align-items: center">

+ 3 - 3
src/views/performance/components/chartsCom/powerMarkers2DCharts.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:32:12
- * @LastEditTime: 2025-03-14 18:45:29
+ * @LastEditTime: 2025-03-18 09:27:14
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/powerMarkers2DCharts.vue
@@ -9,7 +9,7 @@
 <!-- <h1>逐月有功功率散点2D分析</h1> 
  <h1>偏航控制策略异常检测 2D</h1>  目前没找到这个分析模型-->
 <template>
-  <div style="min-height: 300px">
+  <div style="min-height: 600px">
     <!-- 2D散点图 -->
     <template>
       <div style="display: flex; align-items: center; margin-top: 20px">
@@ -57,7 +57,7 @@
       <div
         v-loading="loading"
         :ref="`plotlyChart-${index}`"
-        style="height: 400px"
+        style="height: 600px"
       >
         <el-empty v-if="isError" description="请求失败"></el-empty>
       </div>

+ 22 - 11
src/views/performance/editAssets.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:26:31
- * @LastEditTime: 2025-01-20 13:59:16
+ * @LastEditTime: 2025-03-17 16:16:32
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/editAssets.vue
@@ -9,25 +9,30 @@
 <template>
   <div class="global-variable">
     <el-row type="flex" justify="space-between">
-      <el-col :span="8"
-        ><el-button
+      <el-col :span="8">
+        <el-button
           type="text"
           style="font-size: 20px"
           icon="el-icon-arrow-left"
           @click="() => $router.push('/home/performance/assetssMag')"
           >返回</el-button
-        ></el-col
-      >
+        >
+      </el-col>
     </el-row>
+
     <!-- <analysis-event :activeName="activeName"></analysis-event> -->
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane label="分析事件" name="first">
-        <analysis-event :activeName="activeName"></analysis-event>
-      </el-tab-pane>
-      <!-- <el-tab-pane label="分析编辑" name="second">
+    <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="分析事件" name="first"> -->
+    <analysis-event
+      :activeName="activeName"
+      :fieldName="fieldName"
+      :analysisName="analysisName"
+    ></analysis-event>
+    <!-- </el-tab-pane> -->
+    <!-- <el-tab-pane label="分析编辑" name="second">
         <edit-analysis :activeName="activeName"></edit-analysis>
       </el-tab-pane> -->
-    </el-tabs>
+    <!-- </el-tabs> -->
   </div>
 </template>
 <script>
@@ -41,8 +46,14 @@ export default {
   data() {
     return {
       activeName: "first",
+      analysisName: "",
+      fieldName: "",
     };
   },
+  mounted() {
+    this.analysisName = this.$route.query.analysisName;
+    this.fieldName = this.$route.query.fieldName;
+  },
   methods: {
     handleClick(tab, event) {},
   },