ZhangXianQiang
2024-03-20 cd1f212d25cfc56ea1c3381f7ae0a4f2744ec3f4
fix:修改大屏按钮
1个文件已修改
66 ■■■■ 已修改文件
src/layout/components/Navbar.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,16 @@
      </el-dropdown>
    </div>
    <div class="test-container">
      <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>
    </div>
    <div class="button-container">
      <el-button type="primary" @click="toScreen">可视化大屏</el-button>
    </div>
  </div>
</template>
@@ -51,7 +61,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,
@@ -87,11 +97,11 @@
    }
  },
  methods: {
    exchange(roleId){
        exchangeRole(roleId).then(response => {
              this.$modal.msgSuccess("修改成功");
            }).catch(()=>{});
          },
    exchange(roleId) {
      exchangeRole(roleId).then(response => {
        this.$modal.msgSuccess("修改成功");
      }).catch(() => { });
    },
    toggleSideBar() {
      this.$store.dispatch('app/toggleSideBar')
    },
@@ -104,7 +114,13 @@
        this.$store.dispatch('LogOut').then(() => {
          location.href = '/index';
        })
      }).catch(() => {});
      }).catch(() => { });
    },
    toScreen() {
      this.$router.push({
        path: '/screen'
      })
    }
  }
}
@@ -116,7 +132,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 +140,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 +213,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>