Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
muChangApp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
muChangApp
Commits
5873d4b8
Commit
5873d4b8
authored
Oct 29, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
牛舍详情页:追加 在离舍开关
牛舍配置页:着手修改
parent
4f6df0b8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
99 additions
and
63 deletions
+99
-63
app-routing.module.ts
src/app/app-routing.module.ts
+12
-0
app.module.ts
src/app/app.module.ts
+2
-2
kanban.component.html
src/app/components/kanban/kanban.component.html
+4
-4
kanban.component.ts
src/app/components/kanban/kanban.component.ts
+3
-0
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+15
-15
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+4
-5
env-detail.page.html
src/app/envCtrl/env-detail/env-detail.page.html
+23
-28
env-detail.page.ts
src/app/envCtrl/env-detail/env-detail.page.ts
+36
-9
No files found.
src/app/app-routing.module.ts
View file @
5873d4b8
...
@@ -39,6 +39,17 @@ const routes: Routes = [
...
@@ -39,6 +39,17 @@ const routes: Routes = [
]
]
},
},
{
path
:
'login'
,
component
:
LoginPage
},
{
path
:
'login'
,
component
:
LoginPage
},
// {path: 'env-detail',
// component: EnvDetailPage,
// children: [
// {path: 'fan', component: EnvFanPage},
// {path: 'shower/:fieldRegionNo', component: EnvShowerPage},
// {path: 'light/:fieldRegionNo', component: EnvLightPage},
// {path: 'waterchannel/:fieldRegionNo', component: EnvWaterchannelPage},
// {path: '', redirectTo: 'fan', pathMatch : 'prefix'},
// ]
// },
{
path
:
'env-detail'
,
{
path
:
'env-detail'
,
component
:
EnvDetailPage
,
component
:
EnvDetailPage
,
children
:
[
children
:
[
...
@@ -49,6 +60,7 @@ const routes: Routes = [
...
@@ -49,6 +60,7 @@ const routes: Routes = [
{
path
:
''
,
redirectTo
:
'fan'
,
pathMatch
:
'prefix'
},
{
path
:
''
,
redirectTo
:
'fan'
,
pathMatch
:
'prefix'
},
]
]
},
},
// { path: 'env-detail', loadChildren: './envCtrl/env-detail/env-detail.module#EnvDetailPageModule' },
// { path: 'env-detail', loadChildren: './envCtrl/env-detail/env-detail.module#EnvDetailPageModule' },
// {path: 'env-history', component: EnvHistoryPage},
// {path: 'env-history', component: EnvHistoryPage},
{
path
:
'env-history'
,
loadChildren
:
'./envCtrl/env-history/env-history.module#EnvHistoryPageModule'
},
{
path
:
'env-history'
,
loadChildren
:
'./envCtrl/env-history/env-history.module#EnvHistoryPageModule'
},
...
...
src/app/app.module.ts
View file @
5873d4b8
...
@@ -82,7 +82,7 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
...
@@ -82,7 +82,7 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
// EnvAnalPage,
// EnvAnalPage,
// EnvAlarmPage,
// EnvAlarmPage,
EnvAlarmDetailPage
,
EnvAlarmDetailPage
,
//EnvCfgPage,
//
EnvCfgPage,
// EnvHomePage,
// EnvHomePage,
],
],
entryComponents
:
[],
entryComponents
:
[],
...
@@ -115,7 +115,7 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
...
@@ -115,7 +115,7 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
Http
,
Http
,
Mqtt
,
Mqtt
,
Transfer
,
Transfer
,
Load
Load
,
],
],
bootstrap
:
[
AppComponent
]
bootstrap
:
[
AppComponent
]
})
})
...
...
src/app/components/kanban/kanban.component.html
View file @
5873d4b8
...
@@ -5,14 +5,14 @@
...
@@ -5,14 +5,14 @@
<div
class=
"sub"
style=
"text-align: center;margin-top: 15px;"
>
<div
class=
"sub"
style=
"text-align: center;margin-top: 15px;"
>
<!--<ion-icon name="ios-heart" style="padding: auto"></ion-icon>-->
<!--<ion-icon name="ios-heart" style="padding: auto"></ion-icon>-->
<ion-row>
<ion-row>
<ion-col>
<ion-col
style=
"padding-right: 0px;"
>
<i
ngClass=
{{iconClass}}
[
ngStyle
]="{'
color
'
:
iconColor
,
'
font-size
'
:
iconSize
}"
></i>
<i
ngClass=
{{iconClass}}
[
ngStyle
]="{'
color
'
:
iconColor
,
'
font-size
'
:
iconSize
}"
></i>
</ion-col>
</ion-col>
<ion-col
size=
"1"
style=
"width:1px"
>
<ion-col
size=
"1"
style=
"width:1px
; padding-left:0px; padding-right: 0px
"
>
<span
style=
"border-right: 1px solid #E0E0E0; font-size:13px;vertical-align: center"
></span>
<span
style=
"border-right: 1px solid #E0E0E0; font-size:13px;vertical-align: center"
></span>
</ion-col>
</ion-col>
<ion-col>
<ion-col
style=
"padding-left: 0px;"
>
<span
style=
"padding-bottom:
20px"
[
ngStyle
]="{'
color
'
:fontColor
,
'
font-size
'
:
icon
Size
}"
>
{{inData}}
</span>
<span
style=
"padding-bottom:
10px"
[
ngStyle
]="{'
color
'
:fontColor
,
'
font-size
'
:
font
Size
}"
>
{{inData}}
</span>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
</div>
</div>
...
...
src/app/components/kanban/kanban.component.ts
View file @
5873d4b8
...
@@ -25,6 +25,9 @@ export class KanbanComponent implements OnInit {
...
@@ -25,6 +25,9 @@ export class KanbanComponent implements OnInit {
@
Input
()
@
Input
()
inData
=
''
;
inData
=
''
;
@
Input
()
fontSize
=
''
;
constructor
()
{
}
constructor
()
{
}
ngOnInit
()
{
ngOnInit
()
{
...
...
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
5873d4b8
...
@@ -54,14 +54,14 @@
...
@@ -54,14 +54,14 @@
<ion-col>
<ion-col>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-label
position=
"fixed"
>
开启温度
</ion-label>
<ion-label
position=
"fixed"
>
开启温度
</ion-label>
<ion-input
(
ionFocus
)="
fanT
empHaveFouch
()"
[(
ngModel
)]="
fengJi
.
controlConfig
.
TU
"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
(
ionFocus
)="
t
empHaveFouch
()"
[(
ngModel
)]="
fengJi
.
controlConfig
.
TU
"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-label
position=
"fixed"
>
℃
</ion-label>
<ion-label
position=
"fixed"
>
℃
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col>
<ion-col>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-label
position=
"fixed"
>
关闭温度
</ion-label>
<ion-label
position=
"fixed"
>
关闭温度
</ion-label>
<ion-input
(
ionFocus
)="
fanT
empHaveFouch
()"
[(
ngModel
)]="
fengJi
.
controlConfig
.
TL
"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
(
ionFocus
)="
t
empHaveFouch
()"
[(
ngModel
)]="
fengJi
.
controlConfig
.
TL
"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-label
position=
"fixed"
>
℃
</ion-label>
<ion-label
position=
"fixed"
>
℃
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -88,13 +88,13 @@
...
@@ -88,13 +88,13 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
fanT
empHaveFouch
()"
style=
"width:80px;"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
t
empHaveFouch
()"
style=
"width:80px;"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
intverval
"
(
ionFocus
)="
fanT
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
intverval
"
(
ionFocus
)="
t
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -103,14 +103,14 @@
...
@@ -103,14 +103,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
T
"
(
ionFocus
)="
fanT
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
T
"
(
ionFocus
)="
t
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-label>
℃
</ion-label>
<ion-label>
℃
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<!-- <ion-col size="auto" style="font-size: 13px;">-->
<!-- <ion-col size="auto" style="font-size: 13px;">-->
<!-- <ion-item class="fanItem" lines="none">-->
<!-- <ion-item class="fanItem" lines="none">-->
<!-- <ion-label style="width:80px">偏差温度</ion-label>-->
<!-- <ion-label style="width:80px">偏差温度</ion-label>-->
<!-- <ion-input [(ngModel)]="penLinCfg.A" (ionFocus)="
fanT
empHaveFouch()" style="width:50px;"></ion-input>-->
<!-- <ion-input [(ngModel)]="penLinCfg.A" (ionFocus)="
t
empHaveFouch()" style="width:50px;"></ion-input>-->
<!-- </ion-item>-->
<!-- </ion-item>-->
<!-- </ion-col>-->
<!-- </ion-col>-->
</ion-row>
</ion-row>
...
@@ -118,14 +118,14 @@
...
@@ -118,14 +118,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
A区喷水时间
</ion-label>
<ion-label
style=
"width:80px"
>
A区喷水时间
</ion-label>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
A
"
(
ionFocus
)="
fanT
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
A
"
(
ionFocus
)="
t
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
B区喷水时间
</ion-label>
<ion-label
style=
"width:80px"
>
B区喷水时间
</ion-label>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
B
"
(
ionFocus
)="
fanT
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
B
"
(
ionFocus
)="
t
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
fanT
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
t
empHaveFouch
()"
(
ionBlur
)="
updateCowshed
()"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -164,14 +164,14 @@
...
@@ -164,14 +164,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="
fanT
empHaveFouch()" style="width:50px;"></ion-input>-->
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="
t
empHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
[(
ngModel
)]="
cfg
.
startDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
blur
)="
updateCowshed
()"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
cfg
.
startDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
blur
)="
updateCowshed
()"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
~
</ion-label>
<ion-label
style=
"width:80px"
>
~
</ion-label>
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="
fanT
empHaveFouch()" style="width:50px;"></ion-input>-->
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="
t
empHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
[(
ngModel
)]="
cfg
.
stopDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
blur
)="
updateCowshed
()"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
cfg
.
stopDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
blur
)="
updateCowshed
()"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -180,13 +180,13 @@
...
@@ -180,13 +180,13 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
开灯时间
</ion-label>
<ion-label
style=
"width:80px"
>
开灯时间
</ion-label>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
on
"
(
ionFocus
)="
fanT
empHaveFouch
()"
(
onBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
on
"
(
ionFocus
)="
t
empHaveFouch
()"
(
onBlur
)="
updateCowshed
()"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
关灯时间
</ion-label>
<ion-label
style=
"width:80px"
>
关灯时间
</ion-label>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
off
"
(
ionFocus
)="
fanT
empHaveFouch
()"
(
onBlur
)="
updateCowshed
()"
></ion-input>
<ion-input
style=
"width:50px;"
[(
ngModel
)]="
cfg
.
off
"
(
ionFocus
)="
t
empHaveFouch
()"
(
onBlur
)="
updateCowshed
()"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -212,14 +212,14 @@
...
@@ -212,14 +212,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="
fanT
empHaveFouch()" style="width:50px;"></ion-input>-->
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="
t
empHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
[(
ngModel
)]="
shuiCao
.
controlConfig
.
startDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
change
)="
updateCowshed
()"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
shuiCao
.
controlConfig
.
startDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
change
)="
updateCowshed
()"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
~
</ion-label>
<ion-label
style=
"width:80px"
>
~
</ion-label>
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="
fanT
empHaveFouch()" style="width:50px;"></ion-input>-->
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="
t
empHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
[(
ngModel
)]="
shuiCao
.
controlConfig
.
stopDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
change
)="
updateCowshed
()"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
shuiCao
.
controlConfig
.
stopDate
"
displayFormat=
"MM-DD"
class=
"timepicker"
(
change
)="
updateCowshed
()"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
5873d4b8
...
@@ -54,16 +54,16 @@ export class EnvCfgPage implements OnInit {
...
@@ -54,16 +54,16 @@ export class EnvCfgPage implements OnInit {
columns
:
this
.
getColumns
(
numColumns
,
numOptions
,
columnOptions
),
columns
:
this
.
getColumns
(
numColumns
,
numOptions
,
columnOptions
),
buttons
:
[
buttons
:
[
{
{
text
:
'
Cancel
'
,
text
:
'
取消
'
,
role
:
'cancel'
,
role
:
'cancel'
,
handler
:
()
=>
{
handler
:
()
=>
{
this
.
fanMode
.
selecting
=
false
;
this
.
fanMode
.
selecting
=
false
;
}
}
},
},
{
{
text
:
'
Confirm
'
,
text
:
'
确认
'
,
handler
:
(
value
)
=>
{
handler
:
(
value
)
=>
{
console
.
log
(
`Got Value
${
value
}
`
);
//
console.log(`Got Value ${value}`);
this
.
fanMode
.
selecting
=
false
;
this
.
fanMode
.
selecting
=
false
;
}
}
}
}
...
@@ -201,7 +201,6 @@ export class EnvCfgPage implements OnInit {
...
@@ -201,7 +201,6 @@ export class EnvCfgPage implements OnInit {
}
}
workModeEvent
(
item
)
{
workModeEvent
(
item
)
{
console
.
log
(
'更新牛舍配置信息'
);
this
.
updateCowshed
();
this
.
updateCowshed
();
}
}
...
@@ -228,7 +227,7 @@ export class EnvCfgPage implements OnInit {
...
@@ -228,7 +227,7 @@ export class EnvCfgPage implements OnInit {
await
picker
.
present
();
await
picker
.
present
();
}
}
fanT
empHaveFouch
()
{
t
empHaveFouch
()
{
console
.
log
(
'fanTempHaveFouch'
);
console
.
log
(
'fanTempHaveFouch'
);
if
(
this
.
fanMode
.
selecting
===
false
)
{
if
(
this
.
fanMode
.
selecting
===
false
)
{
this
.
fanMode
.
selecting
=
true
;
this
.
fanMode
.
selecting
=
true
;
...
...
src/app/envCtrl/env-detail/env-detail.page.html
View file @
5873d4b8
...
@@ -15,37 +15,32 @@
...
@@ -15,37 +15,32 @@
<span
*
ngIf=
"item.ts"
class=
"right"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</span>
<span
*
ngIf=
"item.ts"
class=
"right"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</span>
</div>
</div>
<div
style=
"background-color: #F0F0F0;"
align=
"center"
>
<div
style=
"background-color: #F0F0F0;"
align=
"center"
>
<v-kanban
class=
"home-bar"
name=
"温度"
[
inData
]="
item
.
temp
"
iconClass=
"vo v-wendu"
iconColor=
"#285B90"
iconSize=
"14px"
></v-kanban>
<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=
"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=
"#285B90"
iconSize=
"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=
"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>
</div>
</ion-header>
</ion-header>
<ion-content
style=
"background-color: #F3F4F4;"
>
<ion-content
style=
"background-color: #F3F4F4;"
>
<
ion-router-outlet></ion-router-outlet
>
<
!--<ion-router-outlet></ion-router-outlet>--
>
<ion-tabs>
<ion-tabs>
<ion-tab-bar
slot=
"top"
>
<ion-tab-bar
slot=
"top"
>
<ion-tab-button
tab=
"fan"
>
<ion-tab-button
tab=
"fan"
>
<ion-label>
风机
</ion-label>
<ion-label>
风机
</ion-label>
</ion-tab-button>
</ion-tab-button>
<ion-tab-button
tab=
"shower"
[
routerLink
]="['/
env-detail
/
shower
',
item
.
fieldRegionNo
]
"
>
<!--[rootParams]="fieldRegionNo"-->
<ion-tab-button
tab=
"shower"
[
routerLink
]="
showerLink
"
>
<!--[rootParams]="fieldRegionNo"-->
<ion-label>
喷淋
</ion-label>
<ion-label>
喷淋
</ion-label>
</ion-tab-button>
</ion-tab-button>
<ion-tab-button
tab=
"light"
[
routerLink
]="['/
env-detail
/
light
',
item
.
fieldRegionNo
]
"
>
<ion-tab-button
tab=
"light"
[
routerLink
]="
lightLink
"
>
<ion-label>
照明
</ion-label>
<ion-label>
照明
</ion-label>
</ion-tab-button>
</ion-tab-button>
<ion-tab-button
tab=
"waterchannel"
[
routerLink
]="['/
env-detail
/
waterchannel
',
item
.
fieldRegionNo
]
"
>
<ion-tab-button
tab=
"waterchannel"
[
routerLink
]="
waterchannelLink
"
>
<ion-label>
水槽
</ion-label>
<ion-label>
水槽
</ion-label>
</ion-tab-button>
</ion-tab-button>
</ion-tab-bar>
</ion-tab-bar>
</ion-tabs>
</ion-tabs>
</ion-content>
</ion-content>
<!--<ion-tabs>-->
<!--<ion-tab [root]="fan" [rootParams]="fieldRegionNo" tabTitle="风机">-->
<!--</ion-tab>-->
<!--<ion-tab [root]="shower" [rootParams]="fieldRegionNo" tabTitle="风机">-->
<!--</ion-tab>-->
<!--<ion-tab [root]="light" [rootParams]="fieldRegionNo" tabTitle="风机">-->
<!--</ion-tab>-->
<!--</ion-tabs>-->
src/app/envCtrl/env-detail/env-detail.page.ts
View file @
5873d4b8
...
@@ -18,9 +18,11 @@ export class EnvDetailPage implements OnInit {
...
@@ -18,9 +18,11 @@ export class EnvDetailPage implements OnInit {
private
load
:
Load
,
private
load
:
Load
,
private
tf
:
Transfer
)
{}
private
tf
:
Transfer
)
{}
item
=
{};
item
:
any
=
{};
fieldRegionNo
=
''
;
fieldRegionNo
=
''
;
loading
=
false
;
// 发送指令延时判断
// 发送指令延时判断
comm
=
{
comm
=
{
...
@@ -29,28 +31,46 @@ export class EnvDetailPage implements OnInit {
...
@@ -29,28 +31,46 @@ export class EnvDetailPage implements OnInit {
};
};
// fan = '/env-detail/fan';
// fan = '/env-detail/fan';
// shower = '/env-detail/shower';
showerLink
=
''
;
// light = '/env-detail/light';
lightLink
=
''
;
waterchannelLink
=
''
;
ngOnInit
()
{
ngOnInit
()
{
this
.
init
();
}
init
()
{
this
.
comm
.
isLoading
=
false
;
this
.
comm
.
isLoading
=
false
;
this
.
comm
.
remain
=
0
;
this
.
comm
.
remain
=
0
;
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
fieldRegionNo
=
data
.
no
;
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
);
this
.
getData
(
0
);
}
}
initLayout
()
{
if
(
this
.
item
&&
this
.
item
.
heatStressLevel
&&
this
.
item
.
heatStressLevel
!==
''
)
{
this
.
item
.
heatStressColor
=
this
.
item
.
heatStressLevel
===
'0'
?
'#71fa1d'
:
this
.
item
.
heatStressLevel
===
'1'
?
'#71fa1d'
:
this
.
item
.
heatStressLevel
===
'2'
?
'#FAB139'
:
this
.
item
.
heatStressLevel
===
'3'
?
'#ff6a1f'
:
'#b22222'
;
}
}
getData
(
time
)
{
getData
(
time
)
{
if
(
time
)
{
if
(
time
)
{
this
.
load
.
toLoad
(
'加载中...'
,
false
);
this
.
load
.
toLoad
(
'加载中...'
,
false
);
}
}
this
.
api
.
cowshedApp
.
getRealDataByFieldRegionNo
([{
'fieldRegionNo'
:
this
.
fieldRegionNo
},
(
data
)
=>
{
//
this.api.cowshedApp.getRealDataByFieldRegionNo([{'fieldRegionNo' : this.fieldRegionNo}, (data) => {
// if (data) {
if
(
data
)
{
// this.item = data;
this
.
item
=
data
;
// this.initLayout()
;
}
//
}
}]);
//
}]);
// ----------------------------------------------
// ----------------------------------------------
// TODO 测试用准备数据
// TODO 测试用准备数据
this
.
item
=
{
this
.
item
=
{
...
@@ -68,6 +88,7 @@ export class EnvDetailPage implements OnInit {
...
@@ -68,6 +88,7 @@ export class EnvDetailPage implements OnInit {
inHouse
:
this
.
getInHouseState
(
1
),
// 0-离舍,1-在舍
inHouse
:
this
.
getInHouseState
(
1
),
// 0-离舍,1-在舍
ts
:
'2019-08-05 23:44'
,
ts
:
'2019-08-05 23:44'
,
};
};
this
.
initLayout
();
// ----------------------------------------------
// ----------------------------------------------
}
}
...
@@ -114,4 +135,10 @@ export class EnvDetailPage implements OnInit {
...
@@ -114,4 +135,10 @@ export class EnvDetailPage implements OnInit {
const
query
=
'env-history?no='
+
item
.
fieldRegionNo
;
const
query
=
'env-history?no='
+
item
.
fieldRegionNo
;
this
.
nav
.
navigateForward
(
query
);
this
.
nav
.
navigateForward
(
query
);
}
}
setInHouse
()
{
this
.
loading
=
true
;
// TODO
this
.
loading
=
false
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment