Commit 9dc429bb authored by yating.lin's avatar yating.lin

修改牛舍历史页

parent cbab3c11
...@@ -35,13 +35,13 @@ ...@@ -35,13 +35,13 @@
<ion-item lines="full" class="ionItem" style="height: 45px;"> <ion-item lines="full" class="ionItem" style="height: 45px;">
<div style="width: 28%"> <div style="width: 28%">
<ion-datetime displayFormat="YYYY/MM" cancelText="取消" doneText="确认" [(ngModel)]="startTime" (ionChange)="reflush()"></ion-datetime> <ion-datetime style="position: relative;" displayFormat="YYYY/MM" cancelText="取消" doneText="确认" [(ngModel)]="startTime" (ionChange)="reflush()"></ion-datetime>
</div> </div>
<div style="width: 2%"> <div style="width: 2%">
<span>~</span> <span>~</span>
</div> </div>
<div style="width: 30%"> <div style="width: 30%">
<ion-datetime displayFormat="YYYY/MM" cancelText="取消" doneText="确认" [(ngModel)]="stopTime" style="margin-left: 3px;" (ionChange)="reflush()"></ion-datetime> <ion-datetime style="position: relative;" displayFormat="YYYY/MM" cancelText="取消" doneText="确认" [(ngModel)]="stopTime" style="margin-left: 3px;" (ionChange)="reflush()"></ion-datetime>
</div> </div>
<div style="width: 40%"> <div style="width: 40%">
<div class="note" style="margin-bottom: 5px;"> <div class="note" style="margin-bottom: 5px;">
...@@ -78,7 +78,10 @@ ...@@ -78,7 +78,10 @@
<div *ngIf="item.data.NH3" class="warnContent">氨气: {{item.data.NH3}} ppm</div> <div *ngIf="item.data.NH3" class="warnContent">氨气: {{item.data.NH3}} ppm</div>
</div> </div>
<div style="width:30%; float: left"> <div style="width:30%; float: left">
<img *ngIf="displayArea === 'trouble' && item.disposeState === 0" [src]="'../../assets/img/troubleDisposeState' + item.disposeState + '.png'" class="warnIcon" (click)="onRecvClick(item)"> <div *ngIf="displayArea === 'trouble' && item.disposeState === 0" >
<ion-button color="secondary" style="display: inline-block; width: 55px; height: 30px; font-size: 12px; border-radius: 20px;" (click)="onRecvClick(item)">确认修复</ion-button>
</div>
<!-- <img *ngIf="displayArea === 'trouble' && item.disposeState === 0" [src]="'../../assets/img/troubleDisposeState' + item.disposeState + '.png'" class="warnIcon" (click)="onRecvClick(item)">-->
<!-- <ion-button color="primary" size="small" style="display: inline-block" *ngIf="a.disposeState === 0" (click)='onRecvClick(a)'>确认修复</ion-button>--> <!-- <ion-button color="primary" size="small" style="display: inline-block" *ngIf="a.disposeState === 0" (click)='onRecvClick(a)'>确认修复</ion-button>-->
<img *ngIf="displayArea === 'trouble' && item.disposeState === 1" [src]="'../../assets/img/troubleDisposeState' + item.disposeState + '.png'" class="warnIcon"> <img *ngIf="displayArea === 'trouble' && item.disposeState === 1" [src]="'../../assets/img/troubleDisposeState' + item.disposeState + '.png'" class="warnIcon">
......
<ion-header> <!-- style="background-color: #F3F4F4" translucent="false" --> <ion-header>
<ion-toolbar> <ion-toolbar>
<ion-title class="title">牛舍告警一览</ion-title> <ion-title class="title">牛舍告警一览</ion-title>
</ion-toolbar> </ion-toolbar>
......
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
background-size:100% 100%;-moz-background-size:100% 100%; background-size:100% 100%;-moz-background-size:100% 100%;
} }
.title{ //.title{
margin-bottom: 5px; // margin-bottom: 5px;
padding-top: 5px; // padding-top: 5px;
align-items:center; // align-items:center;
justify-content: center; // justify-content: center;
color: #717171; // color: #717171;
font-size: 14px; // font-size: 14px;
} //}
.sub{ .sub{
padding-bottom: 3px; padding-bottom: 3px;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
.title{ .title{
text-align: center; text-align: center;
padding-left: 0px; padding-left: 0px;
font-weight: lighter; //font-weight: lighter;
font-size: large //font-size: large
} }
.home-bar{ .home-bar{
......
...@@ -9,28 +9,25 @@ ...@@ -9,28 +9,25 @@
<ion-content color='light' style="height: 100%; padding-top: 30px;"> <ion-content color='light' style="height: 100%; padding-top: 30px;">
<div style="padding-top: 10px"> <div style="padding-top: 10px">
<h1 class="subTittle">牛舍热应激状态</h1> <span [ngClass]="{'perfect': analResult === '优','good': analResult === '良','bad': analResult === '差'}" margin-start="10px;">{{analResult}}</span> <h1 class="subTittle">牛舍热应激状态</h1>
<div style="width:100%; padding: 10px">
<img [src]="'../../assets/img/level-best.png'" style="width:50px !important">
</div>
<h1 class="subTittle">近8个小时环境参数曲线</h1> <h1 class="subTittle">近8个小时环境参数曲线</h1>
<div echarts [options]="chartOption" class="demo-chart"></div> <div echarts [options]="chartOption" class="demo-chart"></div>
<h1 class="subTittle">近8个小时环境参数表</h1> <h1 class="subTittle">近8个小时环境参数表</h1>
<div> <div style="width: 98%">
<ngx-datatable class='material' [rows]="rows" [columnMode]="'force'" [scrollbarH]="true" [scrollbarV]="true" style="white-space: nowrap; text-align: center"> <ngx-datatable class="material" [rows]="rows" [columnMode]="'force'" [scrollbarH]="true" [scrollbarV]="true" style="white-space: nowrap; text-align: center; font-size:14px">
<ngx-datatable-column name="时间" prop="time" width="100"> <ngx-datatable-column name="时间" prop="time" width="80">
</ngx-datatable-column> </ngx-datatable-column>
<ngx-datatable-column name="热应激" prop="thi" width="60"> <ngx-datatable-column name="热应激" prop="thi" width="60">
</ngx-datatable-column> </ngx-datatable-column>
<ngx-datatable-column name="温度" prop="temp" width="80"> <ngx-datatable-column name="温度" prop="temp" width="60">
</ngx-datatable-column>
<ngx-datatable-column name="湿度" prop="humi" width="80">
</ngx-datatable-column>
<ngx-datatable-column name="光照" prop="AA" width="80">
</ngx-datatable-column>
<ngx-datatable-column name="风机" prop="BB" width="80">
</ngx-datatable-column> </ngx-datatable-column>
<ngx-datatable-column name="喷淋" prop="CC" width="80"> <ngx-datatable-column name="湿度" prop="humi" width="60">
</ngx-datatable-column> </ngx-datatable-column>
<ngx-datatable-column name="照明" prop="DD" width="80"> <ngx-datatable-column name="氨气浓度" prop="NH3" width="80">
</ngx-datatable-column> </ngx-datatable-column>
</ngx-datatable> </ngx-datatable>
</div> </div>
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
.title { .title {
text-align: center; text-align: center;
padding-left: 0px; padding-left: 0px;
font-weight: lighter; //font-weight: lighter;
font-size: large //font-size: large
} }
.subTittle { .subTittle {
......
...@@ -14,12 +14,10 @@ export class EnvHistoryPage implements OnInit { ...@@ -14,12 +14,10 @@ export class EnvHistoryPage implements OnInit {
constructor(private api: Api, private ac: ActivatedRoute, private load: Load) { constructor(private api: Api, private ac: ActivatedRoute, private load: Load) {
} }
item = {fieldRegionNo: ''}; item: any = {};
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
// TODO 以下为假数据 待删除 // TODO 以下为假数据 待删除
analResult = '优';
chartOption = { chartOption = {
backgroundColor: '#F0F8FF', backgroundColor: '#F0F8FF',
visualMap: [ visualMap: [
...@@ -42,13 +40,13 @@ export class EnvHistoryPage implements OnInit { ...@@ -42,13 +40,13 @@ export class EnvHistoryPage implements OnInit {
// 时间 热应激 温度 湿度 光照 风机 喷淋 照明 // 时间 热应激 温度 湿度 光照 风机 喷淋 照明
rows = [ rows = [
{time: '17:00', thi: '轻', temp: '23.8', humi: '56', AA: '70', BB: '55%', CC: 'O', DD: 'X'}, {time: '17:00', thi: '轻', temp: '23.8', humi: '56', NH3: '70'},
{time: '17:30', thi: '中', temp: '27.2', humi: '43', AA: '80', BB: '55%', CC: 'X', DD: 'O'}, {time: '17:30', thi: '中', temp: '27.2', humi: '43', NH3: '80'},
{time: '18:00', thi: '轻', temp: '23.2', humi: '61', AA: '99', BB: '55%', CC: 'O', DD: 'X'}, {time: '18:00', thi: '轻', temp: '23.2', humi: '61', NH3: '99'},
{time: '18:30', thi: '轻', temp: '23.1', humi: '47', AA: '100', BB: '55%', CC: 'X', DD: 'O'}, {time: '18:30', thi: '轻', temp: '23.1', humi: '47', NH3: '100'},
{time: '19:00', thi: '轻', temp: '20.2', humi: '43', AA: '60', BB: '55%', CC: 'O', DD: 'X'}, {time: '19:00', thi: '轻', temp: '20.2', humi: '43', NH3: '60'},
{time: '19:30', thi: '轻', temp: '21.6', humi: '34', AA: '50', BB: '55%', CC: 'O', DD: 'X'}, {time: '19:30', thi: '轻', temp: '21.6', humi: '34', NH3: '50'},
{time: '20:00', thi: '轻', temp: '22.5', humi: '43', AA: '40', BB: '55%', CC: 'X', DD: 'O'}, {time: '20:00', thi: '轻', temp: '22.5', humi: '43', NH3: '40'},
]; ];
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
...@@ -72,7 +70,8 @@ export class EnvHistoryPage implements OnInit { ...@@ -72,7 +70,8 @@ export class EnvHistoryPage implements OnInit {
this.load.toLoad('加载中...', false); this.load.toLoad('加载中...', false);
} }
this.api.cowshedApp.getRealDataByFieldRegionNo([{'fieldRegionNo': this.item.fieldRegionNo}, (data) => { this.api.cowshedApp.getRealDataByFieldRegionNo([{'fieldRegionNo': this.item.fieldRegionNo}, (data) => {
// TODO 测试用假数据
data.fieldRegionName = '1号牛舍';
if (data) { if (data) {
this.item = data; this.item = data;
} }
......
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