|
@@ -1,15 +1,28 @@
|
|
|
<template>
|
|
|
- <div id="main" class="header-bar">
|
|
|
- <header>
|
|
|
- <ul class="nav">
|
|
|
- <div class="logo">GrandStar</div>
|
|
|
- <li class="header-bar-hover-warp nav-li">
|
|
|
- <div @click="isChildMenu = !isChildMenu" class="menu-modal">
|
|
|
- 功能导览
|
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </div>
|
|
|
- <div class="header-bar-hover" v-if="isChildMenu">
|
|
|
- <!-- <ul class="left-menu">
|
|
|
+ <div id="main" class="header-bar">
|
|
|
+ <header>
|
|
|
+ <ul class="nav">
|
|
|
+ <div class="logo">GrandStar</div>
|
|
|
+ <li class="header-bar-hover-warp nav-li">
|
|
|
+ <div @click="isChildMenu = !isChildMenu" class="menu-modal">
|
|
|
+ 功能导览
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="nav-li" v-for="i in barData" :key="i.id">
|
|
|
+ <span>{{ i.name }}</span>
|
|
|
+ </li>
|
|
|
+ <!-- <li class="active nav-li">
|
|
|
+ <router-link to="/main/canvas/">canvas</router-link>
|
|
|
+ </li>
|
|
|
+ <li class="nav-li">
|
|
|
+ <router-link to="/main/iotPlatformRoom/#/wel/index">云帆</router-link>
|
|
|
+ </li>
|
|
|
+ <li class="nav-li">
|
|
|
+ <router-link to="/main/about">主服务about</router-link>
|
|
|
+ </li> -->
|
|
|
+ <div class="header-bar-hover" v-if="isChildMenu">
|
|
|
+ <!-- <ul class="left-menu">
|
|
|
<li>
|
|
|
<div class="active-warp">
|
|
|
<i class="el-icon-edit"></i>
|
|
@@ -35,8 +48,8 @@
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul> -->
|
|
|
- <div class="header-bar-hover-content">
|
|
|
- <!-- <el-alert
|
|
|
+ <div class="header-bar-hover-content">
|
|
|
+ <!-- <el-alert
|
|
|
title="可将常用功能收纳此栏目中,帮助使用者快捷找到菜单。同时将在顶部导览栏目中生成前7个功能入口。"
|
|
|
type="warning"
|
|
|
class="el-alert"
|
|
@@ -67,33 +80,30 @@
|
|
|
</div>
|
|
|
|
|
|
</div> -->
|
|
|
- <ul class="menu-warp">
|
|
|
-
|
|
|
- <li v-for="i in menuData.children" :key="i.id" class="menu-ul">
|
|
|
- <div class="menu-title">{{i.name}}</div>
|
|
|
- <ul style="background:#fff" >
|
|
|
- <li @click="toWDLY(j)" style="cursor: pointer;" v-for="j in i.children" :key="j.id">{{j.name}}</li>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <ul class="menu-warp">
|
|
|
+ <li
|
|
|
+ v-for="i in menuData.children"
|
|
|
+ :key="i.id"
|
|
|
+ class="menu-ul"
|
|
|
+ >
|
|
|
+ <div class="menu-title">{{ i.name }}</div>
|
|
|
+ <ul style="background: #fff">
|
|
|
+ <li
|
|
|
+ @click="toWDLY(j)"
|
|
|
+ style="cursor: pointer"
|
|
|
+ v-for="j in i.children"
|
|
|
+ :key="j.id"
|
|
|
+ >
|
|
|
+ {{ j.name }}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <!-- <li class="nav-li">
|
|
|
- <router-link to="/main/fjhxCloudVue/#/wel/index">针筒</router-link>
|
|
|
- </li>
|
|
|
- <li class="active nav-li">
|
|
|
- <router-link to="/main/canvas/">canvas</router-link>
|
|
|
- </li>
|
|
|
- <li class="nav-li">
|
|
|
- <router-link to="/main/iotPlatformRoom/#/wel/index">云帆</router-link>
|
|
|
- </li>
|
|
|
- <li class="nav-li">
|
|
|
- <router-link to="/main/about">主服务about</router-link>
|
|
|
- </li> -->
|
|
|
- </ul>
|
|
|
- <div class="fr">
|
|
|
- <!-- <el-input
|
|
|
+ </ul>
|
|
|
+ <div class="fr">
|
|
|
+ <!-- <el-input
|
|
|
class="input-search"
|
|
|
placeholder="请输入关键词"
|
|
|
suffix-icon="el-icon-search"
|
|
@@ -109,23 +119,25 @@
|
|
|
<el-dropdown-item>中文</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown> -->
|
|
|
- <el-badge :value="12" class="badge">
|
|
|
- <i class="el-icon-message-solid"></i>
|
|
|
- </el-badge>
|
|
|
-
|
|
|
- <el-dropdown class="dropdown-box">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- leehom<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item>个人中心</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="$router.push('/')">退出</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- </div>
|
|
|
- </header>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <el-badge :value="12" class="badge">
|
|
|
+ <i class="el-icon-message-solid"></i>
|
|
|
+ </el-badge>
|
|
|
+
|
|
|
+ <el-dropdown class="dropdown-box">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ leehom<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item>个人中心</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="$router.push('/')"
|
|
|
+ >退出</el-dropdown-item
|
|
|
+ >
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
+ </header>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
|
|
|
<script>
|
|
|
import { registerMicroApps, start } from 'qiankun'
|
|
@@ -137,8 +149,9 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
input1: null,
|
|
|
- isChildMenu:false,
|
|
|
- menuData:[],
|
|
|
+ isChildMenu: false,
|
|
|
+ menuData: [],
|
|
|
+ barData: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -147,7 +160,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- toWDLY(_i){
|
|
|
+ toWDLY(_i) {
|
|
|
console.log(_i)
|
|
|
this.$router.push('/main/fjhxCloudVue/#/' + _i.path)
|
|
|
this.isChildMenu = false
|
|
@@ -157,11 +170,11 @@ export default {
|
|
|
},
|
|
|
getData() {
|
|
|
const v = this
|
|
|
- v.$get('/api/blade-system/menu/routes').then(res=>{
|
|
|
- v.menuData = res.data[3]
|
|
|
+ v.$get('/api/blade-system/menu/routes').then((res) => {
|
|
|
+ v.menuData = res.data.length >= 1 ? res.data[0] : []
|
|
|
+ v.barData = res.data
|
|
|
console.log(v.menuData)
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
@@ -172,159 +185,155 @@ export default {
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
.header-bar {
|
|
|
- background: #20222A;
|
|
|
+ background: #20222a;
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
right: 0;
|
|
|
- z-index: 11205;
|
|
|
- .menu-modal{
|
|
|
+ z-index: 1100;
|
|
|
+ .menu-modal {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-
|
|
|
- .nav {
|
|
|
+ .header-bar-hover {
|
|
|
+ position: fixed;
|
|
|
+ z-index: 205;
|
|
|
+ top: 50px;
|
|
|
+ left: 0px;
|
|
|
+ right: 0;
|
|
|
display: flex;
|
|
|
- padding: 0;
|
|
|
- margin: 0;
|
|
|
- height: 50px;
|
|
|
- overflow: hidden;
|
|
|
- .logo{
|
|
|
- color: #fff;
|
|
|
- font-size: 20px;
|
|
|
- font-weight: bold;
|
|
|
- line-height: 50px;
|
|
|
- margin: 0 20px;
|
|
|
- }
|
|
|
- .header-bar-hover-warp{
|
|
|
- .header-bar-hover{
|
|
|
- position: fixed;
|
|
|
- z-index: 1000000;
|
|
|
- top: 50px;
|
|
|
- left: 0px;
|
|
|
- right: 0;
|
|
|
- display: flex;
|
|
|
- background: #fff;
|
|
|
- box-shadow: 0px 3px 10px 1px rgba(0,0,0,0.1);
|
|
|
- height: 500px;
|
|
|
- .header-bar-hover-content{
|
|
|
- margin: 32px 20px;
|
|
|
- text-align: left;
|
|
|
- .el-alert{
|
|
|
- line-height:20px;
|
|
|
- text-align:center;
|
|
|
- background:#DFECFF;
|
|
|
- color:#666666;
|
|
|
- font-weight: 400;
|
|
|
- margin-bottom: 20px;
|
|
|
- i{
|
|
|
- color: #46A6FF;
|
|
|
- }
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0px 3px 10px 1px rgba(0, 0, 0, 0.1);
|
|
|
+ height: 500px;
|
|
|
+ .header-bar-hover-content {
|
|
|
+ margin: 32px 20px;
|
|
|
+ text-align: left;
|
|
|
+ .el-alert {
|
|
|
+ line-height: 20px;
|
|
|
+ text-align: center;
|
|
|
+ background: #dfecff;
|
|
|
+ color: #666666;
|
|
|
+ font-weight: 400;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ i {
|
|
|
+ color: #46a6ff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .fun-lists {
|
|
|
+ width: 700px;
|
|
|
+ overflow: hidden;
|
|
|
+ .fun-list {
|
|
|
+ width: 120px;
|
|
|
+ height: 40px;
|
|
|
+ margin: 20px 20px 0 0;
|
|
|
+ background: #f1f1f1;
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
+ line-height: 40px;
|
|
|
+ color: #333333;
|
|
|
+ font-size: 12px;
|
|
|
+ float: left;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ span {
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
- .fun-lists{
|
|
|
- width: 700px;
|
|
|
- overflow: hidden;
|
|
|
- .fun-list{
|
|
|
- width: 120px;
|
|
|
- height: 40px;
|
|
|
- margin: 20px 20px 0 0;
|
|
|
- background: #F1F1F1;
|
|
|
- border-radius: 4px 4px 4px 4px;
|
|
|
- line-height: 40px;
|
|
|
- color: #333333;
|
|
|
- font-size: 12px;
|
|
|
- float: left;
|
|
|
- text-align: center;
|
|
|
- cursor: pointer;
|
|
|
- span{
|
|
|
- margin-left: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
- .fun-list.active{
|
|
|
- border: 1px solid #46A6FF;
|
|
|
- background: #fff;
|
|
|
- color: #46A6FF;
|
|
|
- box-sizing: border-box;
|
|
|
- i{
|
|
|
- color: #46A6FF;
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ .fun-list.active {
|
|
|
+ border: 1px solid #46a6ff;
|
|
|
+ background: #fff;
|
|
|
+ color: #46a6ff;
|
|
|
+ box-sizing: border-box;
|
|
|
+ i {
|
|
|
+ color: #46a6ff;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- ul{
|
|
|
- padding: 0 20px;
|
|
|
- margin: 0;
|
|
|
- width: 230px;
|
|
|
- background: #f1f1f1;
|
|
|
- text-align: left;
|
|
|
-
|
|
|
- li{
|
|
|
- color: #333333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ul {
|
|
|
+ padding: 0 20px;
|
|
|
+ margin: 0;
|
|
|
+ width: 230px;
|
|
|
+ background: #f1f1f1;
|
|
|
+ text-align: left;
|
|
|
+
|
|
|
+ li {
|
|
|
+ color: #333333;
|
|
|
+ list-style: none;
|
|
|
+ margin: 0;
|
|
|
+ position: relative;
|
|
|
+ .text {
|
|
|
+ margin-left: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .el-icon-arrow-down {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 20px;
|
|
|
+ }
|
|
|
+ .child-menu {
|
|
|
+ margin-left: 24px;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .active-warp {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .active-warp:hover {
|
|
|
+ color: #0084ff;
|
|
|
+ i {
|
|
|
+ color: #0084ff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .menu-warp {
|
|
|
+ width: 100vw;
|
|
|
+ background: #fff;
|
|
|
+ overflow: hidden;
|
|
|
+ .menu-ul {
|
|
|
+ float: left;
|
|
|
+ width: 100px;
|
|
|
+ margin-right: 80px;
|
|
|
+ .menu-title {
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
+ border-bottom: 1px solid #ddd;
|
|
|
+ }
|
|
|
+ ul {
|
|
|
+ li {
|
|
|
list-style: none;
|
|
|
margin: 0;
|
|
|
- position: relative;
|
|
|
- .text{
|
|
|
- margin-left: 10px;
|
|
|
- font-size: 14px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- .el-icon-arrow-down{
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- top: 20px;
|
|
|
- }
|
|
|
- .child-menu{
|
|
|
- margin-left: 24px;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: 400;
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- .active-warp{
|
|
|
+ padding: 0;
|
|
|
+ height: 34px;
|
|
|
+ line-height: 34px;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-
|
|
|
- .active-warp:hover{
|
|
|
- color: #0084FF;
|
|
|
- i{
|
|
|
- color: #0084FF;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .menu-warp{
|
|
|
- width: 100vw;
|
|
|
- background: #fff;
|
|
|
- overflow: hidden;
|
|
|
- .menu-ul{
|
|
|
- float: left;
|
|
|
- width: 100px;
|
|
|
- margin-right: 80px;
|
|
|
- .menu-title{
|
|
|
- font-weight: bold;
|
|
|
- color: #333333;
|
|
|
- height: 40px;
|
|
|
- line-height: 40px;
|
|
|
- border-bottom: 1px solid #ddd;
|
|
|
- }
|
|
|
- ul{
|
|
|
- li{
|
|
|
- list-style: none;
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- height: 34px;
|
|
|
- line-height: 34px;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: 400;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- li:hover{
|
|
|
- color:#0084FF;
|
|
|
- }
|
|
|
- }
|
|
|
+ li:hover {
|
|
|
+ color: #0084ff;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+ .nav {
|
|
|
+ display: flex;
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+ height: 50px;
|
|
|
+ overflow: hidden;
|
|
|
+ .logo {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 50px;
|
|
|
+ margin: 0 20px;
|
|
|
+ }
|
|
|
.nav-li {
|
|
|
width: 130px;
|
|
|
height: 50px;
|
|
@@ -334,7 +343,7 @@ export default {
|
|
|
line-height: 50px;
|
|
|
list-style: none;
|
|
|
color: #fff;
|
|
|
- a{
|
|
|
+ a {
|
|
|
color: #fff;
|
|
|
}
|
|
|
}
|
|
@@ -385,7 +394,6 @@ export default {
|
|
|
header > a {
|
|
|
margin: 0 20px;
|
|
|
}
|
|
|
-
|
|
|
</style>
|
|
|
|
|
|
|