|
@@ -1,9 +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" />
|
|
|
+ <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">
|
|
@@ -11,8 +19,8 @@
|
|
|
<div class="header-weather" v-if="code == '200'">
|
|
|
<!-- <i :class="'qi-' + weather.icon"></i> -->
|
|
|
<!-- <img src="../../assets/WeatherIcon-master/weather-icon-S2/64/103.png" > -->
|
|
|
- <el-image :src="weatherPic" style="overflow: hidden;height: 100%;" />
|
|
|
- <span>{{ weather.text }} {{ weather.temp + '℃' }}</span>
|
|
|
+ <el-image :src="weatherPic" style="overflow: hidden; height: 100%" />
|
|
|
+ <span>{{ weather.text }} {{ weather.temp + "℃" }}</span>
|
|
|
<!-- <span></span> -->
|
|
|
</div>
|
|
|
<search id="header-search" class="right-menu-item" />
|
|
@@ -40,7 +48,10 @@
|
|
|
-->
|
|
|
</template>
|
|
|
|
|
|
- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
|
|
+ <el-dropdown
|
|
|
+ class="avatar-container right-menu-item hover-effect"
|
|
|
+ trigger="click"
|
|
|
+ >
|
|
|
<div class="avatar-wrapper">
|
|
|
<img :src="avatar" class="user-avatar" />
|
|
|
<span v-if="nickname" class="user-nickname">{{ nickname }}</span>
|
|
@@ -107,9 +118,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
- mounted() {
|
|
|
-
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
created() {
|
|
|
// this.getWeather();
|
|
|
// this.$refs.message.getUnReadCount();
|
|
@@ -119,16 +128,16 @@ export default {
|
|
|
weather: undefined,
|
|
|
code: 0,
|
|
|
weatherPic: "https://hzl.willalp.com:9000/willalpbucket/64/",
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
methods: {
|
|
|
getWeather() {
|
|
|
- getThisTenantWeather().then(res => {
|
|
|
+ getThisTenantWeather().then((res) => {
|
|
|
const temp = JSON.parse(res.data);
|
|
|
this.code = temp.code;
|
|
|
this.weather = temp.now;
|
|
|
this.weatherPic = this.weatherPic + this.weather.icon + ".png";
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
toggleSideBar() {
|
|
|
this.$store.dispatch("app/toggleSideBar");
|
|
@@ -141,7 +150,7 @@ export default {
|
|
|
location.href = getPath("/index");
|
|
|
});
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -154,6 +163,8 @@ export default {
|
|
|
position: relative;
|
|
|
background: #fff;
|
|
|
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
|
|
+ /* 顶部栏与tab栏间距 */
|
|
|
+ margin-bottom: 3px !important;
|
|
|
|
|
|
.header-weather {
|
|
|
height: 100%;
|
|
@@ -166,13 +177,12 @@ export default {
|
|
|
span {
|
|
|
height: 100%;
|
|
|
font-weight: 400;
|
|
|
- color: #6F6F6F;
|
|
|
+ color: #6f6f6f;
|
|
|
margin-right: 16px;
|
|
|
margin-left: 10px;
|
|
|
position: relative;
|
|
|
float: right;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
.hamburger-container {
|