Browse Source

feat: 水质报名去除off

sunxiao 1 month ago
parent
commit
5dddbb1331
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/views/analyse/components/CustomModal.vue

+ 6 - 3
src/views/analyse/components/CustomModal.vue

@@ -16,13 +16,14 @@ const modelVisible = defineModel('visible');
 
 const simulateData = computed(() => {
   const data = props.currentData;
-  const usefulkeys = ['on', 'off'];
+  // const usefulkeys = ['on', 'off']; old
+  const usefulkeys = ['on'];
   const resultObj = {};
 
   usefulkeys.forEach(key => {
     const tempArr = data[key];
 
-    resultObj[key] = tempArr.map(item => {
+    resultObj[key] = (tempArr || []).map(item => {
       let numVal = '';
       const keyWhiteList = ['MLSS', 'r']
       const numDigit = keyWhiteList.includes(item.name) ? 0 : 2;
@@ -42,6 +43,7 @@ const simulateData = computed(() => {
       }
     })
   })
+  console.log("resultObj",  resultObj );
   return resultObj;
 })
 
@@ -52,7 +54,8 @@ const handleCancel = () => {
 
 // 发起预测
 const handleStartReport = () => {
-  const usefulkeys = ['on', 'off'];
+  // const usefulkeys = ['on', 'off']; old
+  const usefulkeys = ['on'];
   const simulate = {};
   const table = {
     header: [],