feat:计算值问题
This commit is contained in:
@@ -75,7 +75,7 @@ export function evaluateGetFromFormula(formula, parse, externalFormData, current
|
|||||||
console.log(relFormulaVal)
|
console.log(relFormulaVal)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let v = math.evaluate(relFormulaVal)
|
let v = math.evaluate(relFormulaVal).toString()
|
||||||
v = isFinite(v) ? v : 0
|
v = isFinite(v) ? v : 0
|
||||||
if (parse) {
|
if (parse) {
|
||||||
return handleRoundFiveNumber(v, currentColumn.decimalPosition)
|
return handleRoundFiveNumber(v, currentColumn.decimalPosition)
|
||||||
@@ -207,12 +207,9 @@ function Get_C_KNO3(sValue, weight, operator) {
|
|||||||
if (W === 0) return ''
|
if (W === 0) return ''
|
||||||
const V = ((W * S) / 100) * 22 - 75
|
const V = ((W * S) / 100) * 22 - 75
|
||||||
if (operator === '<' && V < 0) {
|
if (operator === '<' && V < 0) {
|
||||||
console.log(math.abs(V / 12))
|
|
||||||
|
|
||||||
return math.abs(V / 12)
|
return math.abs(V / 12)
|
||||||
}
|
}
|
||||||
if (operator === '>=' && V >= 0) {
|
if (operator === '>=' && V >= 0) {
|
||||||
console.log(V / 4)
|
|
||||||
return V / 4
|
return V / 4
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user