$store.getters.systemLogo
  import mainContentNav from "@/components/basis/main-content-nav/method";

      handleLoadMenuLogout() {
        mainContentNav.loadMenuLogout(this, this.menus.logout);
      },
<template>
  <div class="htsj-main">
    <!--wrapper-->
    <div class="wrapper">
      <!--sidebar wrapper -->

      <!--end sidebar wrapper -->
      <!--start header -->
      <header>
        <div class="topbar d-flex align-items-center">
          <nav class="navbar navbar-expand">
            <div class="mobile-toggle-menu"><i class='bx bx-menu'></i>
            </div>
            <div class="search-bar flex-grow-1">
              <div class="position-relative search-bar-box">
                <div class="sidebar-header">
                  <div v-if='$store.getters.systemLogo'>
                    <img :src="$store.getters.systemLogo" class="logo-icon" alt="logo icon" />
                  </div>
                  <div>
                    <h4 class="logo-text">{{$store.getters.systemName}}</h4>
                  </div>
                </div>
              </div>
            </div>

            <div class="user-box dropdown">
              <a class="d-flex align-items-center nav-link  dropdown-toggle dropdown-toggle-nocaret" href="#"
                role="button" data-bs-toggle="dropdown" aria-expanded="false">
                <img :src="$store.getters.user.headIcon" class="user-img" alt="user avatar" />
                <div class="user-info ps-3">
                  <p class="user-name mb-0">{{ $store.getters.user.pushName }}</p>
                  <p class="designattion mb-0">快捷方式</p>
                </div>
              </a>

              <ul class="dropdown-menu dropdown-menu-end">
                <!-- <li v-for="(menu, i) in value.quick || []" :key="`quick${i}`">
                  <a class="dropdown-item" href="javascript:;" @click="handelChangeMenu(menu)">
                    <i :class="`${(menu.meta || {}).icon || 'bx bx-home-circle'}`" ></i><span>{{ (menu.meta || {}).title ||
                      menu.menuName }}</span>
                  </a>
                </li>
                <li>
                  <div class="dropdown-divider mb-0"></div>
                </li> -->                
                <li>
                  <a class="dropdown-item" href="javascript:;" @click="handleTo"><i
                      class="bx bx bx-home-circle"></i><span>后台管理</span></a>
                </li>
                <li>
                  <a class="dropdown-item" href="javascript:;" @click="handleLoadMenuLogout"><i
                      class="bx bx-log-out-circle"></i><span>{{
                      ((menus.logout || {}).meta || {}).title ||
                      (menus.logout || {}).menuName ||
                      "退出"
                      }}</span></a>
                </li>
              </ul>
            </div>
          </nav>
        </div>
      </header>
    </div>
    <div class="page-wrapper">
      <chat-main></chat-main>
    </div>

    <!--end header -->
    <!-- <el-button @click="handleTo">控制中心</el-button>

    <el-button @click="handleToSh">商户平台</el-button>

    <el-button @click="handleToJXCh">进销存</el-button> -->
  </div>
</template>
<style></style>

<script>
  require(`./main/style.scss`);
  import mainContentNav from "@/components/basis/main-content-nav/method";
  export default {
    //开启组件自动注入到首页
    componentsUsed: {
      name: "htsj-main",
    },
    //用于动态生成路由
    name: "main",
    routerUsed: {
      path: "/main",
      name: "main",
      meta: {
        keepAlive: true,
        name: "main",
      },
      component: (r) =>
        require.ensure([], () => r(require("./main")), "htsj"),
    },
    data() {
      return {
        footConfig: {
          selected: "main",
        },
        menus: {
          logout: [

          ]
        }
      };
    },
    methods: {
      handleLoadMenuLogout() {
        mainContentNav.loadMenuLogout(this, this.menus.logout);
      },
      handleTo() {
        this.$link.toLinkUrl("/auth/main-content", this);
        //  /auth/main-content
      },
      handleToSh() {
        this.$link.toLinkUrl("/mall/main", this);
        //  /auth/main-content
      },
      handleToJXCh() {
        this.$link.toLinkUrl("/invoicing/main", this);
        //  /auth/main-content
      },
    },
    components: {},
    // ,
    // beforeRouteEnter(to, from, next) {
    //   console.log(to);
    //   next(vm => {
    //     vm.$router.replace(from.path);
    //   });
    // }
  };
</script>
文档更新时间: 2022-06-16 10:59   作者:admin