From 9cb1c3c39136c89974bc4049fca5e450e757b1be Mon Sep 17 00:00:00 2001 From: 13404089107 <puwei@sinata.cn> Date: 星期五, 15 八月 2025 17:51:03 +0800 Subject: [PATCH] fix --- laboratory/src/views/dataManagement/dispatching/editDispatch.vue | 42 ++++++++++++++++++++++++++---------------- 1 files changed, 26 insertions(+), 16 deletions(-) diff --git a/laboratory/src/views/dataManagement/dispatching/editDispatch.vue b/laboratory/src/views/dataManagement/dispatching/editDispatch.vue index 684e724..2cb3960 100644 --- a/laboratory/src/views/dataManagement/dispatching/editDispatch.vue +++ b/laboratory/src/views/dataManagement/dispatching/editDispatch.vue @@ -3,7 +3,9 @@ <el-dialog :title="dialogTitle" :visible.sync="visible" - width="80%" + width="90%" + @open='open' + top="5vh" :close-on-click-modal="false" @close="handleClose" > @@ -118,7 +120,6 @@ <div style="padding-left: 25px"> <el-form-item prop="experimentTime" label="试验时间"> <el-date-picker - style="width: 100%" v-model="form.experimentTime" type="datetimerange" range-separator="至" @@ -236,7 +237,7 @@ <img v-if="imgSrc" style="width: 200px; height: 100px; margin-left: 25px" - :src="imgSrc" + :src="getFullUrl(imgSrc)" fit="fit" /> </div> @@ -263,6 +264,8 @@ import SignatureCanvas from "@/components/SignatureCanvas.vue"; import AIEditor from "@/components/AiEditor"; import { getDetailById, sign } from "./service"; +import {queryDetail} from '@/components/service.js' +import {getFullUrl} from '@/utils/utils.js' export default { name: "ApprovalDialog", @@ -357,6 +360,14 @@ }, }, methods: { + getFullUrl, + open(){ + queryDetail().then(res=>{ + if(res){ + this.imgSrc=res.signPicture + } + }) + }, // 获取详情 getDetail(id) { getDetailById({ id }) @@ -451,8 +462,8 @@ } }) .catch((err) => { - console.error("获取详情失败:", err); - this.$message.error("获取详情失败"); + // console.error("获取详情失败:", err); + // this.$message.error("获取详情失败"); }); }, memberList(type) { @@ -483,7 +494,6 @@ dispatchId: this.data.id, // 传递当前调度id confirmSign: this.imgSrc, // 签名图片 }; - console.log('params',params) sign(params).then(res => { if (res && res.code === 200) { this.$message.success('签字成功'); @@ -493,7 +503,7 @@ this.$message.error(res.msg || '签字失败'); } }).catch(() => { - this.$message.error('签字失败'); + // this.$message.error('签字失败'); }); }, openSignature() { @@ -501,10 +511,10 @@ }, handleSignatureConfirm(imageData) { this.signatureDialogVisible = false; - // 模拟上传签名图片,实际应调用上传接口,成功后回显图片链接 - // TODO: 替换为实际上传接口 - // uploadSignature(imageData).then(url => { this.imgSrc = url }) - this.imgSrc = 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'; // 默认图片链接 + this.imgSrc = ""; // 先清空 + this.$nextTick(() => { + this.imgSrc = imageData; + }); }, }, }; @@ -517,7 +527,7 @@ .approval-dialog { display: flex; - height: 60vh; + height: 70vh; .approval-content { flex: 1; @@ -528,8 +538,8 @@ } .approval-flow { - padding: 40px 20px; - width: 405px; + padding: 20px 0px; + width: 305px; background: #ffffff; box-shadow: 0px 4px 12px 4px rgba(0, 0, 0, 0.08); border-radius: 10px; @@ -552,11 +562,11 @@ } } .approval-dialog-approve { - margin-top: 26px; + margin-top: 18px; } .approval-content-card { - height: calc(100% - 100px) !important; + height: calc(100% - 10px) !important; box-shadow: none !important; } -- Gitblit v1.7.1