|
@@ -1,12 +1,14 @@
|
|
<!-- -->
|
|
<!-- -->
|
|
<template>
|
|
<template>
|
|
- <v-card class="pa-5 card-box d-flex flex-column align-center">
|
|
|
|
|
|
+ <v-card class="pa-5 d-flex flex-column align-center" :class="{'card-box': !props.hideWidth}" :elevation="props.elevation">
|
|
<div class="resume-header mt-15 mb-8" style="width: 700px;">
|
|
<div class="resume-header mt-15 mb-8" style="width: 700px;">
|
|
<div class="resume-title">修改登录密码</div>
|
|
<div class="resume-title">修改登录密码</div>
|
|
</div>
|
|
</div>
|
|
<CtForm ref="CtFormRef" :items="formItems" style="width: 700px;"></CtForm>
|
|
<CtForm ref="CtFormRef" :items="formItems" style="width: 700px;"></CtForm>
|
|
- <v-btn class="buttons mt-5" color="primary" @click.stop="handleCommit">{{ $t('common.save') }}</v-btn>
|
|
|
|
- <v-btn class="mt-3" color="primary" variant="text" @click="router.go(-1)">返回</v-btn>
|
|
|
|
|
|
+ <div class="mb-15">
|
|
|
|
+ <v-btn class="buttons mt-5" color="primary" @click.stop="handleCommit">保存</v-btn>
|
|
|
|
+ <v-btn v-if="!props.hideGoBack" class="mt-3" color="primary" variant="text" @click="router.go(-1)">返回</v-btn>
|
|
|
|
+ </div>
|
|
</v-card>
|
|
</v-card>
|
|
|
|
|
|
<Loading :visible="overlay"></Loading>
|
|
<Loading :visible="overlay"></Loading>
|
|
@@ -15,12 +17,31 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
-import { useI18n } from '@/hooks/web/useI18n'
|
|
|
|
|
|
+// import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useRouter } from 'vue-router'; const router = useRouter()
|
|
import { useRouter } from 'vue-router'; const router = useRouter()
|
|
import { entUpdatePassword } from '@/api/enterprise'
|
|
import { entUpdatePassword } from '@/api/enterprise'
|
|
|
|
+const props = defineProps({
|
|
|
|
+ entChangePassword: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false
|
|
|
|
+ },
|
|
|
|
+ hideGoBack: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false
|
|
|
|
+ },
|
|
|
|
+ hideWidth: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false
|
|
|
|
+ },
|
|
|
|
+ elevation: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: '2'
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+
|
|
defineOptions({name: 'staff-changePassword'})
|
|
defineOptions({name: 'staff-changePassword'})
|
|
|
|
|
|
-const { t } = useI18n()
|
|
|
|
|
|
+// const { t } = useI18n() // 强制修改密码不能使用
|
|
|
|
|
|
const CtFormRef = ref()
|
|
const CtFormRef = ref()
|
|
const formItems = ref({
|
|
const formItems = ref({
|
|
@@ -74,7 +95,12 @@ const handleCommit = async () => {
|
|
if (params.password !== params.passwordConfirm) return Snackbar.warning('两次输入的密码不一致,请确认')
|
|
if (params.password !== params.passwordConfirm) return Snackbar.warning('两次输入的密码不一致,请确认')
|
|
|
|
|
|
await entUpdatePassword(params)
|
|
await entUpdatePassword(params)
|
|
- Snackbar.success(t('common.submittedSuccessfully'))
|
|
|
|
|
|
+ Snackbar.success('提交成功')
|
|
|
|
+ if (props.entChangePassword) {
|
|
|
|
+ localStorage.setItem('entUpdatePassword', 'doNotNeedChange')
|
|
|
|
+ window.location.href = '/recruit/enterprise'
|
|
|
|
+ return
|
|
|
|
+ }
|
|
router.go(-1)
|
|
router.go(-1)
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|