Browse Source

添加处理Cp图表

liujiejie 1 year ago
parent
commit
7a913ed43d

+ 12 - 0
src/assets/js/class/chart.js

@@ -17,6 +17,12 @@ export default class chartClass {
     height = 300,
     Xdata = [],
     Ydata = [],
+    BarXdata = [],
+    BarYdata = [],
+    LineXdata = [],
+    LineYdata = [],
+    ScatterXdata = [],
+    ScatterYdata = [],
     formFilterAlignData = [], //条件过滤字段
   }) {
     this.id = Math.random();
@@ -28,6 +34,12 @@ export default class chartClass {
     this.type = type;
     this.Xdata = Xdata;
     this.Ydata = Ydata;
+    this.BarXdata = BarXdata;
+    this.BarYdata = BarYdata;
+    this.LineXdata = LineXdata;
+    this.LineYdata = LineYdata;
+    this.ScatterXdata = ScatterXdata;
+    this.ScatterYdata = ScatterYdata;
     this.formFilterAlignData = formFilterAlignData;
   }
 }

+ 4 - 1
src/assets/js/constants/echarts-config/Heatmap.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:13:21
- * @LastEditTime: 2024-11-21 15:33:44
+ * @LastEditTime: 2024-11-25 09:43:16
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/Heatmap.js
@@ -9,6 +9,9 @@
 //Heatmap-热力图
 // 风速随时间和风向的分布
 export const option = {
+  title: {
+    text: "风速随时间和风向的分布",
+  },
   tooltip: {
     position: "top",
   },

+ 6 - 4
src/assets/js/constants/echarts-config/bar.js

@@ -1,6 +1,6 @@
 export const option = {
   title: {
-    text: "Dynamic Data",
+    text: "额定风速间隔数据计数",
   },
   tooltip: {
     trigger: "axis",
@@ -15,8 +15,9 @@ export const option = {
     containLabel: true, // 包含标签在内
   },
   xAxis: {
+    name: "机组",
     type: "category",
-    data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+    data: ["#11", "#12", "#13", "#14", "#15", "#16", "#17"],
     axisTick: {
       alignWithLabel: true,
     },
@@ -34,10 +35,11 @@ export const option = {
   },
   yAxis: {
     type: "value",
+    name: "总数",
     nameLocation: "middle", // 设置名称位置,可以是 'start', 'middle' 或 'end'
     nameTextStyle: {
-      fontSize: 14, // 文字大小
-      color: "#333", // 文字颜色
+      // fontSize: 14, // 文字大小
+      // color: "#333", // 文字颜色
       padding: [0, 0, 30, 0], // 文字与轴线的距离
     },
   },

+ 5 - 2
src/assets/js/constants/echarts-config/boxPlot.js

@@ -1,14 +1,17 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:14:10
- * @LastEditTime: 2024-11-20 17:20:56
- * @LastEditors: milo-MacBook-Pro.local
+ * @LastEditTime: 2024-11-25 09:49:28
+ * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/boxPlot.js
  */
 //箱线图-boxPlot
 //不同季节的风速分布
 export const option = {
+  title: {
+    text: "季节的风速分布",
+  },
   tooltip: {
     trigger: "item",
   },

+ 5 - 2
src/assets/js/constants/echarts-config/hexbin.js

@@ -1,14 +1,17 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:17:31
- * @LastEditTime: 2024-11-20 17:21:19
- * @LastEditors: milo-MacBook-Pro.local
+ * @LastEditTime: 2024-11-25 09:43:28
+ * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/hexbin.js
  */
 // 蜂巢图-Hexbin
 // 风速和风向的联合分布
 export const option = {
+  title: {
+    text: "风速和风向的联合分布",
+  },
   tooltip: {
     trigger: "item",
   },

+ 4 - 1
src/assets/js/constants/echarts-config/histogram.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-19 16:24:20
- * @LastEditTime: 2024-11-19 16:58:13
+ * @LastEditTime: 2024-11-25 09:43:57
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/histogram.js
@@ -12,6 +12,9 @@
 // 实现建议:
 // 使用 ECharts 的直方图。
 export const option = {
+  title: {
+    text: "风速分布直方图",
+  },
   toolbox: {
     feature: {
       dataView: { show: true, readOnly: false },

+ 1 - 1
src/assets/js/constants/echarts-config/line.js

@@ -6,7 +6,7 @@
 // xAxis 为风速,yAxis 为功率。
 export const option = {
   title: {
-    text: "Stacked Line",
+    text: "风速-功率曲线图",
   },
   tooltip: {
     trigger: "axis",

+ 4 - 1
src/assets/js/constants/echarts-config/pareto.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:19:45
- * @LastEditTime: 2024-11-21 14:55:59
+ * @LastEditTime: 2024-11-25 09:44:44
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/pareto.js
@@ -10,6 +10,9 @@
 // 风电场设备故障类型及累积影响
 // 帕累托图通常用于显示数据的分类贡献和累积比例。
 export const option = {
+  title: {
+    text: "设备故障类型及累积",
+  },
   tooltip: {
     trigger: "axis",
     axisPointer: {

+ 4 - 1
src/assets/js/constants/echarts-config/radar.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-04 11:33:31
- * @LastEditTime: 2024-11-21 10:03:46
+ * @LastEditTime: 2024-11-25 09:45:05
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/radar.js
@@ -9,6 +9,9 @@
 // 雷达图-radar
 // 示例:不同风电场的性能评价
 export const option = {
+  title: {
+    text: "风电场性能",
+  },
   tooltip: {},
   radar: {
     indicator: [

+ 4 - 1
src/assets/js/constants/echarts-config/roseChart.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-19 16:18:07
- * @LastEditTime: 2024-11-19 16:58:24
+ * @LastEditTime: 2024-11-25 09:45:34
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/roseChart.js
@@ -13,6 +13,9 @@
 // ECharts 的极坐标 + 柱状图。
 // 使用 polar 和 radiusAxis 配置。
 export const option = {
+  title: {
+    text: "风速或风力分布",
+  },
   angleAxis: {
     type: "category",
     data: ["N", "NE", "E", "SE", "S", "SW", "W", "NW"], // 风向

+ 3 - 0
src/assets/js/constants/echarts-config/scatter.js

@@ -1,4 +1,7 @@
 export const option = {
+  title: {
+    text: "风速分布",
+  },
   xAxis: {
     name: "风向 (°)",
     type: "category",

+ 5 - 2
src/assets/js/constants/echarts-config/stackedBar.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2024-11-19 16:25:10
- * @LastEditTime: 2024-11-20 17:22:20
- * @LastEditors: milo-MacBook-Pro.local
+ * @LastEditTime: 2024-11-25 09:46:37
+ * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/stackedBar.js
  */
@@ -12,6 +12,9 @@
 // 实现建议:
 // 使用堆叠柱状图。
 export const option = {
+  title: {
+    text: "风机状态",
+  },
   xAxis: {
     type: "category",
     data: ["风机1", "风机2", "风机3", "风机4"], // 风机编号

+ 4 - 1
src/assets/js/constants/echarts-config/timeSeries.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:16:47
- * @LastEditTime: 2024-11-20 09:47:16
+ * @LastEditTime: 2024-11-25 09:46:47
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/timeSeries.js
@@ -9,6 +9,9 @@
 //时间序列图 timeSeries
 //风速变化趋势
 export const option = {
+  title: {
+    text: "风速变化趋势",
+  },
   tooltip: {
     trigger: "axis",
   },

+ 5 - 2
src/assets/js/constants/echarts-config/waterfall.js

@@ -1,14 +1,17 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:15:50
- * @LastEditTime: 2024-11-20 17:22:28
- * @LastEditors: milo-MacBook-Pro.local
+ * @LastEditTime: 2024-11-25 09:47:00
+ * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/waterfall.js
  */
 // 瀑布图-Waterfall
 // 示例:风速到发电量的损耗分析
 export const option = {
+  title: {
+    text: "风速到发电量的损耗分析",
+  },
   legend: {
     top: "bottom",
   },

+ 562 - 0
src/views/dataAdministration/vibration/index.vue

@@ -0,0 +1,562 @@
+<!--
+ * @Author: your name
+ * @Date: 2024-11-25 09:28:47
+ * @LastEditTime: 2024-11-25 09:33:01
+ * @LastEditors: bogon
+ * @Description: In User Settings Edit
+ * @FilePath: /performance-test/src/views/dataAdministration/vibration/index.vue
+-->
+<template>
+  <div class="global-variable" v-loading="loading">
+    <!-- 振动数据操作页面 -->
+    <div class="condition">
+      <el-form
+        :inline="true"
+        ref="ruleForm"
+        :model="formInline"
+        class="demo-form-inline"
+        :rules="rules"
+      >
+        <el-form-item label="风场名称:" prop="fieldName">
+          <el-input
+            size="small"
+            v-model="formInline.fieldName"
+            placeholder="请输入风场名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="状态:" prop="batchState" size="small">
+          <el-select v-model="formInline.batchState" placeholder="请选择状态">
+            <el-option label="启用" value="1"></el-option>
+            <el-option label="停用" value="0"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="创建时间">
+          <el-date-picker
+            size="small"
+            v-model="formInline.picker"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            @change="onDateChange"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="onSubmit" size="small"
+            >查询</el-button
+          >
+          <el-button @click="reset('ruleForm')" size="small">重置</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="list-page">
+      <div class="newly">
+        <el-button
+          v-hasPermi="['performance:batchMag:add']"
+          type="primary"
+          @click="newnuedialog"
+          size="small"
+          >新增</el-button
+        >
+      </div>
+      <el-table
+        v-loading="loading"
+        class="center-align-table"
+        :data="tableData"
+        border
+        :cell-style="rowStyle"
+      >
+        <el-table-column
+          prop="fieldName"
+          align="center"
+          min-width="100"
+          label="关联风场"
+        >
+        </el-table-column>
+        <el-table-column
+          align="center"
+          min-width="100"
+          label="批次名称"
+          prop="batchName"
+        >
+        </el-table-column>
+        <!-- <el-table-column align="center" label="批次编号" prop="batchCode">
+          </el-table-column> -->
+
+        <el-table-column
+          prop="batchState"
+          align="center"
+          label="状态"
+          min-width="100"
+        >
+          <template slot-scope="scope">
+            <span>
+              {{
+                scope.row.batchState == 0
+                  ? "禁用"
+                  : scope.row.batchState == 1
+                  ? "启用"
+                  : "/"
+              }}</span
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="createTime"
+          align="center"
+          min-width="150"
+          label="创建时间"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="transition"
+          align="center"
+          fixed="right"
+          label="操作"
+          min-width="200"
+        >
+          <template slot-scope="scope">
+            <el-button
+              v-hasPermi="['performance:batchMag:edit']"
+              @click="compile(scope.row)"
+              type="text"
+              size="small"
+              >编辑</el-button
+            >
+            <el-button
+              v-hasPermi="['performance:batchMag:editState']"
+              v-if="scope.row.batchState == 0"
+              @click="setState(1, scope.row)"
+              type="text"
+              size="small"
+              >启用</el-button
+            >
+            <el-button
+              v-else
+              v-hasPermi="['performance:batchMag:editState']"
+              style="color: #666"
+              @click="setState(0, scope.row)"
+              type="text"
+              size="small"
+              >禁用</el-button
+            >
+
+            <el-button
+              style="color: #f00"
+              @click="deleted(scope.row)"
+              v-hasPermi="['performance:batchMag:delete']"
+              type="text"
+              size="small"
+              :disabled="scope.row.batchState == 1"
+              >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination-container">
+        <el-pagination
+          @current-change="handleCurrentChange"
+          :current-page.sync="formInline.pageNum"
+          layout="total, prev, pager, next"
+          :page-size="formInline.pageSize"
+          :total="formInline.totalSize"
+        >
+        </el-pagination>
+      </div>
+    </div>
+
+    <!-- 弹出层 -->
+    <!-- 新增 /编辑-->
+    <el-dialog
+      :title="title"
+      :visible.sync="nuedialog"
+      width="500px"
+      :before-close="handleCloses"
+    >
+      <div v-loading="loadingView" class="views">
+        <el-form
+          :model="ruleForm"
+          :rules="addUserRules"
+          ref="addUserForm"
+          label-width="100px"
+          class="demo-ruleForm"
+        >
+          <el-form-item label="关联风场:" prop="fieldCode">
+            <el-select
+              :disabled="title === '编辑'"
+              v-model="ruleForm.fieldCode"
+              placeholder="请选择关联风场"
+              style="width: 100%"
+            >
+              <el-option
+                :label="item.fieldName"
+                v-for="item in fieldCodeList"
+                :value="item.codeNumber"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="批次名称"
+            prop="batchName"
+            v-if="title === '编辑'"
+          >
+            <el-input
+              v-model="ruleForm.batchName"
+              placeholder="请输入批次名称"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="cancel('addUserForm')" size="small"
+            >取 消
+          </el-button>
+          <el-button
+            type="primary"
+            @click="submitForm('addUserForm')"
+            size="small"
+          >
+            确 定
+          </el-button>
+        </span>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getBatchMagList,
+  addFieldBatch,
+  updateFieldBatch,
+  queryCodeNum,
+  onOrOffFieldBatch,
+  deleteFieldBatch,
+  createBatchName,
+} from "@/api/performance.js";
+export default {
+  data() {
+    return {
+      loadingView: false,
+      loading: false, //数据加载中
+      rules: {
+        fieldCode: { trigger: "change" },
+        batchState: { trigger: "blur" },
+      },
+      startDate: "",
+      endDate: "",
+      fieldCodeList: [],
+      formInline: {
+        fieldName: undefined,
+        batchState: undefined,
+        picker: [],
+        pageNum: 1,
+        pageSize: 10,
+        totalSize: 0,
+      },
+      tableData: [],
+      // 新增编辑表单
+      ruleForm: {
+        fieldCode: null,
+        batchName: null,
+        batchCode: null,
+      },
+      addUserRules: {
+        batchCode: {
+          required: true,
+          message: "请选择关联风场",
+          trigger: "change",
+        },
+        batchName: [
+          { required: true, message: "请输入批次名称", trigger: "blur" },
+        ],
+      },
+      //修改密码
+      editUserPassword: {
+        oldPWD: "",
+        newPWD: "",
+        userId: "",
+      },
+
+      nuedialog: false,
+      title: "",
+    };
+  },
+  created() {
+    this.getTableList();
+    this.getQueryCodeNumList();
+  },
+
+  methods: {
+    handleCloses(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+        })
+        .catch((_) => {});
+    },
+    onDateChange(date) {
+      if (Array.isArray(date)) {
+        this.startDate = this.$formatDate(date[0]);
+        this.endDate = this.$formatDate(date[1]);
+        if (this.endDate < this.startDate) {
+          this.endDate = this.startDate;
+        }
+      } else {
+        this.startDate = null;
+        this.endDate = null;
+      }
+    },
+    //获取风场列表
+    async getQueryCodeNumList() {
+      this.loading = true;
+      try {
+        const result = await queryCodeNum();
+        this.fieldCodeList = result.data.fieldCodeList;
+        this.loading = false;
+      } catch (error) {
+        console.error(error);
+        this.loading = false;
+      }
+    },
+    //分页数据切换
+    handleCurrentChange(val) {
+      this.formInline.pageNum = val;
+      this.getTableList();
+    },
+    //修改状态
+    setState(state, row) {
+      //启用接口
+      this.loading = true;
+      onOrOffFieldBatch({ batchCode: row.batchCode, batchState: state })
+        .then((res) => {
+          this.$message({
+            message: res.msg,
+            type: "success",
+          });
+          this.loading = false;
+          this.getTableList();
+        })
+        .catch((error) => {
+          this.loading = false;
+        });
+    },
+    async getTableList() {
+      try {
+        this.loading = true;
+        const result = await getBatchMagList({
+          ...this.formInline,
+          picker: undefined,
+          startTime: this.startDate || undefined,
+          endTime: this.endDate || undefined,
+          totalSize: undefined,
+        });
+        this.tableData = result.data.list;
+        this.formInline.totalSize = result.data.totalSize;
+        this.loading = false;
+      } catch (error) {
+        this.$message({
+          type: "error",
+          message: "请检查是否连接网络",
+        });
+      }
+    },
+
+    rowStyle() {
+      return "text-align:center";
+    },
+    // 查询
+    onSubmit() {
+      this.getTableList();
+    },
+    // 重置
+    reset(formName) {
+      this.formInline.picker = [];
+      this.startDate = undefined;
+      this.endDate = undefined;
+      this.$refs[formName].resetFields();
+      this.getTableList();
+    },
+
+    // 新增,编辑确定
+    submitForm(formName) {
+      // this.loading = true;
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.loadingView = true;
+          switch (this.title) {
+            case "新增":
+              const obj = this.fieldCodeList.find(
+                (item) => item.codeNumber === this.ruleForm.fieldCode
+              );
+              const form = new FormData();
+              form.append("fieldName", obj.fieldName);
+              createBatchName(form).then((results) => {
+                addFieldBatch({
+                  ...this.ruleForm,
+                  batchName: results.data,
+                  batchCode: undefined,
+                })
+                  .then((res) => {
+                    this.$message({
+                      type: "success",
+                      message: res.msg,
+                    });
+                    // this.loading = false;
+                    this.getTableList();
+                    this.nuedialog = false;
+                    this.loadingView = false;
+                  })
+                  .catch(() => {
+                    this.loadingView = false;
+                    // this.loading = false;
+                  });
+              });
+
+              break;
+            case "编辑":
+              updateFieldBatch({ ...this.ruleForm, fieldCode: undefined })
+                .then((res) => {
+                  this.$message({
+                    type: "success",
+                    message: res.msg,
+                  });
+                  this.getTableList();
+                  this.nuedialog = false;
+                  this.loadingView = false;
+                })
+                .catch(() => {
+                  this.loadingView = false;
+                });
+
+              break;
+          }
+          // this.nuedialog = false;
+        } else {
+          return false;
+        }
+      });
+    },
+    //点击取消
+    cancel(formName) {
+      this.$refs[formName] && this.$refs[formName].resetFields();
+      this.ruleForm = {
+        fieldCode: null,
+        batchCode: null,
+        batchName: null,
+      };
+      this.nuedialog = false;
+      this.loadingView = false;
+    },
+    // 编辑 回显数据
+    async compile(row) {
+      try {
+        // 直接替换整个对象,以确保 Vue 的响应式系统能够检测到变化
+        this.ruleForm = {
+          fieldCode: row.fieldCode,
+          batchCode: row.batchCode,
+          batchName: row.batchName,
+        };
+        this.nuedialog = true;
+        this.title = "编辑";
+      } catch (error) {
+        this.$message.error("获取用户信息失败");
+      }
+    },
+    // 删除
+    deleted(row) {
+      this.$confirm("此操作将永久删除该用户, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.loading = true;
+          deleteFieldBatch({ batchCode: row.batchCode })
+            .then((res) => {
+              this.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+              this.loading = false;
+              this.getTableList();
+            })
+            .catch(() => {
+              this.loading = false;
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    // 新增
+    newnuedialog() {
+      this.cancel("addUserForm");
+      this.ruleForm = {
+        batchCode: "",
+        batchName: "",
+        fieldCode: "",
+      };
+      this.nuedialog = true;
+      this.title = "新增";
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.general {
+  display: flex;
+  flex-wrap: wrap;
+
+  .condition {
+    width: 50%;
+    display: flex;
+
+    p {
+      width: 100px;
+      text-align: right;
+      line-height: 40px;
+    }
+
+    span {
+      line-height: 40px;
+
+      padding-left: 20px;
+    }
+
+    .el-select {
+      width: 100%;
+      margin-bottom: 20px;
+    }
+
+    .el-input {
+      margin-bottom: 20px;
+    }
+  }
+}
+
+.attachment {
+  display: flex;
+  padding-top: 10px;
+
+  p {
+    margin-right: 20px;
+    color: #409eff;
+  }
+}
+
+.addition {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 10px;
+}
+.demo-ruleForm {
+  .el-form-item {
+    margin-bottom: 25px;
+  }
+}
+</style>

+ 36 - 29
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/cp.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-21 15:40:30
- * @LastEditTime: 2024-11-22 14:04:26
+ * @LastEditTime: 2024-11-25 15:18:08
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/cp.js
@@ -16,6 +16,7 @@ export function handleCpChartLogic(
   isFilter,
   type
 ) {
+  // console.log(item, formLabelAlign, formFilterAlign, "cp");
   // 封装柱状图的具体逻辑
   if (isFilter === "filter") {
     // 数据筛选逻辑
@@ -59,10 +60,16 @@ export function handleCpChartLogic(
     item.Xdata = formLabelAlign.Xdata;
     item.Ydata = filterList;
   } else {
-    item.Xdata = formLabelAlign.Xdata;
-    item.Ydata = formLabelAlign.Ydata;
+    item.LineXdata = formLabelAlign.LineXdata;
+    item.LineYdata = formLabelAlign.LineYdata;
+    item.ScatterXdata = formLabelAlign.ScatterXdata;
+    item.ScatterYdata = formLabelAlign.ScatterYdata;
   }
-
+  //默认数据
+  item.LineXdata = formLabelAlign.LineXdata;
+  item.LineYdata = formLabelAlign.LineYdata;
+  item.ScatterXdata = formLabelAlign.ScatterXdata;
+  item.ScatterYdata = formLabelAlign.ScatterYdata;
   item.option.xAxis = {
     ...item.option.xAxis,
     name: formLabelAlign.Xlable,
@@ -72,30 +79,30 @@ export function handleCpChartLogic(
     name: formLabelAlign.Ylable,
   };
 
-  if (item.Ydata[0]?.data?.length > 0) {
-    item.option.series = getFormattedSeries(item.Ydata, type);
-  }
-  if (item.Xdata[0]?.data?.length > 0) {
-    item.option.xAxis = {
-      ...item.option.xAxis,
-      data: item.Xdata[0].data,
-      axisTick: { alignWithLabel: true },
-      axisLabel: {
-        formatter: (value, index) =>
-          value !== null ? getFormattedLabels(index, item.Xdata, value) : "",
-      },
-    };
-    item.option.tooltip = {
-      trigger: "axis",
-      axisPointer: { type: "shadow" },
-      formatter: (params) => {
-        const index = params[0]?.dataIndex; // 获取当前数据点索引
-        const content = params
-          .map((param) => `${param.marker}${param.seriesName}: ${param.value}`)
-          .join("<br/>");
-        const customLabels = getFormattedLabels(index, item.Xdata);
-        return `${customLabels}<br/>${content}`;
-      },
-    };
+  if (item.LineYdata[0]?.data?.length > 0) {
+    const res = item.LineYdata?.map((lineItem, ind) => {
+      return {
+        name: lineItem.label,
+        type: "line",
+        renderMode: "webgl", // 启用 WebGL 渲染
+        data: [
+          ...lineItem.data?.map((val, valInd) => {
+            return [
+              item.LineXdata[ind]?.data[valInd][item.LineXdata[ind].label],
+              val[lineItem.label],
+            ];
+          }),
+        ],
+      };
+    });
+    item.option.series = [...res];
   }
+  // item.option.xAxis = {
+  //   ...item.option.xAxis,
+  //   axisTick: { alignWithLabel: true },
+  // };
+  // item.option.tooltip = {
+  //   trigger: "axis",
+  //   axisPointer: { type: "shadow" },
+  // };
 }

+ 617 - 48
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartTitle.vue

@@ -6,7 +6,131 @@
       size="mini"
       ref="form"
     >
-      <el-form-item label="纬度标签">
+      <template v-if="curEdit.type !== 'Cp' && curEdit.type !== 'pareto'">
+        <el-form-item label="纬度标签">
+          <div
+            slot="label"
+            style="
+              display: flex;
+              align-items: center;
+              justify-content: space-between;
+            "
+          >
+            <span>纬度标签</span>
+            <el-tooltip
+              content="添加纬度"
+              placement="bottom-start"
+              v-if="curEdit.type === 'scatter' || curEdit.type === 'radar'"
+            >
+              <i
+                @click="
+                  formLabelAlign.Xdata.push({ lable: '', data: [], id: '' })
+                "
+                class="el-icon-circle-plus-outline"
+                style="font-size: 20px"
+              ></i>
+            </el-tooltip>
+          </div>
+          <template v-for="(item, ind) in formLabelAlign.Xdata">
+            <div class="attributeItemData">
+              <el-select
+                style="margin: 5px 0"
+                :key="ind + 'select'"
+                v-model="formLabelAlign.Xdata[ind].id"
+                placeholder="请先进行数据配置"
+                :disabled="disabled"
+                @change="handleXdata('init')"
+              >
+                <el-option
+                  v-for="item in selectData"
+                  :label="item.label"
+                  :value="item.id"
+                  :key="item.id"
+                ></el-option>
+              </el-select>
+              <el-tooltip
+                v-if="curEdit.type === 'scatter' || curEdit.type === 'radar'"
+                :content="
+                  formLabelAlign.Xdata.length <= 1
+                    ? '该指标不可删除,最少存在一组指标'
+                    : '删除该指标'
+                "
+                placement="bottom-start"
+              >
+                <el-button
+                  type="text"
+                  :disabled="formLabelAlign.Xdata.length <= 1"
+                  @click="removeXdata(ind, 'init')"
+                >
+                  <i
+                    class="el-icon-delete"
+                    style="font-size: 16px; color: red; padding: 0 0 0 10px"
+                  ></i
+                ></el-button>
+              </el-tooltip>
+            </div>
+          </template>
+        </el-form-item>
+        <el-form-item label="指标值">
+          <div
+            slot="label"
+            style="
+              display: flex;
+              align-items: center;
+              justify-content: space-between;
+            "
+          >
+            <span>指标值</span>
+            <el-tooltip content="添加指标值" placement="bottom-start">
+              <i
+                @click="handleMetrics('init')"
+                class="el-icon-circle-plus-outline"
+                style="font-size: 20px"
+              ></i>
+            </el-tooltip>
+          </div>
+          <template v-for="(item, ind) in formLabelAlign.Ydata">
+            <div class="attributeItemData">
+              <el-select
+                style="margin: 5px 0"
+                :key="ind + 'select' + 'zhibiao'"
+                v-model="formLabelAlign.Ydata[ind].id"
+                placeholder="请先进行数据配置"
+                :disabled="disabled"
+                @change="handleYdata(ind, 'init')"
+              >
+                <el-option
+                  v-for="item in selectData"
+                  :label="item.label"
+                  :value="item.id"
+                  :key="item.id"
+                ></el-option>
+              </el-select>
+              <el-tooltip
+                :content="
+                  formLabelAlign.Ydata.length <= 1
+                    ? '该指标不可删除,最少存在一组指标'
+                    : '删除该指标'
+                "
+                placement="bottom-start"
+              >
+                <el-button
+                  type="text"
+                  :disabled="formLabelAlign.Ydata.length <= 1"
+                  @click="removeYdata(ind, 'init')"
+                >
+                  <i
+                    class="el-icon-delete"
+                    style="font-size: 16px; color: red; padding: 0 0 0 10px"
+                  ></i
+                ></el-button>
+              </el-tooltip>
+            </div>
+          </template>
+        </el-form-item>
+      </template>
+
+      <el-form-item v-if="curEdit.type === 'pareto'" label="柱纬度标签">
         <div
           slot="label"
           style="
@@ -15,30 +139,268 @@
             justify-content: space-between;
           "
         >
-          <span>纬度标签</span>
-          <el-tooltip
-            content="添加纬度"
-            placement="bottom-start"
-            v-if="curEdit.type === 'scatter' || curEdit.type === 'radar'"
-          >
+          <span>柱纬度标签</span>
+          <el-tooltip content="添加纬度" placement="bottom-start">
             <i
               @click="
-                formLabelAlign.Xdata.push({ lable: '', data: [], id: '' })
+                formLabelAlign.BarXdata.push({ lable: '', data: [], id: '' })
               "
               class="el-icon-circle-plus-outline"
               style="font-size: 20px"
             ></i>
           </el-tooltip>
         </div>
-        <template v-for="(item, ind) in formLabelAlign.Xdata">
+        <template v-for="(item, ind) in formLabelAlign.BarXdata">
           <div class="attributeItemData">
             <el-select
               style="margin: 5px 0"
               :key="ind + 'select'"
-              v-model="formLabelAlign.Xdata[ind].id"
+              v-model="formLabelAlign.BarXdata[ind].id"
               placeholder="请先进行数据配置"
               :disabled="disabled"
-              @change="handleXdata"
+              @change="handleXdata('bar')"
+            >
+              <el-option
+                v-for="item in selectData"
+                :label="item.label"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+            <el-tooltip
+              :content="
+                formLabelAlign.BarXdata.length <= 1
+                  ? '该指标不可删除,最少存在一组指标'
+                  : '删除该指标'
+              "
+              placement="bottom-start"
+            >
+              <el-button
+                type="text"
+                :disabled="formLabelAlign.BarXdata.length <= 1"
+                @click="removeXdata(ind, 'bar')"
+              >
+                <i
+                  class="el-icon-delete"
+                  style="font-size: 16px; color: red; padding: 0 0 0 10px"
+                ></i
+              ></el-button>
+            </el-tooltip>
+          </div>
+        </template>
+      </el-form-item>
+      <el-form-item v-if="curEdit.type === 'pareto'" label="柱指标值">
+        <div
+          slot="label"
+          style="
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+          "
+        >
+          <span>柱指标值</span>
+          <el-tooltip content="添加柱指标值" placement="bottom-start">
+            <i
+              @click="handleMetrics('bar')"
+              class="el-icon-circle-plus-outline"
+              style="font-size: 20px"
+            ></i>
+          </el-tooltip>
+        </div>
+        <template v-for="(item, ind) in formLabelAlign.BarYdata">
+          <div class="attributeItemData">
+            <el-select
+              style="margin: 5px 0"
+              :key="ind + 'select' + 'zhibiao'"
+              v-model="formLabelAlign.BarYdata[ind].id"
+              placeholder="请先进行数据配置"
+              :disabled="disabled"
+              @change="handleYdata(ind, 'bar')"
+            >
+              <el-option
+                v-for="item in selectData"
+                :label="item.label"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+            <el-tooltip
+              :content="
+                formLabelAlign.BarYdata.length <= 1
+                  ? '该指标不可删除,最少存在一组指标'
+                  : '删除该指标'
+              "
+              placement="bottom-start"
+            >
+              <el-button
+                type="text"
+                :disabled="formLabelAlign.BarYdata.length <= 1"
+                @click="removeYdata(ind, 'bar')"
+              >
+                <i
+                  class="el-icon-delete"
+                  style="font-size: 16px; color: red; padding: 0 0 0 10px"
+                ></i
+              ></el-button>
+            </el-tooltip>
+          </div>
+        </template>
+      </el-form-item>
+      <el-form-item
+        v-if="curEdit.type === 'pareto' || curEdit.type === 'Cp'"
+        label="线纬度标签"
+      >
+        <div
+          slot="label"
+          style="
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+          "
+        >
+          <span>线纬度标签</span>
+          <el-tooltip content="添加纬度" placement="bottom-start">
+            <i
+              @click="
+                formLabelAlign.LineXdata.push({ lable: '', data: [], id: '' })
+              "
+              class="el-icon-circle-plus-outline"
+              style="font-size: 20px"
+            ></i>
+          </el-tooltip>
+        </div>
+        <template v-for="(item, ind) in formLabelAlign.LineXdata">
+          <div class="attributeItemData">
+            <el-select
+              style="margin: 5px 0"
+              :key="ind + 'select'"
+              v-model="formLabelAlign.LineXdata[ind].id"
+              placeholder="请先进行数据配置"
+              :disabled="disabled"
+              @change="handleXdata('line')"
+            >
+              <el-option
+                v-for="item in selectData"
+                :label="item.label"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+            <el-tooltip
+              :content="
+                formLabelAlign.LineXdata.length <= 1
+                  ? '该指标不可删除,最少存在一组指标'
+                  : '删除该指标'
+              "
+              placement="bottom-start"
+            >
+              <el-button
+                type="text"
+                :disabled="formLabelAlign.LineXdata.length <= 1"
+                @click="removeXdata(ind, 'line')"
+              >
+                <i
+                  class="el-icon-delete"
+                  style="font-size: 16px; color: red; padding: 0 0 0 10px"
+                ></i
+              ></el-button>
+            </el-tooltip>
+          </div>
+        </template>
+      </el-form-item>
+      <el-form-item
+        v-if="curEdit.type === 'pareto' || curEdit.type === 'Cp'"
+        label="线指标值"
+      >
+        <div
+          slot="label"
+          style="
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+          "
+        >
+          <span>线指标值</span>
+          <el-tooltip content="添加线指标值" placement="bottom-start">
+            <i
+              @click="handleMetrics('line')"
+              class="el-icon-circle-plus-outline"
+              style="font-size: 20px"
+            ></i>
+          </el-tooltip>
+        </div>
+        <template v-for="(item, ind) in formLabelAlign.LineYdata">
+          <div class="attributeItemData">
+            <el-select
+              style="margin: 5px 0"
+              :key="ind + 'select' + 'zhibiao'"
+              v-model="formLabelAlign.LineYdata[ind].id"
+              placeholder="请先进行数据配置"
+              :disabled="disabled"
+              @change="handleYdata(ind, 'line')"
+            >
+              <el-option
+                v-for="item in selectData"
+                :label="item.label"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+            <el-tooltip
+              :content="
+                formLabelAlign.LineYdata.length <= 1
+                  ? '该指标不可删除,最少存在一组指标'
+                  : '删除该指标'
+              "
+              placement="bottom-start"
+            >
+              <el-button
+                type="text"
+                :disabled="formLabelAlign.LineYdata.length <= 1"
+                @click="removeYdata(ind, 'line')"
+              >
+                <i
+                  class="el-icon-delete"
+                  style="font-size: 16px; color: red; padding: 0 0 0 10px"
+                ></i
+              ></el-button>
+            </el-tooltip>
+          </div>
+        </template>
+      </el-form-item>
+      <el-form-item v-if="curEdit.type === 'Cp'" label="点纬度标签">
+        <div
+          slot="label"
+          style="
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+          "
+        >
+          <span>点纬度标签</span>
+          <el-tooltip content="添加纬度" placement="bottom-start">
+            <i
+              @click="
+                formLabelAlign.ScatterXdata.push({
+                  lable: '',
+                  data: [],
+                  id: '',
+                })
+              "
+              class="el-icon-circle-plus-outline"
+              style="font-size: 20px"
+            ></i>
+          </el-tooltip>
+        </div>
+        <template v-for="(item, ind) in formLabelAlign.ScatterXdata">
+          <div class="attributeItemData">
+            <el-select
+              style="margin: 5px 0"
+              :key="ind + 'select'"
+              v-model="formLabelAlign.ScatterXdata[ind].id"
+              placeholder="请先进行数据配置"
+              :disabled="disabled"
+              @change="handleXdata('scatter')"
             >
               <el-option
                 v-for="item in selectData"
@@ -48,9 +410,8 @@
               ></el-option>
             </el-select>
             <el-tooltip
-              v-if="curEdit.type === 'scatter' || curEdit.type === 'radar'"
               :content="
-                formLabelAlign.Xdata.length <= 1
+                formLabelAlign.ScatterXdata.length <= 1
                   ? '该指标不可删除,最少存在一组指标'
                   : '删除该指标'
               "
@@ -58,8 +419,8 @@
             >
               <el-button
                 type="text"
-                :disabled="formLabelAlign.Xdata.length <= 1"
-                @click="removeXdata(ind)"
+                :disabled="formLabelAlign.ScatterXdata.length <= 1"
+                @click="removeXdata(ind, 'scatter')"
               >
                 <i
                   class="el-icon-delete"
@@ -70,7 +431,7 @@
           </div>
         </template>
       </el-form-item>
-      <el-form-item label="指标值">
+      <el-form-item v-if="curEdit.type === 'Cp'" label="指标值">
         <div
           slot="label"
           style="
@@ -79,24 +440,24 @@
             justify-content: space-between;
           "
         >
-          <span>指标值</span>
-          <el-tooltip content="添加指标值" placement="bottom-start">
+          <span>指标值</span>
+          <el-tooltip content="添加指标值" placement="bottom-start">
             <i
-              @click="handleMetrics"
+              @click="handleMetrics('scatter')"
               class="el-icon-circle-plus-outline"
               style="font-size: 20px"
             ></i>
           </el-tooltip>
         </div>
-        <template v-for="(item, ind) in formLabelAlign.Ydata">
+        <template v-for="(item, ind) in formLabelAlign.ScatterYdata">
           <div class="attributeItemData">
             <el-select
               style="margin: 5px 0"
               :key="ind + 'select' + 'zhibiao'"
-              v-model="formLabelAlign.Ydata[ind].id"
+              v-model="formLabelAlign.ScatterYdata[ind].id"
               placeholder="请先进行数据配置"
               :disabled="disabled"
-              @change="handleYdata(ind)"
+              @change="handleYdata(ind, 'scatter')"
             >
               <el-option
                 v-for="item in selectData"
@@ -107,7 +468,7 @@
             </el-select>
             <el-tooltip
               :content="
-                formLabelAlign.Ydata.length <= 1
+                formLabelAlign.ScatterYdata.length <= 1
                   ? '该指标不可删除,最少存在一组指标'
                   : '删除该指标'
               "
@@ -115,8 +476,8 @@
             >
               <el-button
                 type="text"
-                :disabled="formLabelAlign.Ydata.length <= 1"
-                @click="removeYdata(ind)"
+                :disabled="formLabelAlign.ScatterYdata.length <= 1"
+                @click="removeYdata(ind, 'scatter')"
               >
                 <i
                   class="el-icon-delete"
@@ -279,6 +640,48 @@ export default {
         },
       ],
       formLabelAlign: {
+        ScatterXdata: [
+          {
+            label: "",
+            data: [],
+            id: "",
+          },
+        ],
+        ScatterYdata: [
+          {
+            label: "",
+            data: [],
+            id: "",
+          },
+        ],
+        LineXdata: [
+          {
+            label: "",
+            data: [],
+            id: "",
+          },
+        ],
+        LineYdata: [
+          {
+            label: "",
+            data: [],
+            id: "",
+          },
+        ],
+        BarXdata: [
+          {
+            label: "",
+            data: [],
+            id: "",
+          },
+        ],
+        BarYdata: [
+          {
+            label: "",
+            data: [],
+            id: "",
+          },
+        ],
         Xdata: [
           {
             label: "",
@@ -337,33 +740,113 @@ export default {
     this.changeData();
   },
   methods: {
-    handleMetrics() {
-      this.formLabelAlign.Ydata.push({ lable: "", data: [], id: "" });
-      this.formFilterAlign.push({
-        filters: [],
-        filterType1: "",
-        number1: null,
-        filterType2: "",
-        number2: null,
-        radio: null,
-      });
-    },
     ...mapMutations("dragChart", [
       "updateChart",
       "setCurEdit",
       "setFormFilterAlignData",
     ]),
+    handleMetrics(type) {
+      switch (type) {
+        case "init":
+          this.formLabelAlign.Ydata.push({ lable: "", data: [], id: "" });
+          this.formFilterAlign.push({
+            filters: [],
+            filterType1: "",
+            number1: null,
+            filterType2: "",
+            number2: null,
+            radio: null,
+          });
+          break;
+        case "bar":
+          this.formLabelAlign.BarYdata.push({ lable: "", data: [], id: "" });
+          this.formFilterAlign.push({
+            filters: [],
+            filterType1: "",
+            number1: null,
+            filterType2: "",
+            number2: null,
+            radio: null,
+          });
+          break;
+        case "line":
+          this.formLabelAlign.LineYdata.push({ lable: "", data: [], id: "" });
+          this.formFilterAlign.push({
+            filters: [],
+            filterType1: "",
+            number1: null,
+            filterType2: "",
+            number2: null,
+            radio: null,
+          });
+          break;
+        case "scatter":
+          this.formLabelAlign.ScatterYdata.push({
+            lable: "",
+            data: [],
+            id: "",
+          });
+          this.formFilterAlign.push({
+            filters: [],
+            filterType1: "",
+            number1: null,
+            filterType2: "",
+            number2: null,
+            radio: null,
+          });
+          break;
+      }
+    },
     //纬度轴 处理整合数据
-    handleXdata() {
-      this.formLabelAlign.Xdata = this.updateAxisData(
-        this.formLabelAlign.Xdata
-      );
+    handleXdata(type) {
+      switch (type) {
+        case "init":
+          this.formLabelAlign.Xdata = this.updateAxisData(
+            this.formLabelAlign.Xdata
+          );
+          break;
+        case "bar":
+          this.formLabelAlign.BarXdata = this.updateAxisData(
+            this.formLabelAlign.BarXdata
+          );
+          break;
+        case "line":
+          this.formLabelAlign.LineXdata = this.updateAxisData(
+            this.formLabelAlign.LineXdata
+          );
+          break;
+        case "scatter":
+          this.formLabelAlign.ScatterXdata = this.updateAxisData(
+            this.formLabelAlign.ScatterXdata
+          );
+          break;
+      }
     },
     //指标值 处理整合数据
-    handleYdata(ind) {
-      this.formLabelAlign.Ydata = this.updateAxisData(
-        this.formLabelAlign.Ydata
-      );
+    handleYdata(ind, type) {
+      switch (type) {
+        case "init":
+          this.formLabelAlign.Ydata = this.updateAxisData(
+            this.formLabelAlign.Ydata
+          );
+          break;
+        case "bar":
+          this.formLabelAlign.BarYdata = this.updateAxisData(
+            this.formLabelAlign.BarYdata
+          );
+          break;
+        case "line":
+          this.formLabelAlign.LineYdata = this.updateAxisData(
+            this.formLabelAlign.LineYdata
+          );
+          break;
+        case "scatter":
+          this.formLabelAlign.ScatterYdata = this.updateAxisData(
+            this.formLabelAlign.ScatterYdata
+          );
+          break;
+      }
+
       this.formFilterAlign.forEach((item, index) => {
         if (ind === index) {
           {
@@ -424,6 +907,66 @@ export default {
                     id: "",
                   },
                 ],
+          BarXdata:
+            this.curEdit.BarXdata.length > 0
+              ? this.curEdit.BarXdata
+              : [
+                  {
+                    label: "",
+                    data: [],
+                    id: "",
+                  },
+                ],
+          BarYdata:
+            this.curEdit.BarYdata.length > 0
+              ? this.curEdit.BarYdata
+              : [
+                  {
+                    label: "",
+                    data: [],
+                    id: "",
+                  },
+                ],
+          LineXdata:
+            this.curEdit.LineXdata.length > 0
+              ? this.curEdit.LineXdata
+              : [
+                  {
+                    label: "",
+                    data: [],
+                    id: "",
+                  },
+                ],
+          LineYdata:
+            this.curEdit.LineYdata.length > 0
+              ? this.curEdit.LineYdata
+              : [
+                  {
+                    label: "",
+                    data: [],
+                    id: "",
+                  },
+                ],
+          ScatterXdata:
+            this.curEdit.ScatterXdata.length > 0
+              ? this.curEdit.ScatterXdata
+              : [
+                  {
+                    label: "",
+                    data: [],
+                    id: "",
+                  },
+                ],
+          ScatterYdata:
+            this.curEdit.ScatterYdata.length > 0
+              ? this.curEdit.ScatterYdata
+              : [
+                  {
+                    label: "",
+                    data: [],
+                    id: "",
+                  },
+                ],
         });
         // 查找是否存在数据
         const index = this.curEdit.formFilterAlignData.findIndex(
@@ -527,11 +1070,37 @@ export default {
         formFilterAlignData: this.formFilterAlign,
       }); // 更新图表
     },
-    removeYdata(index) {
-      this.formLabelAlign.Ydata.splice(index, 1); // 删除当前项
+    removeYdata(index, type) {
+      switch (type) {
+        case "init":
+          this.formLabelAlign.Ydata.splice(index, 1); // 删除当前项
+          break;
+        case "bar":
+          this.formLabelAlign.BarYdata.splice(index, 1); // 删除当前项
+          break;
+        case "line":
+          this.formLabelAlign.LineYdata.splice(index, 1); // 删除当前项
+          break;
+        case "scatter":
+          this.formLabelAlign.ScatterYdata.splice(index, 1); // 删除当前项
+          break;
+      }
     },
-    removeXdata(index) {
-      this.formLabelAlign.Xdata.splice(index, 1); // 删除当前项
+    removeXdata(index, type) {
+      switch (type) {
+        case "init":
+          this.formLabelAlign.Xdata.splice(index, 1); // 删除当前项
+          break;
+        case "bar":
+          this.formLabelAlign.BarXdata.splice(index, 1); // 删除当前项
+          break;
+        case "line":
+          this.formLabelAlign.LineXdata.splice(index, 1); // 删除当前项
+          break;
+        case "scatter":
+          this.formLabelAlign.ScatterXdata.splice(index, 1); // 删除当前项
+          break;
+      }
     },
   },
 };