From 3d9d07a04299d9d43c8b4faa3192c7233c338026 Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期四, 11 七月 2024 15:09:30 +0800
Subject: [PATCH] 科学计数法逻辑修改
---
static/js/worker.js | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/static/js/worker.js b/static/js/worker.js
index 76eb25b..d23711c 100644
--- a/static/js/worker.js
+++ b/static/js/worker.js
@@ -54,7 +54,6 @@
}
}
list2.push(c.v.v)
- isToExponential = list2.some(val => val.includes('e+'))
if(getInspectionValueType(item.i)==1&&!isNaN(parseFloat(c.v.v))){
let n = String(c.v.v)
if(n.includes('/')){
@@ -218,11 +217,13 @@
let comResult = ''
try {
if(getInspectionValueType(item.i)==1){
- let ask = currentSample.insProduct.find(m => m.id == item.i).ask?currentSample.insProduct.find(m => m.id == item.i).ask.split('&'):null;
- let tell = currentSample.insProduct.find(m => m.id == item.i).tell?currentSample.insProduct.find(m => m.id == item.i).tell.split('&'):null;
+ // let ask = currentSample.insProduct.find(m => m.id == item.i).ask?currentSample.insProduct.find(m => m.id == item.i).ask.split('&'):null;
+ // let tell = currentSample.insProduct.find(m => m.id == item.i).tell?currentSample.insProduct.find(m => m.id == item.i).tell.split('&'):null;
comResult = compute(item.v.f.replace(/=/g, ' '),comValue)
+ let list3 = list2.map(item=>item+'')
+ isToExponential = list3.some(val => val.includes('e+'))
// 瑁呭椤圭洰妫�楠屽�艰浆鍖�
- if (PROJECT === '瑁呭鐢电紗' && isToExponential === true) {
+ if (PROJECT === '瑁呭鐢电紗' && isToExponential) {
let num2 = new Big(comResult)
comResult = num2.toExponential()
}
@@ -248,6 +249,7 @@
comResult = str
}
} catch (error) {
+ console.log('error---', error)
}
try {
list.forEach(a => {
@@ -267,7 +269,7 @@
})
changeInput(comResult, `${id}-${item.r}-${item.c}-${pId}`) //鏀瑰彉鏈�缁堝��
} catch (error) {
-
+ console.log('error---', error)
}
}
}
--
Gitblit v1.9.3