From c832bf2e80ac465e71b7a1c1f7a59d4252030989 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 05 Aug 2025 17:33:08 +0800
Subject: [PATCH] feat:事件工单滚动条
---
src/page/index/top/index.vue | 90 +++++++++++++++++++++++++++------------------
1 files changed, 54 insertions(+), 36 deletions(-)
diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue
index 5f37bac..c2a7440 100644
--- a/src/page/index/top/index.vue
+++ b/src/page/index/top/index.vue
@@ -7,33 +7,31 @@
</div>
</div>
<div class="top-bar__title">
- <top-menu ref="topMenu" v-if="setting.menu"></top-menu>
+<!--<top-menu ref="topMenu" v-if="setting.menu"></top-menu>-->
<top-search class="top-bar__item" v-if="setting.search"></top-search>
</div>
<div class="top-bar__right">
- <div v-if="setting.lock" class="top-bar__item">
- <top-lock></top-lock>
- </div>
- <div class="top-bar__item">
- <top-qna></top-qna>
- </div>
- <div class="top-bar__item" v-if="setting.fullscreen">
- <top-full></top-full>
+ <div class="icon-box">
+ <top-lock v-if="setting.lock"/>
+ <top-qna />
+ <top-full v-if="setting.fullscreen" title="全屏"/>
+ <img class="gateway" @click="jumpMH" src="@/assets/images/mh.png" alt="进入门户" title="进入门户" width="20" height="20">
</div>
<div class="top-user">
- <img class="top-bar__img" :src="userInfo.avatar" />
+ <img class="top-bar__img" :src="userInfo.avatar " alt=""/>
+
<el-dropdown>
<span class="el-dropdown-link">
- {{ userInfo.user_name }}
+ {{ userInfo.real_name }}
<el-icon class="el-icon--right">
<arrow-down />
</el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
- <el-dropdown-item>
+<!-- <el-dropdown-item>
<router-link to="/">{{ $t('navbar.dashboard') }}</router-link>
- </el-dropdown-item>
+ </el-dropdown-item>-->
<el-dropdown-item>
<router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link>
</el-dropdown-item>
@@ -49,17 +47,17 @@
</template>
<script>
-import { mapGetters } from 'vuex';
-import topLock from './top-lock.vue';
-import topMenu from './top-menu.vue';
-import topSearch from './top-search.vue';
-import topTheme from './top-theme.vue';
-import topLogs from './top-logs.vue';
-import topColor from './top-color.vue';
-import topLang from './top-lang.vue';
-import topFull from './top-full.vue';
-import topQna from './top-qna.vue';
-import topSetting from '../setting.vue';
+import { mapGetters } from 'vuex'
+import topLock from './top-lock.vue'
+import topMenu from './top-menu.vue'
+import topSearch from './top-search.vue'
+import topTheme from './top-theme.vue'
+import topLogs from './top-logs.vue'
+import topColor from './top-color.vue'
+import topLang from './top-lang.vue'
+import topFull from './top-full.vue'
+import topQna from './top-qna.vue'
+import topSetting from '../setting.vue'
export default {
components: {
@@ -75,17 +73,17 @@
topSetting,
},
name: 'top',
- data() {
- return {};
+ data () {
+ return {}
},
filters: {},
- created() {},
+ created () { },
computed: {
...mapGetters([
'setting',
'userInfo',
'tagWel',
- 'tagList',
+ 'bsTagList',
'isCollapse',
'tag',
'logsLen',
@@ -94,22 +92,28 @@
]),
},
methods: {
- setCollapse() {
- this.$store.commit('SET_COLLAPSE');
+ setCollapse () {
+ this.$store.commit('SET_COLLAPSE')
},
- logout() {
+ logout () {
this.$confirm(this.$t('logoutTip'), this.$t('tip'), {
confirmButtonText: this.$t('submitText'),
cancelButtonText: this.$t('cancelText'),
type: 'warning',
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
- this.$router.push({ path: '/login' });
- });
- });
+ const env = import.meta.env.VITE_APP_ENV
+ const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
+ env === 'development' ? this.$router.push({ path: '/login' }):window.location.replace(`${adminUrl}#/login`)
+ })
+ })
+ },
+ jumpMH () {
+ const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
+ window.open(`${adminUrl}#/gatewayPage`, '_blank')
},
},
-};
+}
</script>
<style lang="scss" scoped>
@@ -131,6 +135,7 @@
flex: 1;
display: flex;
align-items: center;
+ height: pxToVh(80);
}
.top-bar__right {
@@ -138,6 +143,19 @@
display: flex !important;
align-items: center;
height: 100%;
+
+ .icon-box{
+ display: flex;
+ align-items: center;
+ gap: 0 20px;
+ .gateway{
+ width: 25px;
+ height: 25px;
+ }
+ >*{
+ cursor: pointer;
+ }
+ }
}
.top-bar__item {
@@ -165,4 +183,4 @@
.el-dropdown-link:hover {
color: #409EFF;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3