| | |
| | | if (num == 1) { |
| | | str = str + m.v.v + ","; |
| | | num++; |
| | | } else { |
| | | } else if (num == 0) { |
| | | str = m.v.v + ","; |
| | | num++; |
| | | } |
| | |
| | | n.v.ps.value.includes("检验值") |
| | | ) { |
| | | let arr = n.v.ps.value.split("值"); |
| | | // console.log( |
| | | // `dataAcquisitionInfo[str].value`, |
| | | // dataAcquisitionInfo[str].value, |
| | | // str |
| | | // ); |
| | | if (Array.isArray(dataAcquisitionInfo[str].value)) { |
| | | // 如果数据源为数组,则执行 |
| | | for ( |
| | |
| | | if (i + 1 == arr[1]) { |
| | | // 赋值数采优化检验项列表 |
| | | arrSpecial.push(n.i); |
| | | setTimeout(() => { |
| | | let num0 = 0; |
| | | if ( |
| | | n.v.ct && |
| | |
| | | : dataAcquisitionInfo[str].value[i]; |
| | | } else { |
| | | // 直接赋值 |
| | | console.log(44444, dataAcquisitionInfo, str); |
| | | n.v.v = dataAcquisitionInfo[str].value[i]; |
| | | } |
| | | // 传递给主线程 |
| | |
| | | }, |
| | | }; |
| | | self.postMessage(JSON.stringify(result)); |
| | | }, 2000); |
| | | } |
| | | } |
| | | } else { |
| | |
| | | if (arr[1] == dataAcquisitionInfo[str].frequency) { |
| | | // 如果数采次数等于检验值序号,则赋值给当前检验值 |
| | | arrSpecial.push(n.i); |
| | | setTimeout(() => { |
| | | let num0 = 0; |
| | | if ( |
| | | n.v.ct && |
| | |
| | | }, |
| | | }; |
| | | self.postMessage(JSON.stringify(result)); |
| | | }, 2000); |
| | | } else if (Number(dataAcquisitionInfo[str].frequency) > num) { |
| | | // 如果数采次数大于检验值序号,则赋值给最后一个检验值 |
| | | if (n.v.ps.value.includes(num)) { |
| | | arrSpecial.push(n.i); |
| | | setTimeout(() => { |
| | | let num0 = 0; |
| | | if ( |
| | | n.v.ct && |
| | |
| | | : dataAcquisitionInfo[str].value; |
| | | } else { |
| | | // 直接赋值 |
| | | console.log(555, dataAcquisitionInfo, str); |
| | | n.v.v = dataAcquisitionInfo[str].value; |
| | | } |
| | | // 传递给主线程 |
| | |
| | | }, |
| | | }; |
| | | self.postMessage(JSON.stringify(result)); |
| | | }, 2000); |
| | | } |
| | | } |
| | | } |