zouyu
2025-11-20 d4ccd9051e65c9675de5d44d3fe4aaab4f6c53e2
src/views/business/inspectionTask/inspection.vue
@@ -20,7 +20,7 @@
        <el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFS物料属性更新</el-button>
        <el-button size="small" type="primary" @click="refreshView">刷新</el-button>
        <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">进货验证</el-button>
        <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary"
        <el-button v-if="state == 1 && [0,1].includes(Number(typeSource))" size="small" type="primary"
          @click="openUnPassDialog('add')">不合格处理</el-button>
        <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">样品切换</el-button>
        <!--        <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">任务切换</el-button>-->
@@ -986,7 +986,6 @@
          }
        });
      }
      console.log("处理后的模板-",this.tableList)
    },
    // 特殊检验项--监听设备信息改变
    equipForm: {
@@ -1014,7 +1013,8 @@
    calcInbondLength(startMeterMark,endMeterMark){
      let inboundLength = null;
      if((startMeterMark!=null && startMeterMark!=='') && (endMeterMark!=null&&endMeterMark!=='')){
        inboundLength = Math.abs(endMeterMark - startMeterMark)
        let minus = this.$Big(endMeterMark).minus(this.$Big(startMeterMark));
        inboundLength = Math.abs(minus)
      }
      return inboundLength;
    },
@@ -1085,9 +1085,6 @@
    },
    disconnect() {
      return disconnect
    },
    sss() {
      console.log(this.$store.state.weightList) //
    },
    // 文件管理--开始
    getList() {
@@ -1171,7 +1168,7 @@
        laboratory: this.sonLaboratory,
      }).then(async (res) => {
        this.insOrder = res.data.insOrder;
        if(res.data.insOrder.ifsOrderType){
        if(res.data.insOrder.ifsOrderType==='02wg'){
          //查询零件属性
          this.getPartProps(res.data.insOrder.ifsInventoryId)
        }
@@ -1362,6 +1359,7 @@
        });
        const params = {
          entrustCode: this.insOrder.entrustCode,
          lotBatchNo: this.insOrder.lotBatchNo,
          sampleCode: this.currentSample.sampleCode,
          id: this.currentSample.id,
          itemIds: itemIds,
@@ -1389,7 +1387,6 @@
      return newObj;
    },
    handleDataAcquisition(data, noDialog) {
      console.log("dadad--",data)
      // 是否可以编辑数采数据
      if (this.dataAcquisitionEidtAble) {
        this.getDataType = 1;
@@ -1413,9 +1410,7 @@
          };
        }
        // 循环数采数据
        console.log(data[i],i)
        for (let j in data[i]) {
          console.log("jjjjj--",j)
          // 拼接字符串  检验项分类+检验项+检验子项
          let str0 = "";
          if (i.includes("@")) {
@@ -1512,6 +1507,7 @@
            };
            let list = this.tableList[0].arr;
            let maxNum = 0;
            let itemNum = 0;//包含检验值批注的个数
            list.forEach((item, index) => {
              let num0 = 0;
              let str = "";
@@ -1542,7 +1538,6 @@
                  }
                  let num = 0;
                  list[index].forEach((n) => {
                    // console.log(n.v.ps.value);
                    if (
                      n.v.ps &&
                      n.v.ps.value &&
@@ -1550,11 +1545,16 @@
                      n.v.ps.value.includes("检验值")
                    ) {
                      num++;
                      if (str0 == str) {
                        maxNum = num;
                      const matchArray = n.v.ps.value.match(/\d+/g);
                      if(matchArray){
                        const no = Number(matchArray[0]);
                        itemNum = itemNum>= no ? itemNum : no;
                      }
                    }
                  });
                  if (str0 == str) {
                    maxNum = num===itemNum ? num : itemNum;
                  }
                }
                // 绑定设备
                if (
@@ -1572,6 +1572,7 @@
              });
            });
            // 获取到最大检验值输入个数后重组数据
            console.log("最大个数:", maxNum);
            let obj0 = {
              name: j,
              arr: data[i][j].result,
@@ -1619,7 +1620,6 @@
          this.getDataIndexLoading = false;
          this.dataGetDia = false;
          this.getDataTypeId = "";
          console.log("dadada---",this.dataAcquisitionInfo)
          this.worker0.postMessage(
            JSON.stringify({
              dataAcquisitionInfo: this.dataAcquisitionInfo,
@@ -1633,7 +1633,6 @@
      // 监听 Worker 返回的结果
      this.worker0.onmessage = (event) => {
        let result = JSON.parse(event.data);
        console.log("Worker 返回的结果:", result);
        if (result.method == "changeInput") {
          // 采集后的数据,需要进行计算的线程进行计算
          let { list, n } = result.value;
@@ -2162,7 +2161,6 @@
                  let aa = inspectionItemClass +
                    inspectionItem +
                    inspectionItemSubclass;
                  console.log(aa,str,aa===str)
                  if (
                    this.currentSample.insProduct[i].templateId ===
                    a.templateId &&
@@ -2864,7 +2862,6 @@
        orderId: this.orderId,
        laboratory: this.sonLaboratory,
      }).then((res) => {
        console.log(res)
        if (res.code === 200) {
          if (!res.data || res.data.errorMsg.length == 0) {
            this.submitLoading = true;