Ver código fonte

1. SPC控制图页面展示优化
2. XBar-R控制图增加Excel数据导入
3. XBar-S控制图增Excel数据导入
4. P控制图增加数据维护页面
5. P控制图Excel数据文件上传、模版下载
6. P控制图页面与接口调试
7. NP控制图数据维护页面
8. NP控制图Excel数据文件上传、模版下载
9. NP控制图页面与接口调试
10. C控制图数据维护页面
11. C控制图Excel数据文件上传、模版下载
12. C控制图页面与接口调试

“luofeng” 1 mês atrás
pai
commit
8712350701

+ 43 - 0
src/api/analysis/index.js

@@ -1,5 +1,20 @@
 import request from "@/utils/request";
+import axios from "axios";
 
+export function deleteQualityFile(data) {
+  return request({
+    url: "/api/v1/quality/file/del",
+    method: "post",
+    data,
+  });
+}
+export function getQualityFileList(data) {
+  return request({
+    url: "/api/v1/quality/file/list",
+    method: "post",
+    data,
+  });
+}
 export function EWMACompute(data) {
   return request({
     url: "/api/v1/spc/EWMACompute",
@@ -21,6 +36,13 @@ export function UCompute(data) {
     data,
   });
 }
+export function UCompute2(params) {
+  return request({
+    url: "/api/v1/spc/UCompute2",
+    method: "get",
+    params: params,
+  });
+}
 export function CCompute(data) {
   return request({
     url: "/api/v1/spc/CCompute",
@@ -28,6 +50,13 @@ export function CCompute(data) {
     data,
   });
 }
+export function CCompute2(params) {
+  return request({
+    url: "/api/v1/spc/CCompute2",
+    method: "get",
+    params: params,
+  });
+}
 export function NPCompute(data) {
   return request({
     url: "/api/v1/spc/NPCompute",
@@ -35,6 +64,13 @@ export function NPCompute(data) {
     data,
   });
 }
+export function NPCompute2(params) {
+  return request({
+    url: "/api/v1/spc/NPCompute2",
+    method: "get",
+    params: params,
+  });
+}
 
 export function PCompute(data) {
   return request({
@@ -43,6 +79,13 @@ export function PCompute(data) {
     data,
   });
 }
+export function PCompute2(params) {
+  return request({
+    url: "/api/v1/spc/PCompute2",
+    method: "get",
+    params: params,
+  });
+}
 
 export function XBarSCompute(data) {
   return request({

+ 22 - 2
src/api/file/index.ts

@@ -2,12 +2,32 @@ import request from "@/utils/request";
 import { AxiosPromise } from "axios";
 import { FileInfo } from "./types";
 
+export function uploadFileApi(
+  file: File,
+  generatePdf: boolean = false
+): AxiosPromise<FileInfo> {
+  const formData = new FormData();
+  console.log(file);
+  formData.append("file", file);
+  formData.append("fileName", file.name);
+  formData.append("generatePdf", generatePdf);
+  return request({
+    url: "/api/v1/base/upload",
+    method: "post",
+    data: formData,
+    headers: {
+      "Content-Type": "multipart/form-data",
+    },
+  });
+}
+
+
 /**
  * 上传文件
  *
  * @param file
  */
-export function uploadFileApi(file: File): AxiosPromise<FileInfo> {
+/*export function uploadFileApi(file: File): AxiosPromise<FileInfo> {
   const formData = new FormData();
   formData.append("file", file);
   return request({
@@ -18,7 +38,7 @@ export function uploadFileApi(file: File): AxiosPromise<FileInfo> {
       "Content-Type": "multipart/form-data",
     },
   });
-}
+}*/
 
 /**
  * 删除文件

+ 2 - 1
src/hooks/userCrud.ts

@@ -364,12 +364,13 @@ export const useCrud = (config?: UseCrudConfig) => {
     /**
      * 根据搜索项导出数据
      */
-    exportData: async (urlStr: string) => {
+    exportData: async (urlStr: string, filePath: string) => {
       handleSearchData();
       const response = await request({
         url: urlStr,
         method: "post",
         data: search.value,
+        params: { filePath: filePath },
         responseType: "arraybuffer",
       });
       Utils.downloadFile(response);

+ 17 - 15
src/views/analysis/process/C.vue

@@ -43,9 +43,8 @@ const chartData = ref({});
 const param = ref([
   7, 5, 6, 8, 4, 9, 5, 6, 7, 4, 5, 10, 3, 6, 5, 7, 12, 5, 6, 4,
 ]);
-const getTableData = async () => {
-  const { data } = await CCompute(param.value);
-  console.log(JSON.stringify(data), "resultDataList");
+const getTableData = async (data) => {
+  // const { data } = await CCompute(data);
   data.CL = data.CL.toFixed(4);
   data.LCL = data.LCL.toFixed(4);
   data.UCL = data.UCL.toFixed(4);
@@ -165,7 +164,7 @@ const chartsOption1 = ref({
   yAxis: [
     {
       type: "value",
-      scale: true, // 开启自适应缩放
+      // scale: true, // 开启自适应缩放
     },
   ],
   series: [
@@ -248,20 +247,23 @@ const setView = () => {
   charts1.value.setOption(chartsOption1.value, true);
 };
 onMounted(() => {
-  init();
+  // init();
 });
-const init = (data, str) => {
-  tableData.value = data;
+const init = (data) => {
+  if (data) {
+    tableData.value = data;
 
-  setHeight();
+    setHeight();
+
+    nextTick(async () => {
+      await getTableData(data);
+      await changeSelect();
+      charts1.value = echarts.init(document.getElementById("charts"));
+      charts1.value.setOption(chartsOption1.value, true);
+      window.addEventListener("resize", setView);
+    });
+  }
 
-  nextTick(async () => {
-    await getTableData();
-    await changeSelect();
-    charts1.value = echarts.init(document.getElementById("charts"));
-    charts1.value.setOption(chartsOption1.value, true);
-  });
-  window.addEventListener("resize", setView);
 };
 onBeforeUnmount(() => {
   window.removeEventListener("resize", setView);

Diferenças do arquivo suprimidas por serem muito extensas
+ 1043 - 0
src/views/analysis/process/CList.vue


+ 0 - 13
src/views/analysis/process/EWMA.vue

@@ -47,7 +47,6 @@ const param = {
 
 const getTableData = async () => {
   var resultData = await EWMACompute(param);
-  console.log(JSON.stringify(resultData.data), "resultDataList");
 
   // 转换函数
   const transformData = (data) => {
@@ -75,10 +74,8 @@ const getTableData = async () => {
   // 转换后的数据
   const formattedData = ref(transformData(resultData.data));
 
-  console.log(JSON.stringify(formattedData.value), "formattedData");
   chartData.value = formattedData.value;
 
-  console.log(JSON.stringify(chartData.value), "chartData.value");
 };
 
 const chartRef = ref(null);
@@ -157,16 +154,6 @@ const initChart = (chartDom) => {
           color: "green",
         },
       },
-      // {
-      //   name: "均值",
-      //   type: "line",
-      //   data: Array(sampleIds.length).fill(meanValue),
-      //   showSymbol: false,
-      //   lineStyle: {
-      //     color: "green",
-      //     type: "solid",
-      //   },
-      // },
       {
         name: "UCL",
         type: "line",

+ 0 - 1
src/views/analysis/process/I-MR.vue

@@ -60,7 +60,6 @@ const param = ref({
 });
 const getTableData = async () => {
   const { data } = await IMRCompute(param.value);
-  console.log(data, "data");
   data.MR_CHART.LCL = data.MR_CHART.LCL.toFixed(4);
   data.MR_CHART.UCL = data.MR_CHART.UCL.toFixed(4);
   data.MR_CHART.CL = data.MR_CHART.CL.toFixed(4);

+ 5 - 6
src/views/analysis/process/NP.vue

@@ -45,9 +45,8 @@ const param = ref({
   subgroupSize: 150,
   scale: 4,
 });
-const getTableData = async () => {
-  const { data } = await NPCompute(param.value);
-  console.log(JSON.stringify(data), "resultDataList");
+const getTableData = async (data) => {
+  console.log(data, "data")
   data.cl = data.cl.toFixed(4);
   data.lcl = data.lcl.toFixed(4);
   data.ucl = data.ucl.toFixed(4);
@@ -250,15 +249,15 @@ const setView = () => {
   charts1.value.setOption(chartsOption1.value, true);
 };
 onMounted(() => {
-  init();
+  // init();
 });
-const init = (data, str) => {
+const init = (data) => {
   tableData.value = data;
 
   setHeight();
 
   nextTick(async () => {
-    await getTableData();
+    await getTableData(data);
     await changeSelect();
     charts1.value = echarts.init(document.getElementById("charts"));
     charts1.value.setOption(chartsOption1.value, true);

Diferenças do arquivo suprimidas por serem muito extensas
+ 1043 - 0
src/views/analysis/process/NPList.vue


+ 9 - 8
src/views/analysis/process/P.vue

@@ -52,8 +52,7 @@ const param = {
   },
 };
 
-const getTableData = async () => {
-  var resultData = await PCompute(param);
+const getTableData = async (resultData) => {
   // 转换函数
   const transformData = (data) => {
     const result = [];
@@ -78,7 +77,7 @@ const getTableData = async () => {
   };
 
   // 转换后的数据
-  const formattedData = ref(transformData(resultData.data));
+  const formattedData = ref(transformData(resultData));
   chartData.value = formattedData.value;
 };
 
@@ -246,11 +245,13 @@ watch(chartData, () => {
   }
 });
 
-const init = () => {
-  nextTick(async () => {
-    await getTableData();
-    await initChart(chartRef.value);
-  });
+const init = (data) => {
+  if (data) {
+    nextTick(async () => {
+      await getTableData(data);
+      await initChart(chartRef.value);
+    });
+  }
 };
 
 // 暴露 init 方法

Diferenças do arquivo suprimidas por serem muito extensas
+ 1043 - 0
src/views/analysis/process/PList.vue


+ 7 - 3
src/views/analysis/process/Xbar-R-2.vue

@@ -439,7 +439,7 @@ const setView = () => {
   charts2.value.setOption(chartsOption2.value, true);
 };
 onMounted(() => {
-  init();
+  // init();
 });
 const init = (data) => {
   tableData.value = data;
@@ -447,8 +447,12 @@ const init = (data) => {
   setHeight();
 
   nextTick(async () => {
-    await getTableData();
-    await changeSelect();
+    if (tableData.value != undefined && tableData.value.length > 0) {
+      // return;
+      await getTableData();
+      await changeSelect();
+    }
+
     charts1.value = echarts.init(document.getElementById("charts"));
     charts2.value = echarts.init(document.getElementById("charts1"));
     charts1.value.setOption(chartsOption1.value, true);

+ 0 - 1
src/views/analysis/process/Xbar-S.vue

@@ -450,7 +450,6 @@ onMounted(() => {
 });
 const init = (data, str) => {
   tableData.value = data;
-  console.log(JSON.stringify(data), "data");
   changeSelect();
   setHeight();
   nextTick(() => {

Diferenças do arquivo suprimidas por serem muito extensas
+ 1263 - 0
src/views/analysis/process/XbarList.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 1304 - 0
src/views/analysis/process/index-1.vue


+ 93 - 294
src/views/analysis/process/index.vue

@@ -60,271 +60,36 @@
     <div class="databox">
       <el-scrollbar :style="{ height: Height + 'px' }">
         <div class="box">
-          <div class="title">
-            <div style="display: flex; align-items: center">
-              <div class="bg"></div>
-              样本数据录入
-            </div>
-            <div class="header" v-show="!addStatus && !editStatus">
-              <Search
-                :searchOptions="searchForm"
-                ref="searchRef"
-                @data-list="getTableData"
-                @reset-list="reset"
-              />
-            </div>
-            <div class="btns">
-              <el-button
-                v-if="!addStatus && !editStatus"
-                type="primary"
-                size="small"
-                class="btn"
-                @click="changeaddstatus"
-                >新增</el-button
-              >
-              <el-button
-                v-if="editStatus || addStatus"
-                type="success"
-                size="small"
-                class="btn"
-                @click="submit"
-                >确定</el-button
-              >
-              <el-button
-                v-if="editStatus || addStatus"
-                type="info"
-                size="small"
-                class="btn"
-                @click="canceleOp"
-                >取消</el-button
-              >
-            </div>
+          <div class="info" v-if="value2 === 'Xbar-R' || value2 === 'Xbar-S'">
+            <XbarList ref="xbarListRef" @tableData="handleDataFromChild" />
           </div>
-          <div class="info" v-if="!addStatus">
-            <el-table
-              :data="tableData"
-              border
-              :style="{ height: maxHeight - 50 + 'px', width: maxWidth + 'px' }"
-              :show-overflow-tooltip="true"
-            >
-              <el-table-column
-                align="center"
-                width="100"
-                prop="dateStr"
-                sortable
-                label="日期"
-              >
-                <template #default="{ row }"
-                  ><span>{{ row.dateStr }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                align="center"
-                width="100"
-                prop="model"
-                label="产品型号"
-              >
-                <template #default="{ row }"
-                  ><span>{{ row.model }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                align="center"
-                width="100"
-                prop="batchNo"
-                label="生产批号"
-              >
-                <template #default="{ row }"
-                  ><span>{{ row.batchNo }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                width="100"
-                align="center"
-                prop="accuracys"
-                label="数据"
-                :show-overflow-tooltip="false"
-              >
-                <template #default="{ row }">
-                  <el-tooltip placement="top">
-                    <template #content>
-                      <div v-for="(item, index) in row.accuracys" :key="index">
-                        <span>数值{{ index + 1 }}: {{ item }}</span>
-                      </div>
-                    </template>
-                    <div class="ellipsis-text">
-                      {{ row.accuracys.join(", ") }}
-                    </div>
-                  </el-tooltip>
-                </template>
-              </el-table-column>
-              <el-table-column
-                align="center"
-                prop="avg"
-                label="平均值"
-                width="60"
-              /><el-table-column
-                align="center"
-                prop="range"
-                label="极差"
-                width="60"
-              /><el-table-column
-                align="center"
-                width="80"
-                prop="checkUser"
-                label="检测人"
-              >
-                <template #default="{ row }"
-                  ><span>{{ row.checkUser }}</span>
-                </template> </el-table-column
-              ><el-table-column
-                align="center"
-                prop="checkDeviceNo"
-                label="检查设备编号"
-              >
-                <template #default="{ row }"
-                  ><span>{{ row.checkDeviceNo }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                align="center"
-                prop="abnormal"
-                width="60"
-                label="是否异常"
-              >
-                <template #default="{ row }"
-                  ><span>{{ row.abnormal }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column align="center" prop="analyseUser" label="分析人">
-                <template #default="{ row }"
-                  ><span>{{ row.analyseUser }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column align="center" prop="measure" label="处置措施">
-                <template #default="{ row }"
-                  ><span>{{ row.measure }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column align="center" width="160" prop="" label="操作">
-                <template #default="{ row }">
-                  <el-button
-                    type="primary"
-                    size="small"
-                    class="btn"
-                    @click="updataItem(row)"
-                    style="height: 25px"
-                    >修改</el-button
-                  >
-                  <el-button
-                    type="info"
-                    size="small"
-                    class="btn"
-                    style="height: 25px"
-                    @click="deleteSubmit(row.id)"
-                    >删除</el-button
-                  >
-                </template>
-              </el-table-column>
-            </el-table>
-            <Pagination
-              :total="currentOption.total"
-              :page="currentOption.page"
-              :limit="currentOption.limit"
-              :pageSizes="currentOption.pageSizes"
-              v-model:page="currentOption.page"
-              @pagination="getTableData"
+          <div class="info" v-if="value2 === 'P'">
+            <PList
+              ref="pListRef"
+              @tableData="handleDataFromChildP"
+              :chart="chart"
+            />
+          </div>
+          <div class="info" v-if="value2 === 'NP'">
+            <NPList
+              ref="npListRef"
+              @tableData="handleDataFromChildNP"
+              :chart="chart"
             />
           </div>
-          <div class="info" v-else>
-            <el-form
-              ref="ruleFormRef"
-              :model="addData"
-              :rules="rules"
-              label-width="auto"
-              class="formStyle"
-            >
-              <el-form-item label="日期" prop="dateStr">
-                <el-date-picker
-                  v-model="addData.dateStr"
-                  type="date"
-                  aria-label="Pick a date"
-                  placeholder="Pick a date"
-                  style="width: 100%"
-                  format="YYYY-MM-DD"
-                  value-format="YYYY-MM-DD"
-                />
-              </el-form-item>
-              <el-form-item label="任务编号" prop="qualityTaskId">
-                <el-select
-                  v-model="addData.qualityTaskId"
-                  @change="
-                    (value) => {
-                      taskChange(value);
-                    }
-                  "
-                >
-                  <el-option
-                    v-for="(item, index) in taskOption"
-                    :key="index"
-                    :label="item.taskCode"
-                    :value="item.id"
-                  />
-                </el-select>
-              </el-form-item>
-              <el-form-item label="产品型号" prop="model">
-                <el-input :disabled="true" v-model="addData.model" />
-              </el-form-item>
-              <el-form-item label="生产批号" prop="batchNo">
-                <el-input v-model="addData.batchNo" />
-              </el-form-item>
-              <el-form-item
-                v-for="(item, index) in addData.accuracys"
-                :label="'数值' + (index + 1)"
-                :key="index"
-                :rules="[
-                  {
-                    required: true,
-                    trigger: 'change',
-                  },
-                ]"
-              >
-                <el-input-number
-                  :precision="2"
-                  :step="0.01"
-                  style="width: 100%"
-                  v-model="addData.accuracys[index]"
-                />
-              </el-form-item>
-              <!-- <el-form-item label="平均值" prop="avg">
-                <el-input v-model="addData.avg" />
-              </el-form-item>
-              <el-form-item label="极差" prop="range">
-                <el-input v-model="addData.range" />
-              </el-form-item> -->
-              <el-form-item label="检测人" prop="checkUser">
-                <el-input v-model="addData.checkUser" />
-              </el-form-item>
-              <el-form-item label="检查设备编号" prop="checkDeviceNo">
-                <el-input v-model="addData.checkDeviceNo" />
-              </el-form-item>
-              <!-- <el-form-item label="是否异常" prop="abnormal">
-                <el-input v-model="addData.abnormal" />
-              </el-form-item> -->
-              <el-form-item label="分析人" prop="analyseUser">
-                <el-input v-model="addData.analyseUser" />
-              </el-form-item>
-              <el-form-item label="处置措施" prop="measure">
-                <el-input v-model="addData.measure" />
-              </el-form-item>
-            </el-form>
+          <div class="info" v-if="value2 === 'C'">
+            <CList
+              ref="cListRef"
+              @tableData="handleDataFromChildC"
+              :chart="chart"
+            />
           </div>
         </div>
         <div class="box" v-show="!addStatus">
-          <div class="info" v-if="value2 === 'X̅-R'">
+          <div class="info" v-if="value2 === 'Xbar-R'">
             <XbarR ref="xbarRRef" :process="showLable" />
           </div>
-          <div class="info" v-if="value2 === 'X̅-S'">
+          <div class="info" v-if="value2 === 'Xbar-S'">
             <XbarS ref="xbarSRef" :process="showLable" />
           </div>
           <div class="info" v-if="value2 === 'P'">
@@ -353,14 +118,10 @@
 
 <script setup>
 import { ref } from "vue";
-import XbarR from "./Xbar-R-2.vue";
-import XbarS from "./Xbar-S-2.vue";
-import P from "./P.vue";
-import NP from "./NP.vue";
-import C from "./C.vue";
-import U from "./U.vue";
-import IMR from "./I-MR.vue";
-import EWMA from "./EWMA.vue";
+import XbarList from "./XbarList.vue";
+import PList from "./PList.vue";
+import NPList from "./NPList.vue";
+import CList from "./CList.vue";
 import * as echarts from "echarts";
 import { useDictionaryStore } from "@/store";
 import {
@@ -371,13 +132,39 @@ import {
   getTaskCode,
 } from "@/api/analysis";
 import Search from "@/components/Search/index.vue";
+import XbarR from "@/views/analysis/process/Xbar-R-2.vue";
+import NP from "@/views/analysis/process/NP.vue";
+import C from "@/views/analysis/process/C.vue";
+import XbarS from "@/views/analysis/process/Xbar-S-2.vue";
+import P from "@/views/analysis/process/P.vue";
+import EWMA from "@/views/analysis/process/EWMA.vue";
+import IMR from "@/views/analysis/process/I-MR.vue";
+
+const handleDataFromChild = async (data) => {
+  await nextTick();
+  tableData.value = data;
+  changeSelect2();
+};
+const handleDataFromChildC = async (data) => {
+  await nextTick();
+  cRefMethod(data);
+};
+const handleDataFromChildNP = async (data) => {
+  await nextTick();
+  npRefMethod(data);
+};
+const handleDataFromChildP = async (data) => {
+  await nextTick();
+  pRefMethod(data);
+};
 
 const xbarRRef = ref("xbarRRef");
 const xbarRRefMethod = async () => {
-  await nextTick();
-  if (xbarRRef.value) {
-    xbarRRef.value.init(tableData.value);
-  }
+  await nextTick(() => {
+    if (xbarRRef.value) {
+      xbarRRef.value.init(tableData.value);
+    }
+  });
 };
 
 const xbarSRef = ref("xbarSRef");
@@ -388,24 +175,24 @@ const xbarSRefMethod = async () => {
   }
 };
 const pRef = ref("pRef");
-const pRefMethod = async () => {
+const pRefMethod = async (data) => {
   await nextTick();
   if (pRef.value) {
-    pRef.value.init();
+    pRef.value.init(data);
   }
 };
 const npRef = ref("npRef");
-const npRefMethod = async () => {
+const npRefMethod = async (data) => {
   await nextTick();
   if (npRef.value) {
-    npRef.value.init();
+    npRef.value.init(data);
   }
 };
 const cRef = ref("cRef");
-const cRefMethod = async () => {
+const cRefMethod = async (data) => {
   await nextTick();
   if (cRef.value) {
-    cRef.value.init();
+    cRef.value.init(data);
   }
 };
 const uRef = ref("uRef");
@@ -419,7 +206,6 @@ const iMRRef = ref("iMRRef");
 const imrRefMethod = async () => {
   await nextTick();
   if (iMRRef.value) {
-    console.log("I-MR控制图");
     iMRRef.value.init();
   }
 };
@@ -427,7 +213,6 @@ const eWMARef = ref("EWMA");
 const eWMARefMethod = async () => {
   await nextTick();
   if (eWMARef.value) {
-    console.log("EWMA控制图");
     eWMARef.value.init();
   }
 };
@@ -484,6 +269,10 @@ const searchForm = [
     type: "input",
   },
 ];
+const { dicts } = useDictionaryStore();
+const sccOptions = ref([...dicts.spc_control_chart]);
+const value2 = ref(sccOptions.value[0].dictValue);
+
 //编辑状态
 const editStatus = ref(false);
 const addStatus = ref(false);
@@ -521,7 +310,7 @@ const setX1array = async () => {
   X1array.value.push("");
   chartsOption1.value.xAxis[0].data = X1array.value;
 };
-const { dicts } = useDictionaryStore();
+
 const importStatus = ref(false);
 const disabled = ref(false);
 const tableData = ref([]);
@@ -683,7 +472,6 @@ const showData = ref({});
 const url = ref(import.meta.env.VITE_APP_BASE_API + "/api/v1/spc/import");
 const headers = { Authorization: `${localStorage.getItem("token")}` };
 const opOptions = ref([...dicts.spc_operation]);
-const sccOptions = ref([...dicts.spc_control_chart]);
 const setChart1Info = () => {
   // chartsOption1.value.title[0].text = `上限=${showData.value.avgMax ? showData.value.avgMax : "-"}`;
   // chartsOption1.value.title[0].text = `x̄=${showData.value.avgAvg ? showData.value.avgAvg : "-"}`;
@@ -767,8 +555,6 @@ const taskOption = ref([]);
 const value = ref(opOptions.value[0].remark);
 const title = ref("调阻精度");
 
-var value2 = ref("");
-
 const showLable = ref("调阻");
 const changeSelect = () => {
   setTimeout(async () => {
@@ -793,7 +579,7 @@ const changeSelect = () => {
         title.value = "调阻精度";
         break;
     }
-    await getTableData();
+    // await getTableData();
     chartsOption1.value.title[0].text = `${title.value}的Xbar-R控制图`;
     // tableData.value.forEach((item) => {
     //   item.accuracy1 = 0;
@@ -809,11 +595,9 @@ const changeSelect = () => {
   }, 0);
 };
 const changeSelect2 = () => {
-  if (value2.value === "X̅-R") {
-    console.log("X̅-R");
+  if (value2.value === "Xbar-R") {
     xbarRRefMethod();
-  } else if (value2.value === "X̅-S") {
-    console.log("X̅-S");
+  } else if (value2.value === "Xbar-S") {
     xbarSRefMethod();
   } else if (value2.value === "P") {
     pRefMethod();
@@ -1152,7 +936,7 @@ const addSubmit = async () => {
       if (code == "200") {
         ElMessage.success("添加成功!");
         reset();
-        getTableData();
+        // getTableData();
       }
     } else {
       ElMessage.error("请检查表单信息");
@@ -1165,7 +949,7 @@ const deleteSubmit = async (id) => {
   });
   if (code == "200") {
     ElMessage.success("删除成功!");
-    getTableData();
+    // getTableData();
   }
 };
 const updateSubmit = async () => {
@@ -1175,7 +959,7 @@ const updateSubmit = async () => {
   if (code == "200") {
     ElMessage.success("更新成功!");
     reset();
-    getTableData();
+    // getTableData();
   }
 };
 const reset = () => {
@@ -1190,7 +974,7 @@ const reset = () => {
     pageSizes: [12],
     operation: value.value,
   };
-  getTableData();
+  // getTableData();
 };
 const setView = () => {
   setHeight();
@@ -1199,6 +983,10 @@ const setView = () => {
   charts1.value.setOption(chartsOption1.value, true);
   charts2.value.setOption(chartsOption2.value, true);
 };
+
+// 父组件的数据
+const chart = ref(value2);
+
 onMounted(async () => {
   getTaskOption();
   setHeight();
@@ -1209,10 +997,9 @@ onMounted(async () => {
     }
   });
 
-  await getTableData();
-  value2.value = "X̅-R";
-  xbarRRefMethod();
-
+  // await getTableData();
+  value2.value = "Xbar-R";
+  // await changeSelect2();
   // nextTick(() => {
   //   charts1.value = echarts.init(document.getElementById("charts"));
   //   charts2.value = echarts.init(document.getElementById("charts1"));
@@ -1232,48 +1019,59 @@ onBeforeUnmount(() => {
     margin-left: -18%;
   }
 }
+
 .ellipsis-text {
   white-space: nowrap; /* 禁止换行 */
   overflow: hidden; /* 隐藏超出部分 */
   text-overflow: ellipsis; /* 显示省略号 */
   width: 100%; /* 宽度占满单元格 */
 }
+
 .formStyle {
   width: 400px;
   margin: 20px auto;
 }
+
 .container1 {
   width: 100%;
   height: 100%;
   display: flex;
   background-color: white;
+
   .infobox {
     width: 200px;
+
     .header {
       height: 120px;
       border-bottom: 2px solid #00000010;
       padding: 20px;
     }
+
     .body {
       padding: 20px;
     }
   }
+
   .databox {
     flex: 1;
     border-left: 2px solid #00000010;
+
     .box {
       height: 710px;
       padding: 5px 20px;
       display: flex;
       flex-direction: column;
+
       .illustrate {
         padding: 20px 60px;
       }
+
       .tableTitle {
         text-align: center;
         margin: 10px 0;
         padding-right: 40px;
       }
+
       .header {
         margin-top: 20px;
         //margin-left: 100px;
@@ -1281,6 +1079,7 @@ onBeforeUnmount(() => {
         width: 100%;
         height: auto;
       }
+
       //.title {
       //  height: 50px;
       //  display: flex;