From 7c86cd2e45cfeed21ec9c726657f61ef5b3728c3 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 24 Oct 2022 15:04:27 +0800
Subject: [PATCH] 修复用户管理编辑后再新增会显示编辑用户的信息的问题

---
 src/views/system/user.vue |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 0e9f7a2..ecea45f 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -1081,15 +1081,14 @@
         })
       },
       beforeOpen(done, type) {
+        this.initFlag = true;
         const column = this.findObject(this.option.group, "farmId");
         var passwordColumn = this.findObject(this.option.group,"password");
         var password2Column = this.findObject(this.option.group,"password2")
         passwordColumn.display = true;
         password2Column.display = true;
         if(type == "add"&& column.dicData == ""){
-          this.form = {
-            id:null
-          }
+          this.form = {id:null}
           this.initData(website.tenantId)
         }
         if (["edit", "view"].includes(type)) {
@@ -1110,12 +1109,13 @@
             //   this.form.postId = this.form.postId.split(",");
             // }
           });
-        }else {
-          this.form = {
-            id:null
-          }
         }
-        this.initFlag = true;
+        if (type == "add"){
+          if (this.$refs.form){
+            this.$refs.form.resetForm()
+          }
+          this.form = {id :null }
+        }
         done();
       },
       currentChange(currentPage) {

--
Gitblit v1.9.3