From 817ea18c62e32b2a3394ae1c245f79bc745c5ac2 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期一, 10 八月 2020 17:42:26 +0800
Subject: [PATCH] 实时监控间距调整,统计查询查找此人界面调整
---
src/pages/desktop/index/components/Tools.vue | 46 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/src/pages/desktop/index/components/Tools.vue b/src/pages/desktop/index/components/Tools.vue
index 24d5c47..2cda1d5 100644
--- a/src/pages/desktop/index/components/Tools.vue
+++ b/src/pages/desktop/index/components/Tools.vue
@@ -31,14 +31,25 @@
<img :src="`${publicPath}images/desktop/header-icon/notice.png`" alt />
</div>
<div class="tools-icon">
- <img :src="`${publicPath}images/desktop/header-icon/user.png`" alt />
+ <el-dropdown size="small" placement="bottom">
+ <span class="el-dropdown-link">
+ <img :src="`${publicPath}images/desktop/header-icon/user.png`" alt />
+ <!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
+ </span>
+ <el-dropdown-menu slot="dropdown" style='top: 44px;'>
+ <el-dropdown-item @click.native='toLogout'>
+ 閫�鍑虹櫥褰�
+ </el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+
</div>
</div>
</div>
</template>
<script>
-
+import {logout} from "@/api/login";
export default {
name: "Tools",
data() {
@@ -127,6 +138,33 @@
debugger
this.$store.commit("desktop/refreshFrame", dock);
}
+ },
+ toLogout(){
+ this.$confirm("鎻愮ず锛氱‘瀹氶��鍑哄悧锛�", {
+ center: true,
+ cancelButtonClass: "comfirm-class-cancle",
+ confirmButtonClass: "comfirm-class-sure"
+ }).then(_ => {
+ logout().then(res => {
+ if (res === "閫�鍑烘垚鍔�") {
+ sessionStorage.removeItem("userInfo");
+ location.assign('/view/index');
+ this.$notify({
+ title: "鎻愮ず",
+ type: "success",
+ message: "閫�鍑烘垚鍔燂紒"
+ });
+ } else {
+ this.$notify({
+ title: "鎻愮ず",
+ type: "success",
+ message: "閫�鍑哄け璐�!"
+ });
+ }
+ });
+ }).catch(_ => {
+ console.log("閫�鍑哄け璐�");
+ });
}
}
};
@@ -183,6 +221,7 @@
}
.tools-middle .dock-item-wrap.actived{
border-color: #40c3ff;
+ background-color: #98aabe;
}
.dock-item-wrap a {
height: 100%;
@@ -224,4 +263,7 @@
height: 100%;
margin-right: 14px;
}
+.el-dropdown-menu{
+ top: 40px !important;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0