Commit 70180495 authored by frank's avatar frank 🏀

release

parent 1e2662a0
......@@ -15,6 +15,7 @@ import {EnvShowerPage} from './envCtrl/env-shower/env-shower.page';
import {EnvLightPageModule} from './envCtrl/env-light/env-light.module';
import {EnvLightPage} from './envCtrl/env-light/env-light.page';
import {EnvWaterchannelPage} from './envCtrl/env-waterchannel/env-waterchannel.page';
import {EnvAnalPage} from './envCtrl/env-anal/env-anal.page';
const routes: Routes = [
{
......@@ -32,18 +33,18 @@ const routes: Routes = [
]
},
{path: 'login', component: LoginPage},
{path: 'env-detail',
component: EnvDetailPage,
children: [
{path:'fan', component: EnvFanPage},
{path:'shower', component: EnvShowerPage},
{path:'light', component: EnvLightPage},
{path:'waterchannel', component: EnvWaterchannelPage},
{path: '', redirectTo: 'fan',pathMatch:'prefix'},
]
},
{path: 'tabs', loadChildren: './envCtrl/tabs/tabs.module#TabsPageModule'},
// {path: 'd', component: EnvFanPage},
// {path: 'env-detail',
// component: EnvDetailPage,
// children: [
// {path:'fan', component: EnvFanPage},
// {path:'shower', component: EnvShowerPage},
// {path:'light', component: EnvLightPage},
// {path:'waterchannel', component: EnvWaterchannelPage},
// {path: '', redirectTo: 'fan',pathMatch:'prefix'},
// ]
// },
// {path: 'tabs', loadChildren: './envCtrl/tabs/tabs.module#TabsPageModule'},
// {path: 'd', component: EnvAnalPage},
];
@NgModule({
......
......@@ -75,6 +75,7 @@ import {EnvLightPage} from './envCtrl/env-light/env-light.page';
EnvShowerPage,
EnvLightPage,
EnvWaterchannelPage,
EnvAnalPage,
],
entryComponents: [],
imports: [
......
<ion-header>
<ion-toolbar>
<ion-title>envAnal</ion-title>
<ion-title>牛舍环境质量分析</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-content color='light' style="height: 100%">
<ion-item lines="full">
<ion-label>请选择牛舍</ion-label>
<ion-select multiple="false" cancelText="取消" okText="确认" (ionChange)="selFarmEvent()">
<ion-select-option *ngFor="let a of cowFarm" value="a.value">{{a.name}}</ion-select-option>
</ion-select>
</ion-item>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">分析结果</h1> <span [ngClass]="{'perfect': analResult === '优','good': analResult === '良','bad': analResult === '差'}">{{analResult}}</span>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">近8个小时环境参数曲线</h1>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">近8个小时环境参数表</h1>
</ion-content>
.perfect{
width: 30px;
height: 30px;
background-color:green;
border-radius: 17%;
-moz-border-radius: 17%;
-webkit-border-radius: 17%;
font-size: 25px;
color:white;
}
.good {
width: 30px;
height: 30px;
background-color:yellow;
border-radius: 17%;
-moz-border-radius: 17%;
-webkit-border-radius: 17%;
font-size: 25px;
color:white;
}
.bad {
width: 30px;
height: 30px;
background-color:red;
border-radius: 17%;
-moz-border-radius: 17%;
-webkit-border-radius: 17%;
font-size: 25px;
color:white;
}
\ No newline at end of file
......@@ -7,9 +7,25 @@ import { Component, OnInit } from '@angular/core';
})
export class EnvAnalPage implements OnInit {
cowFarm :[{
name : '1号牛舍',
value : '1';
},{
name : '2号牛舍',
value : '2';
}];
analResult = '优';
constructor() { }
ngOnInit() {
}
selFarmEvent(){
}
}
......@@ -3,11 +3,14 @@
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title>1号牛舍设备详情</ion-title>
<ion-title style="text-align: center">{{fieldRegionName}}详情页</ion-title>
</ion-toolbar>
<div style="margin-top: 10px;margin-bottom: 10px">
<span style="font-size: 20px">{{item.online ? '在线' : '离线'}}</span>
<div class="right">{{item.time | date: 'yyyy-MM-dd HH:mm:ss'}}</div>
<span [ngClass]="{'online': item.online, 'offline': !item.online}">{{item.online ? '在线' : '离线'}} </span>
<span *ngIf="item.online" class="online">{{item.remoteMode ? '平控' :'现控'}} </span>
<span *ngIf="item.online && item.remoteMode && item.wokeMode === 2" class="online">智控 </span>
<span *ngIf="item.online && item.remoteMode && item.wokeMode === 1" class="online">自控 </span>
<span *ngIf="item.online && item.remoteMode && item.wokeMode === 0" class="online">手控 </span>
</div>
<div>
<v-kanban class="home-bar"></v-kanban>
......
......@@ -8,3 +8,24 @@
margin-right: 3px;
width: 23%;
}
.online {
border-radius: 2px;
background-color: #199ED8;
display: inline-block;
vertical-align: middle;
box-shadow: #ccc 0.5px 0.5px 3px;
padding: 1px 1px 1px 1px;
color: white;
margin-left: 5px;
}
.offline {
border-radius: 17px;
background-color: #9ea7b4;
display: inline-block;
vertical-align: middle;
box-shadow: #ccc 0.5px 0.5px 3px;
padding: 1px 1px 1px 1px;
color: white;
}
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import {Api} from '../../service/api';
import {NavController} from '@ionic/angular';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'v-env-detail',
......@@ -9,7 +10,7 @@ import {NavController} from '@ionic/angular';
})
export class EnvDetailPage implements OnInit {
constructor(private api: Api,public nav: NavController,) { }
constructor(private api: Api,public nav: NavController,private ac: ActivatedRoute,) { }
item = {
name : '1号牛舍',
......@@ -18,11 +19,36 @@ export class EnvDetailPage implements OnInit {
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
};
fieldRegionNo = '';
fieldRegionName = '';
fieldRegionGroup = '';
// 发送指令延时判断
comm = {
remain : 20,
isLoading : true
};
ngOnInit() {
console.log('+ogOnInit');
this.comm.isLoading = false;
this.comm.remain = 0;
this.ac.queryParams.subscribe((data) => {
console.log(data);
if(data.no)
{
this.fieldRegionNo = data.no;
this.fieldRegionName = data.name;
this.fieldRegionGroup = data.group;
}
});
console.log('-ogOnInit');
}
}
......@@ -31,27 +31,24 @@
<ion-list mode="md" class="listview" insert = "false" line="none" style="width:96%;margin-left: 2%">
<ion-item *ngFor="let item of items" (click)="toControl(item)" class="ion-item" style="width: 100%; --padding-start: 0px">
<div class="item">
<div class="top">{{item.name}}
<!--<div class="right">{{item.time | date: 'yyyy-MM-dd HH:mm:ss'}}</div>-->
<ion-icon class="right" name="ios-heart"></ion-icon>
<div class="top">
<i class="vo v-tixing"></i> {{item.name}}
</div>
<div class="content">
<!--<div class="left">-->
<!--<img [src]="'../../assets/img/' + item.img">-->
<!--</div>-->
<!--<div class="rightCon">-->
<span style="font-size: 20px">{{item.online ? '在线' : '离线'}}</span>
<span class="block2" *ngIf="item.temp">温度: &nbsp;&nbsp;{{item.temp}} ℃ </span>
<span class="block1" *ngIf="item.humi">湿度: &nbsp;&nbsp;{{item.humi}} % </span>
<span class="block1" *ngIf="item.thi">热应激等级: &nbsp;&nbsp;{{item.thi}}</span>
</div>
<div class="bottom">
<span [ngClass]="{'online': item.online, 'offline': !item.online}">{{item.online ? '在线' : '离线'}} </span>
<span *ngIf="item.online" class="online">{{item.remoteMode ? '平控' :'现控'}} </span>
<span *ngIf="item.online && item.remoteMode && item.wokeMode === 2" class="online">智控 </span>
<span *ngIf="item.online && item.remoteMode && item.wokeMode === 1" class="online">自控 </span>
<span *ngIf="item.online && item.remoteMode && item.wokeMode === 0" class="online">手控 </span>
<!--<div class="block1" *ngIf="item.yewei || item.yewei === 0">池体液位: &nbsp;&nbsp;{{item.yewei}} m</div>-->
<!--<div class="block2" *ngIf="item.temp || item.temp === 0">液体温度: &nbsp;&nbsp;{{item.temp}} ℃</div>-->
<!--<div class="block2">运行状态: &nbsp;&nbsp;{{item.state ? '工作中' : '未运行'}} </div>-->
<div class="right">{{item.time | date: 'yyyy-MM-dd HH:mm:ss'}}</div>
<!--</div>-->
</div>
<div class="bottom">
<!--<div [ngClass]="{'sucCir': item.state, 'errCir': !item.state}"></div>&nbsp;-->
<!--<span style="font-size: 13px">{{item.online ? '在线' : '离线'}}</span>-->
<span class="block2" *ngIf="item.temp || item.temp === 0">温度: &nbsp;&nbsp;{{item.temp}} ℃</span>
<span class="block1" *ngIf="item.humi || item.humi === 0">湿度: &nbsp;&nbsp;{{item.humi}} %</span>
<span class="right">{{item.time | date: 'yyyy-MM-dd HH:mm:ss'}}</span>
</div>
</div>
</ion-item>
......
......@@ -13,12 +13,18 @@
}
.top {
line-height: 20px;
line-height: 25px;
//border-bottom: 1px solid #cccc;
padding-bottom: 5px;
font-size: 15px;
font-size: 22px;
display: block;
width: 100%;
i.vo.v-tixing{
float: right;
font-size:25px;
color: #B22222;
}
}
.rightCon {
......@@ -31,11 +37,6 @@
font-size: 12px;
}
.right {
float: right;
color: #ffd31a;
}
.bottom {
//border-top: 1px solid #ccc;
padding: 3px;
......@@ -45,3 +46,30 @@
.content{
margin-top: 10px;
}
.online {
border-radius: 2px;
background-color: #199ED8;
display: inline-block;
vertical-align: middle;
box-shadow: #ccc 0.5px 0.5px 3px;
padding: 1px 1px 1px 1px;
color: white;
margin-left: 5px;
}
.offline {
border-radius: 17px;
background-color: #9ea7b4;
display: inline-block;
vertical-align: middle;
box-shadow: #ccc 0.5px 0.5px 3px;
padding: 1px 1px 1px 1px;
color: white;
}
.right {
float: right;
color: #aaa;
}
......@@ -28,6 +28,13 @@ export class EnvHomePage implements OnInit {
zoom: false
};
farmMsg = {
temp : 28.6,
humi : 32.1,
thi : '中',
hasCow : true,
}
items = [
{
name : '1号牛舍',
......@@ -36,66 +43,80 @@ export class EnvHomePage implements OnInit {
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
},
{
name : '2号牛舍',
name : '3号牛舍',
temp : '23.5',
humi : '82',
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
},
{
name : '2号牛舍',
name : '4号牛舍',
temp : '23.5',
humi : '82',
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
},
{
name : '2号牛舍',
name : '5号牛舍',
temp : '23.5',
humi : '82',
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
},
{
name : '2号牛舍',
name : '6号牛舍',
temp : '23.5',
humi : '82',
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
},
{
name : '2号牛舍',
name : '7号牛舍',
temp : '23.5',
humi : '82',
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
},
{
name : '2号牛舍',
name : '8号牛舍',
temp : '23.5',
humi : '82',
thi: '轻',
time : '2019-08-05 23:44',
online : true,
remoteMode: true, //true 平控 false 现控
wokeMode: 1, //0 手控 1 自控 2 智控
ctrl: 0,
alarm: true,
},
......
......@@ -12,8 +12,8 @@
<div class="mainContent">
<div class="contentPart">
<div class="leftOnPart" (click)="goTo('home')"></div>
<!--<div class="rightOnPart " (click)="goTo('row')"></div>-->
<div class="rightOnPart " (click)="goTo('tabs/tab-home')"></div>
<div class="rightOnPart " (click)="goTo('row')"></div>
<!--<div class="rightOnPart " (click)="goTo('tabs/tab-home')"></div>-->
<div class="leftUnderPart" (click)="goTo('alarm')"></div>
<div class="rightUnderPart" (click)="goTo('mine')"></div>
</div>
......
......@@ -34,7 +34,7 @@
<div Button class="button" (click)="loginOut()" [type]="'primary'" style="letter-spacing: 2px">退出登录</div>
</div>
<div style="position: fixed;bottom: 20px;display: inline-block;width: 100%;text-align: center;color: #666666;font-size: 14px;">
版本信息: v2.7.1
版本信息: v2.8.1
</div>
</div>
......
......@@ -26,9 +26,10 @@ export class OtherPage implements OnInit {
devices = [];
fieldRegionNo = '';
fieldRegionName = '';
fieldRegionGroup = '';
types = [];
allBtns = [];
fieldRegionGroup = '';
// 发送指令延时判断
comm = {
......
This diff is collapsed.
This diff is collapsed.
......@@ -15,6 +15,7 @@ export const environment = {
url: 'http://pasture.witium.com/api', // 对外访问测试网地址
// url: 'http://172.16.1.13:8096', // 测试
mqttUrl: '120.27.235.39'
// mqttUrl: '120.27.235.31'
};
/*
......
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