Browse Source

feat: [模板] 签名组件cancal事件

lkf
memorylkf 3 months ago
parent
commit
6393c9315d
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/views/business/comps/template/dialog/EditSign.vue

+ 9
- 1
src/views/business/comps/template/dialog/EditSign.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 签名弹窗 --> <!-- 签名弹窗 -->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" :visible.sync="open" width="500px" @close="close" append-to-body>
<el-form ref="formEditSignForm" :model="form" :rules="rules" label-width="120px"> <el-form ref="formEditSignForm" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -67,6 +67,7 @@ export default {
qmrMcEn:'', qmrMcEn:'',
qmrmm:'', qmrmm:'',
}, },
isChecked:false,
rules: { rules: {
qmrmm: [{ qmrmm: [{
required: true, required: true,
@ -95,17 +96,24 @@ export default {
qmrMcEn:this.$store.getters.name, qmrMcEn:this.$store.getters.name,
qmrmm:'', qmrmm:'',
} }
this.isChecked = false
this.resetForm("formEditSignForm") this.resetForm("formEditSignForm")
this.open = true this.open = true
}, },
cancel() { cancel() {
this.open = false this.open = false
}, },
close(){
if(!this.isChecked){
this.$emit('cancel')
}
},
save() { save() {
this.$refs["formEditSignForm"].validate(valid => { this.$refs["formEditSignForm"].validate(valid => {
if (valid) { if (valid) {
this.$modal.loading() this.$modal.loading()
public_checkPassword(this.form).then(response => { public_checkPassword(this.form).then(response => {
this.isChecked = true
this.$emit('callback',this.form) this.$emit('callback',this.form)
this.open = false this.open = false
}).catch(()=>{ }).catch(()=>{

Loading…
Cancel
Save