提交 0d81da2e authored 作者: zwh's avatar zwh

合并分支 'zwh' 到 'master'

zwh 查看合并请求 !2
...@@ -2,12 +2,8 @@ ...@@ -2,12 +2,8 @@
<div class="layout"> <div class="layout">
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<div class="title"> <div class="title">信创扫描助手</div>
信创扫描助手 <div class="time">当前时间{{ time }}</div>
</div>
<div class="time">
当前时间{{123}}
</div>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="header-img"></div> <div class="header-img"></div>
...@@ -18,14 +14,22 @@ ...@@ -18,14 +14,22 @@
</div> </div>
<div class="contain-all"> <div class="contain-all">
<div class="left-bar"> <div class="left-bar">
<div class="chose-list" :class="nowRouter=='/home'?'check':''" @click="jumRouter('/home')"> <div
<div class="img-content" > class="chose-list"
:class="nowRouter == '/home' ? 'check' : ''"
@click="jumRouter('/home')"
>
<div class="img-content">
<div class="img-home"></div> <div class="img-home"></div>
</div> </div>
<div class="list-name">首页</div> <div class="list-name">首页</div>
</div> </div>
<div class="chose-list" :class="nowRouter=='/account'?'check':''" @click="jumRouter('/account')"> <div
<div class="img-content" > class="chose-list"
:class="nowRouter == '/account' ? 'check' : ''"
@click="jumRouter('/account')"
>
<div class="img-content">
<div class="img-user"></div> <div class="img-user"></div>
</div> </div>
<div class="list-name">用户信息</div> <div class="list-name">用户信息</div>
...@@ -44,109 +48,139 @@ export default { ...@@ -44,109 +48,139 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
nowRouter:'home' nowRouter: "home",
time:null,
timer:null,
}; };
}, },
watch:{ watch: {
"$route.path": { "$route.path": {
handler(newName, oldName) { handler(newName, oldName) {
//     console.log(newName); //     console.log(newName);
this.nowRouter = newName this.nowRouter = newName;
}, },
 immediate: true immediate: true,
} },
},
created() {
this.timer = setInterval(() => {
this.time = this.getTime()
}, 1000);
},
destroyed(){
clearInterval(this.timer)
}, },
methods: { methods: {
logout(){ logout() {
this.$router.push('/login') this.$router.push("/login");
localStorage.clear(); localStorage.clear();
}, },
jumRouter(router){ jumRouter(router) {
this.$router.push(router) this.$router.push(router);
} },
getTime() {
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth() + 1;
let day = now.getDate();
let hh = now.getHours();
let mm = now.getMinutes();
let ss = now.getSeconds();
let clock = year + "-";
if (month < 10) clock += "0";
clock += month + "-";
if (day < 10) clock += "0";
clock += day + " ";
if (hh < 10) clock += "0";
clock += hh + ":";
if (mm < 10) clock += "0";
clock += mm + ":";
if (ss < 10) clock += "0";
clock += ss;
return clock;
},
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.layout{ .layout {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #EDEFF8; background: #edeff8;
.header{ .header {
height: 80px; height: 80px;
background: #FFFFFF; background: #ffffff;
box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.1); box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.1);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 80px; line-height: 80px;
.header-left{ .header-left {
display: flex; display: flex;
.title{ .title {
width: 220px; width: 220px;
height: 80px; height: 80px;
line-height: 80px; line-height: 80px;
font-family: "DFPLiJinHeiW8"; font-family: "DFPLiJinHeiW8";
color: #FFFFFF; color: #ffffff;
line-height: 80px; line-height: 80px;
font-size: 28px; font-size: 28px;
text-align: center; text-align: center;
letter-spacing: 1px; letter-spacing: 1px;
background: #4658AD; background: #4658ad;
margin-right: 20px; margin-right: 20px;
} }
.time{ .time {
font-size: 18px; font-size: 18px;
font-family: "AlibabaPuHuiTi-Regular"; font-family: "AlibabaPuHuiTi-Regular";
color: #646464 color: #646464;
} }
} }
.header-right{ .header-right {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 20px; margin-right: 20px;
height: 80px; height: 80px;
.header-img{ .header-img {
width: 30px; width: 30px;
height: 30px; height: 30px;
background-image: url('../assets/img/admin.png'); background-image: url("../assets/img/admin.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
margin-right: 12px; margin-right: 12px;
} }
.username{ .username {
font-size: 18px; font-size: 18px;
font-family: "AlibabaPuHuiTi-Regular"; font-family: "AlibabaPuHuiTi-Regular";
color: #646464; color: #646464;
// line-height: 25px; // line-height: 25px;
} }
.blue-line{ .blue-line {
width: 2px; width: 2px;
height: 36px; height: 36px;
background: #4658AD; background: #4658ad;
margin: 0 30px; margin: 0 30px;
} }
.login-out{ .login-out {
font-size: 18px; font-size: 18px;
font-family: "AlibabaPuHuiTi-Regular"; font-family: "AlibabaPuHuiTi-Regular";
color: #F96635; color: #f96635;
cursor: pointer; cursor: pointer;
// line-height: 25px; // line-height: 25px;
} }
} }
} }
.contain-all{ .contain-all {
height:calc(100% - 80px); height: calc(100% - 80px);
width: 100%; width: 100%;
display: flex; display: flex;
.left-bar{ .left-bar {
width: 220px; width: 220px;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-top: 40px; padding-top: 40px;
background-color: #fff; background-color: #fff;
.chose-list{ .chose-list {
display: flex; display: flex;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
...@@ -155,53 +189,51 @@ export default { ...@@ -155,53 +189,51 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding-left: 40px; padding-left: 40px;
cursor: pointer; cursor: pointer;
&:hover{ &:hover {
background: #EDEFF8; background: #edeff8;
color: #4658AD; color: #4658ad;
.img-content{ .img-content {
background: #4176F0; background: #4176f0;
} }
} }
.img-content{ .img-content {
width: 32px; width: 32px;
height: 32px; height: 32px;
background: #C3C2C2; background: #c3c2c2;
border-radius: 4px; border-radius: 4px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 12px; margin-right: 12px;
} }
.img-home{ .img-home {
width: 20px; width: 20px;
height: 18px; height: 18px;
background-image: url('../assets/img/home.png'); background-image: url("../assets/img/home.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.img-user{ .img-user {
width: 20px; width: 20px;
height: 18px; height: 18px;
background-image: url('../assets/img/img-user.png'); background-image: url("../assets/img/img-user.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.list-name{ .list-name {
font-size: 20px; font-size: 20px;
color: #747C93; color: #747c93;
} }
} }
.check{ .check {
background: #EDEFF8; background: #edeff8;
color: #4658AD; color: #4658ad;
.img-content{ .img-content {
background: #4176F0; background: #4176f0;
} }
} }
} }
.right-center{ .right-center {
width: calc(100% - 220px); width: calc(100% - 220px);
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论