|
@@ -26,17 +26,38 @@
|
|
</div>
|
|
</div>
|
|
<div class="right-top-item"><svg-icon icon-class="quanxian" /><span class="item-title">换肤</span></div>
|
|
<div class="right-top-item"><svg-icon icon-class="quanxian" /><span class="item-title">换肤</span></div>
|
|
<div class="right-top-item"><svg-icon icon-class="quanxian" /><span class="item-title">意见建议</span></div>
|
|
<div class="right-top-item"><svg-icon icon-class="quanxian" /><span class="item-title">意见建议</span></div>
|
|
- <el-dropdown trigger="click" class="right-top-item">
|
|
|
|
|
|
+ <el-popover placement="bottom-end" trigger="click" popper-class="profile-poper-box" class="right-top-item">
|
|
<div>
|
|
<div>
|
|
|
|
+ <div class="avatar-box">
|
|
|
|
+ <el-avatar :size="56" src="/images/avatar.png" />
|
|
|
|
+ <div class="name-box">
|
|
|
|
+ <div class="user-name">{{ name }}</div>
|
|
|
|
+ <div class="dept-name">{{ deptName }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="log-box">
|
|
|
|
+ <div>
|
|
|
|
+ <span class="log-left">当前在线人数:</span>
|
|
|
|
+ <span class="log-right">{{ userInfo.loginUserNum }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <span class="log-left">上次登录时间:</span>
|
|
|
|
+ <span class="log-right">{{ userInfo.lastLoginTime }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <span class="log-left">上次登录IP:</span>
|
|
|
|
+ <span class="log-right">{{ userInfo.lastLoginIp }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="text-align: center;color: #333333;">
|
|
|
|
+ <span style="cursor:pointer;" @click="logout">退出登录</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div slot="reference">
|
|
<el-avatar :size="36" src="/images/avatar.png" />
|
|
<el-avatar :size="36" src="/images/avatar.png" />
|
|
<span class="user-name">{{ name }}<i class="el-icon-caret-bottom" /></span>
|
|
<span class="user-name">{{ name }}<i class="el-icon-caret-bottom" /></span>
|
|
</div>
|
|
</div>
|
|
- <el-dropdown-menu slot="dropdown" size="small">
|
|
|
|
- <el-dropdown-item>
|
|
|
|
- <span style="display:block;" @click="logout">Log Out</span>
|
|
|
|
- </el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </el-dropdown>
|
|
|
|
|
|
+ </el-popover>
|
|
</div>
|
|
</div>
|
|
<div class="right-down">
|
|
<div class="right-down">
|
|
<search id="header-search" />
|
|
<search id="header-search" />
|
|
@@ -65,33 +86,23 @@ export default {
|
|
'sidebar',
|
|
'sidebar',
|
|
'avatar',
|
|
'avatar',
|
|
'name',
|
|
'name',
|
|
|
|
+ 'deptName',
|
|
|
|
+ 'userInfo',
|
|
'messageCount'
|
|
'messageCount'
|
|
])
|
|
])
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async logout() {
|
|
async logout() {
|
|
- await this.$store.dispatch('user/logout').then(() => {
|
|
|
|
- location.reload()
|
|
|
|
- localStorage.removeItem('reclass-search')
|
|
|
|
- localStorage.removeItem('ledger-search')
|
|
|
|
- localStorage.removeItem('amortization-search')
|
|
|
|
- localStorage.removeItem('bmcAD-search')
|
|
|
|
- // localStorage.clear()
|
|
|
|
- window.localStorage.clear()
|
|
|
|
- window.sessionStorage.clear()
|
|
|
|
- // removeCookies('username')
|
|
|
|
- // removeCookies('loginInfo')
|
|
|
|
- // removeCookies('hostname')
|
|
|
|
- })
|
|
|
|
- // console.log(this.$route.fullPath)
|
|
|
|
- // 退出登录后,再次进入 直接进入reclass页
|
|
|
|
- // this.$router.push(`/login?redirect=/reclass/reclassList`)
|
|
|
|
- // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
|
|
|
- },
|
|
|
|
- jumpPage() {
|
|
|
|
- // 点击logo 跳转到首页
|
|
|
|
- this.$router.push({
|
|
|
|
- path: '/dashboard'
|
|
|
|
|
|
+ await this.$store.dispatch('user/logout').then((res) => {
|
|
|
|
+ location.href = res['casLogoutUrl']
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error)
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 0,
|
|
|
|
+ showClose: true,
|
|
|
|
+ message: '退出登录出错: ' + error.message
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
showData() {
|
|
showData() {
|