忘记密码修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
69cde152bb
commit
c93dfc5d88
|
@ -3,98 +3,57 @@
|
||||||
<!-- Reset Password -->
|
<!-- Reset Password -->
|
||||||
<el-page-header :content="$t('passwordReset:title:reset')" @back="goBack" />
|
<el-page-header :content="$t('passwordReset:title:reset')" @back="goBack" />
|
||||||
<div class="box-wrapper">
|
<div class="box-wrapper">
|
||||||
<el-form
|
<el-form ref="resetForm" v-loading="formLoading" :model="form" label-width="150px" :rules="rules"
|
||||||
ref="resetForm"
|
class="demo-ruleForm" size="small">
|
||||||
v-loading="formLoading"
|
|
||||||
:model="form"
|
|
||||||
label-width="150px"
|
|
||||||
:rules="rules"
|
|
||||||
class="demo-ruleForm"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
<!-- 邮箱 -->
|
<!-- 邮箱 -->
|
||||||
<el-form-item
|
<el-form-item :label="$t('passwordReset:form:email')" prop="EmailOrPhone">
|
||||||
:label="$t('passwordReset:form:email')"
|
<el-input v-model="form.EmailOrPhone" autocomplete="off" @change="handleEmailChange"
|
||||||
prop="EmailOrPhone"
|
v-if="!IsCanConnectInternet" />
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="form.EmailOrPhone"
|
|
||||||
autocomplete="off"
|
|
||||||
@change="handleEmailChange"
|
|
||||||
v-if="!IsCanConnectInternet"
|
|
||||||
/>
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-input
|
<el-input v-model="form.EmailOrPhone" autocomplete="off" @change="handleEmailChange" />
|
||||||
v-model="form.EmailOrPhone"
|
|
||||||
autocomplete="off"
|
|
||||||
@change="handleEmailChange"
|
|
||||||
/>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="text-align: right">
|
<el-col :span="6" style="text-align: right">
|
||||||
<el-button
|
<el-button size="small" type="primary" style="width: 80%" :disabled="sendDisabled"
|
||||||
size="small"
|
@click="handleSendCode">{{ sendTitle }}</el-button>
|
||||||
type="primary"
|
|
||||||
style="width: 80%"
|
|
||||||
:disabled="sendDisabled"
|
|
||||||
@click="handleSendCode"
|
|
||||||
>{{ sendTitle }}</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
<el-form-item
|
<el-form-item :label="!IsCanConnectInternet
|
||||||
:label="
|
? $t('trials:researchForm:form:checkCode')
|
||||||
!IsCanConnectInternet
|
: $t('trials:researchForm:form:verifyCode')
|
||||||
? $t('trials:researchForm:form:checkCode')
|
" required>
|
||||||
: $t('trials:researchForm:form:verifyCode')
|
|
||||||
"
|
|
||||||
required
|
|
||||||
>
|
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-form-item prop="VerificationCode">
|
<el-form-item prop="VerificationCode">
|
||||||
<el-input v-model="form.VerificationCode" autocomplete="off" />
|
<el-input v-model="form.VerificationCode" autocomplete="off" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" style="text-align: right">
|
<el-col :span="6" style="text-align: right">
|
||||||
<i
|
<i :title="isVerify === null
|
||||||
:title="
|
? $t('passwordReset:button:verify')
|
||||||
isVerify === null
|
: isVerify
|
||||||
? $t('passwordReset:button:verify')
|
? $t('passwordReset:button:verifySuccess')
|
||||||
: isVerify
|
: $t('passwordReset:button:Failed')
|
||||||
? $t('passwordReset:button:verifySuccess')
|
" :class="isVerify === null
|
||||||
: $t('passwordReset:button:Failed')
|
? 'el-icon-question'
|
||||||
"
|
: isVerify
|
||||||
:class="
|
|
||||||
isVerify === null
|
|
||||||
? 'el-icon-question'
|
|
||||||
: isVerify
|
|
||||||
? 'el-icon-success'
|
? 'el-icon-success'
|
||||||
: 'el-icon-error'
|
: 'el-icon-error'
|
||||||
"
|
" :style="{
|
||||||
:style="{
|
marginRight: '5px',
|
||||||
marginRight: '5px',
|
color:
|
||||||
color:
|
isVerify === null
|
||||||
isVerify === null
|
? '#909399'
|
||||||
? '#909399'
|
: isVerify
|
||||||
: isVerify
|
? '#67c23a'
|
||||||
? '#67c23a'
|
: '#f56c6c',
|
||||||
: '#f56c6c',
|
}"></i>
|
||||||
}"
|
|
||||||
></i>
|
|
||||||
<!-- 校验 -->
|
<!-- 校验 -->
|
||||||
<el-button
|
<el-button size="small" type="primary" :style="{
|
||||||
size="small"
|
width: '80%',
|
||||||
type="primary"
|
}" :disabled="form.VerificationCode === '' || form.EmailOrPhone === ''
|
||||||
:style="{
|
" @click="verifyCode">
|
||||||
width: '80%',
|
|
||||||
}"
|
|
||||||
:disabled="
|
|
||||||
form.VerificationCode === '' || form.EmailOrPhone === ''
|
|
||||||
"
|
|
||||||
@click="verifyCode"
|
|
||||||
>
|
|
||||||
{{ $t("passwordReset:button:verify") }}
|
{{ $t("passwordReset:button:verify") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -104,55 +63,35 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 用户名 -->
|
<!-- 用户名 -->
|
||||||
<el-form-item :label="$t('passwordReset:form:userName')" prop="UserId">
|
<el-form-item :label="$t('passwordReset:form:userName')" prop="UserId">
|
||||||
<el-select
|
<span :title="userMsg">{{ userMsg }}</span>
|
||||||
v-model="form.UserId"
|
<!-- <el-select v-model="form.UserId" clearable filterable style="width: 100%" @change="handleUserChange">
|
||||||
clearable
|
<el-option v-for="item of users" :key="item.UserId" :label="item.UserName" :value="item.UserId">
|
||||||
filterable
|
|
||||||
style="width: 100%"
|
|
||||||
@change="handleUserChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item of users"
|
|
||||||
:key="item.UserId"
|
|
||||||
:label="item.UserName"
|
|
||||||
:value="item.UserId"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ item.UserName }}</span>
|
<span style="float: left">{{ item.UserName }}</span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
||||||
item.UserType
|
item.UserType
|
||||||
}}</span>
|
}}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 用户类型 -->
|
<!-- 用户类型 -->
|
||||||
<el-form-item
|
<!-- <el-form-item
|
||||||
v-if="form.UserId"
|
v-if="form.UserId"
|
||||||
:label="$t('passwordReset:form:userType')"
|
:label="$t('passwordReset:form:userType')"
|
||||||
>
|
>
|
||||||
<el-input v-model="form.UserType" disabled />
|
<el-input v-model="form.UserType" disabled />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<!-- 新密码 -->
|
<!-- 新密码 -->
|
||||||
<el-form-item
|
<el-form-item class="my_new_pwd" :label="$t('passwordReset:form:password')" prop="NewPwd"
|
||||||
class="my_new_pwd"
|
style="position: relative">
|
||||||
:label="$t('passwordReset:form:password')"
|
|
||||||
prop="NewPwd"
|
|
||||||
style="position: relative"
|
|
||||||
>
|
|
||||||
<el-input v-model="form.NewPwd" show-password autocomplete="off" />
|
<el-input v-model="form.NewPwd" show-password autocomplete="off" />
|
||||||
<span style="position: absolute; right: -30px">
|
<span style="position: absolute; right: -30px">
|
||||||
<el-tooltip
|
<el-tooltip :content="$t('passwordReset:form:passwordtip')" placement="top">
|
||||||
:content="$t('passwordReset:form:passwordtip')"
|
|
||||||
placement="top"
|
|
||||||
>
|
|
||||||
<i class="el-icon-question" />
|
<i class="el-icon-question" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 确认密码 -->
|
<!-- 确认密码 -->
|
||||||
<el-form-item
|
<el-form-item :label="$t('passwordReset:form:confirmPassword')" prop="CheckPass">
|
||||||
:label="$t('passwordReset:form:confirmPassword')"
|
|
||||||
prop="CheckPass"
|
|
||||||
>
|
|
||||||
<el-input v-model="form.CheckPass" show-password autocomplete="off" />
|
<el-input v-model="form.CheckPass" show-password autocomplete="off" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="text-align: right">
|
<el-form-item style="text-align: right">
|
||||||
|
@ -262,13 +201,13 @@ export default {
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
UserId: [
|
// UserId: [
|
||||||
{
|
// {
|
||||||
required: true,
|
// required: true,
|
||||||
message: this.$t("common:ruleMessage:select"),
|
// message: this.$t("common:ruleMessage:select"),
|
||||||
trigger: ["blur", "change"],
|
// trigger: ["blur", "change"],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
},
|
||||||
sendDisabled: true,
|
sendDisabled: true,
|
||||||
sendTitle: this.$t("passwordReset:button:send"),
|
sendTitle: this.$t("passwordReset:button:send"),
|
||||||
|
@ -276,6 +215,19 @@ export default {
|
||||||
IsCanConnectInternet: true,
|
IsCanConnectInternet: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
userMsg() {
|
||||||
|
if (!this.users || this.users.length <= 0) return ''
|
||||||
|
let str = ''
|
||||||
|
this.users.forEach((item, index) => {
|
||||||
|
str += `${item.UserName}(${item.UserType})`
|
||||||
|
if (index < this.users.length - 1) {
|
||||||
|
str += '; '
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
},
|
},
|
||||||
|
@ -338,6 +290,9 @@ export default {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.formLoading = false;
|
this.formLoading = false;
|
||||||
this.users = res.Result;
|
this.users = res.Result;
|
||||||
|
if (this.users && this.users.length > 0) {
|
||||||
|
this.form.UserId = this.users[0].UserId
|
||||||
|
}
|
||||||
this.isVerify = true;
|
this.isVerify = true;
|
||||||
this.$message.success(this.$t("passwordReset:button:verifySuccess"));
|
this.$message.success(this.$t("passwordReset:button:verifySuccess"));
|
||||||
})
|
})
|
||||||
|
@ -394,12 +349,14 @@ export default {
|
||||||
.reset-wrapper {
|
.reset-wrapper {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reset-wrapper .el-page-header {
|
.reset-wrapper .el-page-header {
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
border: 1px solid #ebeef5;
|
border: 1px solid #ebeef5;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reset-wrapper .box-wrapper {
|
.reset-wrapper .box-wrapper {
|
||||||
width: 700px;
|
width: 700px;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
|
|
Loading…
Reference in New Issue