| | |
| | | <i :class="isFullScren ? 'icon-tuichuquanping' : 'icon-quanping'" @click="handleScreen"></i> |
| | | </div> |
| | | </el-tooltip> |
| | | <img class="top-bar__img" :src="userInfo.avatar"> |
| | | <img class="top-bar__img" :src="topBarImg"> |
| | | <el-dropdown> |
| | | <span class="el-dropdown-link"> |
| | | {{ userInfo.userName }} |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { getStore } from "@/util/store" |
| | | import { setTheme } from "@/util/util" |
| | | import { resetRouter } from '@/router/router' |
| | | import { mapGetters, mapState } from "vuex" |
| | |
| | | name: "top", |
| | | data () { |
| | | return { |
| | | webType: getStore({ name: "webType" }), |
| | | searchShow: false, |
| | | userBox: false, |
| | | userForm: { |
| | |
| | | }], |
| | | }, |
| | | ] |
| | | } |
| | | }, |
| | | showMenu: getStore({ name: "showMenu" }), |
| | | globalUserInfo: getStore({ name: "userInfo" }), |
| | | } |
| | | }, |
| | | filters: {}, |
| | |
| | | showFullScren: state => state.common.showFullScren, |
| | | showCollapse: state => state.common.showCollapse, |
| | | showSearch: state => state.common.showSearch, |
| | | showMenu: state => state.common.showMenu, |
| | | showColor: state => state.common.showColor |
| | | }), |
| | | ...mapGetters([ |
| | |
| | | "tag", |
| | | "logsLen", |
| | | "logsFlag" |
| | | ]) |
| | | ]), |
| | | topBarImg () { |
| | | if (this.userInfo.avatar.indexOf('upload') != -1) { |
| | | return this.website.minioUrl + this.userInfo.avatar |
| | | } else { |
| | | return this.userInfo.avatar |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | handleScreen () { |
| | |
| | | }).then(() => { |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | resetRouter() |
| | | this.$router.push({ path: "/login" }) |
| | | |
| | | |
| | | if (this.webType == 'default') { |
| | | this.$router.push({ path: "/login" }) |
| | | } else { |
| | | this.$router.push({ path: "/tenementLogin" }) |
| | | } |
| | | }) |
| | | }) |
| | | } |