[fix][V]:完善表单提交提示逻辑

master
Romesum 5 years ago
parent 396e0679bd
commit f262efcc77

@ -36,20 +36,14 @@
</template>
<script>
import {get, post} from "~/utils";
import {get, post,stop} from "~/utils";
import {showDialog, showFail, showSuccess} from "~/utils/dialog";
export default {
props: {
dialogFormVisible: {
required: true
},
userForm: {
required: true
},
edit: {
required: true
}
dialogFormVisible: {required: true},
userForm: {required: true},
edit: {required: true}
},
data() {
return {
@ -69,6 +63,9 @@
office: this.userForm.office,
position: parseInt(this.userForm.position),
uid: this.userForm.uid
}).catch(async e => {
await showFail(e.msg,this)
await stop()
})
showSuccess('编辑完成', this)
} else {
@ -80,6 +77,9 @@
office: this.userForm.office,
position: parseInt(this.userForm.position),
password: this.password
}).catch(async e => {
await showFail(e.msg,this)
await stop()
})
showSuccess('新增完成', this)
}

Loading…
Cancel
Save