Commit ab03aa09 authored by van.chen's avatar van.chen

index页面修改,alarm页面修改

parent c980a937
...@@ -142,7 +142,8 @@ export class EastPage implements OnInit { ...@@ -142,7 +142,8 @@ export class EastPage implements OnInit {
this.api.app.getLiquidLevelData([{fieldRegionNo: this.fieldRegionNo}, (data) => { this.api.app.getLiquidLevelData([{fieldRegionNo: this.fieldRegionNo}, (data) => {
if (data.liquidLevel) { if (data.liquidLevel) {
this.yewei = Number(data.liquidLevel); this.yewei = Number(data.liquidLevel);
this.proc = (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) * 100; this.proc = (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) > 1
? 100 : (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) * 100;
this.color = Number(data.liquidLevel) > Number(data.liquidLevelMax) || this.color = Number(data.liquidLevel) > Number(data.liquidLevelMax) ||
Number(data.liquidLevel) < Number(data.liquidLevelMin) ? 'red' : ''; Number(data.liquidLevel) < Number(data.liquidLevelMin) ? 'red' : '';
} }
......
<div class="mainCon" style="background: url('../../assets/bg/index.png') 100% 100%;background-size: cover;"> <div class="mainCon" style="background: url('../../assets/bg/index.png') 100% 100%;background-size: cover;">
<div class="mainTop"> <div class="mainTop">
<div class="imgTop"> <div class="imgTop">
<img style="width: auto !important;" src="../../assets/icon/cow.png"> <img style="width: auto !important;" src="../../assets/img/cow.png">
</div> </div>
<div style="font-size: 35px;line-height: 55px;height: 20%;border-bottom: 2px solid #ccc;width: 65%;display: inline-block;margin-bottom: 3%;"> <div style="font-size: 35px;line-height: 55px;height: 20%;border-bottom: 2px solid #ccc;width: 65%;display: inline-block;margin-bottom: 3%;">
Welcome! Welcome!
...@@ -11,15 +11,10 @@ ...@@ -11,15 +11,10 @@
</div> </div>
<div class="mainContent"> <div class="mainContent">
<div class="contentPart"> <div class="contentPart">
<div class="leftPart" (click)="goTo('home')"> <div class="leftOnPart" (click)="goTo('home')"></div>
<div class="left_inner"></div> <div class="rightOnPart " (click)="goTo('row')"></div>
</div> <div class="leftUnderPart" (click)="goTo('alarm')"></div>
<div class="rightPart" (click)="goTo('row')"> <div class="rightUnderPart" (click)="goTo('mine')"></div>
<div class="right_inner"></div>
</div>
<div class="centerPart" (click)="goTo('alarm')">
<div class="center_inner"></div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -21,41 +21,41 @@ ...@@ -21,41 +21,41 @@
position: relative; position: relative;
} }
.leftPart { .leftOnPart {
background: url("../../assets/index/left.png"); background: url("../../assets/index/1.png") center;
background-size: 110% 100%; position: absolute;
height: 100%; top: 0;
width: calc(50% - 0.5px); left: 0;
margin-right: 1px;
display: inline-block;
border-radius: 65px 0 0 65px;
} }
.rightPart { .rightOnPart {
background: url("../../assets/index/right.png"); background: url("../../assets/index/2.png") center;
height: 100%; position: absolute;
width: calc(50% - 0.5px); top: 0;
background-size: 100% 100%; left: 50%;
margin-left: -10px;
display: inline-block;
border-radius: 0 65px 65px 0;
} }
.rightPart:active, .leftPart:active { .leftUnderPart {
transform:rotateY(180deg); background: url("../../assets/index/3.png") center;
transition: 0.5s all; position: absolute;
top: 50%;
left: 0;
} }
.centerPart { .rightUnderPart {
background: url("../../assets/index/center.png") center; background: url("../../assets/index/4.png") center;
background-size: 110%;
position: absolute; position: absolute;
top: calc(50% - 75px); top: 50%;
height: 150px; left: 50%;
width: 150px; }
left: calc(50% - 75px);
border-radius: 100%; .leftOnPart, .rightOnPart, .leftUnderPart, .rightUnderPart {
} background-size: 100% 100%;
.centerPart:active { height: 50%;
background-color: #ff9933; width: 50%;
}
.leftOnPart:active, .rightOnPart:active, .leftUnderPart:active, .rightUnderPart:active {
transform:rotateY(180deg);
transition: 0.6s all;
} }
...@@ -13,7 +13,9 @@ export class IndexPage implements OnInit { ...@@ -13,7 +13,9 @@ export class IndexPage implements OnInit {
ngOnInit() {} ngOnInit() {}
goTo(e) { goTo(e) {
this.tf.transfer({url: '/' + e}); setTimeout(() => {
this.tf.transfer({url: '/' + e});
}, 300);
} }
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="topBar"> <div class="topBar">
<div class="top"> <div class="top">
<div class="imgPart"> <div class="imgPart">
<img style="height: 100%" src="../../../assets/icon/favicon.png"> <img style="height: 100%;border-radius: 100%" src="../../../assets/img/none.png">
</div> </div>
<div class="topRight"> <div class="topRight">
<div class="rightTop">{{user.userName}}</div> <div class="rightTop">{{user.userName}}</div>
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
</div> </div>
</div> </div>
<div class="bottomBtn"> <div class="bottomBtn">
<ion-button mode="ios" color="primary" expand="block" class="button" (click)="loginOut()">退出登录</ion-button> <div Button class="button" (click)="loginOut()" [type]="'primary'" style="letter-spacing: 2px">退出登录</div>
</div> </div>
</div> </div>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.topBar { .topBar {
height: 25%; height: 25%;
padding-top: 15%; padding-top: 15%;
background-color: lavender; background-color: rgba(40, 201, 189, 0.6);
.top { .top {
padding: 5% 8%; padding: 5% 8%;
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
.middleCon { .middleCon {
.line { .line {
border-bottom: 2px solid #1890ff; border-bottom: 2px solid #28c9bd;
padding: 8% 25px 0 25px; padding: 8% 25px 0 25px;
.label { .label {
...@@ -60,8 +60,9 @@ ...@@ -60,8 +60,9 @@
.button { .button {
padding: 0; padding: 0;
margin: 0; margin: 0;
border-radius: 0; background-color: #28c9bd;
background-color: #1890ff; border-radius: 5px;
border: 1px solid #28c9bd;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment