| | |
| | | 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 |