spring
2025-03-19 b12ac953f7edf7e8d42e0da958a0779d64cd40bc
Merge branch 'master' of http://114.132.189.42:9002/r/tx-lims-before
已修改1个文件
26 ■■■■■ 文件已修改
src/components/do/b1-inspect-order-plan/Inspection.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -961,7 +961,7 @@
        sampleId: id,
        sonLaboratory: sonLaboratory
      }" v-if="state == 1 && fileAdd" :on-success="handleSuccessUp" :show-file-list="false"
        accept=".jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv" :headers="headers"
        accept=".jpg,.jpeg,.png,.gif,.docx,.doc,.xls,.xlsx,.pdf,.zip,.rar,.csv" :headers="headers"
        :before-upload="beforeUpload" style="width: 80px !important;" :on-error="onError" ref="upload">
        <el-button size="small" type="primary" v-if="state == 1">附件上传</el-button></el-upload>
      <!-- <span v-if="sonLaboratory === '远场'||sonLaboratory === '近场'" style="color: red;font-size: 12px;">辐射试验尽量上传设备导出的csv文件,不然触发不了报告生成</span> -->
@@ -4441,11 +4441,35 @@
          let list = await this.getCurrentProduct(this.currentSample.id, 0);
          this.currentSample.insProduct = this.HaveJson(list);
          this.currentNum++;
        } else if (this.sonLaboratory === "振动") {
          this.getDocAnalysis(response.data)
        }
      } else {
        this.$message.error(response.message);
      }
    },
    getDocAnalysis (data) {
      const psToDataKeyMap = {
        '检验值1': '1',
        '检验值9': '9',
        '检验值10': '10',
        '检验值11': '11',
        '检验值12': '12',
        '检验值13': '13',
      };
      for (let i in this.param) {
        this.param[i].insValue.forEach(a => {
          // 检查当前的ps.value是否在映射表中存在
          if (a.v.ps.value && psToDataKeyMap.hasOwnProperty(a.v.ps.value)) {
            // 使用映射表中的值从data对象获取对应的值
            a.v.v = data[psToDataKeyMap[a.v.ps.value]];
            // 调用保存上下文的方法
            this.saveInsContext(a.i);
          }
        });
      }
    },
    beforeUpload(file) {
      if (
        this.sonLaboratory === "电路试验" &&