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