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
3f9db925
Commit
3f9db925
authored
Nov 21, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整layout
parent
08c984d9
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1006 additions
and
454 deletions
+1006
-454
app-routing.module.ts
src/app/app-routing.module.ts
+3
-3
env-add-model.page.html
src/app/envCtrl/env-add-model/env-add-model.page.html
+12
-2
env-add-model.page.scss
src/app/envCtrl/env-add-model/env-add-model.page.scss
+28
-1
env-alarm-detail.page.html
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.html
+28
-23
env-alarm-detail.page.scss
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.scss
+27
-5
env-alarm-detail.page.ts
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.ts
+35
-10
env-alarm.page.html
src/app/envCtrl/env-alarm/env-alarm.page.html
+1
-1
env-anal.page.ts
src/app/envCtrl/env-anal/env-anal.page.ts
+1
-1
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+696
-316
env-cfg.page.scss
src/app/envCtrl/env-cfg/env-cfg.page.scss
+72
-1
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+25
-25
env-change-model.page.scss
src/app/envCtrl/env-change-model/env-change-model.page.scss
+1
-1
env-detail.page.html
src/app/envCtrl/env-detail/env-detail.page.html
+3
-2
env-detail.page.ts
src/app/envCtrl/env-detail/env-detail.page.ts
+17
-3
env-fan.page.ts
src/app/envCtrl/env-fan/env-fan.page.ts
+12
-28
env-history.page.html
src/app/envCtrl/env-history/env-history.page.html
+2
-2
env-home.page.html
src/app/envCtrl/env-home/env-home.page.html
+3
-3
env-home.page.ts
src/app/envCtrl/env-home/env-home.page.ts
+1
-1
env-light.page.ts
src/app/envCtrl/env-light/env-light.page.ts
+13
-22
env-shower.page.ts
src/app/envCtrl/env-shower/env-shower.page.ts
+12
-0
constants.ts
src/app/service/constants.ts
+1
-0
牛舍.png
src/assets/img/牛舍.png
+0
-0
global.scss
src/global.scss
+13
-4
No files found.
src/app/app-routing.module.ts
View file @
3f9db925
...
@@ -57,9 +57,9 @@ const routes: Routes = [
...
@@ -57,9 +57,9 @@ const routes: Routes = [
component
:
EnvDetailPage
,
component
:
EnvDetailPage
,
children
:
[
children
:
[
{
path
:
'fan'
,
component
:
EnvFanPage
},
{
path
:
'fan'
,
component
:
EnvFanPage
},
{
path
:
'shower/:fieldRegionNo'
,
component
:
EnvShowerPage
},
{
path
:
'shower/:fieldRegionNo
/:operationModel
'
,
component
:
EnvShowerPage
},
{
path
:
'light/:fieldRegionNo'
,
component
:
EnvLightPage
},
{
path
:
'light/:fieldRegionNo
/:operationModel
'
,
component
:
EnvLightPage
},
{
path
:
'waterchannel/:fieldRegionNo'
,
component
:
EnvWaterchannelPage
},
{
path
:
'waterchannel/:fieldRegionNo
/:operationModel
'
,
component
:
EnvWaterchannelPage
},
{
path
:
''
,
redirectTo
:
'fan'
,
pathMatch
:
'prefix'
},
{
path
:
''
,
redirectTo
:
'fan'
,
pathMatch
:
'prefix'
},
]
]
...
...
src/app/envCtrl/env-add-model/env-add-model.page.html
View file @
3f9db925
...
@@ -6,8 +6,17 @@
...
@@ -6,8 +6,17 @@
<ion-title
mode=
"ios"
class=
"title"
>
喷淋模式填写
</ion-title>
<ion-title
mode=
"ios"
class=
"title"
>
喷淋模式填写
</ion-title>
</ion-toolbar>
</ion-toolbar>
</ion-header>
</ion-header>
<ion-content
style=
"background-color: #F3F4F4;"
>
<ion-content
style=
"background-color: lightgray;"
>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
>
<div
style=
"width: 100%; margin-top:15px;"
>
<div
class=
"top-line"
>
</div>
<div
class=
"top-img"
>
<img
src=
"../../../assets/img/喷淋.png"
class=
"img"
>
</div>
<div
class=
"top-line"
>
</div>
</div>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
class=
"parentDiv"
>
<ion-item-sliding
*
ngFor=
"let allCfg of controlConfig"
>
<ion-item-sliding
*
ngFor=
"let allCfg of controlConfig"
>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-grid>
<ion-grid>
...
@@ -62,6 +71,7 @@
...
@@ -62,6 +71,7 @@
<ion-item
width=
"100%"
lines=
"none"
>
<ion-item
width=
"100%"
lines=
"none"
>
<ion-icon
name=
"add-circle"
color=
"secondary"
class=
"addIcon"
(
click
)="
addModel
()"
></ion-icon>
<ion-icon
name=
"add-circle"
color=
"secondary"
class=
"addIcon"
(
click
)="
addModel
()"
></ion-icon>
</ion-item>
</ion-item>
</div>
</div>
<div
style=
"text-align: center; width:100%; position: absolute; bottom: 10px;"
>
<div
style=
"text-align: center; width:100%; position: absolute; bottom: 10px;"
>
<ion-button
(
click
)="
goBack
()"
class=
"btn"
color=
"light"
slot=
"start"
style=
"margin-right: 20px;"
>
取消
</ion-button>
<ion-button
(
click
)="
goBack
()"
class=
"btn"
color=
"light"
slot=
"start"
style=
"margin-right: 20px;"
>
取消
</ion-button>
...
...
src/app/envCtrl/env-add-model/env-add-model.page.scss
View file @
3f9db925
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
}
}
.addIcon
{
.addIcon
{
margin-left
:
160px
;
margin-left
:
calc
(
46%
)
;
}
}
.deleteIcon
{
.deleteIcon
{
...
@@ -22,3 +22,30 @@
...
@@ -22,3 +22,30 @@
width
:
35%
;
width
:
35%
;
}
}
.parentDiv
{
width
:
94%
;
//margin-top: 10px;
background-color
:
#ffffff
;
border-radius
:
7px
;
padding
:
5px
;
}
.img
{
width
:
40px
!
important
;
}
.top-img
{
width
:
16%
;
display
:
inline-block
;
text-align
:
center
;
float
:
left
;
}
.top-line
{
width
:
40%
;
height
:
2px
;
border-bottom
:
1px
solid
lightgray
;
display
:
inline-block
;
margin
:
15px
0px
14px
5px
;
float
:
left
;
}
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.html
View file @
3f9db925
...
@@ -17,31 +17,35 @@
...
@@ -17,31 +17,35 @@
</ion-segment-button>
</ion-segment-button>
</ion-segment>
</ion-segment>
<ion-item
lines=
"full"
class=
"ionItem"
color=
"gray"
>
<ion-item
lines=
"full"
class=
"ionItem"
style=
"height: 45px;"
>
<!-- color="gray" -->
<ion-select
interface=
"popover"
placeholder=
"状态"
[(
ngModel
)]="
disposeState
"
(
onClick
)="
refresh
()"
id=
"selectState"
>
<div
style=
"float:left; display: inline-block; position: relative; width:40%; padding-top: 10px;"
>
<ion-select-option
value=
"全部"
class=
"popLabel"
>
全部
</ion-select-option>
<ion-select
class=
"selectBtn font-content"
interface=
"popover"
placeholder=
"状态"
[(
ngModel
)]="
disposeState
"
(
ionChange
)="
refresh
()"
id=
"selectState"
>
<ion-select-option
value=
"0"
class=
"popLabel"
>
待修复
</ion-select-option>
<ion-select-option
value=
"全部"
class=
"popLabel"
>
全部
</ion-select-option>
<ion-select-option
value=
"1"
class=
"popLabel"
>
已修复
</ion-select-option>
<ion-select-option
value=
"0"
class=
"popLabel"
>
待修复
</ion-select-option>
</ion-select>
<ion-select-option
value=
"1"
class=
"popLabel"
>
已修复
</ion-select-option>
<ion-select
interface=
"popover"
placeholder=
"类型"
[(
ngModel
)]="
fieldDeviceType
"
(
click
)="
refresh
()"
id=
"selectType"
>
</ion-select>
<ion-select-option
*
ngFor=
"let option of typeOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
</div>
<!--<ion-select-option value="全部" class="popLabel">全部</ion-select-option>-->
<div
style=
"float:left; display: inline-block; position: relative; width:40%; padding-top: 10px;"
>
<!--<ion-select-option value="环境" class="popLabel">环境</ion-select-option>-->
<ion-select
class=
"selectBtn font-content"
interface=
"popover"
placeholder=
"类型"
[(
ngModel
)]="
fieldDeviceType
"
(
ionChange
)="
refresh
()"
id=
"selectType"
>
<!--<ion-select-option value="风机" class="popLabel">风机</ion-select-option>-->
<ion-select-option
*
ngFor=
"let option of typeOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<!--<ion-select-option value="喷淋" class="popLabel">喷淋</ion-select-option>-->
<!--<ion-select-option value="全部" class="popLabel">全部</ion-select-option>-->
<!--<ion-select-option value="照明" class="popLabel">照明</ion-select-option>-->
<!--<ion-select-option value="环境" class="popLabel">环境</ion-select-option>-->
<!--<ion-select-option value="水槽" class="popLabel">水槽</ion-select-option>-->
<!--<ion-select-option value="风机" class="popLabel">风机</ion-select-option>-->
</ion-select>
<!--<ion-select-option value="喷淋" class="popLabel">喷淋</ion-select-option>-->
<!--<ion-select-option value="照明" class="popLabel">照明</ion-select-option>-->
<!--<ion-select-option value="水槽" class="popLabel">水槽</ion-select-option>-->
</ion-select>
</div>
</ion-item>
</ion-item>
<ion-item
lines=
"full"
class=
"ionItem"
color=
"gray"
style=
"height: 45px; --inner-padding-end: 0px;"
>
<ion-item
lines=
"full"
class=
"ionItem"
color=
"gray"
style=
"height: 45px; --inner-padding-end: 0px;"
>
<div
style=
"width: 2
8
%"
>
<div
style=
"width: 2
6
%"
>
<ion-datetime
class=
"content-text-color"
style=
"position: relative;"
displayFormat=
"YYYY/MM"
cancelText=
"取消"
doneText=
"确认"
[(
ngModel
)]="
startTime
"
(
click
)="
refresh
()"
id=
"selectStartTime"
></ion-datetime>
<ion-datetime
class=
"content-text-color"
style=
"position: relative;"
displayFormat=
"YYYY/MM"
cancelText=
"取消"
doneText=
"确认"
[(
ngModel
)]="
startTime
"
(
click
)="
refresh
()"
id=
"selectStartTime"
></ion-datetime>
</div>
</div>
<div
style=
"width:
2
%"
>
<div
style=
"width:
4
%"
>
<span>
~
</span>
<span
class=
"font-content"
>
~
</span>
</div>
</div>
<div
style=
"width:
30
%"
>
<div
style=
"width:
28
%"
>
<ion-datetime
class=
"content-text-color"
style=
"position: relative;"
displayFormat=
"YYYY/MM"
cancelText=
"取消"
doneText=
"确认"
[(
ngModel
)]="
stopTime
"
style=
"margin-left: 3px;"
(
click
)="
refresh
()"
id=
"selectStopTime"
></ion-datetime>
<ion-datetime
class=
"content-text-color"
style=
"position: relative;"
displayFormat=
"YYYY/MM"
cancelText=
"取消"
doneText=
"确认"
[(
ngModel
)]="
stopTime
"
style=
"margin-left: 3px;"
(
click
)="
refresh
()"
id=
"selectStopTime"
></ion-datetime>
</div>
</div>
<div
style=
"width: 40%; padding-right: 15px;"
>
<div
style=
"width: 40%; padding-right: 15px;"
>
...
@@ -75,15 +79,16 @@
...
@@ -75,15 +79,16 @@
<div
class=
"detailContent"
>
<div
class=
"detailContent"
>
<div
class=
"timeline"
*
ngIf=
"troubleList.length > 0"
>
<div
class=
"timeline"
*
ngIf=
"troubleList.length > 0"
>
<div
class=
"entry"
*
ngFor=
"let item of troubleList"
>
<div
class=
"entry
outDiv
"
*
ngFor=
"let item of troubleList"
>
<div
class=
"title"
>
<div
class=
"title"
>
<div><img
[
src
]="'../../
assets
/
img
/'
+
item
.
fieldDeviceType
+
'.
png
'"
class=
"deviceIcon"
></div>
<div><img
[
src
]="'../../
assets
/
img
/'
+
item
.
fieldDeviceType
+
'.
png
'"
class=
"deviceIcon"
></div>
<p
class=
"font-ts"
style=
"font-size:13px !important"
>
{{item.troubleTime}}
</p>
<p
class=
"font-ts"
style=
"font-size:13px !important"
>
{{item.troubleTime}}
</p>
</div>
</div>
<div
class=
"body"
>
<div
class=
"body
inDiv
"
>
<h3
style=
"margin-bottom: 5px;"
class=
"font-content-title"
>
{{item.description}}
</h3>
<div>
<div
id=
"parentDiv"
>
<div
style=
"width:65%; float: left"
>
<div
style=
"width:65%; float: left"
>
<h3
style=
"margin-bottom: 5px;"
class=
"font-content-title"
>
{{item.description}}
</h3>
<div
*
ngIf=
"item.data !== null && item.data.temp !== undefined && item.data.temp !== null && item.data.temp !== ''"
class=
"warnContent font-content"
>
温度: {{item.data.temp}} ℃
</div>
<div
*
ngIf=
"item.data !== null && item.data.temp !== undefined && item.data.temp !== null && item.data.temp !== ''"
class=
"warnContent font-content"
>
温度: {{item.data.temp}} ℃
</div>
<div
*
ngIf=
"item.data !== null && item.data.humi !== undefined && item.data.humi !== null && item.data.humi !== ''"
class=
"warnContent font-content"
>
湿度: {{item.data.humi}} %
</div>
<div
*
ngIf=
"item.data !== null && item.data.humi !== undefined && item.data.humi !== null && item.data.humi !== ''"
class=
"warnContent font-content"
>
湿度: {{item.data.humi}} %
</div>
<div
*
ngIf=
"item.data !== null && item.data.heatStressLevel !== undefined && item.data.heatStressLevel !== null && item.data.heatStressLevel !== ''"
class=
"warnContent font-content"
>
热应激等级: {{item.data.heatStressLevel}}
</div>
<div
*
ngIf=
"item.data !== null && item.data.heatStressLevel !== undefined && item.data.heatStressLevel !== null && item.data.heatStressLevel !== ''"
class=
"warnContent font-content"
>
热应激等级: {{item.data.heatStressLevel}}
</div>
...
...
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.scss
View file @
3f9db925
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
font-size
:
13px
;
font-size
:
13px
;
--padding-start
:
5px
;
--padding-start
:
5px
;
--padding-end
:
0px
;
--padding-end
:
0px
;
height
:
3
5
px
;
height
:
3
0
px
;
}
}
.popLabel
{
.popLabel
{
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
width
:
60px
!
important
;
width
:
60px
!
important
;
}
}
.deviceIcon
{
.deviceIcon
{
width
:
50
px
!
important
;
width
:
45
px
!
important
;
}
}
.detailContent
{
.detailContent
{
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
top
:
0px
;
top
:
0px
;
left
:
calc
(
30%
+
15px
);
left
:
calc
(
30%
+
15px
);
bottom
:
0px
;
bottom
:
0px
;
width
:
4
px
;
width
:
3
px
;
background
:
#ddd
;
background
:
#ddd
;
}
}
.timeline
:after
{
.timeline
:after
{
...
@@ -105,6 +105,17 @@
...
@@ -105,6 +105,17 @@
clear
:
both
;
clear
:
both
;
}
}
.outDiv
{
overflow
:
hidden
;
margin-top
:
15px
;
}
.inDiv
{
margin
:
3px
;
padding-bottom
:
10px
;
border-bottom
:
1px
solid
lightgray
;
}
.entry
{
.entry
{
clear
:
both
;
clear
:
both
;
text-align
:
left
;
text-align
:
left
;
...
@@ -139,9 +150,15 @@
...
@@ -139,9 +150,15 @@
font-size
:
100%
;
font-size
:
100%
;
}
}
.entry
.body
{
.entry
.body
{
margin
:
0
0
30px
;
//margin: 0 0 30px;
//float: right;
//width: 65%;
//padding-left: 15px;
margin
:
0
0
5px
;
padding-bottom
:
30px
;
float
:
right
;
float
:
right
;
width
:
6
5
%
;
width
:
6
2
%
;
padding-left
:
15px
;
padding-left
:
15px
;
}
}
.entry
.body
p
{
.entry
.body
p
{
...
@@ -152,6 +169,11 @@
...
@@ -152,6 +169,11 @@
font-weight
:
400
;
font-weight
:
400
;
}
}
.itemColor
{
.itemColor
{
--background
:
auto
;
--background
:
auto
;
}
}
.selectBtn
{
--padding-top
:
0px
;
}
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.ts
View file @
3f9db925
...
@@ -95,8 +95,9 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -95,8 +95,9 @@ export class EnvAlarmDetailPage implements OnInit {
this
.
setDateInterval
(
this
.
curInterval
);
this
.
setDateInterval
(
this
.
curInterval
);
this
.
showArea
(
data
.
displayArea
);
this
.
showArea
(
data
.
displayArea
);
this
.
getTroubleList
(
true
);
this
.
setOperation
(
this
.
displayArea
);
this
.
getAlarmList
(
true
);
// this.getTroubleList(true);
// this.getAlarmList(true);
});
});
}
}
...
@@ -105,6 +106,25 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -105,6 +106,25 @@ export class EnvAlarmDetailPage implements OnInit {
this
.
stopTime
=
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM'
);
this
.
stopTime
=
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM'
);
}
}
setOperation
(
displayArea
)
{
if
(
displayArea
===
'trouble'
)
{
this
.
typeOptions
=
[
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'风机'
,
modelValue
:
'风机'
},
{
modelId
:
'喷淋'
,
modelValue
:
'喷淋'
},
{
modelId
:
'照明'
,
modelValue
:
'照明'
},
{
modelId
:
'水槽'
,
modelValue
:
'水槽'
}];
}
else
{
this
.
typeOptions
=
[
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'环境'
,
modelValue
:
'环境'
},
{
modelId
:
'风机'
,
modelValue
:
'风机'
},
{
modelId
:
'喷淋'
,
modelValue
:
'喷淋'
},
{
modelId
:
'照明'
,
modelValue
:
'照明'
},
{
modelId
:
'水槽'
,
modelValue
:
'水槽'
}];
}
}
showArea
(
displayArea
)
{
showArea
(
displayArea
)
{
this
.
isTroubleDis
=
displayArea
===
'trouble'
?
true
:
false
;
this
.
isTroubleDis
=
displayArea
===
'trouble'
?
true
:
false
;
this
.
isAlarmDis
=
displayArea
===
'alarm'
?
true
:
false
;
this
.
isAlarmDis
=
displayArea
===
'alarm'
?
true
:
false
;
...
@@ -133,9 +153,10 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -133,9 +153,10 @@ export class EnvAlarmDetailPage implements OnInit {
item
.
troubleTime
=
this
.
api
.
formatTime
(
'yyyy-MM-dd hh:mm:ss'
,
new
Date
(
item
.
troubleTime
));
item
.
troubleTime
=
this
.
api
.
formatTime
(
'yyyy-MM-dd hh:mm:ss'
,
new
Date
(
item
.
troubleTime
));
});
});
}
}
if
(
isInit
)
{
// if (isInit) {
this
.
detailInfo
=
data
;
// this.detailInfo = data;
}
// }
this
.
detailInfo
=
data
;
this
.
detailInfoLength
=
data
.
devErrTotal
;
this
.
detailInfoLength
=
data
.
devErrTotal
;
this
.
appendItems
(
data
.
trouble
,
data
.
devErrTotal
);
this
.
appendItems
(
data
.
trouble
,
data
.
devErrTotal
);
}]);
}]);
...
@@ -165,9 +186,10 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -165,9 +186,10 @@ export class EnvAlarmDetailPage implements OnInit {
item
.
troubleTime
=
this
.
api
.
formatTime
(
'yyyy-MM-dd hh:mm:ss'
,
new
Date
(
item
.
alarmTime
));
item
.
troubleTime
=
this
.
api
.
formatTime
(
'yyyy-MM-dd hh:mm:ss'
,
new
Date
(
item
.
alarmTime
));
});
});
}
}
if
(
isInit
)
{
// if (isInit) {
this
.
detailInfo
=
data
;
// this.detailInfo = data;
}
// }
this
.
detailInfo
=
data
;
this
.
detailInfoLength
=
data
.
alarmTotal
;
this
.
detailInfoLength
=
data
.
alarmTotal
;
this
.
appendItems
(
data
.
trouble
,
data
.
alarmTotal
);
this
.
appendItems
(
data
.
trouble
,
data
.
alarmTotal
);
}]);
}]);
...
@@ -178,7 +200,7 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -178,7 +200,7 @@ export class EnvAlarmDetailPage implements OnInit {
// await this.wait(500);
// await this.wait(500);
// console.log(allDataLength);
// console.log(allDataLength);
// console.log(this.troubleList.length);
// console.log(this.troubleList.length);
if
(
trouble
&&
trouble
.
length
>
0
)
{
if
(
trouble
.
length
>
0
&&
this
.
troubleList
.
length
<
allDataLength
)
{
for
(
let
i
=
0
;
i
<
trouble
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
trouble
.
length
;
i
++
)
{
this
.
troubleList
.
push
(
trouble
[
i
]);
this
.
troubleList
.
push
(
trouble
[
i
]);
this
.
displayLength
=
this
.
displayLength
+
1
;
this
.
displayLength
=
this
.
displayLength
+
1
;
...
@@ -223,9 +245,11 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -223,9 +245,11 @@ export class EnvAlarmDetailPage implements OnInit {
document
.
getElementById
(
'infiniteScroll'
).
removeAttribute
(
'disabled'
);
document
.
getElementById
(
'infiniteScroll'
).
removeAttribute
(
'disabled'
);
if
(
ev
.
target
.
value
===
'alarm'
)
{
if
(
ev
.
target
.
value
===
'alarm'
)
{
this
.
displayArea
=
'alarm'
;
this
.
displayArea
=
'alarm'
;
this
.
setOperation
(
'alarm'
);
this
.
getAlarmList
(
true
);
this
.
getAlarmList
(
true
);
}
else
{
}
else
{
this
.
displayArea
=
'trouble'
;
this
.
displayArea
=
'trouble'
;
this
.
setOperation
(
'trouble'
);
this
.
getTroubleList
(
true
);
this
.
getTroubleList
(
true
);
}
}
},
1000
);
},
1000
);
...
@@ -305,6 +329,7 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -305,6 +329,7 @@ export class EnvAlarmDetailPage implements OnInit {
}
}
refresh
()
{
refresh
()
{
this
.
waiting
();
console
.
log
(
'refresh'
);
console
.
log
(
'refresh'
);
this
.
detailInfo
=
{};
this
.
detailInfo
=
{};
this
.
troubleList
=
[];
this
.
troubleList
=
[];
...
@@ -329,7 +354,7 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -329,7 +354,7 @@ export class EnvAlarmDetailPage implements OnInit {
cssClass
:
'main-color'
,
cssClass
:
'main-color'
,
mode
:
'ios'
,
mode
:
'ios'
,
message
:
''
,
message
:
''
,
duration
:
1
000
duration
:
2
000
});
});
await
loading
.
present
();
await
loading
.
present
();
...
...
src/app/envCtrl/env-alarm/env-alarm.page.html
View file @
3f9db925
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<ion-refresher
slot=
"fixed"
(
ionRefresh
)="
doRefresh
($
event
)"
>
<ion-refresher
slot=
"fixed"
(
ionRefresh
)="
doRefresh
($
event
)"
>
<ion-refresher-content></ion-refresher-content>
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
</ion-refresher>
<ion-card
*
ngFor=
"let item of alarmItems"
style=
"margin-top:10px; margin-bottom:0px;"
>
<ion-card
*
ngFor=
"let item of alarmItems"
style=
"margin-top:10px; margin-bottom:0px;"
color=
"white"
>
<ion-card-header
style=
"padding-top: 3px; padding-bottom: 3px;"
>
<ion-card-header
style=
"padding-top: 3px; padding-bottom: 3px;"
>
<ion-card-title
style=
"display: inline-block"
style=
"width:100%"
>
<ion-card-title
style=
"display: inline-block"
style=
"width:100%"
>
<div
class=
"cardTitle"
>
<div
class=
"cardTitle"
>
...
...
src/app/envCtrl/env-anal/env-anal.page.ts
View file @
3f9db925
...
@@ -350,7 +350,7 @@ export class EnvAnalPage implements OnInit {
...
@@ -350,7 +350,7 @@ export class EnvAnalPage implements OnInit {
{
{
type
:
'value'
,
type
:
'value'
,
scale
:
true
,
scale
:
true
,
name
:
'湿度(%
r
H)'
,
name
:
'湿度(%
R
H)'
,
// max: 1200,
// max: 1200,
// min: 0,
// min: 0,
boundaryGap
:
[
0.1
,
0.1
]
boundaryGap
:
[
0.1
,
0.1
]
...
...
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
3f9db925
...
@@ -4,364 +4,744 @@
...
@@ -4,364 +4,744 @@
</ion-toolbar>
</ion-toolbar>
</ion-header>
</ion-header>
<ion-content>
<ion-content
color=
"light"
>
<ion-item
lines=
"
full"
style=
"margin-left: 5px;
"
>
<ion-item
lines=
"
none"
style=
"margin-left: 5px;"
class=
"itemColor
"
>
<ion-label
>
请
选择牛舍
</ion-label>
<ion-label
class=
"font-sub-title"
>
选择牛舍
</ion-label>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
curFieldRegionNo
"
(
ionChange
)="
selectCowshed
()"
>
<ion-select
class=
"font-sub-title"
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
curFieldRegionNo
"
(
ionChange
)="
selectCowshed
()"
>
<ion-select-option
*
ngFor=
"let cowshed of cowshedList"
[
value
]="
cowshed
.
fieldRegionNo
"
>
{{cowshed.fieldRegionName}}
</ion-select-option>
<ion-select-option
*
ngFor=
"let cowshed of cowshedList"
[
value
]="
cowshed
.
fieldRegionNo
"
>
{{cowshed.fieldRegionName}}
</ion-select-option>
</ion-select>
</ion-select>
</ion-item>
</ion-item>
<div
*
ngIf=
"curCowshed.fieldRegionName"
>
<div
*
ngIf=
"curCowshed.fieldRegionName"
class=
"parentDiv"
>
<ion-item
lines=
"full"
class=
"subTitle"
>
<ion-label>
智慧模式选择
</ion-label>
<div
style=
"overflow: hidden;"
>
<ion-toggle
mode=
"ios"
slot=
"end"
color=
"secondary"
style=
"width:50px"
[
disabled
]="
true
"
[(
checked
)]="
curCowshed
.
isWisdomModelChecked
"
(
click
)="
toggle
(
curCowshed
.
isWisdomModelChecked
)"
></ion-toggle>
<h1
class=
"main-title clearColor"
style=
"width:38%; display: inline-block; float: left; margin-left:13px"
>
智慧模式选择
</h1>
</ion-item>
<div
style=
"width:50%; text-align:left; display: inline-block; float: left;"
>
<ion-toggle
mode=
"ios"
slot=
"end"
color=
"secondary"
style=
"width:50px"
[
disabled
]="
true
"
[(
checked
)]="
curCowshed
.
isWisdomModelChecked
"
(
click
)="
toggle
(
curCowshed
.
isWisdomModelChecked
)"
></ion-toggle>
</div>
</div>
<!--<ion-item lines="full" class="subTitle clearColor fix-item-padding">-->
<!--<ion-label>智慧模式选择</ion-label>-->
<!--<ion-toggle mode="ios" slot="end" color="secondary" style="width:50px" [disabled]="true" [(checked)]="curCowshed.isWisdomModelChecked" (click)="toggle(curCowshed.isWisdomModelChecked)"></ion-toggle>-->
<!--</ion-item>-->
<div
style=
"margin-left: 10px; margin-right: 10px;"
>
<div
style=
"margin-left: 10px; margin-right: 10px;"
>
<ion-label
text-wrap
color=
"danger"
style=
"margin-left: 20px"
>
选择智慧模式时,风机/喷淋/照明的控制将强制进入有环境条件影响的自控模式
</ion-label>
<ion-label
text-wrap
color=
"danger"
style=
"margin-left: 20px
; font-size: 12px;
"
>
选择智慧模式时,风机/喷淋/照明的控制将强制进入有环境条件影响的自控模式
</ion-label>
</div>
</div>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-label>
偏差值配置
</ion-label>
<div
class=
"item-title-div"
>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenProperty"
(
click
)="
openItem
('
propertyCfg
')"
></ion-icon>
<div
style=
"width:85%; display: inline-block; float: left;"
>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenProperty"
(
click
)="
openItem
('
propertyCfg
')"
></ion-icon>
<h1
class=
"main-title clearColor"
>
偏差值配置
</h1>
</ion-item-divider>
</div>
<!--<ion-item class="fanItem" lines="none" *ngIf="isOpenProperty" @shrink @stretch @flyIn @flyOut >-->
<div
class=
"icon-up-down"
>
<ion-item
class=
"fanItem"
lines=
"none"
*
ngIf=
"isOpenProperty"
@
shrink
>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenProperty"
(
click
)="
openItem
('
propertyCfg
')"
></ion-icon>
<ion-grid>
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenProperty"
(
click
)="
openItem
('
propertyCfg
')"
></ion-icon>
<ion-row>
</div>
<ion-col>
</div>
<ion-item
class=
"fanItem"
>
<div
class=
"item-content-div"
*
ngIf=
"isOpenProperty"
@
shrink
@
stretch
>
<ion-label
position=
"fixed"
>
偏差温度
</ion-label>
<div
style=
"width:20%; display:inline-block"
>
<ion-input
class=
"inputText"
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
toft
"
></ion-input>
<ion-label
position=
"fixed"
class=
"font-content"
>
偏差温度
</ion-label>
<ion-label
position=
"fixed"
>
℃
</ion-label>
</div>
</ion-item>
<div
style=
"width:15%; display:inline-block"
>
</ion-col>
<ion-input
class=
"inputText font-input"
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
toft
"
></ion-input>
<ion-col>
</div>
<ion-item
class=
"fanItem"
>
<div
style=
"width:15%; display:inline-block; text-align:center"
>
<ion-label
position=
"fixed"
>
偏差湿度
</ion-label>
<ion-label
position=
"fixed"
class=
"font-smaller"
>
℃
</ion-label>
<ion-input
class=
"inputText"
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
hoft
"
></ion-input>
</div>
<ion-label
position=
"fixed"
>
% rH
</ion-label>
<div
style=
"width:20%; display:inline-block"
>
</ion-item>
<ion-label
position=
"fixed"
class=
"font-content"
>
偏差湿度
</ion-label>
</ion-col>
</div>
</ion-row>
<div
style=
"width:15%; display:inline-block"
>
</ion-grid>
<ion-input
class=
"inputText font-input"
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
hoft
"
></ion-input>
</ion-item>
</div>
<div
*
ngIf=
"fan"
>
<div
style=
"width:15%; display:inline-block; text-align:center"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-label
position=
"fixed"
class=
"font-smaller"
>
% RH
</ion-label>
<ion-label
style=
"width: 40%"
>
风机模式配置
</ion-label>
</div>
</div>
<div
class=
"item-title-div"
style=
"margin-top: 5px;"
>
<div
style=
"width:50%; display: inline-block; float: left;"
>
<h1
class=
"main-title clearColor"
>
风机配置
</h1>
</div>
<div
style=
"width:35%; text-align:right; display: inline-block; float: left;"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
fan
.
controlModel
"
(
ionChange
)="
workModeChange
('
fan
')"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
fan
.
controlModel
"
(
ionChange
)="
workModeChange
('
fan
')"
>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
</ion-select>
</ion-select>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenFan && isFanDisplay"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenFan && isFanDisplay"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
</ion-item-divider>
<div
*
ngIf=
"isOpenFan && isFanDisplay"
@
shrink
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-grid>
<ion-row>
<ion-col>
<ion-item
class=
"fanItem"
>
<ion-label
position=
"fixed"
>
开启温度
</ion-label>
<ion-input
class=
"inputText"
(
ionFocus
)="
tempHaveTouch
($
event
)"
[(
ngModel
)]="
fan
.
controlConfig
.
config
.
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
class=
"inputText"
(
ionFocus
)="
tempHaveTouch
($
event
)"
[(
ngModel
)]="
fan
.
controlConfig
.
config
.
TL
"
></ion-input>
<ion-label
position=
"fixed"
>
℃
</ion-label>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<ion-item
class=
"fanItem"
lines=
"none"
style=
"padding-left: 10px"
*
ngIf=
"isOpenFan"
>
<a
(
click
)="
onReferenceModel
()"
>
参考常用模式
</a>
</ion-item>
</div>
</div>
<div
class=
"icon-up-down"
>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenFan && isFanDisplay"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenFan && isFanDisplay"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
</div>
</div>
<div
class=
"item-content-div"
style=
"height:70px;"
*
ngIf=
"isOpenFan && isFanDisplay"
@
shrink
@
stretch
>
<div
style=
"width: 100%; overflow: hidden;"
>
<div
style=
"width:20%; display:inline-block"
>
<ion-label
position=
"fixed"
class=
"font-content"
>
开启温度
</ion-label>
</div>
<div
style=
"width:15%; display:inline-block"
>
<ion-input
class=
"inputText font-input"
(
ionFocus
)="
tempHaveTouch
($
event
)"
[(
ngModel
)]="
fan
.
controlConfig
.
config
.
TU
"
></ion-input>
</div>
<div
style=
"width:15%; display:inline-block; text-align:center"
>
<ion-label
position=
"fixed"
class=
"font-smaller"
>
℃
</ion-label>
</div>
<div
style=
"width:20%; display:inline-block"
>
<ion-label
position=
"fixed"
class=
"font-content"
>
关闭温度
</ion-label>
</div>
<div
style=
"width:15%; display:inline-block"
>
<ion-input
class=
"inputText font-input"
(
ionFocus
)="
tempHaveTouch
($
event
)"
[(
ngModel
)]="
fan
.
controlConfig
.
config
.
TL
"
></ion-input>
</div>
<div
style=
"width:15%; display:inline-block; text-align:center"
>
<ion-label
position=
"fixed"
class=
"font-smaller"
>
℃
</ion-label>
</div>
</div>
<div
style=
"width: 100%; overflow: hidden;margin-top: 8px;"
>
<ion-button
color=
"secondary"
style=
"display: inline-block; font-size:13px; height: 25px;"
(
click
)="
onReferenceModel
()"
>
参考并使用常用模式 >>
</ion-button>
</div>
</div>
</div>
<div
*
ngIf=
"shower"
>
<div
class=
"item-title-div"
style=
"margin-top: 5px;"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<div
style=
"width:50%; display: inline-block; float: left;"
>
<ion-label
style=
"width: 40%"
>
喷淋模式配置
</ion-label>
<h1
class=
"main-title clearColor"
>
喷淋配置
</h1>
</div>
<div
style=
"width:35%; text-align:right; display: inline-block; float: left;"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
shower
.
controlModel
"
(
ionChange
)="
workModeChange
('
shower
')"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
shower
.
controlModel
"
(
ionChange
)="
workModeChange
('
shower
')"
>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
</ion-select>
</ion-select>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenShower && isShowerDisplay"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenShower && isShowerDisplay"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
</ion-item-divider>
<div
*
ngIf=
"isOpenShower && isShowerDisplay"
@
shrink
>
<ion-item-sliding
*
ngFor=
"let allCfg of shower.controlConfig"
>
<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
class=
"inputText"
[(
ngModel
)]="
allCfg
.
config
.
name
"
style=
"width:80px;"
></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
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
interval
"
></ion-input>
<ion-label>
秒
</ion-label>
</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"
>
设置温度
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
T
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
></ion-input>
<ion-label>
℃
</ion-label>
</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
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
A
"
></ion-input>
<ion-label>
秒
</ion-label>
</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
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
B
"
></ion-input>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteShowerModel(cfg)">删除</ion-button>-->
<div
style=
"text-content: center; background-color: lightgray;"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteShowerModel
(
allCfg
.
config
)"
style=
"margin-top: 120px;"
></ion-icon>
</div>
</ion-item-options>
</ion-item-sliding>
<ion-item
width=
"100%"
lines=
"none"
>
<ion-button
color=
"secondary"
class=
"addBtn"
round
(
click
)="
onAddModel
()"
>
添加模式
</ion-button>
</ion-item>
</div>
</div>
<div
class=
"icon-up-down"
>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenShower && isShowerDisplay"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenShower && isShowerDisplay"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
</div>
</div>
<div
class=
"item-content-div font-content"
style=
"height: unset"
*
ngIf=
"isOpenShower && isShowerDisplay"
@
shrink
@
stretch
>
<ion-item-sliding
*
ngFor=
"let allCfg of shower.controlConfig"
>
<ion-item
class=
"fanItem"
>
<ion-grid
class=
"sliding-grid"
>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
模式名
</ion-label>
<ion-input
class=
"inputText font-input"
[(
ngModel
)]="
allCfg
.
config
.
name
"
style=
"width:100px;"
></ion-input>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
间隔时间
</ion-label>
<ion-input
class=
"inputText font-input"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
interval
"
></ion-input>
<ion-label
class=
"font-smaller"
>
秒
</ion-label>
</ion-item>
</ion-col>
</ion-row>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
设置温度
</ion-label>
<ion-input
class=
"inputText font-input"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
T
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
></ion-input>
<ion-label
class=
"font-smaller"
>
℃
</ion-label>
</ion-item>
</ion-col>
</ion-row>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
A区喷淋时间
</ion-label>
<ion-input
class=
"inputText font-input"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
A
"
></ion-input>
<ion-label
class=
"font-smaller"
>
秒
</ion-label>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
style=
"margin-bottom: 5px"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
B区喷淋时间
</ion-label>
<ion-input
class=
"inputText font-input"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
config
.
B
"
></ion-input>
<ion-label
class=
"font-smaller"
>
秒
</ion-label>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteShowerModel(cfg)">删除</ion-button>-->
<div
style=
"text-content: center; background-color: lightgray;"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteShowerModel
(
allCfg
.
config
)"
style=
"margin-top: 120px;"
></ion-icon>
</div>
</ion-item-options>
</ion-item-sliding>
<ion-item
width=
"100%"
lines=
"none"
>
<ion-button
color=
"secondary"
class=
"addBtn"
round
(
click
)="
onAddModel
()"
>
添加模式
</ion-button>
</ion-item>
</div>
</div>
<div
*
ngIf=
"light"
>
<div
class=
"item-title-div"
style=
"margin-top: 5px;"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<div
style=
"width:50%; display: inline-block; float: left;"
>
<ion-label
style=
"width: 40%"
>
照明配置
</ion-label>
<h1
class=
"main-title clearColor"
>
照明配置
</h1>
</div>
<div
style=
"width:35%; text-align:right; display: inline-block; float: left;"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
light
.
controlModel
"
(
ionChange
)="
workModeChange
('
light
')"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
light
.
controlModel
"
(
ionChange
)="
workModeChange
('
light
')"
>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
</ion-select>
</ion-select>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenLight && isLightDisplay"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenLight && isLightDisplay"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
</ion-item-divider>
<div
*
ngIf=
"isOpenLight && isLightDisplay"
@
shrink
>
<ion-item-sliding
*
ngFor=
"let allCfg of light.controlConfig"
>
<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
class=
"inputText"
style=
"width:80px;"
[(
ngModel
)]="
allCfg
.
config
.
name
"
></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"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
config
.
startDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:60px"
>
~
</ion-label>
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
config
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</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"
>
开灯时间
</ion-label>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
config
.
on
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.on" (ionFocus)="tempHaveTouch()"></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-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
config
.
off
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.off" (ionFocus)="tempHaveTouch()"></ion-input>-->
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteLightModel(cfg)">删除</ion-button>-->
<div
style=
"text-content: center; background-color: lightgray;"
(
click
)="
deleteLightModel
(
allCfg
.
config
)"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top: 70px;"
></ion-icon>
</div>
</ion-item-options>
</ion-item-sliding>
<ion-item
width=
"100%"
lines=
"none"
*
ngIf=
"isOpenLight"
>
<ion-button
color=
"secondary"
class=
"addBtn"
round
(
click
)="
onChangeModel
()"
>
替换模式
</ion-button>
</ion-item>
</div>
</div>
<div
class=
"icon-up-down"
>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenLight && isLightDisplay"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenLight && isLightDisplay"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
</div>
</div>
<div
class=
"item-content-div font-content"
style=
"height: auto"
*
ngIf=
"isOpenLight && isLightDisplay"
@
shrink
@
stretch
>
<ion-item-sliding
*
ngFor=
"let allCfg of light.controlConfig"
lines=
"none"
>
<ion-item
class=
"fanItem"
>
<ion-grid
class=
"sliding-grid"
>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
模式名
</ion-label>
<ion-input
class=
"inputText font-input"
style=
"width:80px;"
[(
ngModel
)]="
allCfg
.
config
.
name
"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<ion-datetime
class=
"inputDateTime timepicker font-input"
[(
ngModel
)]="
allCfg
.
config
.
startDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:15px"
class=
"font-content"
>
~
</ion-label>
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<ion-datetime
class=
"inputDateTime timepicker font-input"
[(
ngModel
)]="
allCfg
.
config
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-col>
</ion-row>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
开灯时间
</ion-label>
<ion-datetime
class=
"inputDateTime timepicker font-input"
[(
ngModel
)]="
allCfg
.
config
.
on
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.on" (ionFocus)="tempHaveTouch()"></ion-input>-->
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
class=
"font-content"
>
关灯时间
</ion-label>
<ion-datetime
class=
"inputDateTime timepicker font-input"
[(
ngModel
)]="
allCfg
.
config
.
off
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.off" (ionFocus)="tempHaveTouch()"></ion-input>-->
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteLightModel(cfg)">删除</ion-button>-->
<div
style=
"text-content: center; background-color: lightgray;"
(
click
)="
deleteLightModel
(
allCfg
.
config
)"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top: 70px;"
></ion-icon>
</div>
</ion-item-options>
</ion-item-sliding>
<ion-item
width=
"100%"
lines=
"none"
*
ngIf=
"isOpenLight"
>
<ion-button
color=
"secondary"
class=
"addBtn"
round
(
click
)="
onChangeModel
()"
>
替换模式
</ion-button>
</ion-item>
</div>
</div>
<div
*
ngIf=
"waterChannel"
>
<div
class=
"item-title-div"
style=
"margin-top:5px"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<div
style=
"width:85%; display: inline-block; float: left;"
>
<ion-label>
水槽预警时间段配置
</ion-label>
<h1
class=
"main-title clearColor"
>
水槽预警时间段配置
</h1>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenWaterChannel"
(
click
)="
openItem
('
waterChannelCfg
')"
></ion-icon>
</div>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenWaterChannel"
(
click
)="
openItem
('
waterChannelCfg
')"
></ion-icon>
<div
class=
"icon-up-down"
>
</ion-item-divider>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenWaterChannel"
(
click
)="
openItem
('
waterChannelCfg
')"
></ion-icon>
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenWaterChannel"
(
click
)="
openItem
('
waterChannelCfg
')"
></ion-icon>
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenWaterChannel"
@
shrink
>
</div>
<ion-grid>
</div>
<div
class=
"item-content-div font-content"
style=
"height: auto"
*
ngIf=
"isOpenWaterChannel"
@
shrink
@
stretch
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-grid
class=
"sliding-grid"
>
<ion-row
style=
"width: 100%"
>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px
"
>
日期范围
</ion-label>
<ion-label
style=
"width:80px"
class=
"font-content
"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<ion-datetime
class=
"inputDateTime timepicker
"
[(
ngModel
)]="
waterChannel
.
controlConfig
.
config
.
startDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker font-input
"
[(
ngModel
)]="
waterChannel
.
controlConfig
.
config
.
startDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></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;"
class=
"sliding-col"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:60px
"
>
~
</ion-label>
<ion-label
style=
"width:15px"
class=
"font-content
"
>
~
</ion-label>
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<!--<ion-input placeholder={{cfg.endTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<ion-datetime
class=
"inputDateTime timepicker
"
[(
ngModel
)]="
waterChannel
.
controlConfig
.
config
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker font-input
"
[(
ngModel
)]="
waterChannel
.
controlConfig
.
config
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
<ion-row
style=
"width: 100%"
>
<ion-row
style=
"width: 100%"
>
<ion-label
text-wrap
color=
"danger"
>
上述时间段内,加热设备电流过低时,系统将会发出预警信息
</ion-label>
<ion-label
text-wrap
color=
"danger"
style=
"margin-left: 20px; font-size: 12px;"
>
上述时间段内,加热设备电流过低时,系统将会发出预警信息
</ion-label>
</ion-row>
</ion-row>
</ion-grid>
</ion-grid>
</ion-item>
</ion-item>
</div>
</div>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-label>
牛群离舍配置
</ion-label>
<div
class=
"item-title-div"
style=
"margin-top:5px"
>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenInHouse"
(
click
)="
openItem
('
inHouseCfg
')"
></ion-icon>
<div
style=
"width:85%; display: inline-block; float: left;"
>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenInHouse"
(
click
)="
openItem
('
inHouseCfg
')"
></ion-icon>
<h1
class=
"main-title clearColor"
>
牛群离舍配置
</h1>
</ion-item-divider>
</div>
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenInHouse"
@
shrink
>
<div
class=
"icon-up-down"
>
<ion-grid>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenInHouse"
(
click
)="
openItem
('
inHouseCfg
')"
></ion-icon>
<!--<ion-row>-->
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenInHouse"
(
click
)="
openItem
('
inHouseCfg
')"
></ion-icon>
</div>
</div>
<div
class=
"item-content-div font-content"
style=
"height: auto"
*
ngIf=
"isOpenInHouse"
@
shrink
@
stretch
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-grid
class=
"sliding-grid"
>
<!--<ion-row>-->
<!--<ion-col>牛群回舍时需恢复上述的设备</ion-col>-->
<!--<ion-col>牛群回舍时需恢复上述的设备</ion-col>-->
<!--</ion-row>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-row>-->
<!--<ion-col *ngFor="let device of curCowshed.back">-->
<!--<ion-col *ngFor="let device of curCowshed.back">-->
<!--<ion-item lines="none" class="cow">-->
<!--<ion-item lines="none" class="cow">-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="device.flag"></ion-checkbox>-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="device.flag"></ion-checkbox>-->
<!--<ion-label>{{device.type}}</ion-label>-->
<!--<ion-label>{{device.type}}</ion-label>-->
<!--</ion-item>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--</ion-row>-->
<ion-row>
<ion-row>
<ion-col>
牛群离舍时需完全关闭的设备
</ion-col>
<ion-col
class=
"font-content sliding-col"
style=
"margin-bottom:15px"
>
牛群离舍时需完全关闭的设备
</ion-col>
</ion-row>
</ion-row>
<ion-row>
<ion-row>
<ion-col
*
ngFor=
"let device of curCowshed.leave"
>
<ion-col
*
ngFor=
"let device of curCowshed.leave"
class=
"sliding-col"
>
<ion-item
lines=
"none"
class=
"cow"
>
<ion-item
lines=
"none"
class=
"cow"
>
<ion-checkbox
color=
"primary"
class=
"cowCheckBox"
slot=
"start"
[(
ngModel
)]="
device
.
flag
"
></ion-checkbox>
<div
style=
"float: left"
>
<ion-label>
{{device.type}}
</ion-label>
<ion-label
class=
"font-content"
>
{{device.type}}
</ion-label>
</ion-item>
<ion-checkbox
mode=
"md"
color=
"secondary"
class=
"font-content"
slot=
"start"
[(
ngModel
)]="
device
.
flag
"
></ion-checkbox>
</ion-col>
</div>
</ion-row>
</ion-item>
</ion-col>
</ion-grid>
</ion-row>
</ion-item>
</ion-grid>
</ion-item>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
</div>
<ion-label>
环境参数预警配置
</ion-label>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenEnvironment"
(
click
)="
openItem
('
environmentCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenEnvironment"
(
click
)="
openItem
('
environmentCfg
')"
></ion-icon>
</ion-item-divider>
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenEnvironment"
@
shrink
>
<ion-grid>
<div
style=
"text-align: center; margin-top:10px; margin-bottom: 10px"
>
<table
style=
"width:80%; display: inline-block; text-align: center"
>
<tr
style=
"height: 30px"
>
<th
style=
"width:15%"
></th>
<td
style=
"width:30%"
>
上限
</td>
<td
style=
"width:30%"
>
下限
</td>
<td
style=
"width:15%"
></td>
</tr>
<tr
style=
"height: 30px"
>
<th>
温度
</th>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
TU
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
class=
"tdBorder"
></ion-input></td>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
TL
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-right: 1px solid lightgray;"
></ion-input></td>
<td>
℃
</td>
</tr>
<tr
style=
"height: 30px"
>
<th>
湿度
</th>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
HU
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
></ion-input></td>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
HL
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-right: 1px solid lightgray;"
></ion-input></td>
<td>
% rH
</td>
</tr>
<tr
style=
"height: 30px"
>
<th>
氨气
</th>
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.NH3U" (ionFocus)="humHaveTouch($event)" class="tdBorder" style="border-bottom: 1px solid lightgray;"></ion-input></td>-->
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.NH3L" (ionFocus)="humHaveTouch($event)" class="tdBorder" style="border-right: 1px solid lightgray; border-bottom: 1px solid lightgray;"></ion-input></td>-->
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
NH3U
"
class=
"tdBorder"
style=
"border-bottom: 1px solid lightgray;"
></ion-input></td>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
NH3L
"
class=
"tdBorder"
style=
"border-right: 1px solid lightgray; border-bottom: 1px solid lightgray;"
></ion-input></td>
<td>
ppm
</td>
<div
class=
"item-title-div"
style=
"margin-top:5px"
>
</tr>
<div
style=
"width:85%; display: inline-block; float: left;"
>
<h1
class=
"main-title clearColor"
>
环境参数预警配置
</h1>
</div>
<div
class=
"icon-up-down"
>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenEnvironment"
(
click
)="
openItem
('
environmentCfg
')"
></ion-icon>
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenEnvironment"
(
click
)="
openItem
('
environmentCfg
')"
></ion-icon>
</div>
</div>
<div
class=
"item-content-div font-content"
style=
"height: auto"
*
ngIf=
"isOpenEnvironment"
@
shrink
@
stretch
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-grid
class=
"sliding-grid"
>
<div
style=
"text-align: center; margin-top:10px; margin-bottom: 10px"
>
<table
style=
"width:80%; display: inline-block; text-align: center"
>
<tr
style=
"height: 30px"
>
<th
style=
"width:15%"
></th>
<td
style=
"width:30%"
class=
"font-content"
>
上限
</td>
<td
style=
"width:30%"
class=
"font-content"
>
下限
</td>
<td
style=
"width:15%"
></td>
</tr>
<tr
style=
"height: 30px"
>
<th
class=
"font-content"
>
温度
</th>
<td><ion-input
class=
"font-input"
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
TU
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
class=
"tdBorder"
></ion-input></td>
<td><ion-input
class=
"font-input"
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
TL
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-right: 1px solid lightgray;"
></ion-input></td>
<td
class=
"font-smaller"
>
℃
</td>
</tr>
<tr
style=
"height: 30px"
>
<th
class=
"font-content"
>
湿度
</th>
<td><ion-input
class=
"font-input"
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
HU
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
></ion-input></td>
<td><ion-input
class=
"font-input"
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
HL
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-right: 1px solid lightgray;"
></ion-input></td>
<td
class=
"font-smaller"
>
% RH
</td>
</tr>
<tr
style=
"height: 30px"
>
<th
class=
"font-content"
>
氨气
</th>
<td><ion-input
class=
"font-input"
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
NH3U
"
class=
"tdBorder"
style=
"border-bottom: 1px solid lightgray;"
></ion-input></td>
<td><ion-input
class=
"font-input"
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
NH3L
"
class=
"tdBorder"
style=
"border-right: 1px solid lightgray; border-bottom: 1px solid lightgray;"
></ion-input></td>
<td
class=
"font-smaller"
>
ppm
</td>
</tr>
</table>
</div>
</ion-grid>
</ion-item>
</div>
</table>
<div
class=
"item-title-div"
style=
"margin-top:5px"
>
</div>
<div
style=
"width:85%; display: inline-block; float: left;"
>
</ion-grid>
<h1
class=
"main-title clearColor"
>
热应激配置
</h1>
</ion-item>
</div>
<div
class=
"icon-up-down"
>
<ion-icon
name=
"arrow-up"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenHeatStress"
(
click
)="
openItem
('
heatStressCfg
')"
></ion-icon>
<ion-icon
name=
"arrow-down"
color=
"secondary"
mode=
"ios"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenHeatStress"
(
click
)="
openItem
('
heatStressCfg
')"
></ion-icon>
</div>
</div>
<div
class=
"item-content-div font-content"
style=
"height: auto"
*
ngIf=
"isOpenHeatStress"
@
shrink
@
stretch
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-grid
class=
"sliding-grid"
>
<ion-row>
<ion-item
lines=
"none"
class=
"thiItem font-smaller"
>
计算公式 0.81* 温度 +(0.99*温度-14.3)* 湿度+46.3
</ion-item>
</ion-row>
<ion-row>
<ion-item
lines=
"none"
class=
"thiItem font-content"
>
等级临界值
</ion-item>
</ion-row>
<ion-row>
<ion-col
class=
"thiItem sliding-col font-content"
style=
"width: 30%; margin-bottom:5px;"
>
应激等级
</ion-col>
<ion-col
class=
"thiItem sliding-col font-content"
style=
"width: 18%; margin-bottom:5px;"
>
THI值(
<
)</
ion-col
>
<ion-col
class=
"thiItem sliding-col font-content"
style=
"width: 45%; margin-bottom:5px; text-align:left; padding-left:15px;"
>
预警方式
</ion-col>
</ion-row>
<ion-row
*
ngFor=
"let heatStress of curCowshed.heatStressList"
>
<ion-col
class=
"thiItem sliding-col font-content "
style=
"width: 30%; margin-bottom:5px;"
>
{{heatStress.heatStressLevel}}
</ion-col>
<ion-col
class=
"thiItem sliding-col font-content"
style=
"width: 18%; margin-bottom:5px;"
>
{{heatStress.thi}}
</ion-col>
<ion-col
class=
"thiItem sliding-col font-content"
style=
"width: 45%; margin-bottom:5px;"
>
<ion-select
class=
"heatSelect font-input input-tb-text"
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
heatStress
.
alarmLevel
"
>
<ion-select-option
*
ngFor=
"let alarmWay of alarmWays"
[
value
]="
alarmWay
.
alarmId
"
>
{{alarmWay.alarmValue}}
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
</div>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-label>
热应激配置
</ion-label>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenHeatStress"
(
click
)="
openItem
('
heatStressCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenHeatStress"
(
click
)="
openItem
('
heatStressCfg
')"
></ion-icon>
</ion-item-divider>
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenHeatStress"
@
shrink
>
<ion-grid>
<ion-row>
<ion-item
lines=
"none"
class=
"thiItem"
>
计算公式 0.81* 温度 +(0.99*温度-14.3)* 湿度+46.3
</ion-item>
</ion-row>
<ion-row>
<ion-item
lines=
"none"
class=
"thiItem"
>
等级临界值
</ion-item>
</ion-row>
<ion-row>
<ion-col
class=
"thiItem"
size=
"3"
>
应激等级
</ion-col>
<ion-col
class=
"thiItem"
size=
"2"
>
THI值(
<
)</
ion-col
>
<ion-col
class=
"thiItem"
size=
"5"
style=
"text-align:left; padding-left:15px;"
>
预警方式
</ion-col>
</ion-row>
<ion-row
*
ngFor=
"let heatStress of curCowshed.heatStressList"
>
<ion-col
class=
"thiItem"
size=
"3"
>
{{heatStress.heatStressLevel}}
</ion-col>
<ion-col
class=
"thiItem"
size=
"2"
>
{{heatStress.thi}}
</ion-col>
<ion-col
class=
"thiItem"
size=
"5"
>
<ion-select
class=
"heatSelect"
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
heatStress
.
alarmLevel
"
>
<ion-select-option
*
ngFor=
"let alarmWay of alarmWays"
[
value
]="
alarmWay
.
alarmId
"
>
{{alarmWay.alarmValue}}
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<ion-item
width=
"100%"
lines=
"none"
>
<ion-item
width=
"100%"
lines=
"none"
>
<ion-button
color=
"secondary"
class=
"addBtn"
round
(
click
)="
updateCowshed
()"
>
保存配置
</ion-button>
<ion-button
color=
"secondary"
class=
"addBtn"
style=
"height:35px;"
round
(
click
)="
updateCowshed
()"
>
保存
</ion-button>
</ion-item>
</ion-item>
</div>
</div>
<!--<v-loading-bump style="z-index: 9999; color: red" [remain]="comm.remain" *ngIf="comm.isLoading"></v-loading-bump>-->
<!--<v-loading-bump style="z-index: 9999; color: red" [remain]="comm.remain" *ngIf="comm.isLoading"></v-loading-bump>-->
</ion-content>
</ion-content>
<
!
--
以下
layout
布局废弃
--
>
<!--<ion-item-divider sticky="true" class="itemDriver subTitle fix-item-padding">-->
<!--<ion-label>偏差值配置</ion-label>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenProperty" (click)="openItem('propertyCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenProperty" (click)="openItem('propertyCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<!–<ion-item class="fanItem" lines="none" *ngIf="isOpenProperty" @shrink @stretch @flyIn @flyOut >–>-->
<!--<ion-item class="fanItem" lines="none" *ngIf="isOpenProperty" @shrink >-->
<!--<ion-grid>-->
<!--<ion-row>-->
<!--<ion-col>-->
<!--<ion-item class="fanItem">-->
<!--<ion-label position="fixed">偏差温度</ion-label>-->
<!--<ion-input class="inputText" [(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 class="inputText" [(ngModel)]="curCowshed.propertyConfig.hoft"></ion-input>-->
<!--<ion-label position="fixed">% RH</ion-label>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--</ion-grid>-->
<!--</ion-item>-->
<!--<div *ngIf="fan">-->
<!--<ion-item-divider sticky="true" class="itemDriver subTitle">-->
<!--<ion-label style="width: 40%">风机模式配置</ion-label>-->
<!--<ion-select multiple="false" cancelText="取消" okText="确认" class="selectFont" [(ngModel)]="fan.controlModel" (ionChange)="workModeChange('fan')">-->
<!--<ion-select-option *ngFor="let option of controlModelOptions" [value]="option.modelId">{{option.modelValue}}</ion-select-option>-->
<!--</ion-select>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenFan && isFanDisplay" (click)="openItem('fanCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenFan && isFanDisplay" (click)="openItem('fanCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<div *ngIf="isOpenFan && isFanDisplay" @shrink >-->
<!--<ion-item class="fanItem" lines="none" >-->
<!--<ion-grid>-->
<!--<ion-row>-->
<!--<ion-col>-->
<!--<ion-item class="fanItem">-->
<!--<ion-label position="fixed">开启温度</ion-label>-->
<!--<ion-input class="inputText" (ionFocus)="tempHaveTouch($event)" [(ngModel)]="fan.controlConfig.config.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 class="inputText" (ionFocus)="tempHaveTouch($event)" [(ngModel)]="fan.controlConfig.config.TL"></ion-input>-->
<!--<ion-label position="fixed">℃</ion-label>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--</ion-grid>-->
<!--</ion-item>-->
<!--<ion-item class="fanItem" lines="none" style="padding-left: 10px" *ngIf="isOpenFan">-->
<!--<a (click)="onReferenceModel()" >参考常用模式</a>-->
<!--</ion-item>-->
<!--</div>-->
<!--</div>-->
<!--<div *ngIf="shower">-->
<!--<ion-item-divider sticky="true" class="itemDriver subTitle">-->
<!--<ion-label style="width: 40%">喷淋模式配置</ion-label>-->
<!--<ion-select multiple="false" cancelText="取消" okText="确认" class="selectFont" [(ngModel)]="shower.controlModel" (ionChange)="workModeChange('shower')">-->
<!--<ion-select-option *ngFor="let option of controlModelOptions" [value]="option.modelId">{{option.modelValue}}</ion-select-option>-->
<!--</ion-select>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenShower && isShowerDisplay" (click)="openItem('showerCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenShower && isShowerDisplay" (click)="openItem('showerCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<div *ngIf="isOpenShower && isShowerDisplay" @shrink >-->
<!--<ion-item-sliding *ngFor="let allCfg of shower.controlConfig">-->
<!--<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 class="inputText" [(ngModel)]="allCfg.config.name" style="width:80px;"></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 class="inputText" style="width:50px;" [(ngModel)]="allCfg.config.interval"></ion-input>-->
<!--<ion-label>秒</ion-label>-->
<!--</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">设置温度</ion-label>-->
<!--<ion-input class="inputText" style="width:50px;" [(ngModel)]="allCfg.config.T" (ionFocus)="tempHaveTouch($event)"></ion-input>-->
<!--<ion-label>℃</ion-label>-->
<!--</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 class="inputText" style="width:50px;" [(ngModel)]="allCfg.config.A"></ion-input>-->
<!--<ion-label>秒</ion-label>-->
<!--</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 class="inputText" style="width:50px;" [(ngModel)]="allCfg.config.B"></ion-input>-->
<!--<ion-label>秒</ion-label>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--</ion-grid>-->
<!--</ion-item>-->
<!--<ion-item-options side="end">-->
<!--<!–<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteShowerModel(cfg)">删除</ion-button>–>-->
<!--<div style="text-content: center; background-color: lightgray;">-->
<!--<ion-icon name="remove-circle" color='danger' class="deleteIcon" (click)="deleteShowerModel(allCfg.config)" style="margin-top: 120px;"></ion-icon>-->
<!--</div>-->
<!--</ion-item-options>-->
<!--</ion-item-sliding>-->
<!--<ion-item width="100%" lines="none">-->
<!--<ion-button color="secondary" class="addBtn" round (click)="onAddModel()">添加模式</ion-button>-->
<!--</ion-item>-->
<!--</div>-->
<!--</div>-->
<!--<div *ngIf="light">-->
<!--<ion-item-divider sticky="true" class="itemDriver subTitle">-->
<!--<ion-label style="width: 40%">照明配置</ion-label>-->
<!--<ion-select multiple="false" cancelText="取消" okText="确认" class="selectFont" [(ngModel)]="light.controlModel" (ionChange)="workModeChange('light')">-->
<!--<ion-select-option *ngFor="let option of controlModelOptions" [value]="option.modelId">{{option.modelValue}}</ion-select-option>-->
<!--</ion-select>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenLight && isLightDisplay" (click)="openItem('lightCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenLight && isLightDisplay" (click)="openItem('lightCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<div *ngIf="isOpenLight && isLightDisplay" @shrink >-->
<!--<ion-item-sliding *ngFor="let allCfg of light.controlConfig" >-->
<!--<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 class="inputText" style="width:80px;" [(ngModel)]="allCfg.config.name"></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">日期范围</ion-label>-->
<!--<!–<ion-input placeholder={{cfg.startTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>–>-->
<!--<ion-datetime class="inputDateTime timepicker" [(ngModel)]="allCfg.config.startDate" displayFormat="MM-DD" cancelText="取消" doneText="确认"></ion-datetime>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--<ion-col size="auto" style="font-size: 13px;">-->
<!--<ion-item class="fanItem" lines="none">-->
<!--<ion-label style="width:60px">~</ion-label>-->
<!--<!–<ion-input placeholder={{cfg.endTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>–>-->
<!--<ion-datetime class="inputDateTime timepicker" [(ngModel)]="allCfg.config.stopDate" displayFormat="MM-DD" cancelText="取消" doneText="确认"></ion-datetime>-->
<!--</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">开灯时间</ion-label>-->
<!--<ion-datetime class="inputDateTime timepicker" [(ngModel)]="allCfg.config.on" displayFormat="HH:mm" cancelText="取消" doneText="确认"></ion-datetime>-->
<!--<!–<ion-input style="width:50px;" [(ngModel)]="cfg.on" (ionFocus)="tempHaveTouch()"></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-datetime class="inputDateTime timepicker" [(ngModel)]="allCfg.config.off" displayFormat="HH:mm" cancelText="取消" doneText="确认"></ion-datetime>-->
<!--<!–<ion-input style="width:50px;" [(ngModel)]="cfg.off" (ionFocus)="tempHaveTouch()"></ion-input>–>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--</ion-grid>-->
<!--</ion-item>-->
<!--<ion-item-options side="end">-->
<!--<!–<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteLightModel(cfg)">删除</ion-button>–>-->
<!--<div style="text-content: center; background-color: lightgray;" (click)="deleteLightModel(allCfg.config)">-->
<!--<ion-icon name="remove-circle" color='danger' class="deleteIcon" style="margin-top: 70px;"></ion-icon>-->
<!--</div>-->
<!--</ion-item-options>-->
<!--</ion-item-sliding>-->
<!--<ion-item width="100%" lines="none" *ngIf="isOpenLight">-->
<!--<ion-button color="secondary" class="addBtn" round (click)="onChangeModel()">替换模式</ion-button>-->
<!--</ion-item>-->
<!--</div>-->
<!--</div>-->
<!--<div *ngIf="waterChannel">-->
<!--<ion-item-divider sticky="true" class="itemDriver subTitle">-->
<!--<ion-label>水槽预警时间段配置</ion-label>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenWaterChannel" (click)="openItem('waterChannelCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenWaterChannel" (click)="openItem('waterChannelCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<ion-item class="fanItem" *ngIf="isOpenWaterChannel" @shrink >-->
<!--<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.startTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>–>-->
<!--<ion-datetime class="inputDateTime timepicker" [(ngModel)]="waterChannel.controlConfig.config.startDate" displayFormat="MM-DD" cancelText="取消" doneText="确认"></ion-datetime>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--<ion-col size="auto" style="font-size: 13px;">-->
<!--<ion-item class="fanItem" lines="none">-->
<!--<ion-label style="width:60px">~</ion-label>-->
<!--<!–<ion-input placeholder={{cfg.endTime}} (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>–>-->
<!--<ion-datetime class="inputDateTime timepicker" [(ngModel)]="waterChannel.controlConfig.config.stopDate" displayFormat="MM-DD" cancelText="取消" doneText="确认"></ion-datetime>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--<ion-row style="width: 100%">-->
<!--<ion-label text-wrap color="danger">上述时间段内,加热设备电流过低时,系统将会发出预警信息</ion-label>-->
<!--</ion-row>-->
<!--</ion-grid>-->
<!--</ion-item>-->
<!--</div>-->
<!--<ion-item-divider sticky="true" class="itemDriver subTitle">-->
<!--<ion-label>牛群离舍配置</ion-label>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenInHouse" (click)="openItem('inHouseCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenInHouse" (click)="openItem('inHouseCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<ion-item class="fanItem" *ngIf="isOpenInHouse" @shrink >-->
<!--<ion-grid>-->
<!--<!–<ion-row>–>-->
<!--<!–<ion-col>牛群回舍时需恢复上述的设备</ion-col>–>-->
<!--<!–</ion-row>–>-->
<!--<!–<ion-row>–>-->
<!--<!–<ion-col *ngFor="let device of curCowshed.back">–>-->
<!--<!–<ion-item lines="none" class="cow">–>-->
<!--<!–<ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="device.flag"></ion-checkbox>–>-->
<!--<!–<ion-label>{{device.type}}</ion-label>–>-->
<!--<!–</ion-item>–>-->
<!--<!–</ion-col>–>-->
<!--<!–</ion-row>–>-->
<!--<ion-row>-->
<!--<ion-col>牛群离舍时需完全关闭的设备</ion-col>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col *ngFor="let device of curCowshed.leave">-->
<!--<ion-item lines="none" class="cow">-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="device.flag"></ion-checkbox>-->
<!--<ion-label>{{device.type}}</ion-label>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--</ion-grid>-->
<!--</ion-item>-->
<!--<ion-item-divider sticky="true" class="itemDriver subTitle">-->
<!--<ion-label>环境参数预警配置</ion-label>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenEnvironment" (click)="openItem('environmentCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenEnvironment" (click)="openItem('environmentCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<ion-item class="fanItem" *ngIf="isOpenEnvironment" @shrink >-->
<!--<ion-grid>-->
<!--<div style="text-align: center; margin-top:10px; margin-bottom: 10px">-->
<!--<table style="width:80%; display: inline-block; text-align: center">-->
<!--<tr style="height: 30px">-->
<!--<th style="width:15%"></th>-->
<!--<td style="width:30%">上限</td>-->
<!--<td style="width:30%">下限</td>-->
<!--<td style="width:15%"></td>-->
<!--</tr>-->
<!--<tr style="height: 30px">-->
<!--<th>温度</th>-->
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.TU" (ionFocus)="tempHaveTouch($event)" class="tdBorder"></ion-input></td>-->
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.TL" (ionFocus)="tempHaveTouch($event)" class="tdBorder" style="border-right: 1px solid lightgray;"></ion-input></td>-->
<!--<td>℃</td>-->
<!--</tr>-->
<!--<tr style="height: 30px">-->
<!--<th>湿度</th>-->
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.HU" (ionFocus)="humHaveTouch($event)" class="tdBorder"></ion-input></td>-->
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.HL" (ionFocus)="humHaveTouch($event)" class="tdBorder" style="border-right: 1px solid lightgray;"></ion-input></td>-->
<!--<td>% RH</td>-->
<!--</tr>-->
<!--<tr style="height: 30px">-->
<!--<th>氨气</th>-->
<!--<!–<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.NH3U" (ionFocus)="humHaveTouch($event)" class="tdBorder" style="border-bottom: 1px solid lightgray;"></ion-input></td>–>-->
<!--<!–<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.NH3L" (ionFocus)="humHaveTouch($event)" class="tdBorder" style="border-right: 1px solid lightgray; border-bottom: 1px solid lightgray;"></ion-input></td>–>-->
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.NH3U" class="tdBorder" style="border-bottom: 1px solid lightgray;"></ion-input></td>-->
<!--<td><ion-input [(ngModel)]="curCowshed.environmentConfigJson.NH3L" class="tdBorder" style="border-right: 1px solid lightgray; border-bottom: 1px solid lightgray;"></ion-input></td>-->
<!--<td>ppm</td>-->
<!--</tr>-->
<!--</table>-->
<!--</div>-->
<!--</ion-grid>-->
<!--</ion-item>-->
<!--<ion-item-divider sticky="true" class="itemDriver subTitle">-->
<!--<ion-label>热应激配置</ion-label>-->
<!--<ion-icon name="arrow-up" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="!isOpenHeatStress" (click)="openItem('heatStressCfg')"></ion-icon>-->
<!--<ion-icon name="arrow-down" color="secondary" mode="ios" slot="end" class="iconOpen" *ngIf="isOpenHeatStress" (click)="openItem('heatStressCfg')"></ion-icon>-->
<!--</ion-item-divider>-->
<!--<ion-item class="fanItem" *ngIf="isOpenHeatStress" @shrink >-->
<!--<ion-grid>-->
<!--<ion-row>-->
<!--<ion-item lines="none" class="thiItem">计算公式 0.81* 温度 +(0.99*温度-14.3)* 湿度+46.3</ion-item>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-item lines="none" class="thiItem">等级临界值</ion-item>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col class="thiItem" size="3">应激等级</ion-col>-->
<!--<ion-col class="thiItem" size="2">THI值(<)</ion-col>-->
<!--<ion-col class="thiItem" size="5" style="text-align:left; padding-left:15px;">预警方式</ion-col>-->
<!--</ion-row>-->
<!--<ion-row *ngFor="let heatStress of curCowshed.heatStressList">-->
<!--<ion-col class="thiItem" size="3" >{{heatStress.heatStressLevel}}</ion-col>-->
<!--<ion-col class="thiItem" size="2" >{{heatStress.thi}}</ion-col>-->
<!--<ion-col class="thiItem" size="5" >-->
<!--<ion-select class="heatSelect" multiple="false" cancelText="取消" okText="确认" [(ngModel)]="heatStress.alarmLevel">-->
<!--<ion-select-option *ngFor="let alarmWay of alarmWays" [value]="alarmWay.alarmId">{{alarmWay.alarmValue}}</ion-select-option>-->
<!--</ion-select>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--</ion-grid>-->
<!--</ion-item>-->
src/app/envCtrl/env-cfg/env-cfg.page.scss
View file @
3f9db925
...
@@ -60,11 +60,14 @@
...
@@ -60,11 +60,14 @@
font-weight
:
bold
;
font-weight
:
bold
;
margin-left
:
5px
;
margin-left
:
5px
;
// margin-bottom: 3px;
// margin-bottom: 3px;
border-bottom
:
1px
solid
rgba
(
173
,
173
,
173
,
0
.5
);
//border-bottom: 1px solid rgba(173, 173, 173, 0.5);
border-bottom
:
1px
solid
lightgray
;
}
}
.selectFont
{
.selectFont
{
font-weight
:
normal
;
font-weight
:
normal
;
font-size
:
13px
;
color
:
#8e8e8e
;
}
}
.popContent
{
.popContent
{
...
@@ -89,3 +92,71 @@
...
@@ -89,3 +92,71 @@
--padding-start
:
0px
;
--padding-start
:
0px
;
--padding-top
:
0px
;
--padding-top
:
0px
;
}
}
.itemColor
{
--background
:
auto
;
}
.clearColor
{
background-color
:
unset
;
}
.parentDiv
{
width
:
94%
;
margin
:
auto
;
background-color
:
#ffffff
;
border-radius
:
7px
;
padding
:
10px
5px
10px
5px
;
}
.item-title-div
{
margin-left
:
3px
;
margin-right
:
3px
;
overflow
:
hidden
;
border
:
1px
solid
#d3d3d3
94
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.03
);
border-radius
:
2px
;
}
.item-content-div
{
margin-left
:
3px
;
margin-right
:
3px
;
margin-bottom
:
3px
;
overflow
:
hidden
;
border
:
1px
solid
#d3d3d3
94
;
border-radius
:
2px
;
padding-left
:
10px
;
padding-right
:
10px
;
height
:
35px
;
padding-top
:
inherit
;
}
.icon-up-down
{
width
:
15%
;
text-align
:center
;
display
:
inline-block
;
float
:
left
;
padding-top
:
9px
;
}
.sliding-grid
{
--ion-grid-padding
:
0px
;
}
.sliding-col
{
font-size
:
13px
;
flex
:
0
0
auto
;
width
:
auto
;
--ion-grid-column-padding
:
0px
;
}
.sliding-item
{
--inner-padding-top
:
0px
;
--inner-padding-bottom
:
0px
;
--padding-top
:
0px
;
--padding-bottom
:
0px
;
}
.input-tb-text
{
color
:
black
;
}
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
3f9db925
...
@@ -107,7 +107,7 @@ export class EnvCfgPage implements OnInit {
...
@@ -107,7 +107,7 @@ export class EnvCfgPage implements OnInit {
this
.
comm
.
isLoading
=
true
;
this
.
comm
.
isLoading
=
true
;
}
}
},
1000
)
;
},
1000
)
;
this
.
init
();
//
this.init();
}
}
ionViewWillLeave
()
{
ionViewWillLeave
()
{
...
@@ -494,28 +494,28 @@ export class EnvCfgPage implements OnInit {
...
@@ -494,28 +494,28 @@ export class EnvCfgPage implements OnInit {
}
}
}
}
if
(
this
.
light
.
controlModel
===
Constants
.
CONTROLL_SELF
)
{
if
(
this
.
light
.
controlModel
===
Constants
.
CONTROLL_SELF
)
{
let
h
asError
=
false
;
let
lightH
asError
=
false
;
let
hasBlank
=
false
;
let
hasBlank
=
false
;
this
.
light
.
controlConfig
.
map
(
allCfg
=>
{
this
.
light
.
controlConfig
.
map
(
allCfg
=>
{
if
(
!
has
Error
)
{
if
(
!
has
Blank
)
{
hasError
=
this
.
isEmpty
(
allCfg
.
config
.
name
);
//
hasError = this.isEmpty(allCfg.config.name);
hasBlank
=
t
rue
;
hasBlank
=
t
his
.
isEmpty
(
allCfg
.
config
.
name
)
;
}
}
if
(
!
has
Error
)
{
if
(
!
has
Blank
)
{
hasError
=
this
.
isEmpty
(
allCfg
.
config
.
startDate
);
//
hasError = this.isEmpty(allCfg.config.startDate);
hasBlank
=
t
rue
;
hasBlank
=
t
his
.
isEmpty
(
allCfg
.
config
.
startDate
)
;
}
}
if
(
!
has
Error
)
{
if
(
!
has
Blank
)
{
hasError
=
this
.
isEmpty
(
allCfg
.
config
.
stopDate
);
//
hasError = this.isEmpty(allCfg.config.stopDate);
hasBlank
=
t
rue
;
hasBlank
=
t
his
.
isEmpty
(
allCfg
.
config
.
stopDate
)
;
}
}
if
(
!
has
Error
)
{
if
(
!
has
Blank
)
{
hasError
=
this
.
isEmpty
(
allCfg
.
config
.
on
);
//
hasError = this.isEmpty(allCfg.config.on);
hasBlank
=
t
rue
;
hasBlank
=
t
his
.
isEmpty
(
allCfg
.
config
.
on
)
;
}
}
if
(
!
has
Error
)
{
if
(
!
has
Blank
)
{
hasError
=
this
.
isEmpty
(
allCfg
.
config
.
off
);
//
hasError = this.isEmpty(allCfg.config.off);
hasBlank
=
t
rue
;
hasBlank
=
t
his
.
isEmpty
(
allCfg
.
config
.
off
)
;
}
}
// if (!hasError) {
// if (!hasError) {
...
@@ -524,15 +524,15 @@ export class EnvCfgPage implements OnInit {
...
@@ -524,15 +524,15 @@ export class EnvCfgPage implements OnInit {
// if (!hasError) {
// if (!hasError) {
// hasError = this.validateDate(allCfg.config.stopDate);
// hasError = this.validateDate(allCfg.config.stopDate);
// }
// }
if
(
!
has
Error
)
{
if
(
!
has
Blank
)
{
h
asError
=
this
.
validateDateFromTo
(
allCfg
.
config
.
startDate
,
allCfg
.
config
.
stopDate
);
lightH
asError
=
this
.
validateDateFromTo
(
allCfg
.
config
.
startDate
,
allCfg
.
config
.
stopDate
);
}
}
});
});
if
(
h
asError
&&
hasBlank
)
{
if
(
lightH
asError
&&
hasBlank
)
{
this
.
api
.
presentMsgToast
(
'请完成
喷淋
配置'
);
this
.
api
.
presentMsgToast
(
'请完成
照明
配置'
);
return
false
;
return
false
;
}
else
if
(
h
asError
&&
!
hasBlank
)
{
}
else
if
(
lightH
asError
&&
!
hasBlank
)
{
this
.
api
.
presentMsgToast
(
'
喷淋
配置: 请输入正确的日期范围'
);
this
.
api
.
presentMsgToast
(
'
照明
配置: 请输入正确的日期范围'
);
return
false
;
return
false
;
}
}
}
}
...
@@ -604,10 +604,10 @@ export class EnvCfgPage implements OnInit {
...
@@ -604,10 +604,10 @@ export class EnvCfgPage implements OnInit {
validateDateFromTo
(
dateFrom
,
dateTo
)
{
validateDateFromTo
(
dateFrom
,
dateTo
)
{
let
hasError
=
false
;
let
hasError
=
false
;
const
fromMonth
=
parseInt
(
dateFrom
.
slice
(
0
,
2
),
10
);
const
fromMonth
=
parseInt
(
dateFrom
.
slice
(
0
,
2
),
10
);
const
fromDay
=
parseInt
(
dateFrom
.
slice
(
2
,
4
),
10
);
const
fromDay
=
parseInt
(
dateFrom
.
slice
(
3
,
5
),
10
);
const
from
=
new
Date
(
new
Date
().
getFullYear
(),
fromMonth
,
fromDay
).
valueOf
();
const
from
=
new
Date
(
new
Date
().
getFullYear
(),
fromMonth
,
fromDay
).
valueOf
();
const
toMonth
=
parseInt
(
dateTo
.
slice
(
0
,
2
),
10
);
const
toMonth
=
parseInt
(
dateTo
.
slice
(
0
,
2
),
10
);
const
toDay
=
parseInt
(
dateTo
.
slice
(
2
,
4
),
10
);
const
toDay
=
parseInt
(
dateTo
.
slice
(
3
,
5
),
10
);
const
to
=
new
Date
(
new
Date
().
getFullYear
(),
toMonth
,
toDay
).
valueOf
();
const
to
=
new
Date
(
new
Date
().
getFullYear
(),
toMonth
,
toDay
).
valueOf
();
if
(
from
>
to
)
{
if
(
from
>
to
)
{
...
...
src/app/envCtrl/env-change-model/env-change-model.page.scss
View file @
3f9db925
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
}
}
.addIcon
{
.addIcon
{
margin-left
:
160px
;
margin-left
:
calc
(
46%
)
;
}
}
.deleteIcon
{
.deleteIcon
{
...
...
src/app/envCtrl/env-detail/env-detail.page.html
View file @
3f9db925
...
@@ -17,13 +17,14 @@
...
@@ -17,13 +17,14 @@
</div>
</div>
<div
style=
"background-color: #F0F0F0;"
align=
"center"
>
<div
style=
"background-color: #F0F0F0;"
align=
"center"
>
<v-kanban-small
class=
"home-bar"
name=
"温度"
[
inData
]="
item
.
temp
"
iconWidth=
"50%"
unit=
"℃"
[
iconImg
]="'../../
assets
/
img
/
icon-temp
.
png
'"
[
fontColor
]="
item
.
tempColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"温度"
[
inData
]="
item
.
temp
"
iconWidth=
"50%"
unit=
"℃"
[
iconImg
]="'../../
assets
/
img
/
icon-temp
.
png
'"
[
fontColor
]="
item
.
tempColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"湿度"
[
inData
]="
item
.
humi
"
iconWidth=
"50%"
unit=
"%
r
H"
[
iconImg
]="'../../
assets
/
img
/
icon-humi
.
png
'"
[
fontColor
]="
item
.
humiColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"湿度"
[
inData
]="
item
.
humi
"
iconWidth=
"50%"
unit=
"%
R
H"
[
iconImg
]="'../../
assets
/
img
/
icon-humi
.
png
'"
[
fontColor
]="
item
.
humiColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"热应激"
[
inData
]="
item
.
heatStressLevelName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-heat
.
png
'"
[
fontColor
]="
item
.
heatStressColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"热应激"
[
inData
]="
item
.
heatStressLevelName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-heat
.
png
'"
[
fontColor
]="
item
.
heatStressColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"在离舍"
[
inData
]="
inHouseName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-house
.
png
'"
iconColor=
"#61C7CC"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"在离舍"
[
inData
]="
inHouseName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-house
.
png
'"
iconColor=
"#61C7CC"
fontSize=
"14px"
></v-kanban-small>
</div>
</div>
<div
class=
"inHouseDiv font-content-title"
>
<div
class=
"inHouseDiv font-content-title"
>
<ion-label
class=
"inHouseLabel normalColor"
>
在离舍开关控制
</ion-label>
<ion-label
class=
"inHouseLabel normalColor"
>
在离舍开关控制
</ion-label>
<ion-toggle
mode=
"ios"
color=
"secondary"
[(
ngModel
)]="
inHouseState
"
[
checked
]="
inHouseState
"
(
click
)="
inHouseControl
(
inHouseState
)"
></ion-toggle>
<ion-toggle
mode=
"ios"
color=
"secondary"
[(
ngModel
)]="
inHouseState
"
[
checked
]="
inHouseState
"
[
disabled
]="
inHouseDisabled
"
(
click
)="
inHouseControl
(
inHouseState
)"
></ion-toggle>
<!--<v-switch (click)="inHouseControl(item.inHouse)" [value]="item.inHouse.inHouse" [loading]="loading"></v-switch>-->
<!--<v-switch (click)="inHouseControl(item.inHouse)" [value]="item.inHouse.inHouse" [loading]="loading"></v-switch>-->
</div>
</div>
</ion-header>
</ion-header>
...
...
src/app/envCtrl/env-detail/env-detail.page.ts
View file @
3f9db925
...
@@ -5,6 +5,7 @@ import {ActivatedRoute} from '@angular/router';
...
@@ -5,6 +5,7 @@ import {ActivatedRoute} from '@angular/router';
import
{
Load
}
from
'../../service/load'
;
import
{
Load
}
from
'../../service/load'
;
import
{
Transfer
}
from
'../../service/transfer'
;
import
{
Transfer
}
from
'../../service/transfer'
;
import
{
Loading
}
from
'../../service/loading'
;
import
{
Loading
}
from
'../../service/loading'
;
import
{
Constants
}
from
'../../service/constants'
;
@
Component
({
@
Component
({
selector
:
'v-env-detail'
,
selector
:
'v-env-detail'
,
...
@@ -55,6 +56,8 @@ export class EnvDetailPage implements OnInit {
...
@@ -55,6 +56,8 @@ export class EnvDetailPage implements OnInit {
inHouseState
=
false
;
inHouseState
=
false
;
fieldRegionNo
=
''
;
fieldRegionNo
=
''
;
operationModel
=
0
;
inHouseDisabled
=
false
;
// 发送指令延时判断
// 发送指令延时判断
comm
=
{
comm
=
{
...
@@ -83,6 +86,7 @@ export class EnvDetailPage implements OnInit {
...
@@ -83,6 +86,7 @@ export class EnvDetailPage implements OnInit {
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
if
(
data
.
no
)
{
if
(
data
.
no
)
{
this
.
fieldRegionNo
=
data
.
no
;
this
.
fieldRegionNo
=
data
.
no
;
this
.
operationModel
=
data
.
operationModel
;
this
.
getData
(
0
);
this
.
getData
(
0
);
}
}
});
});
...
@@ -102,15 +106,16 @@ export class EnvDetailPage implements OnInit {
...
@@ -102,15 +106,16 @@ export class EnvDetailPage implements OnInit {
this
.
inHouseName
=
this
.
getInHouseState
(
data
.
inHouse
.
inHouse
);
this
.
inHouseName
=
this
.
getInHouseState
(
data
.
inHouse
.
inHouse
);
this
.
inHouseState
=
data
.
inHouse
.
inHouse
===
1
?
true
:
false
;
this
.
inHouseState
=
data
.
inHouse
.
inHouse
===
1
?
true
:
false
;
this
.
initLayout
(
environmentConfigJson
);
this
.
initLayout
(
environmentConfigJson
);
this
.
setConfusionModelControll
();
}
}
}]);
}]);
}
}
initLayout
(
environmentConfigJson
)
{
initLayout
(
environmentConfigJson
)
{
this
.
fanLink
=
'/env-detail/fan/'
;
this
.
fanLink
=
'/env-detail/fan/'
;
this
.
showerLink
=
'/env-detail/shower/'
+
this
.
fieldRegionNo
;
this
.
showerLink
=
'/env-detail/shower/'
+
this
.
fieldRegionNo
+
'/'
+
this
.
item
.
operationModel
;
this
.
lightLink
=
'/env-detail/light/'
+
this
.
fieldRegionNo
;
this
.
lightLink
=
'/env-detail/light/'
+
this
.
fieldRegionNo
+
'/'
+
this
.
item
.
operationModel
;
this
.
waterchannelLink
=
'/env-detail/waterchannel/'
+
this
.
fieldRegionNo
;
this
.
waterchannelLink
=
'/env-detail/waterchannel/'
+
this
.
fieldRegionNo
+
'/'
+
this
.
item
.
operationModel
;
if
(
this
.
item
)
{
if
(
this
.
item
)
{
this
.
item
.
heatStressColor
=
this
.
item
.
heatStressLevel
===
0
?
'#61C7CC'
:
this
.
item
.
heatStressColor
=
this
.
item
.
heatStressLevel
===
0
?
'#61C7CC'
:
...
@@ -220,4 +225,13 @@ export class EnvDetailPage implements OnInit {
...
@@ -220,4 +225,13 @@ export class EnvDetailPage implements OnInit {
// event.target.complete();
// event.target.complete();
// }, 2000);
// }, 2000);
// }
// }
setConfusionModelControll
()
{
// 混乱模式
if
(
this
.
item
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
this
.
inHouseDisabled
=
true
;
}
else
{
this
.
inHouseDisabled
=
false
;
}
}
}
}
src/app/envCtrl/env-fan/env-fan.page.ts
View file @
3f9db925
...
@@ -18,6 +18,7 @@ export class EnvFanPage implements OnInit {
...
@@ -18,6 +18,7 @@ export class EnvFanPage implements OnInit {
/* 风机 */
/* 风机 */
// 牧场区域编号
// 牧场区域编号
fieldRegionNo
=
''
;
fieldRegionNo
=
''
;
operationModel
=
0
;
// 牧场设备类型
// 牧场设备类型
fieldDeviceType
=
''
;
fieldDeviceType
=
''
;
// 模式状态
// 模式状态
...
@@ -75,6 +76,7 @@ export class EnvFanPage implements OnInit {
...
@@ -75,6 +76,7 @@ export class EnvFanPage implements OnInit {
init
()
{
init
()
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
fieldRegionNo
=
data
.
no
;
this
.
fieldRegionNo
=
data
.
no
;
this
.
operationModel
=
data
.
operationModel
;
this
.
getData
(
0
);
this
.
getData
(
0
);
});
});
}
}
...
@@ -93,6 +95,7 @@ export class EnvFanPage implements OnInit {
...
@@ -93,6 +95,7 @@ export class EnvFanPage implements OnInit {
});
});
this
.
initButtons
();
this
.
initButtons
();
this
.
setConfusionModelControll
();
}
}
this
.
load
.
offLoad
();
this
.
load
.
offLoad
();
}]);
}]);
...
@@ -216,32 +219,13 @@ export class EnvFanPage implements OnInit {
...
@@ -216,32 +219,13 @@ export class EnvFanPage implements OnInit {
}]);
}]);
}
}
setConfusionModelControll
()
{
// async presentLoading() {
// 混乱模式
// const loading = await this.loadingController.create({
if
(
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
// message: '通信中,还剩60秒',
this
.
batchSwitch
.
disabled
=
true
;
// duration: 60000
this
.
devices
.
forEach
((
device
)
=>
{
// });
device
.
disabled
=
true
;
// await loading.present();
});
// let item = 60;
}
// setInterval(() => {
}
// item--;
// loading.message = '通信中,还剩' + item + '秒';
// }, 1000)
//
// const { role, data } = await loading.onDidDismiss();
//
// console.log('Loading dismissed!');
// }
// async presentLoadingWithOptions() {
// const loading = await this.loadingController.create({
// spinner: null,
// duration: 5000,
// message: '加载中...',
// translucent: true,
// cssClass: 'custom-class custom-loading'
// });
// return await loading.present();
// }
}
}
src/app/envCtrl/env-history/env-history.page.html
View file @
3f9db925
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<!--</ngx-datatable-column>-->
<!--</ngx-datatable-column>-->
<!--<ngx-datatable-column [name]="'温度 <br>℃'" prop="temp" [width]="60">-->
<!--<ngx-datatable-column [name]="'温度 <br>℃'" prop="temp" [width]="60">-->
<!--</ngx-datatable-column>-->
<!--</ngx-datatable-column>-->
<!--<ngx-datatable-column [name]="'湿度 <br>%
r
H'" prop="humi" [width]="60">-->
<!--<ngx-datatable-column [name]="'湿度 <br>%
R
H'" prop="humi" [width]="60">-->
<!--</ngx-datatable-column>-->
<!--</ngx-datatable-column>-->
<!--<ngx-datatable-column [name]="'氨气浓度 <br>ppm'" prop="NH3" [width]="90">-->
<!--<ngx-datatable-column [name]="'氨气浓度 <br>ppm'" prop="NH3" [width]="90">-->
<!--</ngx-datatable-column>-->
<!--</ngx-datatable-column>-->
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</ngx-datatable-column>
</ngx-datatable-column>
<ngx-datatable-column
name=
"温度<br>℃"
prop=
"temp"
[
width
]="
60
"
>
<ngx-datatable-column
name=
"温度<br>℃"
prop=
"temp"
[
width
]="
60
"
>
</ngx-datatable-column>
</ngx-datatable-column>
<ngx-datatable-column
name=
"湿度<br>%
r
H"
prop=
"humi"
[
width
]="
60
"
>
<ngx-datatable-column
name=
"湿度<br>%
R
H"
prop=
"humi"
[
width
]="
60
"
>
</ngx-datatable-column>
</ngx-datatable-column>
<ngx-datatable-column
name=
"氨气浓度<br>ppm"
prop=
"NH3"
[
width
]="
90
"
>
<ngx-datatable-column
name=
"氨气浓度<br>ppm"
prop=
"NH3"
[
width
]="
90
"
>
</ngx-datatable-column>
</ngx-datatable-column>
...
...
src/app/envCtrl/env-home/env-home.page.html
View file @
3f9db925
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<ion-refresher
slot=
"fixed"
(
ionRefresh
)="
doRefresh
($
event
)"
>
<ion-refresher
slot=
"fixed"
(
ionRefresh
)="
doRefresh
($
event
)"
>
<ion-refresher-content></ion-refresher-content>
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
</ion-refresher>
<h1
class=
"main-title"
>
故障
统计
</h1>
<h1
class=
"main-title"
>
牛舍状况
统计
</h1>
<div
style=
"margin:1%"
>
<div
style=
"margin:1%"
>
<v-kanban-double
class=
"kanban-double"
[
name1
]="'热应激'"
[
name2
]="'故障'"
<v-kanban-double
class=
"kanban-double"
[
name1
]="'热应激'"
[
name2
]="'故障'"
[
inData1
]="
thiGood
"
[
inData2
]="
thiBad
"
[
inData3
]="
alarmTotal
"
[
inData1
]="
thiGood
"
[
inData2
]="
thiBad
"
[
inData3
]="
alarmTotal
"
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
<div
*
ngIf=
"item.NH3 === '--'"
class=
"detailInfo"
style=
"width: 40%"
>
氨气:
{{'--'}}ppm
</div>
<div
*
ngIf=
"item.NH3 === '--'"
class=
"detailInfo"
style=
"width: 40%"
>
氨气:
{{'--'}}ppm
</div>
<div
*
ngIf=
"item.temp !== '--'"
class=
"detailInfo"
style=
"width: 40%"
>
温度:
<span
class=
"{{item.tempColor}}Color"
>
{{item.temp | number:'0.1-1'}}℃
</span></div>
<div
*
ngIf=
"item.temp !== '--'"
class=
"detailInfo"
style=
"width: 40%"
>
温度:
<span
class=
"{{item.tempColor}}Color"
>
{{item.temp | number:'0.1-1'}}℃
</span></div>
<div
*
ngIf=
"item.temp === '--'"
class=
"detailInfo"
style=
"width: 40%"
>
温度:
{{'--'}}℃
</div>
<div
*
ngIf=
"item.temp === '--'"
class=
"detailInfo"
style=
"width: 40%"
>
温度:
{{'--'}}℃
</div>
<div
*
ngIf=
"item.humi !== '--'"
class=
"detailInfo"
style=
"width: 40%"
>
湿度:
<span
class=
"{{item.humiColor}}Color"
>
{{item.humi | number:'0.0-0'}}%
r
H
</span></div>
<div
*
ngIf=
"item.humi !== '--'"
class=
"detailInfo"
style=
"width: 40%"
>
湿度:
<span
class=
"{{item.humiColor}}Color"
>
{{item.humi | number:'0.0-0'}}%
R
H
</span></div>
<div
*
ngIf=
"item.humi === '--'"
class=
"detailInfo"
style=
"width: 40%"
>
湿度:
{{'--'}}%
r
H
</div>
<div
*
ngIf=
"item.humi === '--'"
class=
"detailInfo"
style=
"width: 40%"
>
湿度:
{{'--'}}%
R
H
</div>
</div>
</div>
<div
class=
"bottom"
>
<div
class=
"bottom"
>
<div
style=
"width:100%; margin-top:10px"
>
<div
style=
"width:100%; margin-top:10px"
>
...
...
src/app/envCtrl/env-home/env-home.page.ts
View file @
3f9db925
...
@@ -220,7 +220,7 @@ export class EnvHomePage implements OnInit {
...
@@ -220,7 +220,7 @@ export class EnvHomePage implements OnInit {
}
}
toControl
(
one
)
{
toControl
(
one
)
{
const
query
=
'/env-detail?no='
+
one
.
fieldRegionNo
;
const
query
=
'/env-detail?no='
+
one
.
fieldRegionNo
+
'&operationModel='
+
one
.
operationModel
;
this
.
tf
.
transfer
({
this
.
tf
.
transfer
({
url
:
'/'
+
one
.
url
,
url
:
'/'
+
one
.
url
,
query
:
query
,
query
:
query
,
...
...
src/app/envCtrl/env-light/env-light.page.ts
View file @
3f9db925
...
@@ -16,6 +16,7 @@ export class EnvLightPage implements OnInit {
...
@@ -16,6 +16,7 @@ export class EnvLightPage implements OnInit {
/* 照明 */
/* 照明 */
// 牧场区域编号
// 牧场区域编号
fieldRegionNo
=
''
;
fieldRegionNo
=
''
;
operationModel
=
0
;
// 牧场设备类型
// 牧场设备类型
fieldDeviceType
=
''
;
fieldDeviceType
=
''
;
// 模式状态
// 模式状态
...
@@ -86,6 +87,7 @@ export class EnvLightPage implements OnInit {
...
@@ -86,6 +87,7 @@ export class EnvLightPage implements OnInit {
init
()
{
init
()
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
operationModel
=
+
params
.
get
(
'operationModel'
);
});
});
this
.
getData
(
0
);
this
.
getData
(
0
);
}
}
...
@@ -111,33 +113,13 @@ export class EnvLightPage implements OnInit {
...
@@ -111,33 +113,13 @@ export class EnvLightPage implements OnInit {
});
});
this
.
initButtons
();
this
.
initButtons
();
this
.
setConfusionModelControll
();
}
}
this
.
load
.
offLoad
();
this
.
load
.
offLoad
();
}]);
}]);
}
}
initButtons
()
{
initButtons
()
{
// // 智控:2
// if (this.controlModel === 2) {
// this.batchSwitch.disabled = true;
// this.devices.forEach((device) => {
// device.disabled = true;
// });
// } else if (this.controlModel === 1) {
// // 自控:1
// // 一键控制: 活性 其他按钮: 非活性
// this.batchSwitch.disabled = false;
// this.devices.forEach((device) => {
// device.disabled = true;
// });
// } else {
// // 手控:0
// // 一键控制: 活性 其他按钮: 活性
// this.batchSwitch.disabled = false;
// this.devices.forEach((device) => {
// device.disabled = false;
// });
// }
if
(
this
.
controlModel
===
Constants
.
CONTROLL_REMOTR
||
this
.
controlModel
===
Constants
.
CONTROLL_SELF
)
{
if
(
this
.
controlModel
===
Constants
.
CONTROLL_REMOTR
||
this
.
controlModel
===
Constants
.
CONTROLL_SELF
)
{
// 远控+自控 的场合
// 远控+自控 的场合
...
@@ -229,7 +211,7 @@ export class EnvLightPage implements OnInit {
...
@@ -229,7 +211,7 @@ export class EnvLightPage implements OnInit {
// 一键开启设备
// 一键开启设备
this
.
api
.
control
.
controlCowedBatchSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedBatchSwitch
([
req
,
(
data
)
=>
{
if
(
data
.
code
===
1
)
{
if
(
data
.
code
===
1
)
{
this
.
getData
(
1
);
this
.
getData
(
0
);
this
.
api
.
presentMsgToast
(
data
.
message
);
this
.
api
.
presentMsgToast
(
data
.
message
);
}
else
{
}
else
{
this
.
getData
(
0
);
this
.
getData
(
0
);
...
@@ -278,4 +260,13 @@ export class EnvLightPage implements OnInit {
...
@@ -278,4 +260,13 @@ export class EnvLightPage implements OnInit {
}]);
}]);
}
}
setConfusionModelControll
()
{
// 混乱模式
if
(
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
this
.
batchSwitch
.
disabled
=
true
;
this
.
devices
.
forEach
((
device
)
=>
{
device
.
disabled
=
true
;
});
}
}
}
}
src/app/envCtrl/env-shower/env-shower.page.ts
View file @
3f9db925
...
@@ -26,6 +26,7 @@ export class EnvShowerPage implements OnInit {
...
@@ -26,6 +26,7 @@ export class EnvShowerPage implements OnInit {
// 牧场区域编号
// 牧场区域编号
fieldRegionNo
=
''
;
fieldRegionNo
=
''
;
operationModel
=
0
;
// 牧场设备类型
// 牧场设备类型
fieldDeviceType
=
''
;
fieldDeviceType
=
''
;
// 模式状态
// 模式状态
...
@@ -108,6 +109,7 @@ export class EnvShowerPage implements OnInit {
...
@@ -108,6 +109,7 @@ export class EnvShowerPage implements OnInit {
init
()
{
init
()
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
operationModel
=
+
params
.
get
(
'operationModel'
);
this
.
getData
(
0
);
this
.
getData
(
0
);
});
});
}
}
...
@@ -137,6 +139,7 @@ export class EnvShowerPage implements OnInit {
...
@@ -137,6 +139,7 @@ export class EnvShowerPage implements OnInit {
this
.
fieldDeviceNameB
=
this
.
param
[
1
].
fieldDeviceName
;
this
.
fieldDeviceNameB
=
this
.
param
[
1
].
fieldDeviceName
;
}
}
this
.
initButtons
();
this
.
initButtons
();
this
.
setConfusionModelControll
();
}
}
this
.
load
.
offLoad
();
this
.
load
.
offLoad
();
}]);
}]);
...
@@ -181,4 +184,13 @@ export class EnvShowerPage implements OnInit {
...
@@ -181,4 +184,13 @@ export class EnvShowerPage implements OnInit {
btn
.
loading
=
false
;
btn
.
loading
=
false
;
}]);
}]);
}
}
setConfusionModelControll
()
{
// 混乱模式
if
(
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
this
.
param
.
forEach
((
device
)
=>
{
device
.
disabled
=
true
;
});
}
}
}
}
src/app/service/constants.ts
View file @
3f9db925
...
@@ -14,4 +14,5 @@ export class Constants {
...
@@ -14,4 +14,5 @@ export class Constants {
public
static
CONTROLL_REMOTR
=
1
;
// 远控(手动控制)
public
static
CONTROLL_REMOTR
=
1
;
// 远控(手动控制)
public
static
CONTROLL_SELF
=
2
;
// 自控
public
static
CONTROLL_SELF
=
2
;
// 自控
public
static
CONTROLL_WISDOM
=
3
;
// 智慧控制
public
static
CONTROLL_WISDOM
=
3
;
// 智慧控制
public
static
CONTROLL_CONFUSION
=
4
;
// 智慧控制
}
}
src/assets/img/牛舍.png
0 → 100644
View file @
3f9db925
1.02 KB
src/global.scss
View file @
3f9db925
...
@@ -162,8 +162,12 @@ img {
...
@@ -162,8 +162,12 @@ img {
}
}
.font-content
{
.font-content
{
font-size
:
13px
!
important
;
color
:
#8e8e8e
!
important
;
}
.font-input
{
font-size
:
13px
;
font-size
:
13px
;
color
:
#8e8e8e
;
}
}
.font-note
{
.font-note
{
...
@@ -172,8 +176,8 @@ img {
...
@@ -172,8 +176,8 @@ img {
}
}
.font-smaller
{
.font-smaller
{
font-size
:
12px
;
font-size
:
12px
!
important
;
color
:
#8e8e8e
;
color
:
#8e8e8e
!
important
;
}
}
.font-mini
{
.font-mini
{
...
@@ -186,6 +190,11 @@ img {
...
@@ -186,6 +190,11 @@ img {
color
:
#8e8e8e
;
color
:
#8e8e8e
;
}
}
.font-alarm
{
font-size
:
13px
;
color
:
#F2401C
;
}
.content-text-color
{
.content-text-color
{
color
:
#8e8e8e
;
color
:
#8e8e8e
;
}
}
...
@@ -319,5 +328,5 @@ img {
...
@@ -319,5 +328,5 @@ img {
}
}
.ion-segment-button
{
.ion-segment-button
{
font-size
:
1
6
px
;
font-size
:
1
5
px
;
}
}
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