| | |
| | | width="80%" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @open='open' |
| | | class="submit-confirm-dialog" |
| | | > |
| | | <div class="approval-content"> |
| | |
| | | <el-button type="primary" @click="openSignature">签名</el-button> |
| | | </div> |
| | | <div v-if="imgSrc" class="signature-preview"> |
| | | <img :src="imgSrc" alt="签名" /> |
| | | <img :src="getFullUrl(imgSrc)" alt="签名" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import SignatureCanvas from "@/components/SignatureCanvas.vue"; |
| | | import {queryDetail} from '@/components/service.js' |
| | | import {getFullUrl} from '@/utils/utils.js' |
| | | |
| | | |
| | | export default { |
| | | name: "ConfirmDialog", |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(){ |
| | | queryDetail().then(res=>{ |
| | | if(res){ |
| | | this.imgSrc=res.signPicture |
| | | } |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.$emit("update:visible", false); |
| | | this.imgSrc = ""; |
| | |
| | | }, |
| | | handleSignatureConfirm(imageData) { |
| | | this.signatureDialogVisible = false; |
| | | this.imgSrc = imageData; |
| | | this.imgSrc = ""; // 先清空 |
| | | this.$nextTick(() => { |
| | | this.imgSrc = imageData; |
| | | }); |
| | | }, |
| | | handleConfirm() { |
| | | if (!this.imgSrc) { |
| | |
| | | this.$emit("confirm", this.imgSrc); |
| | | this.handleClose(); |
| | | }, |
| | | getFullUrl |
| | | }, |
| | | }; |
| | | </script> |