安琪酵母(西藏)益生菌信息采集中心智能实验室
longyvfengyun
2023-06-16 57c62fa61d720efcf3590da31ba0834a81668ef4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<script setup>
import {computed, ref} from "vue";
import FlexLayout from "@/components/FlexLayout.vue";
import {Expand, ArrowDown, ArrowUp, Avatar, Fold} from "@element-plus/icons-vue";
import usePageMenuStore from "@/store/usePageMenuStore";
import userDropdown from "@/views/mainLayout/js/userDropdown";
 
const {isVisible, visibleChange, commandClick} = userDropdown();
 
const pageMenuStore = usePageMenuStore();
const isCollapse = computed(()=>{
    return pageMenuStore.isCollapse;
});
const changeMenuState = ()=>{
    pageMenuStore.changeCollapse(!isCollapse.value);
}
</script>
 
<template>
    <div class="header-wrapper">
        <flex-layout no-bg direction="row">
            <template #header>
                <div class="header-left-wrapper">
                    <span class="menu-state-icon" @click="changeMenuState">
                        <el-icon size="20">
                            <Fold v-if="!isCollapse" />
                            <Expand v-else/>
                        </el-icon>
                    </span>
                    <span>安琪酵母(西藏)益生菌信息采集中心智能实验室</span>
                    <span class="sys-version">V1.21</span>
                </div>
            </template>
            <template #footer>
                <div class="page-header-right">
                    <div class="hdw-avatar">
                        <el-dropdown @command="commandClick" @visible-change="visibleChange">
                            <div class="hdw-avatar-wrapper">
                                <span class="hdw-avatar-icon">
                      <el-icon size="18"><Avatar /></el-icon>
                    </span>
                                <span class="hdw-avatar-text">霍东伟</span>
                                <el-icon size="16">
                                    <ArrowUp v-if="isVisible" />
                                    <ArrowDown v-else />
                                </el-icon>
                            </div>
                            <template #dropdown>
                                <el-dropdown-menu>
                                    <el-dropdown-item command="passwordChange">密码修改</el-dropdown-item>
                                    <el-dropdown-item command="outSystem">安全退出</el-dropdown-item>
                                </el-dropdown-menu>
                            </template>
                        </el-dropdown>
                    </div>
                </div>
            </template>
        </flex-layout>
    </div>
</template>
 
<style lang="less" scoped>
.header-left-wrapper {
    user-select: none;
    height: 64px;
    display: flex;
    align-items: center;
    padding-right: 150px;
    min-width: 12em;
    background-image: url("@/assets/images/page-header-left-bg.png");
    background-repeat: no-repeat;
    background-size: 150% 100%;
    color: @font-color-high-light;
    span {
        font-size: 24px;
        font-weight: bold;
        letter-spacing: 0.2rem;
        &.menu-state-icon {
            display: inline-block;
            text-align: center;
            padding: 4px 8px;
            cursor: pointer;
        }
        &.sys-version {
            padding-top: 8px;
            font-size: 16px;
            vertical-align: bottom;
        }
    }
}
.page-header-right {
    .hdw-avatar {
        padding: 8px 16px;
    }
    .hdw-avatar-text {
        color: @font-color-primary;
        margin-left: 4px;
        margin-right: 4px;
        vertical-align: center;
    }
}
.hdw-avatar-wrapper {
    cursor: pointer;
    color: @font-color-primary;
}
.hdw-avatar-wrapper:focus-visible {
    outline: none;
}
 
.hdw-avatar-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    justify-content: center;
    background-color: #4ba1fa;
    align-items: center;
    color: #032c8f;
}
</style>