licp
2024-08-02 b572bdc7da9c6c47df9be5939f5d3280f2127546
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1274,12 +1274,13 @@
            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
@@ -1293,15 +1294,16 @@
        }
        if(this.getData.length>0){
          this.dataGetDia = true
        }
        try {
          // 向 Worker 发送消息,开始处理逻辑
          this.worker0.postMessage(JSON.stringify({
            dataAcquisitionInfo: this.dataAcquisitionInfo,
            list:this.tableList[0].arr
          }));
        } catch (error) {
          console.log(1111,error);
        }else{
          try {
            // 向 Worker 发送消息,开始处理逻辑
            this.worker0.postMessage(JSON.stringify({
              dataAcquisitionInfo: this.dataAcquisitionInfo,
              list:this.tableList[0].arr
            }));
          } catch (error) {
            console.log(1111,error);
          }
        }
        // 监听 Worker 返回的结果
        this.worker0.onmessage = (event) => {
@@ -1323,6 +1325,7 @@
            done()
          }else{
            this.dataGetDia = false
            this.getDataIndex = []
          }
        }).catch(() => {})
      },
@@ -1349,7 +1352,7 @@
        }
        this.getDataIndexLoading = true;
        this.$axios.post(this.$api.deviceScope.formulaCalculation,{
          map:this.dataAcquisitionInfoNew
          ...this.dataAcquisitionInfoNew
        }, {
          headers: {
            'Content-Type': 'application/json'
@@ -1360,7 +1363,9 @@
          if(res.code!=200){
            return
          }
          this.handleDataAcquisition(res.data.map)
          this.dataGetDia = false
          this.handleDataAcquisition(res.data)
          this.getDataIndex = []
        })
      },
      // 多线程