From 527efb36f35b471710e445972673abff45bacdac Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期五, 12 九月 2025 17:36:09 +0800 Subject: [PATCH] 401跳转登录 --- laboratory/src/views/dataManagement/schemeManagement/stop-experiment.vue | 37 +++++++++++++++++++++++++++---------- 1 files changed, 27 insertions(+), 10 deletions(-) diff --git a/laboratory/src/views/dataManagement/schemeManagement/stop-experiment.vue b/laboratory/src/views/dataManagement/schemeManagement/stop-experiment.vue index c94ed74..8c16875 100644 --- a/laboratory/src/views/dataManagement/schemeManagement/stop-experiment.vue +++ b/laboratory/src/views/dataManagement/schemeManagement/stop-experiment.vue @@ -39,7 +39,7 @@ <AiEditor ref="reasonEditor" :value="editorContent" - height="200px" + height="400px" placeholder="请输入申请说明..." /> </div> @@ -87,7 +87,7 @@ </div> <img v-if="imgSrc" - :src="imgSrc" + :src="getFullUrl(imgSrc)" alt="签名" class="signature-preview" /> @@ -101,6 +101,7 @@ <SignatureCanvas :visible="signatureCanvasVisible" + @close="signatureCanvasVisible=false" @confirm="handleSignatureConfirm" /> </Card> @@ -110,6 +111,9 @@ import AiEditor from '@/components/AiEditor' import SignatureCanvas from "@/components/SignatureCanvas.vue" import { getDetail, applicationTermination } from './service' +import {queryDetail} from '@/components/service.js' +import {getFullUrl} from '@/utils/utils.js' +import { mapState } from "vuex"; export default { name: 'StopExperiment', @@ -134,11 +138,23 @@ this.id = this.$route.query.id if (this.id) { this.getExperimentDetail() + this.open() } else { this.$message.error('参数错误,缺少实验ID') } }, + computed: { + ...mapState(["tagList", "isFold"]), + }, methods: { + getFullUrl, + open(){ + queryDetail().then(res=>{ + if(res){ + this.imgSrc=res.signPicture + } + }) + }, // 获取实验详情 async getExperimentDetail() { try { @@ -151,7 +167,6 @@ this.$message.warning('未获取到实验详情') } } catch (error) { - console.error('获取实验详情失败:', error) this.$message.error('获取实验详情失败') } finally { this.loading = false @@ -197,8 +212,10 @@ }, handleSignatureConfirm(imageData) { this.signatureCanvasVisible = false - // this.imgSrc = imageData - this.imgSrc = 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' + this.imgSrc = ""; // 先清空 + this.$nextTick(() => { + this.imgSrc = imageData; + }); }, async handleConfirm() { if (!this.imgSrc) { @@ -228,16 +245,16 @@ stopFile: filePaths, // 中止文件路径,多个文件路径通过逗号拼接 stopFileName: fileNames // 中止文件名称,多个文件名称通过逗号拼接 } - - console.log('提交的数据:', formData) - await applicationTermination(formData) this.$message.success('提交成功') this.handleDialogClose() // 提交成功后返回列表页 - this.$router.go(-1) + this.$router.back(); + this.$store.commit( + "SET_TAGLIST", + this.tagList.filter((item) => item.path !== this.$route.path) + ); } catch (error) { - console.error('提交失败:', error) this.$message.error('提交失败') } finally { this.loading = false -- Gitblit v1.7.1