Explorar el Código

feature/功能调整

dengrui hace 10 meses
padre
commit
17bd12570e
Se han modificado 2 ficheros con 39 adiciones y 10 borrados
  1. 14 0
      src/views/analysis/process/index.vue
  2. 25 10
      src/views/analysis/target/index/index.vue

+ 14 - 0
src/views/analysis/process/index.vue

@@ -641,11 +641,13 @@ const currentOption = reactive({
   limit: 12,
   pageSizes: [12],
 });
+const lableValue = ref("");
 const getTableData = async () => {
   const { data, code, msg } = await getData({
     pageNo: currentOption.page,
     pageSize: currentOption.limit,
     yearStr: year.value,
+    operation: lableValue.value,
   });
   if (code == "200") {
     tableData.value = data.records;
@@ -919,6 +921,11 @@ const showLable = ref("调阻");
 const changeSelect = () => {
   setTimeout(() => {
     showLable.value = selectRef.value.currentPlaceholder;
+    opOptions.value.forEach((item) => {
+      if (item.dictLabel == showLable.value) {
+        lableValue.value = item.dictValue;
+      }
+    });
     switch (showLable.value) {
       case "调阻":
         title.value = "调阻精度";
@@ -933,6 +940,7 @@ const changeSelect = () => {
         title.value = "调阻精度";
         break;
     }
+    getTableData();
     chartsOption1.value.title[3].text = `${title.value}的Xbar-R控制图`;
     // tableData.value.forEach((item) => {
     //   item.accuracy1 = 0;
@@ -1280,6 +1288,7 @@ const reset = () => {
     page: 0,
     limit: 12,
     pageSizes: [12],
+    operation: value.value,
   };
 };
 const setView = () => {
@@ -1292,6 +1301,11 @@ const setView = () => {
 onMounted(() => {
   setHeight();
   year.value = new Date().getFullYear() + "";
+  opOptions.value.forEach((item) => {
+    if (item.dictLabel == showLable.value) {
+      lableValue.value = item.dictValue;
+    }
+  });
   getTableData();
   nextTick(() => {
     charts1.value = echarts.init(document.getElementById("charts"));

+ 25 - 10
src/views/analysis/target/index/index.vue

@@ -829,14 +829,15 @@
                   />
                 </el-form-item>
                 <el-form-item label="产品型号" prop="model">
-                  <el-select :disabled="editStatus" v-model="addData.model">
+                  <!-- <el-select  v-model="addData.model">
                     <el-option
                       v-for="item in modelOptions"
                       :key="item.dictLabel"
                       :label="item.dictLabel"
                       :value="item.dictValue"
                     />
-                  </el-select>
+                  </el-select> -->
+                  <el-input v-model="addData.model" />
                 </el-form-item>
                 <el-form-item label="生产批号" prop="batchNo">
                   <el-input v-model="addData.batchNo" />
@@ -987,13 +988,7 @@ const filterData = (data) => {
   });
   state.spanArr = spanArr;
 };
-//分页参数
-const currentOption = reactive({
-  total: 0,
-  page: 1,
-  limit: 4,
-  pageSizes: [4],
-});
+
 //设置展示tableData
 const setTableData = (array) => {
   showTableData.value = [];
@@ -1017,6 +1012,7 @@ const getTableData = async () => {
     pageNo: currentOption.page,
     pageSize: currentOption.limit,
     yearStr: year.value,
+    operation: lableValue.value,
   });
   if (code == "200") {
     tableData.value = data.records;
@@ -1163,6 +1159,14 @@ 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 value = ref(opOptions.value[0].remark);
+//分页参数
+const currentOption = reactive({
+  total: 0,
+  page: 1,
+  limit: 4,
+  pageSizes: [4],
+});
 const modelOptions = ref([...dicts.quality_spec_data]);
 const setChart1Info = () => {
   // chartsOption1.value.title[0].text = `上限=${showData.value.avgMax ? showData.value.avgMax : "-"}`;
@@ -1226,13 +1230,18 @@ const onSuccess = (res) => {
   }
 };
 
-const value = ref(opOptions.value[0].remark);
 const title = ref("调阻精度");
 
 const showLable = ref("调阻");
+const lableValue = ref("");
 const changeSelect = () => {
   setTimeout(() => {
     showLable.value = selectRef.value.currentPlaceholder;
+    opOptions.value.forEach((item) => {
+      if (item.dictLabel == showLable.value) {
+        lableValue.value = item.dictValue;
+      }
+    });
     switch (showLable.value) {
       case "调阻":
         title.value = "调阻精度";
@@ -1247,6 +1256,7 @@ const changeSelect = () => {
         title.value = "调阻精度";
         break;
     }
+    getTableData();
     // chartsOption1.value.title[3].text = `${title.value}的Xbar-R控制图`;
     // tableData.value.forEach((item) => {
     //   item.accuracy1 = 0;
@@ -1608,6 +1618,11 @@ watch(
 onMounted(() => {
   setHeight();
   year.value = new Date().getFullYear() + "";
+  opOptions.value.forEach((item) => {
+    if (item.dictLabel == showLable.value) {
+      lableValue.value = item.dictValue;
+    }
+  });
   getTableData();
   // nextTick(() => {
   //   charts1.value = echarts.init(document.getElementById("charts"));