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
4be9e4f0
Commit
4be9e4f0
authored
Sep 11, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
牛舍配置 90%
parent
6817aec5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
343 additions
and
303 deletions
+343
-303
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+162
-206
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+181
-97
No files found.
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
4be9e4f0
...
...
@@ -26,77 +26,71 @@
<ion-col>
<ion-item
class=
"fanItem"
>
<ion-label
position=
"fixed"
>
偏差温度
</ion-label>
<ion-input
placeholder=
"25"
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
toft
"
></ion-input>
<ion-input
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
toft
"
></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
placeholder=
"25"
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
hoft
"
(
ionFocus
)="
fanTempHaveFouch
()
"
></ion-input>
<ion-input
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
hoft
"
></ion-input>
<ion-label
position=
"fixed"
>
℃
</ion-label>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<div
*
ngIf=
"fengJi"
>
<ion-item-divider>
<ion-label>
风机模式配置
</ion-label>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
(
)"
>
<ion-select-option
value=
"0"
>
自
控模式
</ion-select-option>
<ion-select-option
value=
"1"
>
手
控模式
</ion-select-option>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
fengJi
.
controlModel
"
[(
value
)]="
fengJi
.
controlModel
"
(
ionChange
)="
workModeEvent
(
fengJi
)"
>
<ion-select-option
value=
"0"
>
手
控模式
</ion-select-option>
<ion-select-option
value=
"1"
>
自
控模式
</ion-select-option>
</ion-select>
</ion-item-divider>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-grid>
<ion-row>
<ion-col>
<ion-item
class=
"fanItem"
>
<ion-label>
风机模式
</ion-label>
<ion-input
slot=
"end"
placeholder=
"模式一"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-item
class=
"fanItem"
>
<ion-label
position=
"fixed"
>
开启温度
</ion-label>
<ion-input
placeholder=
"25"
(
ionFocus
)="
fanTempHaveFouch
()
"
></ion-input>
<ion-input
(
ionFocus
)="
fanTempHaveFouch
()"
[(
ngModel
)]="
fengJi
.
controlConfig
.
TU
"
></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
placeholder=
"25"
(
ionFocus
)="
fanTempHaveFouch
()
"
></ion-input>
<ion-input
(
ionFocus
)="
fanTempHaveFouch
()"
[(
ngModel
)]="
fengJi
.
controlConfig
.
TL
"
></ion-input>
<ion-label
position=
"fixed"
>
℃
</ion-label>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
</div>
<div
*
ngIf=
"penLin"
>
<ion-item-divider>
<ion-label>
喷淋模式配置
</ion-label>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
(
)"
>
<ion-select-option
value=
"0"
>
自
控模式
</ion-select-option>
<ion-select-option
value=
"1"
>
手
控模式
</ion-select-option>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
penLin
.
controlModel
"
[(
value
)]="
penLin
.
controlModel
"
(
ionChange
)="
workModeEvent
(
penLin
)"
>
<ion-select-option
value=
"0"
>
手
控模式
</ion-select-option>
<ion-select-option
value=
"1"
>
自
控模式
</ion-select-option>
</ion-select>
</ion-item-divider>
<ion-item-sliding
*
ngFor=
"let cfg of
fanCf
g"
>
<ion-item-sliding
*
ngFor=
"let cfg of
penLin.controlConfi
g"
>
<ion-item
class=
"fanItem"
>
<ion-grid>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
placeholder=
{{cfg.name}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-input
placeholder=
{{cfg.timeInterval}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
intverval
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -104,27 +98,27 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-input
placeholder=
{{cfg.tempSet}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
偏差温度
</ion-label>
<ion-input
placeholder=
{{cfg.tempOffset}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
T
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
<!-- <ion-col size="auto" style="font-size: 13px;">-->
<!-- <ion-item class="fanItem" lines="none">-->
<!-- <ion-label style="width:80px">偏差温度</ion-label>-->
<!-- <ion-input [(ngModel)]="penLinCfg.A" (ionFocus)="fanTempHaveFouch()" style="width:50px;"></ion-input>-->
<!-- </ion-item>-->
<!-- </ion-col>-->
</ion-row>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
A区喷水时间
</ion-label>
<ion-input
placeholder=
{{cfg.ATmr}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
A
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
B区喷水时间
</ion-label>
<ion-input
placeholder=
{{cfg.BTmr}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
B
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -134,22 +128,24 @@
<ion-button
color=
'danger'
expand=
"full"
style=
"width:15%;height:90%"
>
删除
</ion-button>
</ion-item-options>
</ion-item-sliding>
</div>
<div
*
ngIf=
"zhaoMing"
>
<ion-item-divider>
<ion-label>
照明配置
</ion-label>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
(
)"
>
<ion-select-option
value=
"0"
>
自
控模式
</ion-select-option>
<ion-select-option
value=
"1"
>
手
控模式
</ion-select-option>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
zhaoMing
.
controlModel
"
[(
value
)]="
zhaoMing
.
controlModel
"
(
ionChange
)="
workModeEvent
(
zhaoMing
)"
>
<ion-select-option
value=
"0"
>
手
控模式
</ion-select-option>
<ion-select-option
value=
"1"
>
自
控模式
</ion-select-option>
</ion-select>
</ion-item-divider>
<ion-item-sliding
*
ngFor=
"let cfg of lightCf
g"
>
<ion-item-sliding
*
ngFor=
"let cfg of zhaoMing.controlConfi
g"
>
<ion-item
style=
"--padding-start: 0px"
>
<ion-grid>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
placeholder=
{{cfg.name}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -158,14 +154,14 @@
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="fanTempHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
displayFormat=
"MM-DD"
placeholder=
"Date
"
class=
"timepicker"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
cfg
.
startDate
"
displayFormat=
"MM-DD
"
class=
"timepicker"
></ion-datetime>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
~
</ion-label>
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="fanTempHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
displayFormat=
"MM-DD"
placeholder=
"Date
"
class=
"timepicker"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
cfg
.
stopDate
"
displayFormat=
"MM-DD
"
class=
"timepicker"
></ion-datetime>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -173,13 +169,13 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
开灯时间
</ion-label>
<ion-input
placeholder=
{{cfg.onTime}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
on
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
style=
"font-size: 13px;--padding-start: 0px"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
关灯时间
</ion-label>
<ion-input
placeholder=
{{cfg.offTime}}
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
off
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -189,8 +185,9 @@
<ion-button
color=
'danger'
expand=
"full"
style=
"width:15%;height:90%"
>
删除
</ion-button>
</ion-item-options>
</ion-item-sliding>
</div>
<div
*
ngIf=
"shuiCao"
>
<ion-item-divider>
<ion-label>
水槽预警时间段配置
</ion-label>
</ion-item-divider>
...
...
@@ -202,14 +199,14 @@
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="fanTempHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
displayFormat=
"MM-DD"
placeholder=
"Date"
class=
"timepicker"
[(
ngModel
)]="
shuiCao
.
startDate
"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
shuiCao
.
controlConfig
.
startDate
"
displayFormat=
"MM-DD"
class=
"timepicker
"
></ion-datetime>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
~
</ion-label>
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="fanTempHaveFouch()" style="width:50px;"></ion-input>-->
<ion-datetime
displayFormat=
"MM-DD"
placeholder=
"Date"
class=
"timepicker"
[(
ngModel
)]="
shuiCao
.
stopDate
"
></ion-datetime>
<ion-datetime
[(
ngModel
)]="
shuiCao
.
controlConfig
.
stopDate
"
displayFormat=
"MM-DD"
class=
"timepicker
"
></ion-datetime>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -222,6 +219,7 @@
<ion-button
color=
'danger'
expand=
"full"
style=
"width:15%;height:90%"
>
删除
</ion-button>
</ion-item-options>
</ion-item-sliding>
</div>
<ion-item-divider>
<ion-label>
牛群在/离舍配置
</ion-label>
...
...
@@ -232,17 +230,23 @@
<ion-col>
牛群回舍时需恢复上述的设备
</ion-col>
</ion-row>
<ion-row>
<ion-col><ion-item
lines=
"none"
class=
"cow"
><ion-label>
风机
</ion-label><ion-checkbox
color=
"primary"
class=
"cowCheckBox"
slot=
"start"
></ion-checkbox></ion-item></ion-col>
<ion-col><ion-item
lines=
"none"
class=
"cow"
><ion-label>
喷淋
</ion-label><ion-checkbox
color=
"primary"
class=
"cowCheckBox"
slot=
"start"
></ion-checkbox></ion-item></ion-col>
<ion-col><ion-item
lines=
"none"
class=
"cow"
><ion-label>
照明
</ion-label><ion-checkbox
color=
"primary"
class=
"cowCheckBox"
slot=
"start"
></ion-checkbox></ion-item></ion-col>
<ion-col
*
ngFor=
"let device of curCowshed.leave"
>
<ion-item
lines=
"none"
class=
"cow"
>
<ion-label>
{{device}}
</ion-label>
<!-- <ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="curCowshed.propertyConfig.toft"></ion-checkbox>-->
</ion-item>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
牛群离舍时需完全关闭的设备
</ion-col>
</ion-row>
<ion-row>
<ion-col><ion-item
lines=
"none"
class=
"cow"
><ion-label>
风机
</ion-label><ion-checkbox
color=
"primary"
class=
"cowCheckBox"
slot=
"start"
></ion-checkbox></ion-item></ion-col>
<ion-col><ion-item
lines=
"none"
class=
"cow"
><ion-label>
喷淋
</ion-label><ion-checkbox
color=
"primary"
class=
"cowCheckBox"
slot=
"start"
></ion-checkbox></ion-item></ion-col>
<ion-col><ion-item
lines=
"none"
class=
"cow"
><ion-label>
照明
</ion-label><ion-checkbox
color=
"primary"
class=
"cowCheckBox"
slot=
"start"
></ion-checkbox></ion-item></ion-col>
<ion-col
*
ngFor=
"let device of curCowshed.back"
>
<ion-item
lines=
"none"
class=
"cow"
>
<ion-label>
{{device}}
</ion-label>
<!-- <ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="curCowshed.propertyConfig.toft"></ion-checkbox>-->
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
...
...
@@ -265,65 +269,17 @@
<ion-row>
<ion-col
class=
"thiItem"
>
应激等级
</ion-col>
<ion-col
class=
"thiItem"
>
THI值(
<
)</
ion-col
>
<ion-col
class=
"thiItem"
>
预警
要否
</ion-col>
<ion-col
class=
"thiItem"
>
预警
等级
</ion-col>
</ion-row>
<ion-row>
<ion-col
class=
"thiItem"
><ion-label>
无应激
</ion-label></ion-col>
<ion-col
class=
"thiItem"
><ion-input
placeholder=
"25"
(
ionFocus
)="
fanTempHaveFouch
()"
></ion-input></ion-col>
<ion-col
class=
"thiItem"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
()"
>
<ion-select-option
value=
"0"
>
无
</ion-select-option>
<ion-select-option
value=
"1"
>
高
</ion-select-option>
<ion-select-option
value=
"1"
>
中
</ion-select-option>
<ion-select-option
value=
"1"
>
低
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
<ion-row>
<ion-col
class=
"thiItem"
><ion-label>
轻度应激
</ion-label></ion-col>
<ion-col
class=
"thiItem"
><ion-input
placeholder=
"25"
(
ionFocus
)="
fanTempHaveFouch
()"
></ion-input></ion-col>
<ion-col
class=
"thiItem"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
()"
>
<ion-select-option
value=
"0"
>
无
</ion-select-option>
<ion-select-option
value=
"1"
>
高
</ion-select-option>
<ion-select-option
value=
"1"
>
中
</ion-select-option>
<ion-select-option
value=
"1"
>
低
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
<ion-row>
<ion-col
class=
"thiItem"
><ion-label>
中度应激
</ion-label></ion-col>
<ion-col
class=
"thiItem"
><ion-input
placeholder=
"25"
(
ionFocus
)="
fanTempHaveFouch
()"
></ion-input></ion-col>
<ion-col
class=
"thiItem"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
()"
>
<ion-select-option
value=
"0"
>
无
</ion-select-option>
<ion-select-option
value=
"1"
>
高
</ion-select-option>
<ion-select-option
value=
"1"
>
中
</ion-select-option>
<ion-select-option
value=
"1"
>
低
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
<ion-row>
<ion-col
class=
"thiItem"
><ion-label>
重度应激
</ion-label></ion-col>
<ion-col
class=
"thiItem"
><ion-input
placeholder=
"25"
(
ionFocus
)="
fanTempHaveFouch
()"
></ion-input></ion-col>
<ion-col
class=
"thiItem"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
()"
>
<ion-select-option
value=
"0"
>
无
</ion-select-option>
<ion-select-option
value=
"1"
>
高
</ion-select-option>
<ion-select-option
value=
"1"
>
中
</ion-select-option>
<ion-select-option
value=
"1"
>
低
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
<ion-row>
<ion-col
class=
"thiItem"
><ion-label>
II重度应激
</ion-label></ion-col>
<ion-col
class=
"thiItem"
><ion-input
placeholder=
"25"
(
ionFocus
)="
fanTempHaveFouch
()"
></ion-input></ion-col>
<ion-row
*
ngFor=
"let heatStress of curCowshed.heatStressList"
align=
"center"
>
<ion-col
class=
"thiItem"
><ion-label>
{{heatStress.heatStressLevel}}
</ion-label></ion-col>
<ion-col
class=
"thiItem"
><ion-input
(
ionFocus
)="
fanTempHaveFouch
()"
disabled=
"true"
>
{{heatStress.thi}}
</ion-input></ion-col>
<ion-col
class=
"thiItem"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
workModeSetting
.
workMode
"
[(
value
)]="
workModeSetting
.
workMode
"
(
ionChange
)="
workModeEvent
(
)"
>
<ion-select-option
value=
"
0
"
>
无
</ion-select-option>
<ion-select-option
value=
"
1"
>
高
</ion-select-option>
<ion-select-option
value=
"
1
"
>
中
</ion-select-option>
<ion-select-option
value=
"
1"
>
低
</ion-select-option>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
heatStress
.
alarmLevel
"
[(
value
)]="
heatStress
.
alarmLevel
"
(
ionChange
)="
workModeEvent
(
heatStress
)"
>
<ion-select-option
value=
"
无
"
>
无
</ion-select-option>
<ion-select-option
value=
"
低"
>
低
</ion-select-option>
<ion-select-option
value=
"
中
"
>
中
</ion-select-option>
<ion-select-option
value=
"
高"
>
高
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
4be9e4f0
...
...
@@ -70,44 +70,26 @@ export class EnvCfgPage implements OnInit {
}
isError
=
false
;
cowshedList
=
[];
cowshedList
:
any
=
[];
curFieldRegionNo
=
''
;
// 当前牛舍信息
curCowshed
=
{
curCowshed
:
any
=
{
factoryNo
:
''
,
factoryName
:
''
,
fieldRegionNo
:
''
,
fieldRegionName
:
''
,
isWisdomModel
:
0
,
propertyConfig
:
{
toft
:
''
,
hoft
:
''
},
config
:
[{
fieldDeviceType
:
''
,
controlModel
:
0
,
controlConfig
:
[{
TU
:
0
,
TL
:
0
,
id
:
''
,
name
:
''
,
T
:
0
,
A
:
0
,
B
:
0
,
intverval
:
0
,
startDate
:
''
,
stopDate
:
''
,
on
:
''
,
off
:
''
,
power
:
0
}
]
}],
config
:
[],
leave
:
[],
back
:
[],
environmentConfigJson
:
{
TU
:
''
,
TL
:
''
,
HU
:
''
,
HL
:
''
},
heatStressList
:
[]
};
environmentConfigJson
:
{
TU
:
0
,
TL
:
0
,
HU
:
0
,
HL
:
0
},
heatStressList
:
[]
};
// 各设备配置信息
fengJi
=
{};
penLin
=
{};
zhaoMing
=
{};
shuiCao
=
{};
fengJi
:
any
=
{};
penLin
:
any
=
{};
zhaoMing
:
any
=
{};
shuiCao
:
any
=
{};
async
openPicker
(
numColumns
=
1
,
numOptions
=
5
,
columnOptions
=
this
.
defaultColumnOptions
)
{
const
picker
=
await
this
.
pickerController
.
create
({
...
...
@@ -191,9 +173,76 @@ export class EnvCfgPage implements OnInit {
}
this
.
load
.
offLoad
();
}]);
// ----------------------------------------------------
// TODO 测试用准备数据
this
.
cowshedList
=
[
{
// 0-无热应激 离线 无报警
fieldRegionNo
:
'FRN136641006052720640'
,
fieldRegionName
:
'1号牛舍'
,
temp
:
'23.5'
,
humi
:
'82'
,
heatStressLevel
:
'0'
,
online
:
0
,
// 0-离线,1-在线
alarm
:
0
,
ts
:
'2019-08-05 23:44'
,
},
{
// 1-轻度热应激 在线 现控 无报警
fieldRegionNo
:
'FN108050436279648256'
,
fieldRegionName
:
'2号牛舍'
,
temp
:
'23.5'
,
humi
:
'82'
,
heatStressLevel
:
'1'
,
online
:
1
,
// 0-离线,1-在线
operationModel
:
0
,
// 0-现控,1-平控
alarm
:
0
,
ts
:
'2019-08-05 23:44'
,
},
{
// 2-中度热应激 在线 平控 非智控(手控) 有报警
fieldRegionNo
:
'FN108050436279648256'
,
fieldRegionName
:
'3号牛舍'
,
temp
:
'23.5'
,
humi
:
'82'
,
heatStressLevel
:
'2'
,
online
:
1
,
// 0-离线,1-在线
operationModel
:
1
,
// 0-现控,1-平控
isWisdomModel
:
0
,
// 0-非智控(手控),1-智控
alarm
:
1
,
ts
:
'2019-08-05 23:44'
,
},
{
// 3-重度热应激 在线 平控 非智控(自控) 有报警
fieldRegionNo
:
'FN108050436279648256'
,
fieldRegionName
:
'4号牛舍'
,
temp
:
'23.5'
,
humi
:
'82'
,
heatStressLevel
:
'3'
,
online
:
1
,
// 0-离线,1-在线
operationModel
:
1
,
// 0-现控,1-平控
isWisdomModel
:
0
,
// 0-非智控(自控),1-智控
alarm
:
1
,
ts
:
'2019-08-05 23:44'
,
},
{
// 4-II重度热应激 在线 平控 智控 有报警
fieldRegionNo
:
'FN108050436279648256'
,
fieldRegionName
:
'测试用5号牛舍'
,
temp
:
'23.5'
,
humi
:
'82'
,
heatStressLevel
:
'4'
,
online
:
1
,
// 0-离线,1-在线
operationModel
:
1
,
// 0-现控,1-平控
isWisdomModel
:
1
,
// 0-非智控(自控),1-智控
alarm
:
1
,
ts
:
'2019-08-05 23:44'
,
},
];
}
workModeEvent
()
{
workModeEvent
(
item
)
{
// if ( this.workModeSetting.workModeOld === this.workModeSetting.workMode ) {
// return;
// }
...
...
@@ -258,12 +307,10 @@ export class EnvCfgPage implements OnInit {
// 获取当前牛舍配置信息
selectCowshed
()
{
this
.
api
.
config
.
getAll
([{
'fieldRegionNo'
:
this
.
curFieldRegionNo
},
(
data
)
=>
{
if
(
data
)
{
this
.
curCowshed
=
data
;
// ----------------------------------------------------
// TODO 测试用准备数据
this
.
curCowshed
=
{
data
=
{
factoryNo
:
'FN108050436279648256'
,
factoryName
:
'一厂'
,
fieldRegionNo
:
'FRN136641006052720640'
,
...
...
@@ -272,20 +319,22 @@ export class EnvCfgPage implements OnInit {
propertyConfig
:
{
toft
:
'1.5'
,
hoft
:
'2'
},
config
:
[
{
fieldDeviceType
:
'风机'
,
controlModel
:
0
,
controlConfig
:
[{
TU
:
28
,
TL
:
20
}]
,
controlModel
:
'0'
,
controlConfig
:
{
TU
:
28
,
TL
:
20
}
,
},
{
fieldDeviceType
:
'喷淋'
,
controlModel
:
1
,
controlConfig
:
[{
id
:
'111'
,
name
:
'模式一'
,
T
:
21
,
A
:
35
,
B
:
45
,
intverval
:
55
},
{
id
:
'222'
,
name
:
'模式二'
,
T
:
21
,
A
:
35
,
B
:
45
,
intverval
:
55
}]
controlModel
:
'1'
,
controlConfig
:
[{
id
:
'111'
,
name
:
'模式一'
,
T
:
21
,
A
:
35
,
B
:
45
,
intverval
:
55
},
{
id
:
'222'
,
name
:
'模式二'
,
T
:
21
,
A
:
35
,
B
:
45
,
intverval
:
55
}]
},
{
fieldDeviceType
:
'照明'
,
controlModel
:
1
,
controlConfig
:
[{
id
:
'111'
,
name
:
'模式A'
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
,
on
:
'19:00'
,
off
:
'05:00'
},
{
id
:
'111'
,
name
:
'模式B'
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
,
on
:
'19:00'
,
off
:
'05:00'
}]
controlModel
:
'1'
,
controlConfig
:
[{
id
:
'111'
,
name
:
'模式A'
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
,
on
:
'19:00'
,
off
:
'05:00'
},
{
id
:
'111'
,
name
:
'模式B'
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
,
on
:
'19:00'
,
off
:
'05:00'
}]
},
{
fieldDeviceType
:
'水槽'
,
controlModel
:
0
,
controlConfig
:
[{
power
:
100
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
}]
,
controlModel
:
'0'
,
controlConfig
:
{
power
:
100
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
}
,
}
],
leave
:
[
'风机'
,
'喷淋'
,
'水槽'
],
...
...
@@ -321,6 +370,8 @@ export class EnvCfgPage implements OnInit {
};
// ----------------------------------------------------
if
(
data
)
{
this
.
curCowshed
=
data
;
this
.
initConfig
();
}
else
{
this
.
api
.
presentMsgToast
(
'获取数据失败'
);
...
...
@@ -333,18 +384,51 @@ export class EnvCfgPage implements OnInit {
// 显示牛舍配置信息
initConfig
()
{
const
configInfo
=
this
.
curCowshed
.
config
;
const
heatStressListInfo
=
this
.
curCowshed
.
heatStressList
;
// 各设备配置情报
if
(
configInfo
&&
configInfo
.
constructor
===
Array
)
{
configInfo
.
map
((
value
,
index
)
=>
{
if
(
'风机'
===
value
.
fieldDeviceType
)
{
switch
(
value
.
fieldDeviceType
)
{
case
'风机'
:
this
.
fengJi
=
value
;
}
else
if
(
'喷淋'
===
value
.
fieldDeviceType
)
{
break
;
case
'喷淋'
:
this
.
penLin
=
value
;
}
else
if
(
'照明'
===
value
.
fieldDeviceType
)
{
break
;
case
'照明'
:
this
.
zhaoMing
=
value
;
}
else
if
(
'水槽'
===
value
.
fieldDeviceType
)
{
break
;
case
'水槽'
:
this
.
shuiCao
=
value
;
break
;
default
:
break
;
}
});
}
// if (heatStressListInfo && heatStressListInfo.constructor === Array) {
// heatStressListInfo.map((value, index) => {
// switch (value.heatStressLevel) {
// case '无应激':
// this.heatStressLevel_0 = value;
// break;
// case '轻度应激' :
// this.heatStressLevel_1 = value;
// break;
// case '中度应激' :
// this.heatStressLevel_2 = value;
// break;
// case '重度应激' :
// this.heatStressLevel_3 = value;
// break;
// case 'II重度应激' :
// this.heatStressLevel_4 = value;
// break;
// default:
// break;
// }
//
// });
// }
}
}
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