制造成本分析配合后端修改&添加顶部账号显示
This commit is contained in:
@@ -7,13 +7,17 @@
|
||||
|
||||
<!-- 右侧区域:全屏按钮 -->
|
||||
<div class="right-content">
|
||||
<el-dropdown trigger="click">
|
||||
<el-button type="text" class="logout-btn" :title="'退出'">
|
||||
<svg-icon style="color: #0B58FF;" icon-class="logout" />
|
||||
</el-button>
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="require(`../../../assets/images/choicepart/avatar.png`)" class="user-avatar">
|
||||
<span v-if="nickname" class="user-nickname">{{ nickname }}</span>
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native='logout'>退出登录</el-dropdown-item>
|
||||
<el-dropdown-item @click.native='handleToggle'>切换账号</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logout">
|
||||
<span>退出登录</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided @click.native='handleToggle'>切换账号</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button type="text" class="return-btn" :title="'返回'" @click="handleReturn">
|
||||
@@ -39,6 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import moment from 'moment'; // 引入moment
|
||||
import {getPath} from "@/utils/ruoyi";
|
||||
export default {
|
||||
@@ -64,6 +69,9 @@ export default {
|
||||
activeTime: 1, // 默认月维度(0=日,1=月,2=年)
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
...mapGetters(['nickname']),
|
||||
},
|
||||
watch: {
|
||||
activeTime(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
@@ -346,12 +354,35 @@ export default {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
padding: 0;
|
||||
}
|
||||
.avatar-container {
|
||||
margin-right: 30px;
|
||||
|
||||
.avatar-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.user-nickname{
|
||||
margin-left: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-icon-caret-bottom {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user