licp
2024-06-26 e20c00b978046bb77fc302aa0a49cda49f4f1345
完善计算
已修改1个文件
30 ■■■■■ 文件已修改
src/components/do/b1-inspect-order-plan/Inspection.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1240,7 +1240,35 @@
                this.saveInsContext()
              }
            } else {
              let comResult = excelFunction.compute(item.v.f.replace(/=/g, ' '),comValue);
              let comResult = ''
              try {
                if(this.getInspectionValueType(item.i)==1){
                  comResult = excelFunction.compute(item.v.f.replace(/=/g, ' '),comValue)
                }else{
                  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)
                  })
                  comResult = str
                }
              } catch (error) {
              }
              // comResult = excelFunction.compute(item.v.f.replace(/=/g, ' '),comValue);
              // switch (item.methodName) {
              //   case 'AVERAGE':
              //     let num = 0