From 18c2ed01fc7af3738fdc570aaa6ee97700fdb618 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 18 三月 2025 13:24:52 +0800
Subject: [PATCH] 检验任务-震动上传文件后直接赋值
---
src/components/do/b1-inspect-order-plan/Inspection.vue | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 80ca6d1..8ef3574 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/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;">杈愬皠璇曢獙灏介噺涓婁紶璁惧瀵煎嚭鐨刢sv鏂囦欢锛屼笉鐒惰Е鍙戜笉浜嗘姤鍛婄敓鎴�</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 === "鐢佃矾璇曢獙" &&
--
Gitblit v1.9.3