zhanghua
2024-09-14 46e5592169f0045fcb40d175c21ea3a1e9aeb593
src/layout/components/Navbar.vue
@@ -11,8 +11,12 @@
        <!-- <h3 style="position: fixed; top: 0; font-size: 16px; color: #5a5e66; " :style="'right:' + orgCss() ">{{ getOrgName() }}</h3> -->
        <div class="right-menu">
            <el-dropdown trigger="click" ref="eldrop" style="margin-right:20px">
                <div class="avatar-wrapper" style="font-size:20px">
            <el-dropdown
                trigger="click"
                ref="eldrop"
                style="margin-right: 20px"
            >
                <div class="avatar-wrapper" style="font-size: 20px">
                    {{ selectStaff.org.name }}
                    <i class="el-icon-caret-bottom"></i>
                </div>
@@ -47,6 +51,7 @@
import Hamburger from '@/components/Hamburger'
export default {
    inject: ['reload'], // 依赖注入
    data() {
        return {
            selectStaff: JSON.parse(localStorage.getItem("selectStaff")),
@@ -67,7 +72,8 @@
        changeStaff(item) {
            this.selectStaff = item
            localStorage.setItem("selectStaff", JSON.stringify(item))
            this.$router.go(0)
            // this.$router.go(0)
            this.reload()
        },
        orgCss() {
            return JSON.parse(localStorage.getItem("user")).name.length * 20 + 100 + 'px';