From bfc611fedef3df0e21d0034614fac90896dcdc44 Mon Sep 17 00:00:00 2001 From: 13404089107 <puwei@sinata.cn> Date: 星期三, 21 五月 2025 10:47:43 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory --- laboratory/src/views/dataManagement/sampleRecordList/components/confirmDialog.vue | 84 ++++++++++++++++++++++++++---------------- 1 files changed, 52 insertions(+), 32 deletions(-) diff --git a/laboratory/src/views/dataManagement/sampleRecordList/components/confirmDialog.vue b/laboratory/src/views/dataManagement/sampleRecordList/components/confirmDialog.vue index ce8e120..fd0355d 100644 --- a/laboratory/src/views/dataManagement/sampleRecordList/components/confirmDialog.vue +++ b/laboratory/src/views/dataManagement/sampleRecordList/components/confirmDialog.vue @@ -13,23 +13,23 @@ <div class="sample-info"> <div class="info-item"> <span class="label">项目课题方案名称:</span> - <span class="value">{{ formData.planName }}</span> + <span class="value">{{ detailData.experimentDispatch?.projectName || '-' }}</span> </div> <div class="info-item"> <span class="label">申请项目执行方案编号:</span> - <span class="value">{{ formData.planName }}</span> + <span class="value">{{ detailData.experimentDispatch?.experimentCode || '-' }}</span> </div> <div class="info-item"> <span class="label">实验编号:</span> - <span class="value">{{ formData.testCode }}</span> + <span class="value">{{ detailData.experimentDispatch?.experimentCode || '-' }}</span> </div> <div class="info-item"> <span class="label">实验名称:</span> - <span class="value">{{ formData.testName }}</span> + <span class="value">{{ detailData.experimentDispatch?.experimentName || '-' }}</span> </div> <div class="info-item"> <span class="label">取样单编号:</span> - <span class="value">{{ formData.sampleCode }}</span> + <span class="value">{{ detailData.samplingCode || '-' }}</span> </div> </div> @@ -57,7 +57,7 @@ width="150" ></el-table-column> <el-table-column - prop="sampleName" + prop="samplingName" label="取样名称" width="150" ></el-table-column> @@ -72,63 +72,63 @@ width="150" ></el-table-column> <el-table-column - prop="ph" + prop="samplePh" label="PH" width="150" ></el-table-column> <el-table-column - prop="waterAmount" + prop="waterAddition" label="加水量" width="150" ></el-table-column> <template v-if="showAdditives"> <el-table-column - prop="additive1" + prop="addAuxiliaryOne" label="加辅1" width="150" ></el-table-column> <el-table-column - prop="additive2" + prop="addAuxiliaryTwo" label="加辅2" width="150" ></el-table-column> <el-table-column - prop="additive3" + prop="addAuxiliaryThree" label="加辅3" width="150" ></el-table-column> <el-table-column - prop="additive4" + prop="addAuxiliaryFour" label="加辅4" width="150" ></el-table-column> <el-table-column - prop="additive5" + prop="addAuxiliaryFive" label="加辅5" width="150" ></el-table-column> <el-table-column - prop="additive6" + prop="addAuxiliarySix" label="加辅6" width="150" ></el-table-column> <el-table-column - prop="additive7" + prop="addAuxiliarySeven" label="加辅7" width="150" ></el-table-column> <el-table-column - prop="additive8" + prop="addAuxiliaryEight" label="加辅8" width="150" ></el-table-column> <el-table-column - prop="additive9" + prop="addAuxiliaryNine" label="加辅9" width="150" ></el-table-column> <el-table-column - prop="additive10" + prop="addAuxiliaryTen" label="加辅10" width="150" ></el-table-column> @@ -139,17 +139,22 @@ width="150" ></el-table-column> <el-table-column - prop="sampleTime" - label="取样时间" - width="150" - ></el-table-column> - <el-table-column - prop="remark" + prop="pictures" label="拍照" width="150" - ></el-table-column> + > + <template slot-scope="scope"> + <el-image + v-for="(url, index) in scope.row.pictures.split(',')" + :key="index" + :src="url" + :preview-src-list="[url]" + style="width: 50px; height: 50px;" + /> + </template> + </el-table-column> <el-table-column - prop="operator" + prop="handlePersonName" fixed="right" label="操作人员" width="150" @@ -179,9 +184,7 @@ <div slot="footer" class="dialog-footer select-member-footer"> <el-button @click="handleClose">取 消</el-button> - <el-button type="primary" @click="handleConfirm" :disabled="!imgSrc" - >确 认</el-button - > + <el-button type="primary" @click="handleConfirm">确 认</el-button> </div> <SignatureCanvas @@ -193,6 +196,7 @@ <script> import SignatureCanvas from "@/components/SignatureCanvas.vue"; +import moment from 'moment'; export default { name: "ConfirmDialog", @@ -212,18 +216,22 @@ type: Array, default: () => [], }, + detailData: { + type: Object, + default: () => ({}), + }, }, data() { return { signatureDialogVisible: false, - imgSrc: "", + imgSrc: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", showAdditives: true, }; }, methods: { handleClose() { this.$emit("update:visible", false); - this.imgSrc = ""; + this.imgSrc = "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"; }, openSignature() { this.signatureDialogVisible = true; @@ -237,7 +245,19 @@ this.$message.warning("请先完成签名确认"); return; } - this.$emit("confirm", this.imgSrc); + const now = new Date().toISOString(); + const params = { + id: this.detailData.id, + commitPersonId: this.detailData.commitPersonId, + commitSign: this.imgSrc, + commitTime: moment().format('YYYY-MM-DD HH:mm:ss'), + dispatchId: this.detailData.experimentDispatch?.id, + samplingCode: this.detailData.samplingCode, + remark: this.formData.remark, + samplingRecordOperations: this.sampleData, + status: 2 // 已提交状态 + }; + this.$emit("confirm", params); this.handleClose(); }, }, -- Gitblit v1.7.1