feat:样品库管理
This commit is contained in:
@@ -11,8 +11,7 @@ export function calcAnalysisValue(group) {
|
||||
try {
|
||||
for (const g of group) {
|
||||
for (const ele of g.fields) {
|
||||
if (!ele.formula || ele.formula == '') continue
|
||||
if (ele.valueTypeManual && ele.valueTypeManual == '1') continue
|
||||
if (!ele.formula || ele.formula == '' || ele.formula.startsWith('From')) continue
|
||||
let formula = ele.formula
|
||||
let formulas = formula.split('|')
|
||||
let formulaVal = ''
|
||||
@@ -20,11 +19,9 @@ export function calcAnalysisValue(group) {
|
||||
formulas.forEach(f => {
|
||||
let value = ''
|
||||
if (f.charAt(0) === 'p') {
|
||||
// let o = elementParamValueData.find((i) => 'p' + i.paramNo === f);
|
||||
let o = findFieldInGroup(f, group, 'p')
|
||||
value = o.value
|
||||
} else if (f.charAt(0) === 'e') {
|
||||
// let o = elementParamValueData.find((i) => 'e' + i.paramNo === f);
|
||||
let o = findFieldInGroup(f, group, 'e')
|
||||
value = o.value
|
||||
} else if (f.charAt(0) === '<' || f.charAt(0) === '>') {
|
||||
@@ -48,7 +45,7 @@ export function calcAnalysisValue(group) {
|
||||
v = eval(formulaVal)
|
||||
} else {
|
||||
v = math.evaluate(formulaVal).toString()
|
||||
v = isFinite(v) ? v.toString() : ''
|
||||
v = isFinite(v) ? v.toString() : 0
|
||||
}
|
||||
ele.value = handleRoundFiveNumber(v, ele.decimalPosition)
|
||||
}
|
||||
|
||||
@@ -206,7 +206,6 @@ export default {
|
||||
data: data
|
||||
}
|
||||
let printData = {
|
||||
// type: "preview",
|
||||
type: 'print',
|
||||
reportTemplate: reportTemplate,
|
||||
reportData: JSON.stringify(reportData)
|
||||
|
||||
Reference in New Issue
Block a user