| | |
| | | :visible.sync="showPasswdForm" |
| | | :append-to-body="true" |
| | | width="500px" |
| | | @close="cancelPasswordChange" |
| | | > |
| | | <el-form |
| | | :model="passwdForm" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="info" @click="showPasswdForm = false" size="small" |
| | | <el-button type="info" size="small" @click="cancelPasswordChange" |
| | | >取 消</el-button |
| | | > |
| | | <el-button type="primary" @click="submitForm('ruleForm')" size="small" |
| | |
| | | }, |
| | | mounted() { |
| | | document.addEventListener("click", (e) => { |
| | | if (this.showFastPath||this.showWifi) { |
| | | if (this.showFastPath || this.showWifi) { |
| | | this.showFastPath = false; |
| | | this.showWifi = false; |
| | | } |
| | |
| | | ); |
| | | }, |
| | | updateSysNow() { |
| | | window.parent.postMessage( |
| | | { msg: `toVindicate?autoUpdate=1` }, |
| | | "*" |
| | | ); |
| | | window.parent.postMessage({ msg: `toVindicate?autoUpdate=1` }, "*"); |
| | | }, |
| | | delaySysRemind(sec) { |
| | | delayUpgradeNotice({ |
| | |
| | | }); |
| | | }, |
| | | toggleShowWifi() { |
| | | this.notificationCenterVisible = false; |
| | | this.showWifi = !this.showWifi; |
| | | this.$store.commit( |
| | | "desktop/changeNotificationCenterVisible", |
| | | this.notificationCenterVisible |
| | | ); |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | |
| | | oldPwd: this.passwdForm.oldPwd, |
| | | newPwd: this.passwdForm.checkPwd, |
| | | }; |
| | | updatePwd(json).then((res) => { |
| | | this.$notify({ |
| | | type: res.success ? "success" : "error", |
| | | message: res.msg, |
| | | updatePwd(json) |
| | | .then((res) => { |
| | | this.$notify({ |
| | | type: res.success ? "success" : "error", |
| | | message: res.msg, |
| | | }); |
| | | if (res.success) { |
| | | this.cancelPasswordChange(); |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: err.msg, |
| | | }); |
| | | }); |
| | | if (res.success) { |
| | | this.showPasswdForm = false; |
| | | } |
| | | }); |
| | | } else { |
| | | console.log("error submit!!"); |
| | | return false; |
| | |
| | | console.log("退出失败"); |
| | | }); |
| | | }, |
| | | cancelPasswordChange() { |
| | | this.showPasswdForm = false; |
| | | this.passwdForm = { |
| | | oldPwd: "", |
| | | newPwd: "", |
| | | checkPwd: "", |
| | | }; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |