|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-row :class="[{'shortnav':isCollapse},{'longNav':!isCollapse}]">
|
|
|
+ <el-row :class="[{'shortnav':isCollapse},{'longNav':!isCollapse}]">
|
|
|
<el-col :span="24">
|
|
|
<el-menu
|
|
|
default-active="2"
|
|
|
@@ -28,7 +28,7 @@
|
|
|
</el-menu-item>
|
|
|
</el-menu-item-group>
|
|
|
</el-submenu>
|
|
|
- <el-menu-item index="99" route="#" title="退出登陆" @click="clickLogout">
|
|
|
+ <el-menu-item index="99" route="#" title="退出登陆" @click="clickLogout">
|
|
|
<i class="icon-logout"></i>
|
|
|
<span slot="title">退出登陆</span>
|
|
|
</el-menu-item>
|
|
|
@@ -39,7 +39,8 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import Navs from '../api/Navs';
|
|
|
-
|
|
|
+ import {SignOut} from '../api/getApiRes.js'
|
|
|
+ let qs = require('qs');
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -67,17 +68,29 @@
|
|
|
},
|
|
|
clickLogout() {
|
|
|
let that = this;
|
|
|
- that.$confirm('此操作将退出当前账号, 是否继续?', '提示', {
|
|
|
+ let param = {
|
|
|
+ token: localStorage.token
|
|
|
+ };
|
|
|
+ let postdata = qs.stringify(param);
|
|
|
+
|
|
|
+ this.$confirm('此操作将退出当前账号, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- localStorage.usercode = '';
|
|
|
- that.$router.push({path: '/login', query: {status: 1}});
|
|
|
+ SignOut(postdata).then(res => {
|
|
|
+ that.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '用户已退出!',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ localStorage.usercode = '';
|
|
|
+ that.$router.push({path: '/login', query: {status: 1}});
|
|
|
+ })
|
|
|
}).catch(() => {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '您已取消退出操作',
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
});
|
|
|
})
|
|
|
}
|
|
|
@@ -106,25 +119,32 @@
|
|
|
margin: 0 auto;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
.el-col, .el-menu {
|
|
|
height: 100%;
|
|
|
border-right: 0;
|
|
|
}
|
|
|
+
|
|
|
/deep/ .el-menu-item {
|
|
|
- background-color: rgba(255,255,255,0)!important;
|
|
|
+ background-color: rgba(255, 255, 255, 0) !important;
|
|
|
}
|
|
|
- /deep/.el-menu {
|
|
|
- background-color: rgba(255,255,255,0.1)!important;
|
|
|
+
|
|
|
+ /deep/ .el-menu {
|
|
|
+ background-color: rgba(255, 255, 255, 0.1) !important;
|
|
|
}
|
|
|
+
|
|
|
/deep/ .el-submenu__title {
|
|
|
- background:rgba(255,255,255,0)!important;
|
|
|
+ background: rgba(255, 255, 255, 0) !important;
|
|
|
}
|
|
|
+
|
|
|
.el-menu li:hover {
|
|
|
background: #00599A;
|
|
|
}
|
|
|
+
|
|
|
/deep/ .el-menu-item:hover {
|
|
|
- background: #00599A!important;
|
|
|
+ background: #00599A !important;
|
|
|
}
|
|
|
+
|
|
|
.logout {
|
|
|
color: #fff;
|
|
|
font-size: 14px;
|
|
|
@@ -136,9 +156,11 @@
|
|
|
.logout:hover {
|
|
|
background: rgb(67, 74, 80);
|
|
|
}
|
|
|
+
|
|
|
.littleLogo {
|
|
|
float: left;
|
|
|
}
|
|
|
+
|
|
|
.icon-home {
|
|
|
width: 18px;
|
|
|
height: 18px;
|
|
|
@@ -147,6 +169,7 @@
|
|
|
background: url("../assets/img/icon/home.png") top center no-repeat;
|
|
|
background-size: 100%;
|
|
|
}
|
|
|
+
|
|
|
.icon-location {
|
|
|
width: 18px;
|
|
|
height: 18px;
|
|
|
@@ -155,6 +178,7 @@
|
|
|
background: url("../assets/img/icon/location.png") top center no-repeat;
|
|
|
background-size: 100%;
|
|
|
}
|
|
|
+
|
|
|
.icon-list {
|
|
|
width: 18px;
|
|
|
height: 18px;
|
|
|
@@ -163,6 +187,7 @@
|
|
|
background: url("../assets/img/icon/list.png") top center no-repeat;
|
|
|
background-size: 100%;
|
|
|
}
|
|
|
+
|
|
|
.icon-equip {
|
|
|
width: 18px;
|
|
|
height: 18px;
|
|
|
@@ -171,6 +196,7 @@
|
|
|
background: url("../assets/img/icon/equip.png") top center no-repeat;
|
|
|
background-size: 100%;
|
|
|
}
|
|
|
+
|
|
|
.icon-qrcode {
|
|
|
width: 18px;
|
|
|
height: 18px;
|
|
|
@@ -178,7 +204,9 @@
|
|
|
margin-top: 20px;
|
|
|
background: url("../assets/img/icon/qrcode.png") top center no-repeat;
|
|
|
background-size: 100%;
|
|
|
- } .icon-setting {
|
|
|
+ }
|
|
|
+
|
|
|
+ .icon-setting {
|
|
|
width: 18px;
|
|
|
height: 18px;
|
|
|
float: left;
|
|
|
@@ -186,6 +214,7 @@
|
|
|
background: url("../assets/img/icon/setting.png") top center no-repeat;
|
|
|
background-size: 100%;
|
|
|
}
|
|
|
+
|
|
|
.icon-logout {
|
|
|
width: 18px;
|
|
|
height: 18px;
|