From 81c9b1f75b80fade52653243b914ccb2677b4a8f Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期二, 22 三月 2022 18:34:17 +0800 Subject: [PATCH] 禅道bug修复 --- src/pages/desktop/index/components/Tools.vue | 70 ++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 30 deletions(-) diff --git a/src/pages/desktop/index/components/Tools.vue b/src/pages/desktop/index/components/Tools.vue index 0d77afc..be2bd4a 100644 --- a/src/pages/desktop/index/components/Tools.vue +++ b/src/pages/desktop/index/components/Tools.vue @@ -53,7 +53,7 @@ <div class="tools-icon no-hover-style"> <img class="smart-ai" - :src="`${publicPath}images/desktop/header-icon/SmartAI.png`" + :src="`${publicPath}images/desktop/header-icon/SmartAI-鏂�.png`" alt /> </div> @@ -120,6 +120,7 @@ :visible.sync="showPasswdForm" :append-to-body="true" width="500px" + @close="cancelPasswordChange" > <el-form :model="passwdForm" @@ -153,7 +154,7 @@ </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" @@ -343,7 +344,7 @@ }, mounted() { document.addEventListener("click", (e) => { - if (this.showFastPath||this.showWifi) { + if (this.showFastPath || this.showWifi) { this.showFastPath = false; this.showWifi = false; } @@ -375,7 +376,7 @@ }, goToUpdate() { this.showAppRemind = false; - window.parent.postMessage({ msg: `toAI?activeName=update` }, "*"); + window.parent.postMessage({ msg: `toAI?activeName=鏇存柊` }, "*"); }, goToWireSet() { window.parent.postMessage( @@ -384,23 +385,7 @@ ); }, updateSysNow() { - window.parent.postMessage( - { msg: `toVindicate?autoUpdate=1` }, - "*" - ); - // this.upgrading = true; - // upgradeNewVersion() - // .then((res) => { - // if (res.code == 200) { - // this.upgrading = true; - - // this.$notify.success("鏇存柊鐗堟湰鎴愬姛"); - // this.showSysRemind = false; - // } - // }) - // .catch((err) => { - // this.$notify.error("鏇存柊鐗堟湰澶辫触"); - // }); + window.parent.postMessage({ msg: `toVindicate?autoUpdate=1` }, "*"); }, delaySysRemind(sec) { delayUpgradeNotice({ @@ -449,7 +434,12 @@ }); }, toggleShowWifi() { + this.notificationCenterVisible = false; this.showWifi = !this.showWifi; + this.$store.commit( + "desktop/changeNotificationCenterVisible", + this.notificationCenterVisible + ); }, submitForm(formName) { this.$refs[formName].validate((valid) => { @@ -458,15 +448,22 @@ 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; @@ -550,6 +547,14 @@ console.log("閫�鍑哄け璐�"); }); }, + cancelPasswordChange() { + this.showPasswdForm = false; + this.passwdForm = { + oldPwd: "", + newPwd: "", + checkPwd: "", + }; + }, }, }; </script> @@ -572,7 +577,7 @@ margin: auto; } .tools .tools-left { - width: 200px; + width: 275px; height: 100%; float: left; margin-left: 14px; @@ -852,6 +857,11 @@ height: 100%; margin-right: 14px; } + +.smart-ai { + height: 65%; +} + .el-dropdown-menu { top: 40px !important; } -- Gitblit v1.8.0