Merge branch 'master' of http://114.132.189.42:9002/r/tx-lims-before
| | |
| | | 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> --> |
| | |
| | | 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 === "电路试验" && |