Browse Source

[Fix-5699][UI] Fix update user error in user information (#5700)

2.0.7-release
Shiwen Cheng 4 years ago committed by GitHub
parent
commit
ab3a88b64b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
  2. 6
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
  3. 9
      dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/_source/info.vue

7
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue

@ -138,7 +138,8 @@
} }
}, },
props: { props: {
item: Object item: Object,
fromUserInfo: Boolean
}, },
methods: { methods: {
_ok () { _ok () {
@ -294,7 +295,7 @@
this.phone = this.item.phone this.phone = this.item.phone
this.state = this.item.state this.state = this.item.state
this.userState = this.item.state + '' || '1' this.userState = this.item.state + '' || '1'
if (this.item.tenantId === 0 || this.item.tenantId) { if (this.fromUserInfo || this.item.tenantId) {
this.tenantId = this.item.tenantId this.tenantId = this.item.tenantId
} }
this.$nextTick(() => { this.$nextTick(() => {
@ -313,7 +314,7 @@
this.phone = this.item.phone this.phone = this.item.phone
this.state = this.item.state this.state = this.item.state
this.userState = this.state + '' || '1' this.userState = this.state + '' || '1'
if (this.item.tenantId === 0 || this.item.tenantId) { if (this.fromUserInfo || this.item.tenantId) {
this.tenantId = this.item.tenantId this.tenantId = this.item.tenantId
} }
if (this.queueList.length > 0) { if (this.queueList.length > 0) {

6
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue

@ -60,7 +60,7 @@
</template> </template>
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import { mapActions } from 'vuex' import { mapActions, mapMutations } from 'vuex'
import mList from './_source/list' import mList from './_source/list'
import mCreateUser from './_source/createUser' import mCreateUser from './_source/createUser'
import mSpin from '@/module/components/spin/spin' import mSpin from '@/module/components/spin/spin'
@ -89,6 +89,7 @@
mixins: [listUrlParamHandle], mixins: [listUrlParamHandle],
props: {}, props: {},
methods: { methods: {
...mapMutations('user', ['setUserInfo']),
...mapActions('security', ['getUsersListP']), ...mapActions('security', ['getUsersListP']),
/** /**
* Query * Query
@ -113,8 +114,9 @@
this.item = item this.item = item
this.createUserDialog = true this.createUserDialog = true
}, },
onUpdate () { onUpdate (param) {
this._debounceGET('false') this._debounceGET('false')
this.setUserInfo(param)
this.createUserDialog = false this.createUserDialog = false
}, },
close () { close () {

9
dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/_source/info.vue

@ -73,7 +73,7 @@
v-if="createUserDialog" v-if="createUserDialog"
:visible.sync="createUserDialog" :visible.sync="createUserDialog"
width="auto"> width="auto">
<m-create-user :item="item" @onUpdate="onUpdate" @close="close"></m-create-user> <m-create-user :item="item" :from-user-info="true" @onUpdate="onUpdate" @close="close"></m-create-user>
</el-dialog> </el-dialog>
</template> </template>
</m-list-box-f> </m-list-box-f>
@ -104,12 +104,7 @@
this.createUserDialog = true this.createUserDialog = true
}, },
onUpdate (param) { onUpdate (param) {
this.setUserInfo({ this.setUserInfo(param)
userName: param.userName,
userPassword: param.userPassword,
email: param.email,
phone: param.phone
})
this.getUserInfo().finally(() => { this.getUserInfo().finally(() => {
this.createUserDialog = false this.createUserDialog = false
}) })

Loading…
Cancel
Save