Commit 70180495 authored by frank's avatar frank 🏀

release

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