| | |
| | | <AiEditor |
| | | ref="reasonEditor" |
| | | :value="editorContent" |
| | | height="200px" |
| | | height="400px" |
| | | placeholder="请输入申请说明..." |
| | | /> |
| | | </div> |
| | |
| | | </div> |
| | | <img |
| | | v-if="imgSrc" |
| | | :src="imgSrc" |
| | | :src="getFullUrl(imgSrc)" |
| | | alt="签名" |
| | | class="signature-preview" |
| | | /> |
| | |
| | | |
| | | <SignatureCanvas |
| | | :visible="signatureCanvasVisible" |
| | | @close="signatureCanvasVisible=false" |
| | | @confirm="handleSignatureConfirm" |
| | | /> |
| | | </Card> |
| | |
| | | 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', |
| | |
| | | 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 { |
| | |
| | | this.$message.warning('未获取到实验详情') |
| | | } |
| | | } catch (error) { |
| | | console.error('获取实验详情失败:', error) |
| | | this.$message.error('获取实验详情失败') |
| | | } finally { |
| | | this.loading = false |
| | |
| | | }, |
| | | 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) { |
| | |
| | | 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 |