This is an automated email from the ASF dual-hosted git repository.

wenhemin pushed a commit to branch 1.3.7-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/1.3.7-prepare by this push:
     new 16ac482  [1.3.7-prepare][Fix-5699][UI] Fix update user error in user 
information (#5902)
16ac482 is described below

commit 16ac482d9e681faf3e632c1bb43aba2149b66b11
Author: Shiwen Cheng <[email protected]>
AuthorDate: Mon Aug 2 11:51:32 2021 +0800

    [1.3.7-prepare][Fix-5699][UI] Fix update user error in user information 
(#5902)
---
 .../pages/security/pages/users/_source/createUser.vue     |  7 ++++---
 .../conf/home/pages/user/pages/account/_source/info.vue   | 15 +++++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
 
b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
index a6502e5..7839622 100644
--- 
a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
+++ 
b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
@@ -124,7 +124,8 @@
       }
     },
     props: {
-      item: Object
+      item: Object,
+      fromUserInfo: Boolean
     },
     methods: {
       _ok () {
@@ -277,7 +278,7 @@
             this.userPassword = ''
             this.email = this.item.email
             this.phone = this.item.phone
-            if (this.item.tenantId) {
+            if (this.fromUserInfo || this.item.tenantId) {
               this.tenantId = this.item.tenantId
             }
             this.$nextTick(() => {
@@ -294,7 +295,7 @@
           this.userPassword = ''
           this.email = this.item.email
           this.phone = this.item.phone
-          if (this.item.tenantId) {
+          if (this.fromUserInfo || this.item.tenantId) {
             this.tenantId = this.item.tenantId
           }
           if (this.queueList.length > 0) {
diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/_source/info.vue
 
b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/_source/info.vue
index f199527..8a1e8d2 100644
--- 
a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/_source/info.vue
+++ 
b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/_source/info.vue
@@ -73,7 +73,7 @@
   </div>
 </template>
 <script>
-  import { mapState, mapMutations } from 'vuex'
+  import { mapActions, mapState, mapMutations } from 'vuex'
   import mListBoxF from '@/module/components/listBoxF/listBoxF'
   import mCreateUser from 
'@/conf/home/pages/security/pages/users/_source/createUser'
 
@@ -85,6 +85,7 @@
     props: {},
     methods: {
       ...mapMutations('user', ['setUserInfo']),
+      ...mapActions('user', ['getUserInfo']),
       /**
        * edit
        */
@@ -101,19 +102,17 @@
             return h(mCreateUser, {
               on: {
                 onUpdate (param) {
-                  self.setUserInfo({
-                    userName: param.userName,
-                    userPassword: param.userPassword,
-                    email: param.email,
-                    phone: param.phone
+                  self.setUserInfo(param)
+                  self.getUserInfo().finally(() => {
+                    modal.remove()
                   })
-                  modal.remove()
                 },
                 close () {
                 }
               },
               props: {
-                item: item
+                item: item,
+                fromUserInfo: true
               }
             })
           }

Reply via email to