From 50fdf639a5d30355950ecd70e9d89ea541080f4b Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 04 七月 2024 13:07:33 +0800
Subject: [PATCH] 调试

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |   83 ++---------------------------------------
 1 files changed, 5 insertions(+), 78 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index a38a441..9197889 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1705,7 +1705,9 @@
                     comp = ask.map((m, i) => {
                       if (m.includes('=')) {
                         let str = m.split('=')[1]
+                        console.log(res,str)
                         if(typeof res == 'string'&&typeof str == 'string'){
+                          console.log(res,str)
                           return  res.trim() == str.trim()
                         }else{
                           return  eval(res) == eval(str)
@@ -1754,11 +1756,13 @@
                 }else{
                   let valueList = [];
                   item.valueList.forEach(a => {
+                    console.log(a)
                     valueList.push({
                       name: `${this.comparisonList.find(e=>e.value==a.c).label}${a.r+1}`,
                       value: 0,
                     })
                   })
+                  console.log(comValue)
                   for (var a in comValue) {
                     valueList.forEach(b => {
                       if (b.name == a) {
@@ -1770,88 +1774,11 @@
                   valueList.forEach(b => {
                     str = str.replace(b.name, b.value)
                   })
+                  console.log(str)
                   comResult = str
                 }
               } catch (error) {
-
               }
-              // comResult = excelFunction.compute(item.v.f.replace(/=/g, ' '),comValue);
-              // switch (item.methodName) {
-              //   case 'AVERAGE':
-              //     let num = 0
-              //     for (var a in comValue) {
-              //       num += comValue[a]
-              //     }
-              //     comResult = num / Object.keys(comValue).length
-              //     break;
-              //   case 'SUM':
-              //     let sum = 0
-              //     for (var a in comValue) {
-              //       sum += comValue[a]
-              //     }
-              //     comResult = sum
-              //     break;
-              //   case 'MEDIAN':
-              //     let arr = []
-              //     for (var a in comValue) {
-              //       arr.push(comValue[a])
-              //     }
-              //     comResult = this.median(arr)
-              //     break;
-              //   case 'APS':
-              //     let arr0 = []
-              //     for (var a in comValue) {
-              //       arr0.push(comValue[a])
-              //     }
-              //     comResult = Math.abs(arr0[0])
-              //     break;
-              //   // case 'MAX':
-              //   //   let arr1 = []
-              //   //   for (var a in comValue) {
-              //   //     arr1.push(eval(comValue[a]))
-              //   //   }
-              //   //   comResult = Math.max(...arr1)
-              //   //   break;
-              //   // case 'MIN':
-              //   //   let arr2 = []
-              //   //   for (var a in comValue) {
-              //   //     arr2.push(eval(comValue[a]))
-              //   //   }
-              //   //   comResult = Math.median(...arr2)
-              //   //   break;
-              //   default:
-              //     let valueList = [];
-              //     item.valueList.forEach(a => {
-              //       valueList.push({
-              //         name: `${this.comparisonList.find(e=>e.value==a.c).label}${a.r+1}`,
-              //         value: 0,
-              //       })
-              //     })
-              //     for (var a in comValue) {
-              //       valueList.forEach(b => {
-              //         if (b.name == a) {
-              //           b.value = comValue[a]
-              //         }
-              //       })
-              //     }
-              //     let str = item.v.f.replace(/=/g, ' ');
-              //     valueList.forEach(b => {
-              //       str = str.replace(b.name, b.value)
-              //     })
-              //     str = str.replaceAll('MAX', 'Math.max')
-              //     str = str.replaceAll('MIN', 'Math.min')
-              //     str = str.replaceAll('锛�', ',')
-              //     try {
-              //       if(this.getInspectionValueType(item.i)==1){
-              //         comResult = eval(str)
-              //       }else{
-              //         comResult = str
-              //       }
-              //     } catch (error) {
-
-              //     }
-              //     break;
-              // }
               try {
                 list.forEach(a => {
                   if (a[0].r == item.r && comResult !== '') {

--
Gitblit v1.9.3