| | |
| | | :visible.sync="passwordVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | style="margin-top: -15vh" |
| | | title="修改密码" |
| | | width="50%"> |
| | | width="50%" |
| | | @close="passwordClose"> |
| | | <avue-form ref="form" v-model="passwordForm" :option="passwordOption" @submit="submitSwitch"/> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | }, |
| | | submitSwitch(form, done) { |
| | | let userInfo = JSON.parse(localStorage.getItem('saber-userInfo')); |
| | | |
| | | let params = { |
| | | userOid:userInfo.content.userOid, |
| | | userName: userInfo.content.userId, |
| | | oldPassword:func.encryptData(form.oldPassword,'daliantan0v0vcip'), |
| | | password:func.encryptData(form.password,'daliantan0v0vcip'), |
| | | confirmPassword:func.encryptData(form.confirmPassword,'daliantan0v0vcip'), |
| | |
| | | if(res.data.code === 200){ |
| | | this.$message.success(res.data.msg); |
| | | this.passwordVisible = false; |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | resetRouter(); |
| | | this.$router.push({path: "/login"}); |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | // this.$store.dispatch("refreshToken", form).then(() => { |
| | | // this.userBox = false; |
| | | // this.$router.push({path: "/"}); |
| | | // }) |
| | | done(); |
| | | }, |
| | | |
| | | // 关闭修改密码对话框 |
| | | passwordClose() { |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | |
| | | logout() { |
| | | this.$confirm(this.$t("logoutTip"), this.$t("tip"), { |
| | | confirmButtonText: this.$t("submitText"), |
| | |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | console.log('123'); |
| | | resetRouter(); |
| | | this.$router.push({path: "/login"}); |
| | | }); |