| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <template>
- <el-container style="height: 100%">
- <el-header class="header" v-show="flag">
- <div class="logInfo">
- <img :src="'api' + logo" alt="" />
- <h3>{{ header }}</h3>
- </div>
- <div class="sysName">
- <h2>可视农业应用系统 实时监测基地生产环境</h2>
- <p>
- The visual agricultural application system monitors the production
- environment of the base in real time
- </p>
- </div>
- <span class="header_btn" @click="hCheckFun">[隐藏]</span>
- </el-header>
- <el-header class="header2" v-show="!flag">
- <h3>可视农业应用系统</h3>
- <span class="header_btn" @click="hCheckFun">[展开]</span>
- </el-header>
- <el-container style="overflow: auto">
- <el-aside width="200px">
- <el-menu
- :default-active="$route.path"
- :collapse-transition="false"
- class="el-menu-vertical-demo"
- :router="isRouter"
- active-text-color="rgb(57, 249, 190)"
- >
- <el-menu-item index="/index/list1">
- <i :class="iconObj[22]"></i>
- <span slot="title">设备列表</span>
- </el-menu-item>
- <el-menu-item index="/index/monitor1">
- <i :class="iconObj[20]"></i>
- <span slot="title">可视农业应用系统</span>
- </el-menu-item>
- </el-menu>
- </el-aside>
- <el-main>
- <router-view></router-view>
- </el-main>
- </el-container>
- </el-container>
- </template>
- <script>
- export default {
- data() {
- return {
- isRouter: true,
- iconObj: {
- 20: "iconfont icon-jiankong",
- 22: "iconfont icon-shebei",
- },
- flag: true,
- header: "",
- logo: "",
- active: 1,
- };
- },
- created: function () {
- this.getUserInfo();
- },
- computed: {},
- mounted() {},
- methods: {
- getUserInfo() {
- this.$axios({
- method: "POST",
- url: "logoheader",
- }).then((res) => {
- this.header = res.data.header;
- this.logo = res.data.logo;
- });
- },
- hCheckFun() {
- this.flag = !this.flag;
- },
- },
- };
- </script>
- <style scoped lang="less">
- .header {
- position: relative;
- width: 100%;
- height: 177px !important;
- border-bottom: 2px solid #272b3a;
- background: #272b3a no-repeat center / 100% 100%
- url(../assets/images/monitor/h_bg.jpg);
- .sysName {
- color: #fff;
- text-align: center;
- h2 {
- font-size: 20px;
- }
- p {
- font-size: 14px;
- }
- margin-top: 50px;
- }
- .logInfo {
- color: #fff;
- position: absolute;
- top: 10px;
- left: 20px;
- display: flex;
- flex-direction: row;
- align-items: center;
- img {
- width: auto;
- height: 40px;
- }
- h3 {
- margin: 0;
- margin-left: 20px;
- }
- }
- }
- .header2 {
- border-bottom: 2px solid #272b3a;
- position: relative;
- background-color: #323749;
- color: #fff;
- }
- .header_btn {
- position: absolute;
- color: #727272;
- font-size: 14px;
- right: 20px;
- bottom: 10px;
- cursor: pointer;
- }
- .header_btn:hover {
- color: #fff;
- }
- .el-aside {
- background: #474e60;
- .el-menu {
- background: #232735;
- .el-menu-item {
- color: #909399;
- }
- .is-active{
- background-color: rgba(45, 111, 102, 0.4);
- }
- .el-menu-item:focus,
- .el-menu-item:hover {
- color: #39f9be;
- background-color: rgba(45, 111, 102, 0.4);
- i{color: #39f9be;}
- }
- }
- }
- .el-main {
- padding: 0;
- background-color: #f6f6f6;
- }
- </style>
|