| | |
| | | child:[] |
| | | } |
| | | for(let j in data[i]){ |
| | | if(j!='frequency'&&!data[i][j].isCalculation){ |
| | | console.log(j,data[i][j]) |
| | | if(j!='frequency'&&data[i][j]&&!data[i][j].isCalculation){ |
| | | this.dataAcquisitionInfo[i+','+j] = { |
| | | value:data[i][j].result, |
| | | frequency:data[i].frequency |
| | | } |
| | | }else if(j!='frequency'&&data[i][j].isCalculation){ |
| | | }else if(j!='frequency'&&data[i][j]&&data[i][j].isCalculation){ |
| | | let obj0 = { |
| | | name:j, |
| | | arr:data[i][j].result |
| | |
| | | done() |
| | | }else{ |
| | | this.dataGetDia = false |
| | | this.getDataIndex = [] |
| | | } |
| | | }).catch(() => {}) |
| | | }, |
| | |
| | | if(res.code!=200){ |
| | | return |
| | | } |
| | | this.dataGetDia = false |
| | | this.handleDataAcquisition(res.data) |
| | | this.getDataIndex = [] |
| | | }) |
| | | }, |
| | | // 多线程 |
| | |
| | | list[index].forEach((n,i)=>{ |
| | | if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('检验值')){ |
| | | let arr = n.v.ps.value.split('值') |
| | | if(Array.isArray(dataAcquisitionInfo[str].value)){ |
| | | for (let i = 0; i < dataAcquisitionInfo[str].value.length; i++) { |
| | | if(i+1==arr[1]){ |
| | | setTimeout(()=>{ |
| | | let num0 = 0 |
| | | if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){ |
| | | let str = n.v.ct.fa.split('.')[1] |
| | | num0 = str.length |
| | | n.v.v = dataAcquisitionInfo[str].value[i]?dataAcquisitionInfo[str].value[i].toFixed(num0):dataAcquisitionInfo[str].value[i] |
| | | }else{ |
| | | n.v.v = dataAcquisitionInfo[str].value[i] |
| | | } |
| | | result = { |
| | | method:'changeInput', |
| | | value:{ |
| | | list:list, |
| | | n:n |
| | | } |
| | | } |
| | | self.postMessage(JSON.stringify(result)) |
| | | },2000) |
| | | } |
| | | } |
| | | }else{ |
| | | if(arr[1] ==dataAcquisitionInfo[str].frequency){ |
| | | setTimeout(()=>{ |
| | | let num0 = 0 |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |