licp
2024-04-10 0344815be8346d6c088415d3e3cb420963ece70e
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -632,7 +632,7 @@
                                          break
                                       }
                                    }
                                    comValue[(tableCode + c.r)] = parseFloat(c.v.v)
                                    comValue[(tableCode + (c.r+1))] = parseFloat(c.v.v)
                                 }
                              }
                           })
@@ -696,6 +696,25 @@
                           comResult = sum
                           break;
                        default:
                  let valueList = [];
                  item.valueList.forEach(a => {
                    valueList.push({
                      name:`${this.comparisonList[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)
                  })
                  comResult = eval(str)
                           break;
                     }
                     list.forEach(a => {
@@ -743,9 +762,9 @@
                     item.valueList = valueList;
                  } else {
                     valueList = []
                     let regex = /[=\+\-\*\%\(\)\s]/g
                     let regex = /[=\+\-\*\%\(\)\/\s]/g
                     let mode = item.v.f.replace(regex, ' ').split(' ');
                     mode.filter(m => m).forEach(m => {
                     mode.filter(m => m&&!Number(m)).forEach(m => {
                        let r = m.split('')[1] - 1
                        let c = this.comparisonList.find(j => j.label == m.split('')[0]).value
                        valueList.push({