Commit e72170b8 authored by zhuangzhuang's avatar zhuangzhuang

牛舍首页: 下拉刷新 平控改成远控 layout微调

牛舍详情页: layout微调
牛舍配置页: picker选值范围修改
parent 5873d4b8
......@@ -869,6 +869,21 @@
"@types/cordova": "^0.0.34"
}
},
"@ionic-native/network": {
"version": "5.16.0",
"resolved": "https://registry.npm.taobao.org/@ionic-native/network/download/@ionic-native/network-5.16.0.tgz",
"integrity": "sha1-gZZvPBwzDDuLIpZs/B7W1fVgWqQ=",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npm.taobao.org/@types/cordova/download/@types/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/splash-screen": {
"version": "5.4.0",
"resolved": "http://registry.npm.taobao.org/@ionic-native/splash-screen/download/@ionic-native/splash-screen-5.4.0.tgz",
......@@ -3380,6 +3395,11 @@
"resolved": "https://registry.npm.taobao.org/cordova-plugin-local-notification/download/cordova-plugin-local-notification-0.9.0-beta.2.tgz",
"integrity": "sha1-46C0o10R+Vu08eNn2brumQnMppU="
},
"cordova-plugin-network-information": {
"version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/cordova-plugin-network-information/download/cordova-plugin-network-information-2.0.2.tgz",
"integrity": "sha1-9IqSy9fMy2PLCl5aAAMAAbisT+o="
},
"cordova-plugin-screen-orientation": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-screen-orientation/-/cordova-plugin-screen-orientation-3.0.1.tgz",
......@@ -4781,8 +4801,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
......@@ -4803,14 +4822,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -4825,20 +4842,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -4955,8 +4969,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
......@@ -4968,7 +4981,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -4983,7 +4995,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -4991,14 +5002,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -5017,7 +5026,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -5098,8 +5106,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -5111,7 +5118,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -5197,8 +5203,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -5234,7 +5239,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -5254,7 +5258,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -5298,14 +5301,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......
......@@ -25,6 +25,7 @@
"@ionic-native/app-minimize": "^5.5.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/local-notifications": "^5.8.0",
"@ionic-native/network": "^5.16.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.6.2",
......@@ -37,6 +38,7 @@
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^4.1.0",
"cordova-plugin-local-notification": "0.9.0-beta.2",
"cordova-plugin-network-information": "^2.0.2",
"cordova-plugin-screen-orientation": "^3.0.1",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
......@@ -91,11 +93,12 @@
"cordova-plugin-local-notification": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
}
},
"cordova-plugin-network-information": {}
},
"platforms": [
"android",
"ios"
]
}
}
\ No newline at end of file
}
......@@ -21,6 +21,7 @@ import {SearchHistoryComponent} from './components/search-history/search-history
import {RefreshComponent} from './components/refresh/refresh.component';
import {AppMinimize} from '@ionic-native/app-minimize/ngx';
import { Network } from '@ionic-native/network/ngx';
import {HomePage} from './home/home.page';
import {EastPage} from './east/east.page';
......@@ -116,6 +117,7 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
Mqtt,
Transfer,
Load,
Network
],
bootstrap: [AppComponent]
})
......
......@@ -26,14 +26,14 @@
<ion-col>
<ion-item class="fanItem">
<ion-label position="fixed">偏差温度</ion-label>
<ion-input [(ngModel)]="curCowshed.propertyConfig.toft" (ionBlur)="updateCowshed()"></ion-input>
<ion-input [(ngModel)]="curCowshed.propertyConfig.toft" (ionFocus)="tempHaveFouch()" (ionBlur)="updateCowshed()"></ion-input>
<ion-label position="fixed"></ion-label>
</ion-item>
</ion-col>
<ion-col>
<ion-item class="fanItem">
<ion-label position="fixed">偏差湿度</ion-label>
<ion-input [(ngModel)]="curCowshed.propertyConfig.hoft" (ionBlur)="updateCowshed()"></ion-input>
<ion-input [(ngModel)]="curCowshed.propertyConfig.hoft" (ionFocus)="humHaveFouch()" (ionBlur)="updateCowshed()"></ion-input>
<ion-label position="fixed">%</ion-label>
</ion-item>
</ion-col>
......
......@@ -231,7 +231,15 @@ export class EnvCfgPage implements OnInit {
console.log('fanTempHaveFouch');
if (this.fanMode.selecting === false) {
this.fanMode.selecting = true;
this.openPicker();
this.openPicker(10, 50);
}
}
humHaveFouch() {
console.log('fanTempHaveFouch');
if (this.fanMode.selecting === false) {
this.fanMode.selecting = true;
this.openPicker(0, 100);
}
}
......
<ion-header>
<ion-toolbar color="secondary">
<ion-buttons slot="start">
<ion-back-button text="" ></ion-back-button>
</ion-buttons>
<ion-title mode="ios" class="title">{{item.fieldRegionName}}详情</ion-title>
<ion-buttons slot="end">
<ion-button style="font-size: medium" (click)="toHistory(item)">历史</ion-button>
</ion-buttons>
</ion-toolbar>
<div class="top">
<span [ngClass]="{'online': item.online, 'offline': !item.online}">{{item.online ? '在线' : '离线'}} </span>
<span *ngIf="item.operationModel" class="online">{{item.operationModel ? '平控' :'现控'}} </span>
<span *ngIf="item.operationModel" [ngClass]="{'online': item.isWisdomModel, 'offline': !item.isWisdomModel}" class="online">智控 </span>
<span *ngIf="item.ts" class="right">{{item.ts | date: 'yyyy-MM-dd HH:mm'}}</span>
</div>
<div style="background-color: #F0F0F0;" align="center">
<v-kanban class="home-bar" name="温度" [inData]="item.temp" iconClass="vo v-wendu" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
<v-kanban class="home-bar" name="湿度" [inData]="item.humi" iconClass="vo v-shidu" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
<v-kanban class="home-bar" name="热应激" [inData]="item.heatStressLevelName" iconClass="vo v-nav-ico" [iconColor]="item.heatStressColor" iconSize="20px" fontSize="14px"></v-kanban>
<v-kanban class="home-bar" name="在舍状态" [inData]="item.inHouse" iconClass="vo v-dapeng-" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
</div>
<div style="background-color: #F0F0F0; height: 30px; padding-right: 10px; padding-top: 5px;">
<ion-label style="margin-left:15px; height: 30px; vertical-align: middle;">在离舍开关控制</ion-label>
<v-switch (click)="setInHouse(item.inHouse)" [value]="item.inHouse" [loading]="loading"></v-switch>
</div>
<ion-toolbar color="secondary">
<ion-buttons slot="start">
<ion-back-button text="" ></ion-back-button>
</ion-buttons>
<ion-title mode="ios" class="title">{{item.fieldRegionName}}详情</ion-title>
<ion-buttons slot="end">
<ion-button style="font-size: medium" (click)="toHistory(item)">历史</ion-button>
</ion-buttons>
</ion-toolbar>
<div class="top">
<span [ngClass]="{'online': item.online, 'offline': !item.online}">{{item.online ? '在线' : '离线'}} </span>
<span *ngIf="item.operationModel" class="online">{{item.operationModel ? '平控' :'现控'}} </span>
<span *ngIf="item.operationModel" [ngClass]="{'online': item.isWisdomModel, 'offline': !item.isWisdomModel}" class="online">智控 </span>
<span *ngIf="item.ts" class="right">{{item.ts | date: 'yyyy-MM-dd HH:mm'}}</span>
</div>
<div style="background-color: #F0F0F0;" align="center">
<v-kanban class="home-bar" name="温度" [inData]="item.temp" iconClass="vo v-wendu" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
<v-kanban class="home-bar" name="湿度" [inData]="item.humi" iconClass="vo v-shidu" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
<v-kanban class="home-bar" name="热应激" [inData]="item.heatStressLevelName" iconClass="vo v-nav-ico" [iconColor]="item.heatStressColor" iconSize="20px" fontSize="14px"></v-kanban>
<v-kanban class="home-bar" name="在舍状态" [inData]="item.inHouse" iconClass="vo v-dapeng-" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
</div>
<div style="background-color: #F0F0F0; height: 30px; padding-right: 10px; padding-top: 5px;">
<ion-label style="margin-left:15px; height: 30px; vertical-align: middle;">在离舍开关控制</ion-label>
<v-switch (click)="setInHouse(item.inHouse)" [value]="item.inHouse" [loading]="loading"></v-switch>
</div>
</ion-header>
<ion-content style="background-color: #F3F4F4;">
<!--<ion-router-outlet></ion-router-outlet>-->
<ion-tabs>
<ion-tab-bar slot="top">
<ion-tab-button tab="fan">
<ion-label>风机</ion-label>
</ion-tab-button>
<ion-tab-button tab="shower" [routerLink]="showerLink"> <!--[rootParams]="fieldRegionNo"-->
<ion-label>喷淋</ion-label>
</ion-tab-button>
<ion-tab-button tab="light" [routerLink]="lightLink">
<ion-label>照明</ion-label>
</ion-tab-button>
<ion-tab-button tab="waterchannel" [routerLink]="waterchannelLink">
<ion-label>水槽</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
<ion-tabs>
<ion-tab-bar slot="top">
<ion-tab-button tab="fan" class="tabSelected">
<ion-label>风机</ion-label>
</ion-tab-button>
<ion-tab-button tab="shower" class="tabSelected" [routerLink]="showerLink"> <!--[rootParams]="fieldRegionNo"-->
<ion-label>喷淋</ion-label>
</ion-tab-button>
<ion-tab-button tab="light" class="tabSelected" [routerLink]="lightLink">
<ion-label>照明</ion-label>
</ion-tab-button>
<ion-tab-button tab="waterchannel" class="tabSelected" [routerLink]="waterchannelLink">
<ion-label>水槽</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-content>
......@@ -55,3 +55,8 @@
.warmColor4 {
color: #b22222;
}
.tabSelected {
// --background-focused: #62C7CC;
--color-selected: #62C7CC;
// --background: #62C7CC;
}
......@@ -44,15 +44,14 @@ export class EnvDetailPage implements OnInit {
this.comm.remain = 0;
this.ac.queryParams.subscribe((data) => {
this.fieldRegionNo = data.no;
this.showerLink = '/env-detail/shower/' + this.fieldRegionNo;
this.lightLink = '/env-detail/light/' + this.fieldRegionNo;
this.waterchannelLink = '/env-detail/waterchannel/' + this.fieldRegionNo;
});
this.getData(0);
}
initLayout() {
this.showerLink = '/env-detail/shower/' + this.fieldRegionNo;
this.lightLink = '/env-detail/light/' + this.fieldRegionNo;
this.waterchannelLink = '/env-detail/waterchannel/' + this.fieldRegionNo;
if (this.item && this.item.heatStressLevel && this.item.heatStressLevel !== '') {
this.item.heatStressColor = this.item.heatStressLevel === '0' ? '#71fa1d' :
this.item.heatStressLevel === '1' ? '#71fa1d' :
......@@ -138,7 +137,14 @@ export class EnvDetailPage implements OnInit {
setInHouse() {
this.loading = true;
// TODO
// TODO 在离舍开关控制
this.loading = false;
}
// doRefresh(event) {
// setTimeout(() => {
// this.getData(0);
// event.target.complete();
// }, 2000);
// }
}
......@@ -27,6 +27,9 @@
</ion-header>
<ion-content color='light'>
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
<h1 style="
font-size: 16px;
padding-left: 5px;
......@@ -34,9 +37,9 @@
line-height: 25px;
margin-bottom: 5px;">故障统计</h1>
<div style="margin-left:1%">
<v-kanban class="home-bar" name="热应激" [inData]="thiGood" iconClass="vo v-youxuan" iconColor="#3e9058" iconSize="30px"></v-kanban>
<v-kanban class="home-bar" name="热应激" [inData]="thiBad" iconClass="vo v-yujing" iconColor="#FAB139" iconSize="30px"></v-kanban>
<v-kanban class="home-bar" name="故障总数" [inData]="alarmTotal" iconClass="vo v-guzhang2" iconColor="#B23706" iconSize="30px"></v-kanban>
<v-kanban class="home-bar" name="热应激" [inData]="thiGood" iconClass="vo v-youxuan" iconColor="#3e9058" iconSize="25px" fontSize="25px"></v-kanban>
<v-kanban class="home-bar" name="热应激" [inData]="thiBad" iconClass="vo v-yujing" iconColor="#FAB139" iconSize="25px" fontSize="25px"></v-kanban>
<v-kanban class="home-bar" name="故障总数" [inData]="alarmTotal" iconClass="vo v-guzhang2" iconColor="#B23706" iconSize="25px" fontSize="25px"></v-kanban>
</div>
<h1 style="
font-size: 16px;
......@@ -57,7 +60,7 @@
</div>
<div class="bottom">
<span [ngClass]="{'online': item.online, 'offline': !item.online}">{{item.online ? '在线' : '离线'}} </span>
<span *ngIf="item.operationModel" class="online">{{item.operationModel ? '控' :'现控'}} </span>
<span *ngIf="item.operationModel" class="online">{{item.operationModel ? '控' :'现控'}} </span>
<span *ngIf="item.operationModel" [ngClass]="{'online': item.isWisdomModel, 'offline': !item.isWisdomModel}" class="online">智控 </span>
<span *ngIf="item.ts" class="right">{{item.ts | date: 'yyyy-MM-dd HH:mm'}}</span>
</div>
......
This diff is collapsed.
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