|
@@ -183,7 +183,13 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
user(val) {
|
|
|
+ this.resetForm(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ resetForm(val) {
|
|
|
let tmp = { ...val };
|
|
|
+ // console.log({ user: this.user, tmp, val });
|
|
|
if (!tmp.id) {
|
|
|
tmp = {
|
|
|
orgId: this.$store.state.user.orgId,
|
|
@@ -197,9 +203,8 @@ export default {
|
|
|
}
|
|
|
this.form = tmp;
|
|
|
},
|
|
|
- },
|
|
|
- methods: {
|
|
|
openDialog() {
|
|
|
+ this.resetForm(this.user);
|
|
|
this.visible = true;
|
|
|
},
|
|
|
closeDialog() {
|