| | |
| | | :title="dialogTitle" |
| | | :visible.sync="visible" |
| | | width="80%" |
| | | @open='open' |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | > |
| | |
| | | <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="至" |
| | |
| | | <img |
| | | v-if="imgSrc" |
| | | style="width: 200px; height: 100px; margin-left: 25px" |
| | | :src="imgSrc" |
| | | :src="getFullUrl(imgSrc)" |
| | | fit="fit" |
| | | /> |
| | | </div> |
| | |
| | | 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", |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | getFullUrl, |
| | | open(){ |
| | | queryDetail().then(res=>{ |
| | | if(res){ |
| | | this.imgSrc=res.signPicture |
| | | } |
| | | }) |
| | | }, |
| | | // 获取详情 |
| | | getDetail(id) { |
| | | getDetailById({ id }) |
| | |
| | | dispatchId: this.data.id, // 传递当前调度id |
| | | confirmSign: this.imgSrc, // 签名图片 |
| | | }; |
| | | console.log('params',params) |
| | | sign(params).then(res => { |
| | | if (res && res.code === 200) { |
| | | this.$message.success('签字成功'); |
| | |
| | | }, |
| | | 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; |
| | | }); |
| | | }, |
| | | }, |
| | | }; |