Fixiaobai
2023-09-24 e3d6cc8c9ee3a771b92a8706e3cf83dededfaa43
src/components/view/processInspection.vue
@@ -248,7 +248,10 @@
import processInspectionUpdate from '../view/processInspectionUpdate.vue'
import processInspectionLook from '../view/processInspectionLook.vue'
export default {
  components: { processInspectionUpdate, processInspectionLook },
  components: {
    processInspectionUpdate,
    processInspectionLook
  },
  data() {
    return {
      showUp: false,
@@ -334,8 +337,8 @@
        name: null
      }, // node点击保存当前点击数据
      clickSelectDevice: {
        index: "", // 点击选择存储当前行索引
        rpId: "" // 点击选择存储当前行项目Id
        index: null, // 点击选择存储当前行索引
        rpId: null // 点击选择存储当前行项目Id
      }
    };
  },
@@ -393,13 +396,23 @@
        }
      }).then(res => {
        this.materialOptions = res.data;
        if (this.materialOptions.length === 1) {
          this.$message({
            message: '该项目下只有一个试验设备,无需选择!',
            type: 'warning'
          });
          return
        }
        row.isSelectDevice = true
        this.filterText = row.did
      });
    },
    // 点击表格选择触发
    clickTableSelect(scope) {
      // this.centerDialogVisible = true;
      scope.row.isSelectDevice = true
      if (this.clickSelectDevice.index != null) {
        this.$set(this.inspectionItems[this.clickSelectDevice.index], 'isSelectDevice', false)
      }
      this.clickSelectDevice.index = scope.$index;
      this.clickSelectDevice.rpId = scope.row.id;
      this.getOptions(scope.row)
@@ -532,7 +545,7 @@
      let val = JSON.parse(JSON.stringify(this.processInspectVo))
      val.techname = this.processInspectVo.techname.split("-")[1]
      val.technologyId = this.processInspectVo.techname.split("-")[0]
      this.processInspectVo.technologyId=val.technologyId
      this.processInspectVo.technologyId = val.technologyId
      this.$axios.post(this.$api.url.processInspectAddProcess, {
        material: val.material,
        materialCode: val.materialCode,
@@ -542,6 +555,7 @@
        techfather: val.techfather,
        techname: val.techname,
        techId: Number(val.technologyId),
        mtId: Number(val.technologyId),
        unit: val.unit
      }, {
        headers: { "Content-Type": "application/json" }
@@ -583,7 +597,7 @@
              c.empiricalValueAddss.push("")
            }
            uName.push(c['username'])
            c.isSelectDevice=false
            c.isSelectDevice = false
            arr.push(c)
          })
        })