Browse Source

[Fix][UI Next][V1.0.0-Alpha] Fix the user token edit bug. (#9123)

* [Fix][UI Next][V1.0.0-Alpha] Fix the user token edit bug.
3.0.0/version-upgrade
songjianet 3 years ago committed by GitHub
parent
commit
ddfd4a5762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      dolphinscheduler-ui-next/src/views/security/token-manage/components/token-modal.tsx

14
dolphinscheduler-ui-next/src/views/security/token-manage/components/token-modal.tsx

@ -67,6 +67,10 @@ const TokenModal = defineComponent({
: ''
variables.model.expireTime = Date.now()
variables.model.token = ''
} else {
variables.model.userId = props.row.userId
variables.model.expireTime = new Date(props.row.expireTime).getTime()
variables.model.token = props.row.token
}
ctx.emit('cancelModal', props.showModalRef)
}
@ -75,6 +79,12 @@ const TokenModal = defineComponent({
handleValidate(props.statusRef)
}
const changeUser = () => {
if (props.statusRef !== 0) {
variables.model.token = ''
}
}
watch(
() => props.showModalRef,
() => {
@ -119,11 +129,12 @@ const TokenModal = defineComponent({
cancelModal,
confirmModal,
getToken,
changeUser,
userStore
}
},
render() {
const { t, getToken, userStore } = this
const { t, getToken, changeUser, userStore } = this
return (
<div>
@ -171,6 +182,7 @@ const TokenModal = defineComponent({
placeholder={t('security.token.user_tips')}
options={this.model.generalOptions}
v-model={[this.model.userId, 'value']}
onUpdateValue={changeUser}
/>
</NFormItem>
)}

Loading…
Cancel
Save