From 323df6a80616eec19125feba8bdb47adb25334a0 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 12 十二月 2024 00:59:09 +0800
Subject: [PATCH] 一机一档OSD
---
src/layout/components/Navbar.vue | 70 +++++++++++++++++++++++++---------
1 files changed, 51 insertions(+), 19 deletions(-)
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 9436b0e..90c59ec 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -1,17 +1,17 @@
<template>
<div class="navbar">
- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
+ <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
+ @toggleClick="toggleSideBar" />
- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
- <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
+ <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
+ <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div class="right-menu">
- <el-button-group style="vertical-align: text-bottom;">
- <el-button @click="exchange(100)">鐪佸巺瑙掕壊</el-button>
- <el-button @click="exchange(103)">鍖哄幙瑙掕壊</el-button>
- <el-button @click="exchange(2)">杩愮淮瑙掕壊</el-button>
- </el-button-group>
- <template v-if="device!=='mobile'">
+
+
+
+
+ <template v-if="device !== 'mobile'">
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="甯冨眬澶у皬" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
@@ -38,6 +38,15 @@
</el-dropdown>
</div>
+ <div class="button-container">
+ <el-button v-if="roles.includes('admin') || roles.includes('county_leader') || roles.includes('city_leader')" type="primary" @click="toScreen" size="small">鍙鍖栧ぇ灞�</el-button>
+ </div>
+ <div class="button-container">
+ <el-button type="primary" @click="toSystemB" size="small">璺宠浆B绯荤粺</el-button>
+ </div>
+ <div class="button-container">
+ <el-button type="primary" @click="toSystemA" size="small">璺宠浆A绯荤粺</el-button>
+ </div>
</div>
</template>
@@ -51,7 +60,7 @@
import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
-import { exchangeRole} from "@/api/system/role";
+import { exchangeRole } from "@/api/system/role";
export default {
components: {
Breadcrumb,
@@ -67,7 +76,8 @@
...mapGetters([
'sidebar',
'avatar',
- 'device'
+ 'device',
+ 'roles'
]),
setting: {
get() {
@@ -87,11 +97,6 @@
}
},
methods: {
- exchange(roleId){
- exchangeRole(roleId).then(response => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- }).catch(()=>{});
- },
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
@@ -104,7 +109,20 @@
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
})
- }).catch(() => {});
+ }).catch(() => { });
+ },
+
+ toScreen() {
+ this.$router.push({
+ path: '/screen'
+ })
+ },
+
+ toSystemA() {
+ window.open('https://www.baidu.com/')
+ },
+ toSystemB() {
+ window.open('https://www.baidu.com/')
}
}
}
@@ -116,7 +134,7 @@
overflow: hidden;
position: relative;
background: #fff;
- box-shadow: 0 1px 4px rgba(0,21,41,.08);
+ box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
.hamburger-container {
line-height: 46px;
@@ -124,7 +142,7 @@
float: left;
cursor: pointer;
transition: background .3s;
- -webkit-tap-highlight-color:transparent;
+ -webkit-tap-highlight-color: transparent;
&:hover {
background: rgba(0, 0, 0, .025)
@@ -197,4 +215,18 @@
}
}
}
+.test-container {
+ margin: 0 20px;
+ height: 100%;
+ float: right;
+ display: flex;
+ align-items: center;
+}
+.button-container {
+ margin: 0 20px;
+ height: 100%;
+ float: right;
+ display: flex;
+ align-items: center;
+}
</style>
--
Gitblit v1.8.0