| | |
| | | <td>{{ item.child[0].name }}</td> |
| | | <td style="text-align: left;"> |
| | | <el-checkbox-group |
| | | v-model="item.child[0].value" :max="item.child[0].maxNum" @change="n=>handleChangeGetDia(n,item.child[0])"> |
| | | v-model="getDataIndex" :max="item.child[0].maxNum"> |
| | | <el-checkbox v-for="(n,j) in item.child[0].arr" :label="j" :key="j+'ppppppppp'">{{n}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | |
| | | <td>{{ m.name }}</td> |
| | | <td style="text-align: left;"> |
| | | <el-checkbox-group |
| | | v-model="m.value" :max="m.maxNum" @change="n=>handleChangeGetDia(n,m)"> |
| | | <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j+'bbbbbbbbbbbbbb'" >{{n}}</el-checkbox> |
| | | v-model="getDataIndex" :max="m.maxNum"> |
| | | <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j+'bbbbbbbbbbbbbb'">{{n}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | |
| | | if(this.getData.length>0){ |
| | | this.dataGetDia = true |
| | | }else{ |
| | | console.log(555555555555) |
| | | try { |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.getDataIndexLoading = false |
| | | this.dataGetDia = false |
| | | this.worker0.postMessage(JSON.stringify({ |
| | | dataAcquisitionInfo: this.dataAcquisitionInfo, |
| | | list:this.tableList[0].arr |
| | |
| | | }, |
| | | submitDataGet(){ |
| | | if(this.getDataIndex.length==0){ |
| | | this.$message.error('请选择需要计算的数据') |
| | | this.$message.error('请选择需要采集的数据') |
| | | return |
| | | } |
| | | // this.getDataIndex.sort((a, b) => a - b); |
| | | // for (let i in this.dataAcquisitionInfoNew){ |
| | | // for(let j in this.dataAcquisitionInfoNew[i]){ |
| | | // if(j!='frequency'&&this.dataAcquisitionInfoNew[i]&&this.dataAcquisitionInfoNew[i][j]&&this.dataAcquisitionInfoNew[i][j].isCalculation){ |
| | | // let arr = [] |
| | | // for(let k = 0;k<this.dataAcquisitionInfoNew[i][j].result.length;k++){ |
| | | // if(this.getDataIndex.includes(k)){ |
| | | // arr.push(this.dataAcquisitionInfoNew[i][j].result[k]) |
| | | // } |
| | | // } |
| | | // if(arr.length>0){ |
| | | // this.dataAcquisitionInfoNew[i][j].result = arr |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // this.getDataIndexLoading = true; |
| | | // this.$axios.post(this.$api.deviceScope.formulaCalculation,{ |
| | | // ...this.dataAcquisitionInfoNew |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // }, |
| | | // noQs:true |
| | | // }).then(res=>{ |
| | | // this.getDataIndexLoading = false; |
| | | // if(res.code!=200){ |
| | | // return |
| | | // } |
| | | // this.dataGetDia = false |
| | | // this.handleDataAcquisition(res.data) |
| | | // this.getDataIndex = [] |
| | | // }) |
| | | }, |
| | | handleChangeGetDia(n,m){ |
| | | console.log(22222,n,m); |
| | | for (let i in this.getData){ |
| | | for(let j in this.getData[i].child){ |
| | | let len = this.getData[i].child[j].arr.length |
| | | let value = this.getData[i].child[j].value |
| | | let maxNum = this.getData[i].child[j].maxNum |
| | | if(len){} |
| | | // if(){} |
| | | for (let i=0;i<this.getData.length;i++){ |
| | | for(let j=0;j<this.getData[i].child.length;j++){ |
| | | let arr = [] |
| | | for(let k=0;k<this.getDataIndex.length;k++){ |
| | | arr.push( this.dataAcquisitionInfoNew[this.getData[i].faName][this.getData[i].child[j].name].result[this.getDataIndex[k]]) |
| | | } |
| | | this.dataAcquisitionInfoNew[this.getData[i].faName][this.getData[i].child[j].name].result = arr |
| | | } |
| | | } |
| | | this.getDataIndexLoading = true |
| | | this.handleDataAcquisition(this.dataAcquisitionInfoNew) |
| | | }, |
| | | // 多线程 |
| | | startWorker() { |
| | |
| | | this.$axios.get(this.$api.user.getUserInfo).then(res => { |
| | | this.userId = res.data.id |
| | | this.componentData.entity.userId = res.data.id |
| | | console.log(1111,this.userId) |
| | | // console.log(1111,this.userId) |
| | | }) |
| | | }, |
| | | // 复核 |