Commit 609b6878 authored by yating.lin's avatar yating.lin

页面微调

parent 57df9b6b
......@@ -105,4 +105,4 @@
"ios"
]
}
}
}
\ No newline at end of file
......@@ -41,7 +41,7 @@
</div>
<h1 class="main-title">牛舍列表</h1>
<ion-list *ngIf="items.length > 0" mode="md" class="list-view" insert = "false" line="none">
<ion-item *ngFor="let item of items" (click)="toControl(item)" class="ion-item" style="width: 100%; --padding-start: 0px">
<ion-item *ngFor="let item of items" (click)="toControl(item)" class="ion-item" style="width: 98%; --padding-start: 0px">
<div class="item">
<div class="top">
<div style="float:left;padding-top:3px;">
......@@ -56,10 +56,10 @@
</div>
<div class="content font-content">
<div class="detailInfo" style="width: 40%">热应激: &nbsp;<span class="warmColor{{item.heatStressLevel}}">{{item.heatStressLevelName}}</span></div>
<div *ngIf="item.NH3 !== '--'" class="detailInfo" style="width: 40%">氨气: &nbsp;<span class="{{item.NH3Color}}Color">{{item.NH3 | number:'0.0-2'}}ppm</span></div>
<div *ngIf="item.NH3 === '--'" class="detailInfo" style="width: 40%">氨气: &nbsp;{{'--'}}ppm</div>
<div *ngIf="item.temp !== '--'" class="detailInfo" style="width: 40%">温度: &nbsp;<span class="{{item.tempColor}}Color">{{item.temp | number:'0.1-1'}}℃</span></div>
<div *ngIf="item.temp === '--'" class="detailInfo" style="width: 40%">温度: &nbsp;{{'--'}}℃</div>
<div *ngIf="item.NH3 !== '--'" class="detailInfo" style="width: 40%">氨气: &nbsp;<span class="{{item.NH3Color}}Color">{{item.NH3 | number:'0.0-2'}} ppm</span></div>
<div *ngIf="item.NH3 === '--'" class="detailInfo" style="width: 40%">氨气: &nbsp;{{'--'}} ppm</div>
<div *ngIf="item.temp !== '--'" class="detailInfo" style="width: 40%">温度: &nbsp;<span class="{{item.tempColor}}Color">{{item.temp | number:'0.1-1'}} </span></div>
<div *ngIf="item.temp === '--'" class="detailInfo" style="width: 40%">温度: &nbsp;{{'--'}} </div>
<div *ngIf="item.humi !== '--'" class="detailInfo" style="width: 40%">湿度: &nbsp;<span class="{{item.humiColor}}Color">{{item.humi | number:'0.1-1'}}% RH</span></div>
<div *ngIf="item.humi === '--'" class="detailInfo" style="width: 40%">湿度: &nbsp;{{'--'}}% RH</div>
</div>
......
......@@ -130,11 +130,20 @@
}
.list-view {
width:96%;
margin-left: 2%;
padding-bottom: 0px;
width: 94%;
margin: auto;
padding: 5px;
border-radius: 5px;
}
.ion-item {
margin-top: 5px;
margin-bottom: 5px;
background-color: #ffffff;
display: block;
width: calc(100%);
}
//.searchbar-input-container {
// height: 25px;
// contain: strict;
......
......@@ -120,12 +120,13 @@ export class EnvShowerPage implements OnInit {
}
init() {
this.route.paramMap.subscribe(params => {
this.fieldRegionNo = params.get('fieldRegionNo');
this.operationModel = +params.get('operationModel');
this.online = +params.get('online');
this.getData(0);
});
// this.route.paramMap.subscribe(params => {
// this.fieldRegionNo = params.get('fieldRegionNo');
// this.operationModel = +params.get('operationModel');
// this.online = +params.get('online');
// this.getData(0);
// });
this.getData(0);
}
getData(time) {
......
......@@ -5,7 +5,6 @@ import {Load} from '../service/load';
import {ActivatedRoute} from '@angular/router';
import {flyIn} from '../animations/flyIn';
import {AlertController} from '@ionic/angular';
import {debug} from 'util';
@Component({
selector: 'v-other',
......@@ -90,7 +89,8 @@ export class OtherPage implements OnInit {
unlock() {
const opt = {fieldDeviceNo : this.alarmMsg.DeviceNo ,
const opt = {
fieldDeviceNo : this.alarmMsg.DeviceNo ,
op : 0 ,
startTime: parseInt((new Date().getTime() / 1000).toString(), 10),
ts: parseInt((new Date().getTime() / 1000).toString(), 10)
......@@ -112,14 +112,14 @@ export class OtherPage implements OnInit {
return;
}
const opt = {fieldDeviceNo : this.workModeSetting.DeviceNo ,
const opt = {
fieldDeviceNo : this.workModeSetting.DeviceNo ,
op : this.workModeSetting.workMode ,
startTime: parseInt((new Date().getTime() / 1000).toString(), 10),
ts: parseInt((new Date().getTime() / 1000).toString(), 10)
};
opt.startTime = opt.ts;
this.api.control.controlSwitch([opt, (data) => {
if (data && data.code === 1) {
this.getData(1);
......
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