| | |
| | | <div class="topMenu"> |
| | | <div class="logo"></div> |
| | | <div class="headerTitle"> |
| | | <p class="textp1">管道基础大数据平台</p> |
| | | <p class="textp2">Pipeline basic big data platform</p> |
| | | <!-- <p class="textp1">管道基础大数据平台</p> |
| | | <p class="textp2">Pipeline basic big data platform</p> --> |
| | | </div> |
| | | <div class="rightWrapper"> |
| | | <div class="rightMenu"> |
| | | <ul class="infinite-list menu_ul"> |
| | | <li v-for="(item, index) in listMenu" class="infinite-list-item"> |
| | | <li |
| | | v-for="(item, index) in listMenu" |
| | | class="infinite-list-item" |
| | | > |
| | | <div @click="setMenuMove(index, item)"> |
| | | <div |
| | | class="menuImage" |
| | |
| | | {{ item.cnName }} |
| | | </div> |
| | | </div> |
| | | <div class="secondMenuDiv" v-show="item.show"> |
| | | <div |
| | | class="secondMenuDiv" |
| | | v-show="item.show" |
| | | > |
| | | <div |
| | | v-for="res in item.children" |
| | | @click="setLiClick(res)" |
| | |
| | | </ul> |
| | | </div> |
| | | <div class="rightUser"> |
| | | <div @click="logOut" class="topdiv topUser"> |
| | | <div |
| | | @click="logOut" |
| | | class="topdiv topUser" |
| | | > |
| | | <div class="userImage user1"></div> |
| | | <div class="userText"> |
| | | <span>{{ this.$store.state.uname }}</span> |
| | | <el-link class="elLink">{{ $t('common.logout') }}</el-link> |
| | | </div> |
| | | </div> |
| | | <div @click="switchLang" class="topdiv botLingo"> |
| | | <div |
| | | @click="switchLang" |
| | | class="topdiv botLingo" |
| | | > |
| | | <div class="userImage user2"></div> |
| | | <div class="userText">Language</div> |
| | | </div> |
| | |
| | | import { logout, selectMenuRecursive } from '@/api/api'; |
| | | import { removeToken, getToken } from '@/utils/auth'; |
| | | import customElMenu from '../components/customElMenu.vue'; |
| | | import { queryMenuTree } from '../api/api'; |
| | | import { queryMenuTree, getPerms } from '../api/api'; |
| | | import colorChange from '../views/maintenance/colorChange.vue'; |
| | | import { containsCoordinate } from 'ol/extent'; |
| | | import Vue from 'vue'; |
| | |
| | | itemdetail: {}, |
| | | formLabelWidth: '70px', |
| | | count: 5, |
| | | changeSelectStyle: 5, |
| | | changeSelectStyle: null, |
| | | changeliSelect: null, |
| | | changeSelectdiv: false, |
| | | listMenu: [ |
| | |
| | | showFlag: null, |
| | | }; |
| | | }, |
| | | created() {}, |
| | | created() { }, |
| | | mounted() { |
| | | this.getMenuTree(); |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | async getCookies() { |
| | | var boolean = this.getTimeCookies(); |
| | | if (boolean != true) { |
| | | this.$router.push('/login'); |
| | | return; |
| | | } |
| | | if (this.$store.state.permsEntity.length == 0) { |
| | | const data = await getPerms(); |
| | | this.$store.state.permsEntity = data.result; |
| | | } |
| | | this.$store.state.uname = JSON.parse( |
| | | localStorage.getItem('LFToken') |
| | | ).uname; |
| | | this.$router.push('/'); |
| | | }, |
| | | getTimeCookies() { |
| | | var time1 = new Date(JSON.parse(localStorage.getItem('LFToken')).time); |
| | | var time2 = new Date(); |
| | | if (time2 > time1) { |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | //主题切换 |
| | | setThemeColors() {}, |
| | | setThemeColors() { }, |
| | | //鼠标移入菜单事件 |
| | | setMenuMove(index, item) { |
| | | var that = this; |
| | |
| | | this.$router.push(item.url); |
| | | if (this.showFlag != null) { |
| | | this.setShowFalseDiv(false); |
| | | this.changeliSelect = '呵呵'; |
| | | this.changeliSelect = '%%'; |
| | | this.showFlag = null; |
| | | } |
| | | } else { |
| | |
| | | |
| | | this.changeSelectStyle = index; |
| | | }, |
| | | |
| | | setShowFalseDiv(bolean) { |
| | | var index = this.showFlag; |
| | | let newItem = this.listMenu[index]; |
| | |
| | | this.$store.commit('currentPerms', res.perms); |
| | | }, |
| | | async getMenuTree() { |
| | | this.getCookies(); |
| | | const data = await queryMenuTree(); |
| | | var that = this; |
| | | if (data.code == 200) { |
| | |
| | | res[i].children = result.result.filter((value) => { |
| | | return value.pid == res[i].id; |
| | | }); |
| | | this.listMenu.push(res[i]); |
| | | this.changeSelectStyle = this.listMenu.length - 1; |
| | | var strartMneu = res[i].children[0]; |
| | | this.$store.commit('currentPerms', strartMneu.perms); |
| | | this.changeliSelect = strartMneu.cnName; |
| | | this.$bus.$emit('currentPerms', strartMneu.perms); |
| | | } else { |
| | | this.listMenu.push(res[i]); |
| | | } |
| | | this.listMenu.push(res[i]); |
| | | } |
| | | }, |
| | | treeData(source) { |
| | |
| | | height: 70px; |
| | | } |
| | | .m1 { |
| | | background: url('../assets/img/menu/menu11.png') no-repeat; |
| | | background: url("../assets/img/menu/menu11.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m2 { |
| | | background: url('../assets/img/menu/menu21.png') no-repeat; |
| | | background: url("../assets/img/menu/menu21.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m3 { |
| | | background: url('../assets/img/menu/menu31.png') no-repeat; |
| | | background: url("../assets/img/menu/menu31.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m4 { |
| | | background: url('../assets/img/menu/menu41.png') no-repeat; |
| | | background: url("../assets/img/menu/menu41.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m5 { |
| | | background: url('../assets/img/menu/menu51.png') no-repeat; |
| | | background: url("../assets/img/menu/menu51.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m6 { |
| | | background: url('../assets/img/menu/menu61.png') no-repeat; |
| | | background: url("../assets/img/menu/menu61.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m11 { |
| | | background: url('../assets/img/menu/menu12.png') no-repeat; |
| | | background: url("../assets/img/menu/menu12.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m21 { |
| | | background: url('../assets/img/menu/menu22.png') no-repeat; |
| | | background: url("../assets/img/menu/menu22.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m31 { |
| | | background: url('../assets/img/menu/menu32.png') no-repeat; |
| | | background: url("../assets/img/menu/menu32.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m41 { |
| | | background: url('../assets/img/menu/menu42.png') no-repeat; |
| | | background: url("../assets/img/menu/menu42.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m51 { |
| | | background: url('../assets/img/menu/menu52.png') no-repeat; |
| | | background: url("../assets/img/menu/menu52.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .m61 { |
| | | background: url('../assets/img/menu/menu62.png') no-repeat; |
| | | background: url("../assets/img/menu/menu62.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | } |
| | |
| | | margin-right: 10px; |
| | | } |
| | | .user1 { |
| | | background: url('../assets/img/user.png') no-repeat; |
| | | background: url("../assets/img/user.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .user2 { |
| | | background: url('../assets/img/EN.png') no-repeat; |
| | | background: url("../assets/img/EN.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .userText { |
| | |
| | | margin-top: 49px; |
| | | margin-left: 120px; |
| | | position: absolute; |
| | | .textp1 { |
| | | font-size: 36px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: bold; |
| | | color: #ffffff; |
| | | background: linear-gradient(0deg, #79a8ff 0%, #ffffff 100%); |
| | | -webkit-background-clip: text; |
| | | -webkit-text-fill-color: transparent; |
| | | } |
| | | .textp2 { |
| | | font-size: 9px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 300; |
| | | color: #ffffff; |
| | | display: flex; |
| | | background: linear-gradient(0deg, #79a8ff 0%, #ffffff 100%); |
| | | -webkit-background-clip: text; |
| | | -webkit-text-fill-color: transparent; |
| | | } |
| | | width: 323px; |
| | | height: 70px; |
| | | background: url("../assets/img/LOGO.png") no-repeat center; |
| | | // .textp1 { |
| | | // font-size: 36px; |
| | | // font-family: Microsoft YaHei; |
| | | // font-weight: bold; |
| | | // color: #ffffff; |
| | | // background: linear-gradient(0deg, #79a8ff 0%, #ffffff 100%); |
| | | // -webkit-background-clip: text; |
| | | // -webkit-text-fill-color: transparent; |
| | | // } |
| | | // .textp2 { |
| | | // font-size: 9px; |
| | | // font-family: Microsoft YaHei; |
| | | // font-weight: 300; |
| | | // color: #ffffff; |
| | | // display: flex; |
| | | // background: linear-gradient(0deg, #79a8ff 0%, #ffffff 100%); |
| | | // -webkit-background-clip: text; |
| | | // -webkit-text-fill-color: transparent; |
| | | // } |
| | | } |
| | | .elLink { |
| | | margin-left: 5px; |
| | |
| | | } |
| | | .secondMenuDiv { |
| | | position: absolute; |
| | | z-index: 30; |
| | | z-index: 1024; |
| | | margin-top: 10px; |
| | | border: 1px solid white; |
| | | border-radius: 5px; |