feat:计算值问题

This commit is contained in:
houjunxiang
2026-01-30 20:03:15 +08:00
parent 6a3d0c7bdd
commit 13faa8d66c

View File

@@ -75,7 +75,7 @@ export function evaluateGetFromFormula(formula, parse, externalFormData, current
console.log(relFormulaVal)
try {
let v = math.evaluate(relFormulaVal)
let v = math.evaluate(relFormulaVal).toString()
v = isFinite(v) ? v : 0
if (parse) {
return handleRoundFiveNumber(v, currentColumn.decimalPosition)
@@ -207,12 +207,9 @@ function Get_C_KNO3(sValue, weight, operator) {
if (W === 0) return ''
const V = ((W * S) / 100) * 22 - 75
if (operator === '<' && V < 0) {
console.log(math.abs(V / 12))
return math.abs(V / 12)
}
if (operator === '>=' && V >= 0) {
console.log(V / 4)
return V / 4
}
return ''