|
@@ -6,7 +6,7 @@
|
|
</div>
|
|
</div>
|
|
<CtForm ref="CtFormRef" :items="formItems" style="width: 700px;"></CtForm>
|
|
<CtForm ref="CtFormRef" :items="formItems" style="width: 700px;"></CtForm>
|
|
<div class="mb-15">
|
|
<div class="mb-15">
|
|
- <v-btn class="buttons mt-5" color="primary" @click.stop="handleCommit">保存</v-btn>
|
|
|
|
|
|
+ <v-btn class="buttons mt-5" color="primary" :loading="loading" @click.stop="handleCommit">保存</v-btn>
|
|
<v-btn v-if="!props.hideGoBack" class="mt-3" color="primary" variant="text" @click="router.go(-1)">返回</v-btn>
|
|
<v-btn v-if="!props.hideGoBack" class="mt-3" color="primary" variant="text" @click="router.go(-1)">返回</v-btn>
|
|
</div>
|
|
</div>
|
|
</v-card>
|
|
</v-card>
|
|
@@ -81,7 +81,7 @@ const formItems = ref({
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
-
|
|
|
|
|
|
+const loading = ref(false)
|
|
const handleCommit = async () => {
|
|
const handleCommit = async () => {
|
|
const { valid } = await CtFormRef.value.formRef.validate()
|
|
const { valid } = await CtFormRef.value.formRef.validate()
|
|
if (!valid) return
|
|
if (!valid) return
|
|
@@ -94,15 +94,21 @@ const handleCommit = async () => {
|
|
// 邮箱登录密码校验
|
|
// 邮箱登录密码校验
|
|
if (params.password !== params.passwordConfirm) return Snackbar.warning('两次输入的密码不一致,请确认')
|
|
if (params.password !== params.passwordConfirm) return Snackbar.warning('两次输入的密码不一致,请确认')
|
|
|
|
|
|
|
|
+ loading.value = true
|
|
await entUpdatePassword(params)
|
|
await entUpdatePassword(params)
|
|
- Snackbar.success('提交成功')
|
|
|
|
|
|
+ Snackbar.success('修改成功')
|
|
if (props.entChangePassword) {
|
|
if (props.entChangePassword) {
|
|
localStorage.setItem('entUpdatePassword', 'doNotNeedChange')
|
|
localStorage.setItem('entUpdatePassword', 'doNotNeedChange')
|
|
- window.location.href = '/recruit/enterprise'
|
|
|
|
- return
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ loading.value = false
|
|
|
|
+ window.location.href = '/recruit/enterprise'
|
|
|
|
+ }, 1500)
|
|
|
|
+ } else {
|
|
|
|
+ loading.value = false
|
|
|
|
+ router.go(-1)
|
|
}
|
|
}
|
|
- router.go(-1)
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
</style>
|
|
</style>
|