|
|
|
@ -79,6 +79,29 @@
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="修改密码" :visible.sync="passwordFormVisible" width="85%" top="5vh"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:show-close="false"
|
|
|
|
|
:close-on-press-escape="false">
|
|
|
|
|
<el-form :model="passwordFormData" :rules="passwordFormDataRules" ref="passwordFormData">
|
|
|
|
|
<el-form-item label="原始密码" prop="old_password">
|
|
|
|
|
<el-input type="password" v-model="passwordFormData.oldPassword" auto-complete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="新密码" prop="new_password">
|
|
|
|
|
<el-input type="password" v-model="passwordFormData.newPassword" auto-complete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="确认密码" prop="check_new_password">
|
|
|
|
|
<el-input type="password" v-model="passwordFormData.check_new_password" auto-complete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<!-- <el-button @click.native="passwordFormVisible = !passwordFormVisible">取消</el-button> -->
|
|
|
|
|
<el-button type="primary" @click.native="addSubmit('passwordFormData')" :loading="passwordLoading">提交
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style="
|
|
|
|
|
position: absolute;
|
|
|
|
@ -136,7 +159,13 @@ export default {
|
|
|
|
|
showDialog: false, // 显示dialog
|
|
|
|
|
redirect: null, // 回调地址
|
|
|
|
|
hospName: "",
|
|
|
|
|
title: "福建省XXX医院"
|
|
|
|
|
title: "福建省XXX医院",
|
|
|
|
|
passwordFormVisible: false,
|
|
|
|
|
passwordFormData: {
|
|
|
|
|
oldPassword: "",
|
|
|
|
|
newPassword: "",
|
|
|
|
|
check_new_password: "",
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -220,10 +249,34 @@ export default {
|
|
|
|
|
this.$store
|
|
|
|
|
.dispatch("Login", this.loginForm)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.$router
|
|
|
|
|
.push({path: this.redirect || "/"})
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
debugger
|
|
|
|
|
if (res.data.needChangePwd == true) {
|
|
|
|
|
this.$confirm('系统检测到您的密码长时间未修改,为保证您的账号安全建议立即修改密码?', '提示', {
|
|
|
|
|
confirmButtonText: '立即修改',
|
|
|
|
|
cancelButtonText: '忽略',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.passwordFormVisible = true;
|
|
|
|
|
this.passwordFormData = {
|
|
|
|
|
oldPassword: "",
|
|
|
|
|
newPassword: "",
|
|
|
|
|
check_new_password: "",
|
|
|
|
|
};
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$router
|
|
|
|
|
.push({path: this.redirect || "/"})
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.$router
|
|
|
|
|
.push({path: this.redirect || "/"})
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|