From 9c1906a8056c0c88fdd116b60fbd17aa8a0cbb5c Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期四, 18 七月 2024 16:32:25 +0800
Subject: [PATCH] 原始记录模板表格刷新当前页数不变

---
 static/js/worker.js |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/static/js/worker.js b/static/js/worker.js
index db988b7..a8717a2 100644
--- a/static/js/worker.js
+++ b/static/js/worker.js
@@ -272,7 +272,7 @@
         try {
           if(getInspectionValueType(item.i)==1){
             let tell = currentSample.insProduct.find(m => m.id == item.i).tell?currentSample.insProduct.find(m => m.id == item.i).tell.split('&'):null;
-            isPoint = this.PROJECT=='瑁呭鐢电紗'&&tell&&tell.length>0&&typeof tell[0] =='string'&&tell[0].includes('/') // 鍒ゆ柇瑕佹眰鍊兼槸鍚︿负鍒嗘暟
+            isPoint = PROJECT=='瑁呭鐢电紗'&&tell&&tell.length>0&&typeof tell[0] =='string'&&tell[0].includes('/') // 鍒ゆ柇瑕佹眰鍊兼槸鍚︿负鍒嗘暟
             comResult = compute(item.v.f.replace(/=/g, ' '),comValue, isPoint)
             let list3 = list2.map(item=>item+'')
             isToExponential = list3.some(val => val.includes('e+'))
@@ -310,10 +310,13 @@
             if (a[0].r == item.r && comResult !== '') {
               for (var b in a) {
                 if (a[b].c == item.c) {
-                  // console.log('comResult---', comResult)
                   try{
-                    let val = parseFloat(comResult.toFixed(3))
-                    a[b].v.v = isNaN(val) ? '' : val
+                    if(comResult==0){
+                      a[b].v.v = 0
+                    }else{
+                      let val = parseFloat(comResult.toFixed(3))
+                      a[b].v.v = isNaN(val) ? '' : val
+                    }
                   }catch(error){
                     a[b].v.v = comResult
                     console.log('error---', error)

--
Gitblit v1.9.3