Jelajahi Sumber

bugfix: 页面问题

lichao 6 bulan lalu
induk
melakukan
4f4a9246b4
1 mengubah file dengan 11 tambahan dan 4 penghapusan
  1. 11 4
      src/views/reportForm/components/chemicalAnalysisReport.vue

+ 11 - 4
src/views/reportForm/components/chemicalAnalysisReport.vue

@@ -225,6 +225,7 @@ export default {
       recallList: [],
       theight2: 0,
       recallSelectionList: [],
+      clickMap: {}
     };
   },
   created() {
@@ -323,7 +324,8 @@ export default {
         validFlag: 1,
         startTime: startTime,
         endTime: endTime,
-        matName: this.search.matName
+        matName: this.clickMap.MAT_NAME || this.search.matName,
+        matNo: this.clickMap.MAT_NO,
       };
       this.dataLoading = true;
       this.axios
@@ -339,12 +341,17 @@ export default {
             }
             this.table.list1 = res.data.badyData.list;
             if (this.table.list1 != null && this.table.list1.length > 0) {
-              this.table.list = res.data.badyData.list[0].sampleResults
+              if (Object.keys(this.clickMap).length === 0) {
+                this.table.list = res.data.badyData.list[0].sampleResults
+              }
             } else {
-              this.table.list = []
+              if (Object.keys(this.clickMap).length === 0) {
+                this.table.list = []
+              }
             }
             this.page.totalPage = res.data.badyData.total;
             this.redDataCk = res.data.redMap || {};
+            this.clickMap = {}
           } else {
             this.$message.error(res.message);
           }
@@ -525,7 +532,7 @@ export default {
       });
     },
     handleCurrentChange(row) {
-      this.search.matName = row.MAT_NAME;
+      this.clickMap = JSON.parse(JSON.stringify(row))
       this.searchData();
     },
     tableHeaderCellStyle() {