|
@@ -10,51 +10,78 @@
|
|
|
id="breadcrumb-container"
|
|
id="breadcrumb-container"
|
|
|
class="breadcrumb-container" />
|
|
class="breadcrumb-container" />
|
|
|
|
|
|
|
|
- <div class="right-menu">
|
|
|
|
|
- <template v-if="device !== 'mobile'">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="right-menu"
|
|
|
|
|
+ v-show="device !== 'mobile'">
|
|
|
|
|
+ <el-dropdown
|
|
|
|
|
+ @command="(v) => handleCommand(v)"
|
|
|
|
|
+ placement="top-start"
|
|
|
|
|
+ trigger="hover">
|
|
|
<div class="right-menu-item">
|
|
<div class="right-menu-item">
|
|
|
- <img
|
|
|
|
|
- src="../../assets/navigation_account.png"
|
|
|
|
|
- class="account"/>
|
|
|
|
|
- <span class="trademarker">{{username}}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div
|
|
|
|
|
- class="right-menu-image"
|
|
|
|
|
- @click="onClickNotificationButton">
|
|
|
|
|
- <img src="../../assets/navigation_notification.png"/>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div
|
|
|
|
|
- class="right-menu-image"
|
|
|
|
|
- @click="onClickMessageButton">
|
|
|
|
|
- <img src="../../assets/navigation_message.png"/>
|
|
|
|
|
|
|
+ <i class="el-icon-user-solid account"></i>
|
|
|
|
|
+ <span class="trademarker" v-if="username">
|
|
|
|
|
+ Hi, {{username}}
|
|
|
|
|
+ </span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div
|
|
|
|
|
- class="right-menu-image"
|
|
|
|
|
- @click="logout">
|
|
|
|
|
- <img src="../../assets/navigation_logout.png"/>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <el-dropdown-menu
|
|
|
|
|
+ slot="dropdown"
|
|
|
|
|
+ class="account-dropdown">
|
|
|
|
|
+ <div class="account-dropdown-item">
|
|
|
|
|
+ <img
|
|
|
|
|
+ class="avatar"
|
|
|
|
|
+ src="../../assets/avatar-default.png"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="flexl">
|
|
|
|
|
+ <div class="flexc">
|
|
|
|
|
+ <span class="username">{{username}}</span>
|
|
|
|
|
+ <span class="role" v-if="role">{{role}}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <span class="email"><{{email}}></span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-dropdown-item divided command="logout" style="padding: 5px 20px;">
|
|
|
|
|
+ <span>Log Out</span>
|
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
|
+ </el-dropdown>
|
|
|
|
|
+ <!-- <div
|
|
|
|
|
+ class="right-menu-image"
|
|
|
|
|
+ @click="onClickNotificationButton">
|
|
|
|
|
+ <i class="el-icon-message"></i>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="right-menu-image"
|
|
|
|
|
+ @click="onClickMessageButton">
|
|
|
|
|
+ <i class="el-icon-message-solid"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="right-menu-image"
|
|
|
|
|
+ @click="logout">
|
|
|
|
|
+ <i class="el-icon-switch-button bold"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="right-menu"
|
|
|
|
|
+ v-show="device == 'mobile'">
|
|
|
<el-dropdown
|
|
<el-dropdown
|
|
|
class="avatar-container"
|
|
class="avatar-container"
|
|
|
@command="(v) => handleCommand(v)"
|
|
@command="(v) => handleCommand(v)"
|
|
|
- trigger="click"
|
|
|
|
|
- v-else>
|
|
|
|
|
|
|
+ trigger="click">
|
|
|
<div class="avatar-wrapper">
|
|
<div class="avatar-wrapper">
|
|
|
- <!-- <img :src="adminIcon" class="user-avatar"> -->
|
|
|
|
|
<i class="el-icon-menu"/>
|
|
<i class="el-icon-menu"/>
|
|
|
</div>
|
|
</div>
|
|
|
<el-dropdown-menu
|
|
<el-dropdown-menu
|
|
|
slot="dropdown"
|
|
slot="dropdown"
|
|
|
class="user-dropdown">
|
|
class="user-dropdown">
|
|
|
- <el-dropdown-item>
|
|
|
|
|
|
|
+ <el-dropdown-item command="">
|
|
|
<span class="fixed-username">Hi, {{username}}</span>
|
|
<span class="fixed-username">Hi, {{username}}</span>
|
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item divided command="onClickMessageButton">
|
|
<el-dropdown-item divided command="onClickMessageButton">
|
|
|
<span>Message</span>
|
|
<span>Message</span>
|
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item divided command="onClickNotificationButton">
|
|
|
|
|
|
|
+ <!--el-dropdown-item divided command="onClickNotificationButton">
|
|
|
<span>Email</span>
|
|
<span>Email</span>
|
|
|
- </el-dropdown-item>
|
|
|
|
|
|
|
+ </el-dropdown-item-->
|
|
|
<el-dropdown-item divided command="logout">
|
|
<el-dropdown-item divided command="logout">
|
|
|
<span>Log Out</span>
|
|
<span>Log Out</span>
|
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
@@ -68,20 +95,12 @@
|
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
|
import Hamburger from '@/components/Hamburger'
|
|
import Hamburger from '@/components/Hamburger'
|
|
|
-import ErrorLog from '@/components/ErrorLog'
|
|
|
|
|
-import Screenfull from '@/components/Screenfull'
|
|
|
|
|
-import SizeSelect from '@/components/SizeSelect'
|
|
|
|
|
-import Search from '@/components/HeaderSearch'
|
|
|
|
|
-import {getUserName} from '../../utils/auth.js'
|
|
|
|
|
|
|
+import {getUserName, getEmail, getRoleName} from '../../utils/auth.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
Breadcrumb,
|
|
Breadcrumb,
|
|
|
- Hamburger,
|
|
|
|
|
- ErrorLog,
|
|
|
|
|
- Screenfull,
|
|
|
|
|
- SizeSelect,
|
|
|
|
|
- Search
|
|
|
|
|
|
|
+ Hamburger
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters([
|
|
...mapGetters([
|
|
@@ -92,11 +111,15 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- username: 'Admin'
|
|
|
|
|
|
|
+ username: 'Admin',
|
|
|
|
|
+ email: '',
|
|
|
|
|
+ role: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.username = getUserName()
|
|
this.username = getUserName()
|
|
|
|
|
+ this.email = getEmail()
|
|
|
|
|
+ this.role = getRoleName()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
toggleSideBar() {
|
|
toggleSideBar() {
|
|
@@ -118,13 +141,15 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onClickMessageButton() {
|
|
onClickMessageButton() {
|
|
|
- console.log(' click message button .............')
|
|
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: "/notification-management/in-app-notification"
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- onClickNotificationButton() {
|
|
|
|
|
|
|
+ /*onClickNotificationButton() {
|
|
|
console.log(' click notification button .............')
|
|
console.log(' click notification button .............')
|
|
|
- },
|
|
|
|
|
|
|
+ },*/
|
|
|
handleCommand(v) {
|
|
handleCommand(v) {
|
|
|
- this[v]()
|
|
|
|
|
|
|
+ if (v) this[v]()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -203,6 +228,8 @@ export default {
|
|
|
|
|
|
|
|
.right-menu-item {
|
|
.right-menu-item {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ color: #555;
|
|
|
|
|
+ font-size: 24px;
|
|
|
padding: 0 30px;
|
|
padding: 0 30px;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
@@ -210,14 +237,14 @@ export default {
|
|
|
|
|
|
|
|
.right-menu-image {
|
|
.right-menu-image {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
+ color: #888;
|
|
|
|
|
+ font-size: 24px;
|
|
|
padding: 8px 20px;
|
|
padding: 8px 20px;
|
|
|
border-left: 1px solid #eee;
|
|
border-left: 1px solid #eee;
|
|
|
- img {
|
|
|
|
|
- width: 22px;
|
|
|
|
|
- height: 22px;
|
|
|
|
|
|
|
+ .bold {
|
|
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
@@ -233,4 +260,46 @@ export default {
|
|
|
padding-right: 10px;
|
|
padding-right: 10px;
|
|
|
text-transform: capitalize;
|
|
text-transform: capitalize;
|
|
|
}
|
|
}
|
|
|
|
|
+ .user-dropdown {
|
|
|
|
|
+ padding: 0 !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ .account-dropdown {
|
|
|
|
|
+ padding: 0 !important;
|
|
|
|
|
+ min-width: 200px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .account-dropdown-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ font-size: 24px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 10px 20px;
|
|
|
|
|
+ margin-right: 20px;
|
|
|
|
|
+ font-family: sans-serif;
|
|
|
|
|
+ font-style: normal;
|
|
|
|
|
+ font-weight: normal;
|
|
|
|
|
+ }
|
|
|
|
|
+ .avatar {
|
|
|
|
|
+ width: 50px;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .username {
|
|
|
|
|
+ padding-left: 10px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ text-transform: capitalize;
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ transform: scale(.9);
|
|
|
|
|
+ }
|
|
|
|
|
+ .email {
|
|
|
|
|
+ padding-left: 6px;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ transform: scale(.9);
|
|
|
|
|
+ }
|
|
|
|
|
+ .role {
|
|
|
|
|
+ color: #ccc;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ padding-left: 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .account-dropdown .el-dropdown-menu__item::before {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|