From 1118cd3db57dc4b72508d4872a5c3688c27a67a1 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 22 七月 2024 18:17:19 +0800
Subject: [PATCH] 修改数采检验bug
---
static/js/worker.js | 35 +++++++++++++++++++++++++++++++----
src/components/do/b1-inspect-order-plan/Inspection.vue | 14 +++++++++++++-
2 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index b27d4eb..7934d4a 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1863,7 +1863,7 @@
switch (this.result.method){
case 'saveInsContext':
this.$nextTick(()=>{
- this.$delete(this.tableList[0],'arr')
+ // this.$delete(this.tableList[0],'arr')
this.$set(this.tableList[0],'arr',this.result.value.tableList[0].arr)
this.param = this.result.value.param
for (var i in this.param){
@@ -1875,6 +1875,18 @@
}
}
}
+ // let obj = this.param[code.split('-')[3]]
+ // this.tableList[0].arr.forEach(item=>{
+ // item.forEach(m=>{
+ // if(obj&&obj.insResult&&m.c==obj.insResult.c&&m.r==obj.insResult.r){
+ // m.v.v = obj.insResult.v.v
+ // }
+ // if(obj&&obj.resValue&&m.c==obj.resValue.c&&m.r==obj.resValue.r){
+ // m.v.v = obj.resValue.v.v
+ // }
+ // })
+ // })
+ // console.log(this.tableList,this.param)
this.saveInsContext()
})
break;
diff --git a/static/js/worker.js b/static/js/worker.js
index 26ba16a..24bb42f 100644
--- a/static/js/worker.js
+++ b/static/js/worker.js
@@ -1,6 +1,6 @@
let code = ''
-let tableList = []
+let tableList = null
let excelMethodList = []
let comparisonList = []
let currentSample = {}
@@ -13,11 +13,32 @@
self.onmessage = function(event) {
const data = JSON.parse(event.data);
code = data.code;
- tableList = JSON.parse(JSON.stringify(data.tableList));
+ if(tableList){
+ let str = code.split('-')
+ let r = str[1]
+ let c = str[2]
+ tableList[0].arr.forEach((item,index)=>{
+ item.forEach((m,i)=>{
+ if(m.c==c&&m.r==r){
+ tableList[0].arr[index] = data.tableList[0].arr[index]
+ }
+ })
+ })
+ }else{
+ tableList = data.tableList;
+ }
+ if(param){
+ let str = code.split('-')
+ let pId = str[3]
+ param[pId] = data.param[pId]
+ }else{
+ param = data.param;
+ }
+ // tableList = data.tableList;
+ // param = data.param;
excelMethodList = JSON.parse(JSON.stringify(data.excelMethodList));
comparisonList = JSON.parse(JSON.stringify(data.comparisonList));
currentSample = JSON.parse(JSON.stringify(data.currentSample));
- param = data.param;
PROJECT = data.PROJECT
changeInput('', code);
};
@@ -817,7 +838,13 @@
str = str.replace(new RegExp(a, 'g'),arr[a])
}
if(str.includes(',,')){
- str = str.replace(new RegExp(',,', 'g'),'')
+ str = str.replace(new RegExp(',,', 'g'),',')
+ }
+ if(str.includes(',,')){
+ str = str.replace(new RegExp(',,', 'g'),',')
+ }
+ if(str.includes(',,')){
+ str = str.replace(new RegExp(',,', 'g'),',')
}
// console.log('str', str)
if(str.includes('&"/"&')){
--
Gitblit v1.9.3