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
de1e2867
Commit
de1e2867
authored
Nov 13, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口调试
parent
eba7dfa5
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
941 additions
and
728 deletions
+941
-728
env-add-model.page.html
src/app/envCtrl/env-add-model/env-add-model.page.html
+7
-7
env-add-model.page.ts
src/app/envCtrl/env-add-model/env-add-model.page.ts
+6
-7
env-alarm-detail.page.scss
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.scss
+2
-2
env-alarm.page.scss
src/app/envCtrl/env-alarm/env-alarm.page.scss
+1
-1
env-alarm.page.ts
src/app/envCtrl/env-alarm/env-alarm.page.ts
+5
-5
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+34
-97
env-cfg.page.scss
src/app/envCtrl/env-cfg/env-cfg.page.scss
+8
-0
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+336
-304
env-change-model.page.html
src/app/envCtrl/env-change-model/env-change-model.page.html
+8
-8
env-change-model.page.ts
src/app/envCtrl/env-change-model/env-change-model.page.ts
+15
-8
env-detail.page.html
src/app/envCtrl/env-detail/env-detail.page.html
+1
-1
env-detail.page.ts
src/app/envCtrl/env-detail/env-detail.page.ts
+27
-18
env-fan.page.html
src/app/envCtrl/env-fan/env-fan.page.html
+6
-6
env-fan.page.ts
src/app/envCtrl/env-fan/env-fan.page.ts
+49
-31
env-history.page.ts
src/app/envCtrl/env-history/env-history.page.ts
+32
-31
env-home.page.html
src/app/envCtrl/env-home/env-home.page.html
+6
-6
env-home.page.ts
src/app/envCtrl/env-home/env-home.page.ts
+94
-90
env-light.page.html
src/app/envCtrl/env-light/env-light.page.html
+10
-6
env-light.page.scss
src/app/envCtrl/env-light/env-light.page.scss
+12
-2
env-light.page.ts
src/app/envCtrl/env-light/env-light.page.ts
+123
-50
env-shower.page.html
src/app/envCtrl/env-shower/env-shower.page.html
+24
-13
env-shower.page.scss
src/app/envCtrl/env-shower/env-shower.page.scss
+33
-3
env-shower.page.ts
src/app/envCtrl/env-shower/env-shower.page.ts
+39
-19
env-waterchannel.page.html
src/app/envCtrl/env-waterchannel/env-waterchannel.page.html
+5
-5
env-waterchannel.page.scss
src/app/envCtrl/env-waterchannel/env-waterchannel.page.scss
+42
-0
env-waterchannel.page.ts
src/app/envCtrl/env-waterchannel/env-waterchannel.page.ts
+9
-3
api.ts
src/app/service/api.ts
+3
-3
shower-0.png
src/assets/img/shower-0.png
+0
-0
shower-1.png
src/assets/img/shower-1.png
+0
-0
environment.ts
src/environments/environment.ts
+4
-2
No files found.
src/app/envCtrl/env-add-model/env-add-model.page.html
View file @
de1e2867
...
@@ -8,20 +8,20 @@
...
@@ -8,20 +8,20 @@
</ion-header>
</ion-header>
<ion-content
style=
"background-color: #F3F4F4;"
>
<ion-content
style=
"background-color: #F3F4F4;"
>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
>
<ion-item-sliding
*
ngFor=
"let
c
fg of controlConfig"
>
<ion-item-sliding
*
ngFor=
"let
allC
fg of controlConfig"
>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-grid>
<ion-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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
class=
"inputText"
[(
ngModel
)]="
cf
g
.
name
"
style=
"width:80px;"
></ion-input>
<ion-input
class=
"inputText"
[(
ngModel
)]="
allCfg
.
confi
g
.
name
"
style=
"width:80px;"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
interval
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
interval
"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
T
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
T
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
></ion-input>
<ion-label>
℃
</ion-label>
<ion-label>
℃
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -39,14 +39,14 @@
...
@@ -39,14 +39,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
A区喷淋时间
</ion-label>
<ion-label
style=
"width:80px"
>
A区喷淋时间
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
A
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
A
"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
B区喷淋时间
</ion-label>
<ion-label
style=
"width:80px"
>
B区喷淋时间
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
B
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
B
"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</ion-item>
</ion-item>
<ion-item-options
side=
"end"
>
<ion-item-options
side=
"end"
>
<div
style=
"text-content: center; background-color: lightgray;"
>
<div
style=
"text-content: center; background-color: lightgray;"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteModel
(
cf
g
)"
style=
"margin-top: 120px;"
></ion-icon>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteModel
(
allCfg
.
confi
g
)"
style=
"margin-top: 120px;"
></ion-icon>
</div>
</div>
</ion-item-options>
</ion-item-options>
</ion-item-sliding>
</ion-item-sliding>
...
...
src/app/envCtrl/env-add-model/env-add-model.page.ts
View file @
de1e2867
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Api
}
from
'../../service/api'
;
import
{
NavController
,
PickerController
}
from
'@ionic/angular'
;
import
{
NavController
,
PickerController
}
from
'@ionic/angular'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
Load
}
from
'../../service/load'
;
import
{
Transfer
}
from
'../../service/transfer'
;
@
Component
({
@
Component
({
selector
:
'v-env-add-model'
,
selector
:
'v-env-add-model'
,
...
@@ -25,18 +21,21 @@ export class EnvAddModelPage implements OnInit {
...
@@ -25,18 +21,21 @@ export class EnvAddModelPage implements OnInit {
}
}
init
()
{
init
()
{
this
.
controlConfig
=
[{
id
:
1
,
name
:
''
,
interval
:
''
,
T
:
''
,
A
:
''
,
B
:
''
}];
this
.
controlConfig
=
[{
id
:
1
,
config
:
{
id
:
1
,
name
:
''
,
interval
:
''
,
T
:
''
,
A
:
''
,
B
:
''
}
}];
}
}
addModel
()
{
addModel
()
{
const
modelCount
=
this
.
controlConfig
.
length
;
const
modelCount
=
this
.
controlConfig
.
length
;
this
.
controlConfig
.
push
({
id
:
modelCount
+
1
,
name
:
''
,
interval
:
''
,
T
:
''
,
A
:
''
,
B
:
''
});
this
.
controlConfig
.
push
({
id
:
modelCount
+
1
,
config
:
{
id
:
modelCount
+
1
,
name
:
''
,
interval
:
''
,
T
:
''
,
A
:
''
,
B
:
''
}
});
}
}
deleteModel
(
one
)
{
deleteModel
(
one
)
{
const
updateModel
=
this
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
const
updateModel
=
this
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
this
.
controlConfig
=
updateModel
;
this
.
controlConfig
=
updateModel
;
this
.
controlConfig
.
forEach
((
item
,
index
)
=>
item
.
id
=
index
+
1
);
this
.
controlConfig
.
forEach
((
item
,
index
)
=>
{
item
.
id
=
index
+
1
;
item
.
config
.
id
=
index
+
1
;
});
}
}
saveModels
()
{
saveModels
()
{
...
...
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.scss
View file @
de1e2867
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
}
}
.popLabel
{
.popLabel
{
width
:
120px
;
//
width: 120px;
font-size
:
15px
;
font-size
:
15px
;
--padding-start
:
5px
;
--padding-start
:
5px
;
--padding-end
:
5px
;
--padding-end
:
5px
;
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
}
}
.popContent
{
.popContent
{
width
:
135px
!
important
;
//
width: 135px !important;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
margin-right
:
5px
;
margin-right
:
5px
;
--padding-start
:
5px
;
--padding-start
:
5px
;
...
...
src/app/envCtrl/env-alarm/env-alarm.page.scss
View file @
de1e2867
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
}
}
.popContent
{
.popContent
{
width
:
135px
!
important
;
//
width: 135px !important;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
margin-right
:
5px
;
margin-right
:
5px
;
--padding-start
:
5px
;
--padding-start
:
5px
;
...
...
src/app/envCtrl/env-alarm/env-alarm.page.ts
View file @
de1e2867
...
@@ -71,20 +71,20 @@ export class EnvAlarmPage implements OnInit {
...
@@ -71,20 +71,20 @@ export class EnvAlarmPage implements OnInit {
connectedCallback
()
{
connectedCallback
()
{
this
.
innerHTML
=
`
this
.
innerHTML
=
`
<ion-list class="popContent">
<ion-list class="popContent">
<ion-radio-group style="
width: 135px;
">
<ion-radio-group style="">
<ion-item style="
width: 135px;
">
<ion-item style="">
<ion-label class="popLabel">近一年</ion-label>
<ion-label class="popLabel">近一年</ion-label>
<ion-radio slot="start" value="12" checked id="popSelect1"></ion-radio>
<ion-radio slot="start" value="12" checked id="popSelect1"></ion-radio>
</ion-item>
</ion-item>
<ion-item style="
width: 135px;
">
<ion-item style="">
<ion-label class="popLabel">近六个月</ion-label>
<ion-label class="popLabel">近六个月</ion-label>
<ion-radio slot="start" value="6" id="popSelect2"></ion-radio>
<ion-radio slot="start" value="6" id="popSelect2"></ion-radio>
</ion-item>
</ion-item>
<ion-item style="
width: 135px;
">
<ion-item style="">
<ion-label class="popLabel">近三个月</ion-label>
<ion-label class="popLabel">近三个月</ion-label>
<ion-radio slot="start" value="3" id="popSelect3"></ion-radio>
<ion-radio slot="start" value="3" id="popSelect3"></ion-radio>
</ion-item>
</ion-item>
<ion-item style="
width: 135px;
">
<ion-item style="">
<ion-label class="popLabel">近一个月</ion-label>
<ion-label class="popLabel">近一个月</ion-label>
<ion-radio slot="start" value="1" id="popSelect4"></ion-radio>
<ion-radio slot="start" value="1" id="popSelect4"></ion-radio>
</ion-item>
</ion-item>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
de1e2867
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
*
ngIf=
"curCowshed.fieldRegionName"
>
<div
*
ngIf=
"curCowshed.fieldRegionName"
>
<ion-item
lines=
"full"
class=
"subTitle"
>
<ion-item
lines=
"full"
class=
"subTitle"
>
<ion-label>
智慧模式选择
</ion-label>
<ion-label>
智慧模式选择
</ion-label>
<ion-toggle
slot=
"end"
color=
"secondary"
style=
"width:50px"
[
(
checked
)]="
curCowshed
.
isWisdomModel
"
></ion-toggle>
<ion-toggle
slot=
"end"
color=
"secondary"
style=
"width:50px"
[
disabled
]="
true
"
[(
checked
)]="
curCowshed
.
isWisdomModelChecked
"
(
click
)="
toggle
(
curCowshed
.
isWisdomModelChecked
)
"
></ion-toggle>
</ion-item>
</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"
>
选择智慧模式时,风机/喷淋/照明的控制将强制进入有环境条件影响的自控模式
</ion-label>
...
@@ -48,9 +48,8 @@
...
@@ -48,9 +48,8 @@
<div
*
ngIf=
"fan"
>
<div
*
ngIf=
"fan"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-label
style=
"width: 40%"
>
风机模式配置
</ion-label>
<ion-label
style=
"width: 40%"
>
风机模式配置
</ion-label>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
fan
.
controlModel
"
[(
value
)]="
fan
.
controlModel
"
(
ionChange
)="
workModeEvent
(
fengJi
)"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
fan
.
controlModel
"
>
<ion-select-option
value=
"0"
>
手控模式
</ion-select-option>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<ion-select-option
value=
"1"
>
自控模式
</ion-select-option>
</ion-select>
</ion-select>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenFan"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenFan"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenFan"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenFan"
(
click
)="
openItem
('
fanCfg
')"
></ion-icon>
...
@@ -86,28 +85,27 @@
...
@@ -86,28 +85,27 @@
<div
*
ngIf=
"shower"
>
<div
*
ngIf=
"shower"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-label
style=
"width: 40%"
>
喷淋模式配置
</ion-label>
<ion-label
style=
"width: 40%"
>
喷淋模式配置
</ion-label>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
shower
.
controlModel
"
[(
value
)]="
shower
.
controlModel
"
(
ionChange
)="
workModeEvent
(
shower
)"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
shower
.
controlModel
"
>
<ion-select-option
value=
"0"
>
手控模式
</ion-select-option>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<ion-select-option
value=
"1"
>
自控模式
</ion-select-option>
</ion-select>
</ion-select>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenShower"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenShower"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenShower"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenShower"
(
click
)="
openItem
('
showerCfg
')"
></ion-icon>
</ion-item-divider>
</ion-item-divider>
<div
*
ngIf=
"isOpenShower"
@
shrink
>
<div
*
ngIf=
"isOpenShower"
@
shrink
>
<ion-item-sliding
*
ngFor=
"let
c
fg of shower.controlConfig"
>
<ion-item-sliding
*
ngFor=
"let
allC
fg of shower.controlConfig"
>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-grid>
<ion-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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
class=
"inputText"
[(
ngModel
)]="
cf
g
.
name
"
style=
"width:80px;"
></ion-input>
<ion-input
class=
"inputText"
[(
ngModel
)]="
allCfg
.
confi
g
.
name
"
style=
"width:80px;"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
interval
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
interval
"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -116,29 +114,23 @@
...
@@ -116,29 +114,23 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
T
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
T
"
(
ionFocus
)="
tempHaveTouch
($
event
)"
></ion-input>
<ion-label>
℃
</ion-label>
<ion-label>
℃
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<!-- <ion-col size="auto" style="font-size: 13px;">-->
<!-- <ion-item class="fanItem" lines="none">-->
<!-- <ion-label style="width:80px">偏差温度</ion-label>-->
<!-- <ion-input [(ngModel)]="penLinCfg.A" (ionFocus)="tempHaveTouch()" style="width:50px;"></ion-input>-->
<!-- </ion-item>-->
<!-- </ion-col>-->
</ion-row>
</ion-row>
<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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
A区喷淋时间
</ion-label>
<ion-label
style=
"width:80px"
>
A区喷淋时间
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
A
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
A
"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
B区喷淋时间
</ion-label>
<ion-label
style=
"width:80px"
>
B区喷淋时间
</ion-label>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
cf
g
.
B
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:50px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
B
"
></ion-input>
<ion-label>
秒
</ion-label>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -148,7 +140,7 @@
...
@@ -148,7 +140,7 @@
<ion-item-options
side=
"end"
>
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteShowerModel(cfg)">删除</ion-button>-->
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteShowerModel(cfg)">删除</ion-button>-->
<div
style=
"text-content: center; background-color: lightgray;"
>
<div
style=
"text-content: center; background-color: lightgray;"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteShowerModel
(
cf
g
)"
style=
"margin-top: 120px;"
></ion-icon>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteShowerModel
(
allCfg
.
confi
g
)"
style=
"margin-top: 120px;"
></ion-icon>
</div>
</div>
</ion-item-options>
</ion-item-options>
</ion-item-sliding>
</ion-item-sliding>
...
@@ -162,38 +154,37 @@
...
@@ -162,38 +154,37 @@
<div
*
ngIf=
"light"
>
<div
*
ngIf=
"light"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-item-divider
sticky=
"true"
class=
"itemDriver subTitle"
>
<ion-label
style=
"width: 40%"
>
照明配置
</ion-label>
<ion-label
style=
"width: 40%"
>
照明配置
</ion-label>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
light
.
controlModel
"
[(
value
)]="
light
.
controlModel
"
(
ionChange
)="
workModeEvent
(
light
)"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
class=
"selectFont"
[(
ngModel
)]="
light
.
controlModel
"
>
<ion-select-option
value=
"0"
>
手控模式
</ion-select-option>
<ion-select-option
*
ngFor=
"let option of controlModelOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<ion-select-option
value=
"1"
>
自控模式
</ion-select-option>
</ion-select>
</ion-select>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenLight"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
<ion-icon
name=
"add"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"!isOpenLight"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenLight"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
<ion-icon
name=
"remove"
slot=
"end"
class=
"iconOpen"
*
ngIf=
"isOpenLight"
(
click
)="
openItem
('
lightCfg
')"
></ion-icon>
</ion-item-divider>
</ion-item-divider>
<div
*
ngIf=
"isOpenLight"
@
shrink
>
<div
*
ngIf=
"isOpenLight"
@
shrink
>
<ion-item-sliding
*
ngFor=
"let
c
fg of light.controlConfig"
>
<ion-item-sliding
*
ngFor=
"let
allC
fg of light.controlConfig"
>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-grid>
<ion-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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
class=
"inputText"
style=
"width:80px;"
[(
ngModel
)]="
cf
g
.
name
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:80px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
name
"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
<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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<!--<ion-input 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
)]="
cf
g
.
startDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:
8
0px"
>
~
</ion-label>
<ion-label
style=
"width:
6
0px"
>
~
</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
)]="
cf
g
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -201,14 +192,14 @@
...
@@ -201,14 +192,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
开灯时间
</ion-label>
<ion-label
style=
"width:80px"
>
开灯时间
</ion-label>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
cf
g
.
on
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
on
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.on" (ionFocus)="tempHaveTouch()"></ion-input>-->
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.on" (ionFocus)="tempHaveTouch()"></ion-input>-->
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
关灯时间
</ion-label>
<ion-label
style=
"width:80px"
>
关灯时间
</ion-label>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
cf
g
.
off
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
off
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.off" (ionFocus)="tempHaveTouch()"></ion-input>-->
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.off" (ionFocus)="tempHaveTouch()"></ion-input>-->
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -217,7 +208,7 @@
...
@@ -217,7 +208,7 @@
</ion-item>
</ion-item>
<ion-item-options
side=
"end"
>
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteLightModel(cfg)">删除</ion-button>-->
<!--<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
(
cf
g
)"
>
<div
style=
"text-content: center; background-color: lightgray;"
(
click
)="
deleteLightModel
(
allCfg
.
confi
g
)"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top: 70px;"
></ion-icon>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top: 70px;"
></ion-icon>
</div>
</div>
</ion-item-options>
</ion-item-options>
...
@@ -243,14 +234,14 @@
...
@@ -243,14 +234,14 @@
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<!--<ion-input placeholder={{cfg.startTime}} (ionFocus)="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
.
startDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
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;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:
8
0px"
>
~
</ion-label>
<ion-label
style=
"width:
6
0px"
>
~
</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
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
waterChannel
.
controlConfig
.
config
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -291,47 +282,6 @@
...
@@ -291,47 +282,6 @@
</ion-col>
</ion-col>
</ion-row>
</ion-row>
<!--<ion-row>-->
<!--<ion-col>牛群回舍时需恢复上述的设备</ion-col>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col>-->
<!--<ion-item lines="none" class="cow"><ion-label>风机</ion-label>-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start"></ion-checkbox>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--<ion-col>-->
<!--<ion-item lines="none" class="cow"><ion-label>喷淋</ion-label>-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start"></ion-checkbox>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--<ion-col>-->
<!--<ion-item lines="none" class="cow"><ion-label>照明</ion-label>-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start"></ion-checkbox>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col>牛群离舍时需完全关闭的设备</ion-col>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col>-->
<!--<ion-item lines="none" class="cow"><ion-label>风机</ion-label>-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start"></ion-checkbox>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--<ion-col>-->
<!--<ion-item lines="none" class="cow"><ion-label>喷淋</ion-label>-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start"></ion-checkbox>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--<ion-col>-->
<!--<ion-item lines="none" class="cow"><ion-label>照明</ion-label>-->
<!--<ion-checkbox color="primary" class="cowCheckBox" slot="start"></ion-checkbox>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
</ion-grid>
</ion-grid>
</ion-item>
</ion-item>
...
@@ -343,16 +293,6 @@
...
@@ -343,16 +293,6 @@
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenEnvironment"
@
shrink
>
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenEnvironment"
@
shrink
>
<ion-grid>
<ion-grid>
<div
style=
"text-align: center; margin-top:10px; margin-bottom: 10px"
>
<div
style=
"text-align: center; margin-top:10px; margin-bottom: 10px"
>
<!--<ngx-datatable class='material' [rows]="environmentConfig" [columnMode]="'force'" style="white-space: nowrap; text-align: center">-->
<!--<ngx-datatable-column name="" prop="tittle" width="50px;">-->
<!--</ngx-datatable-column>-->
<!--<ngx-datatable-column name="上限" prop="top" width="20px;" >-->
<!--</ngx-datatable-column>-->
<!--<ngx-datatable-column name="下限" prop="lower" width="20px;">-->
<!--</ngx-datatable-column>-->
<!--<ngx-datatable-column name="" prop="symbol" width="5px;" style="margin-left: 0px">-->
<!--</ngx-datatable-column>-->
<!--</ngx-datatable>-->
<table
style=
"width:80%; display: inline-block; text-align: center"
>
<table
style=
"width:80%; display: inline-block; text-align: center"
>
<tr
style=
"height: 30px"
>
<tr
style=
"height: 30px"
>
<th
style=
"width:15%"
></th>
<th
style=
"width:15%"
></th>
...
@@ -374,8 +314,8 @@
...
@@ -374,8 +314,8 @@
</tr>
</tr>
<tr
style=
"height: 30px"
>
<tr
style=
"height: 30px"
>
<th>
氨气
</th>
<th>
氨气
</th>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
H
U
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-bottom: 1px solid"
></ion-input></td>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
NH3
U
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-bottom: 1px solid"
></ion-input></td>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
H
L
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-right: 1px solid; border-bottom: 1px solid"
></ion-input></td>
<td><ion-input
[(
ngModel
)]="
curCowshed
.
environmentConfigJson
.
NH3
L
"
(
ionFocus
)="
humHaveTouch
($
event
)"
class=
"tdBorder"
style=
"border-right: 1px solid; border-bottom: 1px solid"
></ion-input></td>
<td>
ppm
</td>
<td>
ppm
</td>
</tr>
</tr>
...
@@ -392,25 +332,22 @@
...
@@ -392,25 +332,22 @@
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenHeatStress"
@
shrink
>
<ion-item
class=
"fanItem"
*
ngIf=
"isOpenHeatStress"
@
shrink
>
<ion-grid>
<ion-grid>
<ion-row>
<ion-row>
<ion-item
lines=
"none"
class=
"thiItem"
>
计算公式 0.81* 温度 +(0.99*温度-14.3)*湿度+46.3
</ion-item>
<ion-item
lines=
"none"
class=
"thiItem"
>
计算公式 0.81* 温度 +(0.99*温度-14.3)*
湿度+46.3
</ion-item>
</ion-row>
</ion-row>
<ion-row>
<ion-row>
<ion-item
lines=
"none"
class=
"thiItem"
>
等级临界值
</ion-item>
<ion-item
lines=
"none"
class=
"thiItem"
>
等级临界值
</ion-item>
</ion-row>
</ion-row>
<ion-row>
<ion-row>
<ion-col
class=
"thiItem"
>
应激等级
</ion-col>
<ion-col
class=
"thiItem"
>
应激等级
</ion-col>
<ion-col
class=
"thiItem"
>
THI值
(
<
)
</
ion-col
>
<ion-col
class=
"thiItem"
>
THI值
(
<
)
</
ion-col
>
<ion-col
class=
"thiItem"
>
预警方式
</ion-col>
<ion-col
class=
"thiItem"
style=
"text-align:left"
>
预警方式
</ion-col>
</ion-row>
</ion-row>
<ion-row
*
ngFor=
"let heatStress of curCowshed.heatStressList"
>
<ion-row
*
ngFor=
"let heatStress of curCowshed.heatStressList"
>
<ion-col
class=
"thiItem"
>
{{heatStress.heatStressLevel}}
</ion-col>
<ion-col
class=
"thiItem"
>
{{heatStress.heatStressLevel}}
</ion-col>
<ion-col
class=
"thiItem"
>
{{heatStress.thi}}
</ion-col>
<ion-col
class=
"thiItem"
>
{{heatStress.thi}}
</ion-col>
<ion-col
class=
"thiItem"
>
<ion-col
class=
"thiItem"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
heatStress
.
alarmLevel
"
[(
value
)]="
heatStress
.
alarmLevel
"
(
ionChange
)="
workModeEvent
(
heatStress
)"
>
<ion-select
class=
"heatSelect"
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
heatStress
.
alarmLevel
"
>
<ion-select-option
value=
"无"
>
无
</ion-select-option>
<ion-select-option
*
ngFor=
"let alarmWay of alarmWays"
[
value
]="
alarmWay
.
alarmId
"
>
{{alarmWay.alarmValue}}
</ion-select-option>
<ion-select-option
value=
"低"
>
低
</ion-select-option>
<ion-select-option
value=
"中"
>
中
</ion-select-option>
<ion-select-option
value=
"高"
>
高
</ion-select-option>
</ion-select>
</ion-select>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.scss
View file @
de1e2867
...
@@ -81,3 +81,11 @@
...
@@ -81,3 +81,11 @@
margin-left
:
10px
;
margin-left
:
10px
;
margin-right
:
10px
;
margin-right
:
10px
;
}
}
.heatSelect
{
font-size
:
12px
;
--padding-bottom
:
0px
;
--padding-end
:
0px
;
--padding-start
:
0px
;
--padding-top
:
0px
;
}
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
de1e2867
...
@@ -22,7 +22,16 @@ export class EnvCfgPage implements OnInit {
...
@@ -22,7 +22,16 @@ export class EnvCfgPage implements OnInit {
'selecting'
:
false
,
'selecting'
:
false
,
};
};
constructor
(
public
alerCtrl
:
AlertController
,
private
pickerController
:
PickerController
,
controlModelOptions
=
[
{
modelId
:
0
,
modelValue
:
'手控模式'
},
{
modelId
:
1
,
modelValue
:
'自控模式'
}];
alarmWays
=
[
{
alarmId
:
'无'
,
alarmValue
:
'无'
},
{
alarmId
:
'平台'
,
alarmValue
:
'平台'
},
{
alarmId
:
'平台/短信'
,
alarmValue
:
'平/短'
}];
constructor
(
public
alerCtrl
:
AlertController
,
private
pickerController
:
PickerController
,
private
alertController
:
AlertController
,
private
api
:
Api
,
private
load
:
Load
,
public
nav
:
NavController
,
private
tf
:
Transfer
,
private
ac
:
ActivatedRoute
)
{
private
api
:
Api
,
private
load
:
Load
,
public
nav
:
NavController
,
private
tf
:
Transfer
,
private
ac
:
ActivatedRoute
)
{
}
}
...
@@ -36,7 +45,7 @@ export class EnvCfgPage implements OnInit {
...
@@ -36,7 +45,7 @@ export class EnvCfgPage implements OnInit {
fieldRegionNo
:
''
,
fieldRegionNo
:
''
,
fieldRegionName
:
''
,
fieldRegionName
:
''
,
isWisdomModel
:
0
,
isWisdomModel
:
0
,
propertyConfig
:
{
toft
:
''
,
hoft
:
''
},
propertyConfig
:
{
toft
:
0
,
hoft
:
0
},
config
:
[],
config
:
[],
leave
:
[{
type
:
'风机'
,
flag
:
true
},
{
type
:
'喷淋'
,
flag
:
false
},
{
type
:
'照明'
,
flag
:
true
}],
leave
:
[{
type
:
'风机'
,
flag
:
true
},
{
type
:
'喷淋'
,
flag
:
false
},
{
type
:
'照明'
,
flag
:
true
}],
back
:
[{
type
:
'风机'
,
flag
:
false
},
{
type
:
'喷淋'
,
flag
:
true
},
{
type
:
'照明'
,
flag
:
false
}],
back
:
[{
type
:
'风机'
,
flag
:
false
},
{
type
:
'喷淋'
,
flag
:
true
},
{
type
:
'照明'
,
flag
:
false
}],
...
@@ -107,33 +116,6 @@ export class EnvCfgPage implements OnInit {
...
@@ -107,33 +116,6 @@ export class EnvCfgPage implements OnInit {
return
options
;
return
options
;
}
}
workModeEvent
(
item
)
{
// this.updateCowshed();
}
// async openCalendarPicker(numColumns = 1, numOptions = 5, columnOptions = this.defaultColumnOptions) {
// const picker = await this.pickerController.create({
// columns: this.getColumns(numColumns, numOptions, columnOptions),
// buttons: [
// {
// text: 'Cancel',
// role: 'cancel',
// handler: () => {
// this.fanMode.selecting = false;
// }
// },
// {
// text: 'Confirm',
// handler: (value) => {
// console.log(`Got Value ${value}`);
// this.fanMode.selecting = false;
// }
// }
// ]
// });
// await picker.present();
// }
tempHaveTouch
(
event
)
{
tempHaveTouch
(
event
)
{
for
(
let
i
=
10
;
i
<=
50
;
i
++
)
{
for
(
let
i
=
10
;
i
<=
50
;
i
++
)
{
this
.
defaultColumnOptions
[
0
][
i
-
10
]
=
i
.
toString
();
this
.
defaultColumnOptions
[
0
][
i
-
10
]
=
i
.
toString
();
...
@@ -155,14 +137,6 @@ export class EnvCfgPage implements OnInit {
...
@@ -155,14 +137,6 @@ export class EnvCfgPage implements OnInit {
}
}
}
}
lightTimeHaveFouch
()
{
// console.log('lightTimeHaveFouch');
// if (this.light.selecting === false) {
// this.light.selecting = true;
// this.openPicker();
// }
}
ngOnInit
()
{
ngOnInit
()
{
// this.pickerController = document.querySelector('ion-picker-controller');
// this.pickerController = document.querySelector('ion-picker-controller');
this
.
init
();
this
.
init
();
...
@@ -177,6 +151,7 @@ export class EnvCfgPage implements OnInit {
...
@@ -177,6 +151,7 @@ export class EnvCfgPage implements OnInit {
const
count
=
this
.
shower
.
controlConfig
.
length
;
const
count
=
this
.
shower
.
controlConfig
.
length
;
cfg
.
forEach
((
item
,
index
)
=>
{
cfg
.
forEach
((
item
,
index
)
=>
{
item
.
id
=
index
+
1
+
count
;
item
.
id
=
index
+
1
+
count
;
item
.
config
.
id
=
index
+
1
+
count
;
});
});
this
.
shower
.
controlConfig
=
[...
this
.
shower
.
controlConfig
,
...
cfg
];
this
.
shower
.
controlConfig
=
[...
this
.
shower
.
controlConfig
,
...
cfg
];
}
else
if
(
data
.
changeModelCfg
)
{
}
else
if
(
data
.
changeModelCfg
)
{
...
@@ -195,157 +170,157 @@ export class EnvCfgPage implements OnInit {
...
@@ -195,157 +170,157 @@ export class EnvCfgPage implements OnInit {
if
(
time
)
{
if
(
time
)
{
this
.
load
.
toLoad
(
'加载中...'
,
false
);
this
.
load
.
toLoad
(
'加载中...'
,
false
);
}
}
// this.api.cowshedApp.getAllRegionData
(['', (data) => {
this
.
api
.
cowshedApp
.
getAll
([
''
,
(
data
)
=>
{
//
// 获取所有牛舍信息
// 获取所有牛舍信息
//
if (data) {
if
(
data
)
{
//
// 牛舍列表
// 牛舍列表
//
if (data.resultIndexDataListForAppVos && data.resultIndexDataListForAppVos.constructor === Array) {
if
(
data
.
resultIndexDataListForAppVos
&&
data
.
resultIndexDataListForAppVos
.
constructor
===
Array
)
{
//
this.isError = false;
this
.
isError
=
false
;
//
this.cowshedList = data.resultIndexDataListForAppVos;
this
.
cowshedList
=
data
.
resultIndexDataListForAppVos
;
//
} else {
}
else
{
//
this.api.presentMsgToast('获取数据失败');
this
.
api
.
presentMsgToast
(
'获取数据失败'
);
//
this.isError = true;
this
.
isError
=
true
;
//
}
}
//
}
}
//
this.load.offLoad();
this
.
load
.
offLoad
();
//
}]);
}]);
// ----------------------------------------------------
//
START
----------------------------------------------------
// TODO 测试用准备数据
// TODO 测试用准备数据
this
.
cowshedList
=
[
//
this.cowshedList = [
{
//
{
// 0-无热应激 离线 无报警
//
// 0-无热应激 离线 无报警
fieldRegionNo
:
'FRN136641006052720640'
,
//
fieldRegionNo: 'FRN136641006052720640',
fieldRegionName
:
'1号牛舍'
,
//
fieldRegionName: '1号牛舍',
temp
:
'23.5'
,
//
temp: '23.5',
humi
:
'82'
,
//
humi: '82',
heatStressLevel
:
'0'
,
//
heatStressLevel: '0',
online
:
0
,
// 0-离线,1-在线
//
online: 0, // 0-离线,1-在线
alarm
:
0
,
//
alarm: 0,
ts
:
'2019-08-05 23:44'
,
//
ts: '2019-08-05 23:44',
},
//
},
{
//
{
// 1-轻度热应激 在线 现控 无报警
//
// 1-轻度热应激 在线 现控 无报警
fieldRegionNo
:
'FN108050436279648256'
,
//
fieldRegionNo: 'FN108050436279648256',
fieldRegionName
:
'2号牛舍'
,
//
fieldRegionName: '2号牛舍',
temp
:
'23.5'
,
//
temp: '23.5',
humi
:
'82'
,
//
humi: '82',
heatStressLevel
:
'1'
,
//
heatStressLevel: '1',
online
:
1
,
// 0-离线,1-在线
//
online: 1, // 0-离线,1-在线
operationModel
:
0
,
// 0-现控,1-平控
//
operationModel: 0, // 0-现控,1-平控
alarm
:
0
,
//
alarm: 0,
ts
:
'2019-08-05 23:44'
,
//
ts: '2019-08-05 23:44',
},
//
},
{
//
{
// 2-中度热应激 在线 平控 非智控(手控) 有报警
//
// 2-中度热应激 在线 平控 非智控(手控) 有报警
fieldRegionNo
:
'FN108050436279648256'
,
//
fieldRegionNo: 'FN108050436279648256',
fieldRegionName
:
'3号牛舍'
,
//
fieldRegionName: '3号牛舍',
temp
:
'23.5'
,
//
temp: '23.5',
humi
:
'82'
,
//
humi: '82',
heatStressLevel
:
'2'
,
//
heatStressLevel: '2',
online
:
1
,
// 0-离线,1-在线
//
online: 1, // 0-离线,1-在线
operationModel
:
1
,
// 0-现控,1-平控
//
operationModel: 1, // 0-现控,1-平控
isWisdomModel
:
0
,
// 0-非智控(手控),1-智控
//
isWisdomModel: 0, // 0-非智控(手控),1-智控
alarm
:
1
,
//
alarm: 1,
ts
:
'2019-08-05 23:44'
,
//
ts: '2019-08-05 23:44',
},
//
},
{
//
{
// 3-重度热应激 在线 平控 非智控(自控) 有报警
//
// 3-重度热应激 在线 平控 非智控(自控) 有报警
fieldRegionNo
:
'FN108050436279648256'
,
//
fieldRegionNo: 'FN108050436279648256',
fieldRegionName
:
'4号牛舍'
,
//
fieldRegionName: '4号牛舍',
temp
:
'23.5'
,
//
temp: '23.5',
humi
:
'82'
,
//
humi: '82',
heatStressLevel
:
'3'
,
//
heatStressLevel: '3',
online
:
1
,
// 0-离线,1-在线
//
online: 1, // 0-离线,1-在线
operationModel
:
1
,
// 0-现控,1-平控
//
operationModel: 1, // 0-现控,1-平控
isWisdomModel
:
0
,
// 0-非智控(自控),1-智控
//
isWisdomModel: 0, // 0-非智控(自控),1-智控
alarm
:
1
,
//
alarm: 1,
ts
:
'2019-08-05 23:44'
,
//
ts: '2019-08-05 23:44',
},
//
},
{
//
{
// 4-II重度热应激 在线 平控 智控 有报警
//
// 4-II重度热应激 在线 平控 智控 有报警
fieldRegionNo
:
'FN108050436279648256'
,
//
fieldRegionNo: 'FN108050436279648256',
fieldRegionName
:
'测试用5号牛舍'
,
//
fieldRegionName: '测试用5号牛舍',
temp
:
'23.5'
,
//
temp: '23.5',
humi
:
'82'
,
//
humi: '82',
heatStressLevel
:
'4'
,
//
heatStressLevel: '4',
online
:
1
,
// 0-离线,1-在线
//
online: 1, // 0-离线,1-在线
operationModel
:
1
,
// 0-现控,1-平控
//
operationModel: 1, // 0-现控,1-平控
isWisdomModel
:
1
,
// 0-非智控(自控),1-智控
//
isWisdomModel: 1, // 0-非智控(自控),1-智控
alarm
:
1
,
//
alarm: 1,
ts
:
'2019-08-05 23:44'
,
//
ts: '2019-08-05 23:44',
},
//
},
];
//
];
// ----------------------------------------------------
//
END
----------------------------------------------------
}
}
// 获取当前牛舍配置信息
// 获取当前牛舍配置信息
selectCowshed
()
{
selectCowshed
()
{
this
.
api
.
config
.
get
All
([{
'fieldRegionNo'
:
this
.
curFieldRegionNo
},
(
data
)
=>
{
this
.
api
.
config
.
get
ByFieldRegionNo
([{
fieldRegionNo
:
this
.
curFieldRegionNo
},
(
data
)
=>
{
// ----------------------------------------------------
//
START
----------------------------------------------------
// TODO 测试用准备数据
// TODO 测试用准备数据
data
=
{
// data = {
factoryNo
:
'FN108050436279648256'
,
// factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
// factoryName: '一厂',
fieldRegionNo
:
'FRN136641006052720640'
,
// fieldRegionNo: 'FRN136641006052720640',
fieldRegionName
:
'1号牛舍'
,
// fieldRegionName: '1号牛舍',
isWisdomModel
:
1
,
// isWisdomModel: 1,
propertyConfig
:
{
toft
:
'1.5'
,
hoft
:
'2'
},
// propertyConfig: {toft: '1.5', hoft: '2'},
config
:
[
// config: [
{
fieldDeviceType
:
'风机'
,
// {fieldDeviceType: '风机',
controlModel
:
'0'
,
// controlModel: '0',
controlConfig
:
{
TU
:
28
,
TL
:
20
},
// controlConfig: {TU: 28, TL: 20},
},
// },
{
fieldDeviceType
:
'喷淋'
,
// {fieldDeviceType: '喷淋',
controlModel
:
'1'
,
// controlModel: '1',
controlConfig
:
[{
id
:
1
,
name
:
'模式一'
,
T
:
21
,
A
:
35
,
B
:
45
,
interval
:
55
},
// controlConfig: [{id: 1, name: '模式一', T: 21, A: 35, B: 45, interval: 55},
{
id
:
2
,
name
:
'模式二'
,
T
:
21
,
A
:
35
,
B
:
45
,
interval
:
55
}]
// {id: 2, name: '模式二', T: 21, A: 35, B: 45, interval: 55}]
},
// },
{
fieldDeviceType
:
'照明'
,
// {fieldDeviceType: '照明',
controlModel
:
'1'
,
// controlModel: '1',
controlConfig
:
[{
id
:
1
,
name
:
'模式A'
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
,
on
:
'19:00'
,
off
:
'05:00'
},
// controlConfig: [{id: 1, name: '模式A', startDate: '10-01', stopDate: '11-02', on: '19:00', off: '05:00'},
{
id
:
2
,
name
:
'模式B'
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
,
on
:
'19:00'
,
off
:
'05:00'
}]
// {id: 2, name: '模式B', startDate: '10-01', stopDate: '11-02', on: '19:00', off: '05:00'}]
},
// },
{
fieldDeviceType
:
'水槽'
,
// {fieldDeviceType: '水槽',
controlModel
:
'0'
,
// controlModel: '0',
controlConfig
:
{
power
:
100
,
startDate
:
'10-01'
,
stopDate
:
'11-02'
},
// controlConfig: {power: 100, startDate: '10-01', stopDate: '11-02'},
}
// }
],
// ],
leave
:
[{
type
:
'风机'
,
flag
:
true
},
{
type
:
'喷淋'
,
flag
:
false
},
{
type
:
'照明'
,
flag
:
true
}],
// leave: [{type: '风机', flag: true}, {type: '喷淋', flag: false}, {type: '照明', flag: true}],
back
:
[{
type
:
'风机'
,
flag
:
false
},
{
type
:
'喷淋'
,
flag
:
true
},
{
type
:
'照明'
,
flag
:
false
}],
// back: [{type: '风机', flag: false}, {type: '喷淋', flag: true}, {type: '照明', flag: false}],
environmentConfigJson
:
{
HL
:
0
,
HU
:
100
,
TL
:
-
10
,
TU
:
50
},
// environmentConfigJson: {HL: 0, HU: 100, TL: -10, TU: 50},
heatStressList
:
[
// heatStressList: [
{
// {
heatStressLevel
:
'无应激'
,
// heatStressLevel: '无应激',
alarmLevel
:
'无'
,
// alarmLevel: '无',
thi
:
68
// thi: 68
},
// },
{
// {
heatStressLevel
:
'轻度应激'
,
// heatStressLevel: '轻度应激',
alarmLevel
:
'低'
,
// alarmLevel: '低',
thi
:
72
// thi: 72
},
// },
{
// {
heatStressLevel
:
'中度应激'
,
// heatStressLevel: '中度应激',
alarmLevel
:
'中'
,
// alarmLevel: '中',
thi
:
80
// thi: 80
},
// },
{
// {
heatStressLevel
:
'重度应激'
,
// heatStressLevel: '重度应激',
alarmLevel
:
'高'
,
// alarmLevel: '高',
thi
:
90
// thi: 90
},
// },
{
// {
heatStressLevel
:
'II重度应激'
,
// heatStressLevel: 'II重度应激',
alarmLevel
:
'高'
,
// alarmLevel: '高',
thi
:
100
// thi: 100
}
// }
]
// ]
};
// };
// ----------------------------------------------------
// END----------------------------------------------------
if
(
data
)
{
if
(
data
)
{
this
.
curCowshed
=
data
;
this
.
curCowshed
=
data
;
this
.
curCowshed
.
isWisdomModelChecked
=
this
.
curCowshed
.
isWisdomModel
?
true
:
false
;
this
.
initConfig
();
this
.
initConfig
();
}
else
{
}
else
{
this
.
api
.
presentMsgToast
(
'获取数据失败'
);
this
.
api
.
presentMsgToast
(
'获取数据失败'
);
...
@@ -366,13 +341,25 @@ export class EnvCfgPage implements OnInit {
...
@@ -366,13 +341,25 @@ export class EnvCfgPage implements OnInit {
this
.
fan
=
value
;
this
.
fan
=
value
;
break
;
break
;
case
'喷淋'
:
case
'喷淋'
:
this
.
shower
=
value
;
const
showerConfig
=
JSON
.
parse
(
value
.
controlConfig
);
this
.
shower
.
fieldDeviceType
=
value
.
fieldDeviceType
;
this
.
shower
.
controlModel
=
value
.
controlModel
;
this
.
shower
.
dataConfig
=
value
.
dataConfig
;
this
.
shower
.
controlConfig
=
showerConfig
;
break
;
break
;
case
'照明'
:
case
'照明'
:
this
.
light
=
value
;
const
lightConfig
=
JSON
.
parse
(
value
.
controlConfig
);
this
.
light
.
fieldDeviceType
=
value
.
fieldDeviceType
;
this
.
light
.
controlModel
=
value
.
controlModel
;
this
.
light
.
dataConfig
=
value
.
dataConfig
;
this
.
light
.
controlConfig
=
lightConfig
;
break
;
break
;
case
'水槽'
:
case
'水槽'
:
this
.
waterChannel
=
value
;
const
waterChannelConfig
=
JSON
.
parse
(
value
.
controlConfig
);
this
.
waterChannel
.
fieldDeviceType
=
value
.
fieldDeviceType
;
this
.
waterChannel
.
controlModel
=
value
.
controlModel
;
this
.
waterChannel
.
dataConfig
=
value
.
dataConfig
;
this
.
waterChannel
.
controlConfig
=
waterChannelConfig
;
break
;
break
;
default
:
default
:
break
;
break
;
...
@@ -389,9 +376,49 @@ export class EnvCfgPage implements OnInit {
...
@@ -389,9 +376,49 @@ export class EnvCfgPage implements OnInit {
// }
// }
}
}
toggle
(
isWisdomModelChecked
)
{
// btn.op = btn.op ? 1 : 0;
// event.preventDefault();
// a.loading = true;
this
.
opChangeComfirm
(
isWisdomModelChecked
);
}
async
opChangeComfirm
(
isWisdomModelChecked
)
{
const
msgOp
=
isWisdomModelChecked
?
'打开'
:
'关闭'
;
const
alert
=
await
this
.
alertController
.
create
({
header
:
'请注意'
,
// subHeader: '确定要' + msgOp + ' ' + msgHeader + ' 这个泵吗?',
message
:
'即将'
+
msgOp
+
'智慧模式,要继续吗?'
,
mode
:
'ios'
,
buttons
:
[
{
text
:
'取消'
,
cssClass
:
'width: 40%'
,
handler
:
()
=>
{
this
.
curCowshed
.
isWisdomModelChecked
=
!
isWisdomModelChecked
;
event
.
preventDefault
();
}
},
{
text
:
'确定'
,
cssClass
:
'width: 40%'
,
handler
:
()
=>
{
this
.
changeWisdomModel
(
isWisdomModelChecked
);
}
}
]
});
await
alert
.
present
();
}
changeWisdomModel
(
isWisdomModelChecked
)
{
}
// 修改牛舍配置
// 修改牛舍配置
updateCowshed
()
{
updateCowshed
()
{
this
.
api
.
config
.
updateCowshedConfig
([
this
.
curCowshed
,
(
data
)
=>
{
this
.
curCowshed
.
isWisdomModel
=
this
.
curCowshed
.
isWisdomModelChecked
?
1
:
0
;
this
.
api
.
config
.
updateConfig
([
this
.
curCowshed
,
(
data
)
=>
{
if
(
data
)
{
if
(
data
)
{
console
.
log
(
'更新成功'
);
console
.
log
(
'更新成功'
);
}
else
{
}
else
{
...
@@ -405,45 +432,45 @@ export class EnvCfgPage implements OnInit {
...
@@ -405,45 +432,45 @@ export class EnvCfgPage implements OnInit {
onReferenceModel
()
{
onReferenceModel
()
{
let
popFanModels
=
{};
let
popFanModels
=
{};
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'风机'
},
(
data
)
=>
{
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'风机'
},
(
data
)
=>
{
// ---------------------------------------------------------
//
START
---------------------------------------------------------
// TODO 测试用数据
// TODO 测试用数据
data
=
[{
//
data = [{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'春季1'
,
//
patternModelName: '春季1',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
{
name
:
'模式名A'
,
TU
:
20
,
TL
:
-
10
},
//
configJson: {name: '模式名A', TU: 20, TL: -10},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'夏季2'
,
//
patternModelName: '夏季2',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
{
name
:
'模式名A'
,
TU
:
20
,
TL
:
-
10
},
//
configJson: {name: '模式名A', TU: 20, TL: -10},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'秋季3'
,
//
patternModelName: '秋季3',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
{
name
:
'模式名A'
,
TU
:
20
,
TL
:
-
10
},
//
configJson: {name: '模式名A', TU: 20, TL: -10},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'冬季4'
,
//
patternModelName: '冬季4',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
{
name
:
'模式名'
,
TU
:
20
,
TL
:
-
10
},
//
configJson: {name: '模式名', TU: 20, TL: -10},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
}];
//
}];
// ---------------------------------------------------------
//
END
---------------------------------------------------------
if
(
data
)
{
if
(
data
)
{
popFanModels
=
data
;
popFanModels
=
data
;
this
.
selectModel
(
'风机'
,
1
,
popFanModels
);
this
.
selectModel
(
'风机'
,
1
,
popFanModels
);
...
@@ -456,45 +483,45 @@ export class EnvCfgPage implements OnInit {
...
@@ -456,45 +483,45 @@ export class EnvCfgPage implements OnInit {
let
popShowerModels
=
{};
let
popShowerModels
=
{};
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'喷淋'
},
(
data
)
=>
{
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'喷淋'
},
(
data
)
=>
{
// ---------------------------------------------------------
//
START
---------------------------------------------------------
// TODO 测试用数据
// TODO 测试用数据
data
=
[{
//
data = [{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'春季1'
,
//
patternModelName: '春季1',
fieldDeviceType
:
'喷淋'
,
//
fieldDeviceType: '喷淋',
configJson
:
{
name
:
'模式名A'
,
T
:
25
,
offset
:
3
,
A
:
25
,
B
:
25
,
interval
:
30
},
//
configJson: {name: '模式名A', T: 25, offset: 3, A: 25, B: 25, interval: 30},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'夏季2'
,
//
patternModelName: '夏季2',
fieldDeviceType
:
'喷淋'
,
//
fieldDeviceType: '喷淋',
configJson
:
{
name
:
'模式名A'
,
T
:
25
,
offset
:
3
,
A
:
25
,
B
:
25
,
interval
:
30
},
//
configJson: {name: '模式名A', T: 25, offset: 3, A: 25, B: 25, interval: 30},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'秋季3'
,
//
patternModelName: '秋季3',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
{
name
:
'模式名A'
,
T
:
25
,
offset
:
3
,
A
:
25
,
B
:
25
,
interval
:
30
},
//
configJson: {name: '模式名A', T: 25, offset: 3, A: 25, B: 25, interval: 30},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'冬季4'
,
//
patternModelName: '冬季4',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
{
name
:
'模式名A'
,
T
:
25
,
offset
:
3
,
A
:
25
,
B
:
25
,
interval
:
30
},
//
configJson: {name: '模式名A', T: 25, offset: 3, A: 25, B: 25, interval: 30},
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
}];
//
}];
// ---------------------------------------------------------
//
END
---------------------------------------------------------
if
(
data
)
{
if
(
data
)
{
popShowerModels
=
data
;
popShowerModels
=
data
;
this
.
selectModel
(
'喷淋'
,
2
,
popShowerModels
);
this
.
selectModel
(
'喷淋'
,
2
,
popShowerModels
);
...
@@ -507,49 +534,49 @@ export class EnvCfgPage implements OnInit {
...
@@ -507,49 +534,49 @@ export class EnvCfgPage implements OnInit {
let
popLightModels
=
{};
let
popLightModels
=
{};
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'照明'
},
(
data
)
=>
{
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'照明'
},
(
data
)
=>
{
// ---------------------------------------------------------
//
START
---------------------------------------------------------
// TODO 测试用数据
// TODO 测试用数据
data
=
[{
//
data = [{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'春季1'
,
//
patternModelName: '春季1',
fieldDeviceType
:
'照明'
,
//
fieldDeviceType: '照明',
configJson
:
[{
name
:
'模式名A'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
},
//
configJson: [{name: '模式名A', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'},
{
name
:
'模式名B'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
}],
//
{name: '模式名B', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'}],
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'夏季2'
,
//
patternModelName: '夏季2',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
[{
name
:
'模式名A'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
},
//
configJson: [{name: '模式名A', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'},
{
name
:
'模式名B'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
}],
//
{name: '模式名B', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'}],
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'秋季3'
,
//
patternModelName: '秋季3',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
[{
name
:
'模式名A'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
},
//
configJson: [{name: '模式名A', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'},
{
name
:
'模式名B'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
}],
//
{name: '模式名B', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'}],
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
},
//
},
{
//
{
patternModelNo
:
'1234681324789546'
,
//
patternModelNo: '1234681324789546',
patternModelName
:
'冬季4'
,
//
patternModelName: '冬季4',
fieldDeviceType
:
'风机'
,
//
fieldDeviceType: '风机',
configJson
:
[{
name
:
'模式名A'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
},
//
configJson: [{name: '模式名A', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'},
{
name
:
'模式名B'
,
startDate
:
'03-01'
,
stopDate
:
'05-01'
,
on
:
'19:00'
,
off
:
'07:00'
}],
//
{name: '模式名B', startDate: '03-01', stopDate: '05-01', on: '19:00', off: '07:00'}],
factoryNo
:
'FN108050436279648256'
,
//
factoryNo: 'FN108050436279648256',
factoryName
:
'一厂'
,
//
factoryName: '一厂',
remark
:
'测试'
//
remark: '测试'
}];
//
}];
// ---------------------------------------------------------
//
END
---------------------------------------------------------
if
(
data
)
{
if
(
data
)
{
popLightModels
=
data
;
popLightModels
=
data
;
this
.
selectModel
(
'照明'
,
3
,
popLightModels
);
this
.
selectModel
(
'照明'
,
3
,
popLightModels
);
...
@@ -652,14 +679,19 @@ export class EnvCfgPage implements OnInit {
...
@@ -652,14 +679,19 @@ export class EnvCfgPage implements OnInit {
deleteShowerModel
(
one
)
{
deleteShowerModel
(
one
)
{
const
updateModel
=
this
.
shower
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
const
updateModel
=
this
.
shower
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
this
.
shower
.
controlConfig
=
updateModel
;
this
.
shower
.
controlConfig
=
updateModel
;
this
.
shower
.
controlConfig
.
forEach
((
item
,
index
)
=>
item
.
id
=
index
+
1
);
this
.
shower
.
controlConfig
.
forEach
((
item
,
index
)
=>
{
item
.
id
=
index
+
1
;
item
.
config
.
id
=
index
+
1
;
});
}
}
deleteLightModel
(
one
)
{
deleteLightModel
(
one
)
{
const
updateModel
=
this
.
light
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
const
updateModel
=
this
.
light
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
this
.
light
.
controlConfig
=
updateModel
;
this
.
light
.
controlConfig
=
updateModel
;
this
.
light
.
controlConfig
.
forEach
((
item
,
index
)
=>
item
.
id
=
index
+
1
);
this
.
light
.
controlConfig
.
forEach
((
item
,
index
)
=>
{
item
.
id
=
index
+
1
;
item
.
config
.
id
=
index
+
1
;
});
}
}
toNextPage
(
device
)
{
toNextPage
(
device
)
{
...
...
src/app/envCtrl/env-change-model/env-change-model.page.html
View file @
de1e2867
...
@@ -8,14 +8,14 @@
...
@@ -8,14 +8,14 @@
</ion-header>
</ion-header>
<ion-content
style=
"background-color: #F3F4F4;"
>
<ion-content
style=
"background-color: #F3F4F4;"
>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
>
<ion-item-sliding
*
ngFor=
"let
c
fg of controlConfig"
>
<ion-item-sliding
*
ngFor=
"let
allC
fg of controlConfig"
>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-grid>
<ion-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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
class=
"inputText"
style=
"width:80px;"
[(
ngModel
)]="
cf
g
.
name
"
></ion-input>
<ion-input
class=
"inputText"
style=
"width:80px;"
[(
ngModel
)]="
allCfg
.
confi
g
.
name
"
></ion-input>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -24,14 +24,14 @@
...
@@ -24,14 +24,14 @@
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<ion-label
style=
"width:80px"
>
日期范围
</ion-label>
<!--<ion-input 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
)]="
cf
g
.
startDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
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;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:
8
0px"
>
~
</ion-label>
<ion-label
style=
"width:
6
0px"
>
~
</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
)]="
cf
g
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -39,14 +39,14 @@
...
@@ -39,14 +39,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
开灯时间
</ion-label>
<ion-label
style=
"width:80px"
>
开灯时间
</ion-label>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
cf
g
.
on
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
on
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.on" (ionFocus)="tempHaveTouch()"></ion-input>-->
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.on" (ionFocus)="tempHaveTouch()"></ion-input>-->
</ion-item>
</ion-item>
</ion-col>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
关灯时间
</ion-label>
<ion-label
style=
"width:80px"
>
关灯时间
</ion-label>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
cf
g
.
off
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
confi
g
.
off
"
displayFormat=
"HH:mm"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.off" (ionFocus)="tempHaveTouch()"></ion-input>-->
<!--<ion-input style="width:50px;" [(ngModel)]="cfg.off" (ionFocus)="tempHaveTouch()"></ion-input>-->
</ion-item>
</ion-item>
</ion-col>
</ion-col>
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</ion-grid>
</ion-grid>
</ion-item>
</ion-item>
<ion-item-options
side=
"end"
>
<ion-item-options
side=
"end"
>
<div
style=
"text-content: center; background-color: lightgray;"
(
click
)="
deleteModel
(
c
fg
)"
>
<div
style=
"text-content: center; background-color: lightgray;"
(
click
)="
deleteModel
(
allC
fg
)"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top: 70px;"
></ion-icon>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top: 70px;"
></ion-icon>
</div>
</div>
</ion-item-options>
</ion-item-options>
...
...
src/app/envCtrl/env-change-model/env-change-model.page.ts
View file @
de1e2867
...
@@ -27,26 +27,33 @@ export class EnvChangeModelPage implements OnInit {
...
@@ -27,26 +27,33 @@ export class EnvChangeModelPage implements OnInit {
}
}
init
()
{
init
()
{
this
.
controlConfig
=
[{
id
:
1
,
name
:
''
,
startDate
:
''
,
stopDate
:
''
,
on
:
''
,
off
:
''
}];
this
.
controlConfig
=
[{
id
:
1
,
config
:
{
id
:
1
,
name
:
''
,
startDate
:
''
,
stopDate
:
''
,
on
:
''
,
off
:
''
}
}];
}
}
addModel
()
{
addModel
()
{
const
modelCount
=
this
.
controlConfig
.
length
;
const
modelCount
=
this
.
controlConfig
.
length
;
this
.
controlConfig
.
push
({
id
:
modelCount
+
1
,
name
:
''
,
startDate
:
''
,
stopDate
:
''
,
on
:
''
,
off
:
''
});
this
.
controlConfig
.
push
({
id
:
modelCount
+
1
,
config
:
{
id
:
modelCount
+
1
,
name
:
''
,
startDate
:
''
,
stopDate
:
''
,
on
:
''
,
off
:
''
}});
}
}
deleteModel
(
one
)
{
deleteModel
(
one
)
{
const
updateModel
=
this
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
const
updateModel
=
this
.
controlConfig
.
filter
(
data
=>
data
.
id
!==
one
.
id
);
this
.
controlConfig
=
updateModel
;
this
.
controlConfig
=
updateModel
;
this
.
controlConfig
.
forEach
((
item
,
index
)
=>
item
.
id
=
index
+
1
);
this
.
controlConfig
.
forEach
((
item
,
index
)
=>
{
item
.
id
=
index
+
1
;
item
.
config
.
id
=
index
+
1
;
});
}
}
saveModels
()
{
saveModels
()
{
this
.
controlConfig
.
forEach
((
item
)
=>
{
this
.
controlConfig
.
forEach
((
item
,
index
)
=>
{
item
.
on
=
this
.
formatTime
(
item
.
on
);
item
.
id
=
index
+
1
;
item
.
off
=
this
.
formatTime
(
item
.
off
);
item
.
config
.
id
=
index
+
1
;
item
.
startDate
=
this
.
formatDate
(
item
.
startDate
);
item
.
config
.
on
=
this
.
formatTime
(
item
.
config
.
on
);
item
.
stopDate
=
this
.
formatDate
(
item
.
stopDate
);
item
.
config
.
off
=
this
.
formatTime
(
item
.
config
.
off
);
item
.
config
.
startDate
=
this
.
formatDate
(
item
.
config
.
startDate
);
item
.
config
.
stopDate
=
this
.
formatDate
(
item
.
config
.
stopDate
);
});
});
const
query
=
'?changeModelCfg='
+
JSON
.
stringify
(
this
.
controlConfig
);
const
query
=
'?changeModelCfg='
+
JSON
.
stringify
(
this
.
controlConfig
);
// this.nav.navigateForward('', );
// this.nav.navigateForward('', );
...
...
src/app/envCtrl/env-detail/env-detail.page.html
View file @
de1e2867
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<v-kanban
class=
"home-bar"
name=
"温度"
[
inData
]="
item
.
temp
"
iconClass=
"vo v-wendu"
iconColor=
"#285B90"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
<v-kanban
class=
"home-bar"
name=
"温度"
[
inData
]="
item
.
temp
"
iconClass=
"vo v-wendu"
iconColor=
"#285B90"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
<v-kanban
class=
"home-bar"
name=
"湿度"
[
inData
]="
item
.
humi
"
iconClass=
"vo v-shidu"
iconColor=
"#285B90"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
<v-kanban
class=
"home-bar"
name=
"湿度"
[
inData
]="
item
.
humi
"
iconClass=
"vo v-shidu"
iconColor=
"#285B90"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
<v-kanban
class=
"home-bar"
name=
"热应激"
[
inData
]="
item
.
heatStressLevelName
"
iconClass=
"vo v-nav-ico"
[
iconColor
]="
item
.
heatStressColor
"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
<v-kanban
class=
"home-bar"
name=
"热应激"
[
inData
]="
item
.
heatStressLevelName
"
iconClass=
"vo v-nav-ico"
[
iconColor
]="
item
.
heatStressColor
"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
<v-kanban
class=
"home-bar"
name=
"在舍状态"
[
inData
]="
item
.
inHouse
.
inHouse
Name
"
iconClass=
"vo v-dapeng-"
iconColor=
"#285B90"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
<v-kanban
class=
"home-bar"
name=
"在舍状态"
[
inData
]="
item
.
inHouse
.
inHouse
=
==
1
?
'在舍'
:
'离舍'
"
iconClass=
"vo v-dapeng-"
iconColor=
"#285B90"
iconSize=
"20px"
fontSize=
"14px"
></v-kanban>
</div>
</div>
<div
class=
"inHouse"
>
<div
class=
"inHouse"
>
<ion-label
class=
"inHouseLabel"
>
在离舍开关控制
</ion-label>
<ion-label
class=
"inHouseLabel"
>
在离舍开关控制
</ion-label>
...
...
src/app/envCtrl/env-detail/env-detail.page.ts
View file @
de1e2867
...
@@ -18,7 +18,7 @@ export class EnvDetailPage implements OnInit {
...
@@ -18,7 +18,7 @@ export class EnvDetailPage implements OnInit {
private
load
:
Load
,
private
load
:
Load
,
private
tf
:
Transfer
)
{}
private
tf
:
Transfer
)
{}
item
:
any
=
{
item
=
{
factoryNo
:
''
,
factoryNo
:
''
,
factoryName
:
''
,
factoryName
:
''
,
fieldRegionNo
:
''
,
fieldRegionNo
:
''
,
...
@@ -26,13 +26,15 @@ export class EnvDetailPage implements OnInit {
...
@@ -26,13 +26,15 @@ export class EnvDetailPage implements OnInit {
temp
:
0
,
temp
:
0
,
humi
:
0
,
humi
:
0
,
heatStressLevel
:
0
,
heatStressLevel
:
0
,
heatStressColor
:
'#71fa1d'
,
heatStressLevelName
:
'无'
,
online
:
0
,
online
:
0
,
operationModel
:
1
,
operationModel
:
1
,
isWisdomModel
:
1
,
isWisdomModel
:
1
,
alarm
:
1
,
alarm
:
1
,
inHouse
:
{
inHouse
:
{
inHouse
:
1
,
inHouse
:
1
,
inHouseName
:
''
,
inHouseName
:
'
离舍
'
,
fieldDeviceNo
:
''
,
fieldDeviceNo
:
''
,
fieldDeviceType
:
''
,
fieldDeviceType
:
''
,
},
},
...
@@ -62,8 +64,8 @@ export class EnvDetailPage implements OnInit {
...
@@ -62,8 +64,8 @@ export class EnvDetailPage implements OnInit {
this
.
comm
.
remain
=
0
;
this
.
comm
.
remain
=
0
;
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
fieldRegionNo
=
data
.
no
;
this
.
fieldRegionNo
=
data
.
no
;
this
.
getData
(
0
);
});
});
this
.
getData
(
0
);
}
}
initLayout
()
{
initLayout
()
{
...
@@ -104,7 +106,12 @@ export class EnvDetailPage implements OnInit {
...
@@ -104,7 +106,12 @@ export class EnvDetailPage implements OnInit {
// operationModel: 1, // 0-现控,1-平控
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(自控),1-智控
// isWisdomModel: 0, // 0-非智控(自控),1-智控
// alarm: 1,
// alarm: 1,
// inHouse : this.getInHouseState(1), // 0-离舍,1-在舍
// inHouse : {
// inHouse: 1,
// inHouseName: this.getInHouseState(1), // 0-离舍,1-在舍},
// fieldDeviceNo: 'FDN15615456135612',
// fieldDeviceType: '牛舍'
// },
// ts: '2019-08-05 23:44',
// ts: '2019-08-05 23:44',
// };
// };
// this.initLayout();
// this.initLayout();
...
@@ -114,19 +121,19 @@ export class EnvDetailPage implements OnInit {
...
@@ -114,19 +121,19 @@ export class EnvDetailPage implements OnInit {
getHeatStressLevelName
(
level
)
{
getHeatStressLevelName
(
level
)
{
let
levelName
=
''
;
let
levelName
=
''
;
switch
(
level
)
{
switch
(
level
)
{
case
'0'
:
case
0
:
levelName
=
'无'
;
levelName
=
'无'
;
break
;
break
;
case
'1'
:
case
1
:
levelName
=
'轻'
;
levelName
=
'轻'
;
break
;
break
;
case
'2'
:
case
2
:
levelName
=
'中'
;
levelName
=
'中'
;
break
;
break
;
case
'3'
:
case
3
:
levelName
=
'重'
;
levelName
=
'重'
;
break
;
break
;
case
'4'
:
case
4
:
levelName
=
'II重'
;
levelName
=
'II重'
;
break
;
break
;
default
:
default
:
...
@@ -154,21 +161,23 @@ export class EnvDetailPage implements OnInit {
...
@@ -154,21 +161,23 @@ export class EnvDetailPage implements OnInit {
// 在离舍开关控制
// 在离舍开关控制
inHouseControl
(
inHouse
)
{
inHouseControl
(
inHouse
)
{
if
(
inHouse
.
fieldDeviceNo
!==
null
&&
inHouse
.
fieldDeviceNo
!==
''
)
{
if
(
inHouse
.
fieldDeviceNo
!==
null
&&
inHouse
.
fieldDeviceNo
!==
''
)
{
const
opt
=
{
fieldDeviceNo
:
''
,
fieldDeviceType
:
''
,
op
:
''
,
ts
:
0
};
const
opt
=
{
fieldDeviceNo
:
''
,
fieldDeviceType
:
''
,
op
:
0
,
ts
:
0
};
opt
.
fieldDeviceNo
=
inHouse
.
fieldDeviceNo
;
opt
.
fieldDeviceNo
=
inHouse
.
fieldDeviceNo
;
opt
.
fieldDeviceType
=
inHouse
.
fieldDeviceType
;
opt
.
fieldDeviceType
=
inHouse
.
fieldDeviceType
;
opt
.
op
=
inHouse
.
inHouse
;
opt
.
op
=
inHouse
.
inHouse
?
1
:
0
;
opt
.
ts
=
new
Date
().
valueOf
();
opt
.
ts
=
new
Date
().
valueOf
();
this
.
comm
.
remain
=
20
;
this
.
comm
.
remain
=
20
;
this
.
api
.
control
.
controlCowedSwitch
([
opt
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedSwitch
([
opt
,
(
data
)
=>
{
if
(
data
&&
data
.
code
===
1
)
{
// if (data && data.code === 1) {
this
.
getData
(
1
);
// this.getData(1);
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
// this.alarmMsg.locked = false;
// // this.alarmMsg.locked = false;
}
else
{
// } else {
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
}
// }
this
.
getData
(
0
);
this
.
api
.
presentMsgToast
(
data
.
message
);
this
.
comm
.
remain
=
0
;
this
.
comm
.
remain
=
0
;
}]);
}]);
}
}
...
...
src/app/envCtrl/env-fan/env-fan.page.html
View file @
de1e2867
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
margin-bottom: 5px;"
>
控制/状态
</h1>
margin-bottom: 5px;"
>
控制/状态
</h1>
<ion-item
*
ngIf=
"batchSwitch"
lines=
"full"
insert=
"false"
>
<ion-item
*
ngIf=
"batchSwitch"
lines=
"full"
insert=
"false"
>
<ion-label>
一键控制
</ion-label>
<ion-label>
一键控制
</ion-label>
<ion-toggle
slot=
"end"
[
checked
]="
batchSwitch
.
op
=
==
1
"
[
disabled
]="
batchSwitch
.
disabled
"
<ion-toggle
slot=
"end"
[
checked
]="
batchSwitch
.
op
"
[
disabled
]="
batchSwitch
.
disabled
"
(
load
)="
batchSwitch
.
load
"
(
ionChange
)="
toggle
(
batchSwitch
)"
></ion-toggle>
[(
ngModel
)]="
batchSwitch
.
op
"
(
load
)="
batchSwitch
.
load
"
(
click
)="
toggle
(
batchSwitch
)"
></ion-toggle>
<!--<v-switch (click)="allCheck(batchSwitch)" [value]="batchSwitch.op" [disabled]="batchSwitch.disabled" [loading]="batchSwitch.load"></v-switch>-->
<!--<v-switch (click)="allCheck(batchSwitch)" [value]="batchSwitch.op" [disabled]="batchSwitch.disabled" [loading]="batchSwitch.load"></v-switch>-->
</ion-item>
</ion-item>
<div>
<div>
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
<ion-card-content
class=
"cardContent"
>
<ion-card-content
class=
"cardContent"
>
<!--<ion-toggle slot="middle" [checked]="device.state"></ion-toggle>-->
<!--<ion-toggle slot="middle" [checked]="device.state"></ion-toggle>-->
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 0"
[
checked
]="
batchSwitch
.
op =
==
1
"
[
disabled
]="
device
.
disabled
"
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 0"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 1"
[
checked
]="
batchSwitch
.
op =
==
1
"
[
disabled
]="
device
.
disabled
"
color=
"danger"
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 1"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"danger"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<!--<v-switch *ngIf="device.alarm === 0" class="btn-switch" (click)="deviceCheck(device)" [value]="device.state" [disabled]="device.disabled" [loading]="device.load"></v-switch>-->
<!--<v-switch *ngIf="device.alarm === 0" class="btn-switch" (click)="deviceCheck(device)" [value]="device.state" [disabled]="device.disabled" [loading]="device.load"></v-switch>-->
<!--<v-switch *ngIf="device.alarm === 1" class="btn-switch" color="danger" (click)="deviceCheck(device)" [value]="device.state" [disabled]="device.disabled" [loading]="device.load"></v-switch>-->
<!--<v-switch *ngIf="device.alarm === 1" class="btn-switch" color="danger" (click)="deviceCheck(device)" [value]="device.state" [disabled]="device.disabled" [loading]="device.load"></v-switch>-->
</ion-card-content>
</ion-card-content>
...
...
src/app/envCtrl/env-fan/env-fan.page.ts
View file @
de1e2867
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Api
}
from
'../../service/api'
;
import
{
Api
}
from
'../../service/api'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
Load
}
from
'../../service/load'
;
import
{
Load
}
from
'../../service/load'
;
...
@@ -21,7 +21,7 @@ export class EnvFanPage implements OnInit {
...
@@ -21,7 +21,7 @@ export class EnvFanPage implements OnInit {
// 各设备信息
// 各设备信息
devices
=
[];
devices
=
[];
// 一鍵控制按钮
// 一鍵控制按钮
batchSwitch
=
{
op
:
undefined
,
type
:
undefined
,
load
:
false
,
disabled
:
undefined
};
batchSwitch
=
{
op
:
false
,
type
:
undefined
,
load
:
false
,
disabled
:
undefined
};
controlModelOptions
=
[
controlModelOptions
=
[
{
modelId
:
0
,
modelValue
:
'手控模式'
},
{
modelId
:
0
,
modelValue
:
'手控模式'
},
...
@@ -34,11 +34,17 @@ export class EnvFanPage implements OnInit {
...
@@ -34,11 +34,17 @@ export class EnvFanPage implements OnInit {
isLoading
:
true
isLoading
:
true
};
};
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
alertControlle
:
AlertController
)
{
}
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
alertControlle
r
:
AlertController
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
ionViewWillEnter
();
this
.
init
();
this
.
init
();
}
}
ionViewWillEnter
()
{
}
init
()
{
init
()
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
fieldRegionNo
=
data
.
no
;
this
.
fieldRegionNo
=
data
.
no
;
...
@@ -50,28 +56,31 @@ export class EnvFanPage implements OnInit {
...
@@ -50,28 +56,31 @@ export class EnvFanPage implements OnInit {
this
.
load
.
toLoad
(
'加载中...'
,
false
);
this
.
load
.
toLoad
(
'加载中...'
,
false
);
}
}
this
.
api
.
cowshedApp
.
getFengJiData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
this
.
api
.
cowshedApp
.
getFengJiData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
//
if (data && data.fieldRegionNo) {
if
(
data
&&
data
.
fieldRegionNo
)
{
//
this.fieldRegionNo = data.fieldRegionNo;
this
.
fieldRegionNo
=
data
.
fieldRegionNo
;
//
this.fieldDeviceType = data.fieldDeviceType;
this
.
fieldDeviceType
=
data
.
fieldDeviceType
;
//
this.controlModel = data.controlModel;
this
.
controlModel
=
data
.
controlModel
;
//
this.devices = data.param;
this
.
devices
=
data
.
param
;
//
this
.
devices
.
forEach
(
device
=>
{
// this.initButtons()
;
device
.
op
=
device
.
state
===
1
?
true
:
false
;
// }
});
// START--------------------------------------------------------------------
this
.
initButtons
();
// TODO 测试用准备数据
}
this
.
fieldDeviceType
=
'风机'
;
this
.
controlModel
=
0
;
this
.
devices
=
[{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'1号组'
,
state
:
1
,
alarm
:
1
},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'2号组'
,
state
:
0
,
alarm
:
1
},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'3号组'
,
state
:
1
,
alarm
:
0
},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'4号组'
,
state
:
0
,
alarm
:
1
},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'5号组'
,
state
:
1
,
alarm
:
0
},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'6号组'
,
state
:
1
,
alarm
:
0
}];
this
.
initButtons
();
// END--------------------------------------------------------------------
}]);
}]);
// START--------------------------------------------------------------------
// TODO 测试用准备数据
// this.fieldDeviceType = '风机';
// this.controlModel = 0;
// this.devices = [{fieldDeviceNo: '136641005998194688', fieldDeviceName: '1号组', state: 1, alarm: 1},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: '2号组', state: 0, alarm: 1},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: '3号组', state: 1, alarm: 0},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: '4号组', state: 0, alarm: 1},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: '5号组', state: 1, alarm: 0},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: '6号组', state: 1, alarm: 0}];
// this.initButtons();
// END--------------------------------------------------------------------
}
}
initButtons
()
{
initButtons
()
{
...
@@ -85,15 +94,17 @@ export class EnvFanPage implements OnInit {
...
@@ -85,15 +94,17 @@ export class EnvFanPage implements OnInit {
// [一键控制]按钮(默认: 开启)
// [一键控制]按钮(默认: 开启)
// 当任意子按钮[关闭]的状态下: 关闭 以外:开启
// 当任意子按钮[关闭]的状态下: 关闭 以外:开启
this
.
batchSwitch
.
op
=
1
;
this
.
batchSwitch
.
op
=
true
;
this
.
devices
.
map
((
device
)
=>
{
this
.
devices
.
map
((
device
)
=>
{
if
(
device
.
state
===
0
)
{
if
(
device
.
op
===
false
)
{
this
.
batchSwitch
.
op
=
0
;
this
.
batchSwitch
.
op
=
false
;
}
}
});
});
}
}
toggle
(
btn
)
{
toggle
(
btn
)
{
// btn.op = btn.op ? 1 : 0;
// event.preventDefault();
// a.loading = true;
// a.loading = true;
this
.
opChangeComfirm
(
btn
);
this
.
opChangeComfirm
(
btn
);
...
@@ -101,8 +112,8 @@ export class EnvFanPage implements OnInit {
...
@@ -101,8 +112,8 @@ export class EnvFanPage implements OnInit {
async
opChangeComfirm
(
btn
)
{
async
opChangeComfirm
(
btn
)
{
const
msgHeader
=
this
.
fieldDeviceType
;
const
msgHeader
=
this
.
fieldDeviceType
;
const
msgOp
=
btn
.
op
?
'
关闭'
:
'打开
'
;
const
msgOp
=
btn
.
op
?
'
打开'
:
'关闭
'
;
const
alert
=
await
this
.
alertControlle
.
create
({
const
alert
=
await
this
.
alertControlle
r
.
create
({
header
:
'请注意'
,
header
:
'请注意'
,
// subHeader: '确定要' + msgOp + ' ' + msgHeader + ' 这个泵吗?',
// subHeader: '确定要' + msgOp + ' ' + msgHeader + ' 这个泵吗?',
message
:
'所有'
+
msgHeader
+
'即将'
+
msgOp
+
',要继续吗?'
,
message
:
'所有'
+
msgHeader
+
'即将'
+
msgOp
+
',要继续吗?'
,
...
@@ -112,7 +123,8 @@ export class EnvFanPage implements OnInit {
...
@@ -112,7 +123,8 @@ export class EnvFanPage implements OnInit {
text
:
'取消'
,
text
:
'取消'
,
cssClass
:
'width: 40%'
,
cssClass
:
'width: 40%'
,
handler
:
()
=>
{
handler
:
()
=>
{
this
.
batchSwitch
.
op
=
btn
.
op
===
0
?
1
:
0
;
this
.
batchSwitch
.
op
=
!
btn
.
op
;
event
.
preventDefault
();
}
}
},
{
},
{
text
:
'确定'
,
text
:
'确定'
,
...
@@ -132,7 +144,7 @@ export class EnvFanPage implements OnInit {
...
@@ -132,7 +144,7 @@ export class EnvFanPage implements OnInit {
const
req
=
{
const
req
=
{
fieldRegionNo
:
this
.
fieldRegionNo
,
fieldRegionNo
:
this
.
fieldRegionNo
,
fieldDeviceType
:
this
.
fieldDeviceType
,
fieldDeviceType
:
this
.
fieldDeviceType
,
op
:
btn
.
op
?
0
:
1
,
op
:
btn
.
op
?
1
:
0
,
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
this
.
comm
.
remain
=
120
;
this
.
comm
.
remain
=
120
;
...
@@ -150,6 +162,12 @@ export class EnvFanPage implements OnInit {
...
@@ -150,6 +162,12 @@ export class EnvFanPage implements OnInit {
this
.
comm
.
remain
=
0
;
this
.
comm
.
remain
=
0
;
btn
.
load
=
false
;
btn
.
load
=
false
;
}]);
}]);
// 子按钮状态
this
.
devices
.
forEach
((
device
)
=>
{
device
.
state
=
btn
.
op
?
1
:
0
;
device
.
op
=
btn
.
op
;
});
}
}
// 单个设备控制
// 单个设备控制
...
@@ -158,7 +176,7 @@ export class EnvFanPage implements OnInit {
...
@@ -158,7 +176,7 @@ export class EnvFanPage implements OnInit {
const
req
=
{
const
req
=
{
fieldDeviceNo
:
btn
.
fieldDeviceNo
,
fieldDeviceNo
:
btn
.
fieldDeviceNo
,
fieldDeviceType
:
this
.
fieldDeviceType
,
fieldDeviceType
:
this
.
fieldDeviceType
,
op
:
btn
.
state
?
0
:
1
,
op
:
btn
.
op
?
1
:
0
,
ts
:
new
Date
().
valueOf
()
ts
:
new
Date
().
valueOf
()
};
};
this
.
comm
.
remain
=
20
;
this
.
comm
.
remain
=
20
;
...
...
src/app/envCtrl/env-history/env-history.page.ts
View file @
de1e2867
...
@@ -21,38 +21,39 @@ export class EnvHistoryPage implements OnInit {
...
@@ -21,38 +21,39 @@ export class EnvHistoryPage implements OnInit {
item
:
any
=
{};
item
:
any
=
{};
chartOption
=
{};
tableRows
=
[];
// START--------------------------------------------------------------------------------
// START--------------------------------------------------------------------------------
// TODO 以下为假数据 待删除
// TODO 以下为假数据 待删除
chartOption
=
{
// chartOption = {
backgroundColor
:
'#F0F8FF'
,
// backgroundColor: '#F0F8FF',
visualMap
:
[
// visualMap: [
{
show
:
false
,
type
:
'continuous'
,
seriesIndex
:
0
,
min
:
0
,
max
:
400
},
// {show: false, type: 'continuous', seriesIndex: 0, min: 0, max: 400},
{
show
:
false
,
type
:
'continuous'
,
seriesIndex
:
1
,
dimension
:
0
,
min
:
0
,
max
:
400
}],
// {show: false, type: 'continuous', seriesIndex: 1, dimension: 0, min: 0, max: 400}],
xAxis
:
{
// xAxis: {
name
:
''
,
type
:
'category'
,
// name: '', type: 'category',
data
:
[
'Mon'
,
'Tue'
,
'Wed'
,
'Thu'
,
'Fri'
,
'Sat'
,
'Sun'
],
// data: ['1', '2', '3', '4', '5', '6', '7', '8'],
},
// },
yAxis
:
[
// yAxis: [
{
name
:
'温度(℃)'
,
type
:
'value'
,
splitLine
:
{
show
:
false
}},
// {name: '温度(℃)', type: 'value', splitLine: {show: false}},
{
name
:
'湿度(%)'
,
type
:
'value'
,
max
:
100
,
splitLine
:
{
show
:
false
}}
// {name: '湿度(%)', type: 'value', max: 100, splitLine: {show: false}}
],
// ],
series
:
[
// series: [
{
data
:
[
28
,
32
,
35
,
34
,
30
,
29
,
27
],
type
:
'line'
},
// {data: [28, 32, 35, 34, 30, 29, 27], type: 'line'},
{
data
:
[
15
,
13
,
12
,
11
,
12
,
11
,
87
],
yAxisIndex
:
1
,
type
:
'line'
},
// {data: [15, 13, 12, 11, 12, 11, 87], yAxisIndex: 1, type: 'line'},
{
data
:
[
76
,
45
,
43
,
23
,
34
,
54
,
23
],
yAxisIndex
:
1
,
type
:
'line'
}
// {data: [76, 45, 43, 23, 34, 54, 23], yAxisIndex: 1, type: 'line'}
]
// ]
};
// };
// // 时间 热应激 温度 湿度 光照 风机 喷淋 照明
// 时间 热应激 温度 湿度 光照 风机 喷淋 照明
// tableRows = [
tableRows
=
[
// {ts: '17:00', thi: '轻', temp: '23.8', humi: '56', NH3: '70'},
{
ts
:
'17:00'
,
thi
:
'轻'
,
temp
:
'23.8'
,
humi
:
'56'
,
NH3
:
'70'
},
// {ts: '17:30', thi: '中', temp: '27.2', humi: '43', NH3: '80'},
{
ts
:
'17:30'
,
thi
:
'中'
,
temp
:
'27.2'
,
humi
:
'43'
,
NH3
:
'80'
},
// {ts: '18:00', thi: '轻', temp: '23.2', humi: '61', NH3: '99'},
{
ts
:
'18:00'
,
thi
:
'轻'
,
temp
:
'23.2'
,
humi
:
'61'
,
NH3
:
'99'
},
// {ts: '18:30', thi: '轻', temp: '23.1', humi: '47', NH3: '100'},
{
ts
:
'18:30'
,
thi
:
'轻'
,
temp
:
'23.1'
,
humi
:
'47'
,
NH3
:
'100'
},
// {ts: '19:00', thi: '轻', temp: '20.2', humi: '43', NH3: '60'},
{
ts
:
'19:00'
,
thi
:
'轻'
,
temp
:
'20.2'
,
humi
:
'43'
,
NH3
:
'60'
},
// {ts: '19:30', thi: '轻', temp: '21.6', humi: '34', NH3: '50'},
{
ts
:
'19:30'
,
thi
:
'轻'
,
temp
:
'21.6'
,
humi
:
'34'
,
NH3
:
'50'
},
// {ts: '20:00', thi: '轻', temp: '22.5', humi: '43', NH3: '40'},
{
ts
:
'20:00'
,
thi
:
'轻'
,
temp
:
'22.5'
,
humi
:
'43'
,
NH3
:
'40'
},
// ];
];
// END--------------------------------------------------------------------------------
// END--------------------------------------------------------------------------------
ngOnInit
()
{
ngOnInit
()
{
...
@@ -97,7 +98,7 @@ export class EnvHistoryPage implements OnInit {
...
@@ -97,7 +98,7 @@ export class EnvHistoryPage implements OnInit {
const
humi
=
[];
const
humi
=
[];
const
thi
=
[];
const
thi
=
[];
const
times
=
[];
const
times
=
[];
debugger
;
if
(
param
.
temp
&&
param
.
temp
.
constructor
===
Array
)
{
if
(
param
.
temp
&&
param
.
temp
.
constructor
===
Array
)
{
param
.
temp
.
map
(
item
=>
{
param
.
temp
.
map
(
item
=>
{
times
.
push
(
new
Date
(
item
.
time
).
getHours
());
times
.
push
(
new
Date
(
item
.
time
).
getHours
());
...
...
src/app/envCtrl/env-home/env-home.page.html
View file @
de1e2867
...
@@ -45,10 +45,10 @@
...
@@ -45,10 +45,10 @@
<span
style=
"text-align: center"
>
{{item.fieldRegionName}}
</span><span
style=
"text-align: center; font-size:12px; padding-left:10px; color:red;"
*
ngIf=
"item.operationModel === 4"
>
(部分设备处于现控状态)
</span></div>
<span
style=
"text-align: center"
>
{{item.fieldRegionName}}
</span><span
style=
"text-align: center; font-size:12px; padding-left:10px; color:red;"
*
ngIf=
"item.operationModel === 4"
>
(部分设备处于现控状态)
</span></div>
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<span
*
ngIf=
"item.temp"
class=
"detailInfo"
style=
"width: 40%"
>
温度:
{{item.temp}} ℃
</span>
<span
*
ngIf=
"item.temp
!== null
"
class=
"detailInfo"
style=
"width: 40%"
>
温度:
{{item.temp}} ℃
</span>
<span
*
ngIf=
"item.humi"
class=
"detailInfo"
style=
"width: 40%"
>
湿度:
{{item.humi}} % rH
</span>
<span
*
ngIf=
"item.humi
!== null
"
class=
"detailInfo"
style=
"width: 40%"
>
湿度:
{{item.humi}} % rH
</span>
<span
*
ngIf=
"item.humi"
class=
"detailInfo"
style=
"width: 40%"
>
氨气:
{{item.NH3}} ppm
</span>
<span
*
ngIf=
"item.humi
!== null
"
class=
"detailInfo"
style=
"width: 40%"
>
氨气:
{{item.NH3}} ppm
</span>
<span
*
ngIf=
"item.heatStressLevel"
class=
"detailInfo"
style=
"width: 40%"
>
热应激:
<span
class=
"warmColor{{item.heatStressLevel}}"
>
{{item.heatStressLevelName}}
</span></span>
<span
*
ngIf=
"item.heatStressLevel
!== null
"
class=
"detailInfo"
style=
"width: 40%"
>
热应激:
<span
class=
"warmColor{{item.heatStressLevel}}"
>
{{item.heatStressLevelName}}
</span></span>
</div>
</div>
<div
class=
"bottom"
>
<div
class=
"bottom"
>
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
...
@@ -60,8 +60,8 @@
...
@@ -60,8 +60,8 @@
<!-- 1:远控 0:现控 4:混乱 -->
<!-- 1:远控 0:现控 4:混乱 -->
<div
*
ngIf=
"item.operationModel === 1 || item.operationModel === 0"
class=
"online"
>
{{item.operationModel === 1 ? '远控' :'现控'}}
</div>
<div
*
ngIf=
"item.operationModel === 1 || item.operationModel === 0"
class=
"online"
>
{{item.operationModel === 1 ? '远控' :'现控'}}
</div>
<div
*
ngIf=
"item.operationModel === 4"
class=
"offline"
>
现控
</div>
<div
*
ngIf=
"item.operationModel === 4"
class=
"offline"
>
现控
</div>
<div
*
ngIf=
"item.operationModel"
[
ngClass
]="{'
online
'
:
item
.
isWisdomModel
,
'
offline
'
:
!
item
.
isWisdomModel
}"
class=
"online"
>
智控
</div>
<div
*
ngIf=
"item.operationModel
!== null
"
[
ngClass
]="{'
online
'
:
item
.
isWisdomModel
,
'
offline
'
:
!
item
.
isWisdomModel
}"
class=
"online"
>
智控
</div>
<div
*
ngIf=
"item.ts"
class=
"right"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</div>
<div
*
ngIf=
"item.ts
!== null
"
class=
"right"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/envCtrl/env-home/env-home.page.ts
View file @
de1e2867
...
@@ -69,24 +69,25 @@ export class EnvHomePage implements OnInit {
...
@@ -69,24 +69,25 @@ export class EnvHomePage implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
init
();
this
.
init
();
this
.
ionViewWillEnter
();
//
this.ionViewWillEnter();
}
}
init
()
{
init
()
{
this
.
getData
(
0
);
}
// ionic的生命周期函数
ionViewWillEnter
()
{
this
.
slideDidChange
();
this
.
slideDidChange
();
this
.
getData
(
0
);
this
.
getData
(
0
);
}
}
// ionic的生命周期函数
// ionViewWillEnter() {
// this.slideDidChange();
// this.getData(0);
// }
getData
(
time
)
{
getData
(
time
)
{
if
(
this
.
isNetConnected
()
===
true
)
{
if
(
this
.
isNetConnected
())
{
if
(
time
)
{
if
(
time
)
{
this
.
load
.
toLoad
(
'加载中...'
,
false
);
this
.
load
.
toLoad
(
'加载中...'
,
false
);
}
}
this
.
api
.
cowshedApp
.
getAll
RegionData
([
''
,
(
data
)
=>
{
this
.
api
.
cowshedApp
.
getAll
([
''
,
(
data
)
=>
{
// 热应激良 热应激差 故障总数
// 热应激良 热应激差 故障总数
if
(
data
)
{
if
(
data
)
{
this
.
thiGood
=
data
.
thiGood
;
this
.
thiGood
=
data
.
thiGood
;
...
@@ -121,87 +122,90 @@ export class EnvHomePage implements OnInit {
...
@@ -121,87 +122,90 @@ export class EnvHomePage implements OnInit {
this
.
isError
=
true
;
this
.
isError
=
true
;
}
}
this
.
displayItems
=
this
.
items
;
this
.
displayItems
=
this
.
items
;
// START--------------------------------------------------------------------
// TODO 测试用准备数据
// this.thiGood = 1;
// this.thiBad = 12;
// this.alarmTotal = 5;
// this.items = [
// {
// // 0-无热应激 离线 无报警
// fieldRegionNo: 'FRN136641006052720640',
// fieldRegionName: '1号牛舍',
// temp: 23.5,
// humi: 82,
// heatStressLevel: '0',
// heatStressLevelName: this.getHeatStressLevelName('0'),
// online: 0, // 0-离线,1-在线
// alarm: 0,
// ts: '2019-08-05 23:44',
// },
// {
// // 1-轻度热应激 在线 现控 无报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '2号牛舍',
// temp: 23.5,
// humi: 82,
// heatStressLevel: '1',
// heatStressLevelName: this.getHeatStressLevelName('1'),
// online: 1, // 0-离线,1-在线
// operationModel: 0, // 0-现控,1-平控
// alarm: 0,
// ts: '2019-08-05 23:44',
// },
// {
// // 2-中度热应激 在线 平控 非智控(手控) 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '3号牛舍',
// temp: 23.5,
// humi: 82,
// heatStressLevel: '2',
// heatStressLevelName: this.getHeatStressLevelName('2'),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(手控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// {
// // 3-重度热应激 在线 平控 非智控(自控) 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '4号牛舍',
// temp: 23.5,
// humi: 82,
// heatStressLevel: '3',
// heatStressLevelName: this.getHeatStressLevelName('3'),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(自控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// {
// // 4-II重度热应激 在线 平控 智控 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '测试用5号牛舍',
// temp: 23.5,
// humi: 82.9,
// NH3: 120.999,
// heatStressLevel: '4',
// heatStressLevelName: this.getHeatStressLevelName('4'),
// online: 1, // 0-离线,1-在线
// operationModel: 4, // 0-现控,1-平控
// isWisdomModel: 1, // 0-非智控(自控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// ];
// this.displayItems = this.items;
// END--------------------------------------------------------------------
}
}
this
.
load
.
offLoad
();
this
.
load
.
offLoad
();
}]);
}]);
// START--------------------------------------------------------------------
// TODO 测试用准备数据
// this.thiGood = 1;
// this.thiBad = 12;
// this.alarmTotal = 5;
// this.items = [
// {
// // 0-无热应激 离线 无报警
// fieldRegionNo: 'FRN136641006052720640',
// fieldRegionName: '1号牛舍',
// temp: 23.5,
// humi: 82,
// NH3: 76.786,
// heatStressLevel: '0',
// heatStressLevelName: this.getHeatStressLevelName(0),
// online: 0, // 0-离线,1-在线
// alarm: 0,
// ts: '2019-08-05 23:44',
// },
// {
// // 1-轻度热应激 在线 现控 无报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '2号牛舍',
// temp: 23.5,
// humi: 82,
// NH3: 10.116,
// heatStressLevel: '1',
// heatStressLevelName: this.getHeatStressLevelName(1),
// online: 1, // 0-离线,1-在线
// operationModel: 0, // 0-现控,1-平控
// alarm: 0,
// ts: '2019-08-05 23:44',
// },
// {
// // 2-中度热应激 在线 平控 非智控(手控) 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '3号牛舍',
// temp: 23.5,
// humi: 82,
// NH3: 60.255,
// heatStressLevel: '2',
// heatStressLevelName: this.getHeatStressLevelName(2),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(手控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// {
// // 3-重度热应激 在线 平控 非智控(自控) 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '4号牛舍',
// temp: 23.5,
// humi: 82,
// NH3: 80.213,
// heatStressLevel: '3',
// heatStressLevelName: this.getHeatStressLevelName(3),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(自控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// {
// // 4-II重度热应激 在线 平控 智控 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '测试用5号牛舍',
// temp: 23.5,
// humi: 82.9,
// NH3: 120.999,
// heatStressLevel: '4',
// heatStressLevelName: this.getHeatStressLevelName(4),
// online: 1, // 0-离线,1-在线
// operationModel: 4, // 0-现控,1-平控
// isWisdomModel: 1, // 0-非智控(自控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// ];
// END--------------------------------------------------------------------
}
}
}
}
...
@@ -216,19 +220,19 @@ export class EnvHomePage implements OnInit {
...
@@ -216,19 +220,19 @@ export class EnvHomePage implements OnInit {
getHeatStressLevelName
(
codeId
)
{
getHeatStressLevelName
(
codeId
)
{
let
levelName
=
''
;
let
levelName
=
''
;
switch
(
codeId
)
{
switch
(
codeId
)
{
case
'0'
:
case
0
:
levelName
=
'无'
;
levelName
=
'无'
;
break
;
break
;
case
'1'
:
case
1
:
levelName
=
'轻'
;
levelName
=
'轻'
;
break
;
break
;
case
'2'
:
case
2
:
levelName
=
'中'
;
levelName
=
'中'
;
break
;
break
;
case
'3'
:
case
3
:
levelName
=
'重'
;
levelName
=
'重'
;
break
;
break
;
case
'4'
:
case
4
:
levelName
=
'II重'
;
levelName
=
'II重'
;
break
;
break
;
default
:
default
:
...
...
src/app/envCtrl/env-light/env-light.page.html
View file @
de1e2867
...
@@ -34,18 +34,22 @@
...
@@ -34,18 +34,22 @@
margin-bottom: 5px;"
>
控制/状态
</h1>
margin-bottom: 5px;"
>
控制/状态
</h1>
<ion-item
*
ngIf=
"devices"
lines=
"full"
insert=
"false"
>
<ion-item
*
ngIf=
"devices"
lines=
"full"
insert=
"false"
>
<ion-label>
一键控制
</ion-label>
<ion-label>
一键控制
</ion-label>
<!-- <ion-toggle slot="end" [checked]="batchSwitch.op"></ion-toggle>-->
<ion-toggle
slot=
"end"
[
checked
]="
batchSwitch
.
op
"
[
disabled
]="
batchSwitch
.
disabled
"
<v-switch
(
click
)="
allCheck
(
batchSwitch
)"
[
value
]="
batchSwitch
.
op
"
[
disabled
]="
batchSwitch
.
disabled
"
[
loading
]="
batchSwitch
.
load
"
></v-switch>
[(
ngModel
)]="
batchSwitch
.
op
"
(
load
)="
batchSwitch
.
load
"
(
click
)="
toggle
(
batchSwitch
)"
></ion-toggle>
<!--<v-switch (click)="allCheck(batchSwitch)" [value]="batchSwitch.op" [disabled]="batchSwitch.disabled" [loading]="batchSwitch.load"></v-switch>-->
</ion-item>
</ion-item>
<div>
<div>
<ion-card
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card-header>
<ion-card-header
class=
"cardHeader"
>
<ion-card-subtitle
align=
"center"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
<ion-card-subtitle
align=
"center"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
</ion-card-header>
</ion-card-header>
<ion-card-content>
<ion-card-content
class=
"cardContent"
>
<!-- <ion-toggle slot="middle" [checked]="device.state"></ion-toggle>-->
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 0"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
<v-switch
class=
"btn-switch"
(
click
)="
deviceCheck
(
device
)"
[
value
]="
device
.
state
"
[
disabled
]="
device
.
disabled
"
[
loading
]="
device
.
load
"
></v-switch>
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 1"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"danger"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<!--<v-switch class="btn-switch" (click)="deviceCheck(device)" [value]="device.state" [disabled]="device.disabled" [loading]="device.load"></v-switch>-->
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</div>
</div>
...
...
src/app/envCtrl/env-light/env-light.page.scss
View file @
de1e2867
...
@@ -8,8 +8,18 @@ i.vo {
...
@@ -8,8 +8,18 @@ i.vo {
.card
{
.card
{
float
:
none
;
float
:
none
;
display
:
inline-block
;
display
:
inline-block
;
width
:
28%
;
width
:
22%
;
margin
:
10px
10px
5px
5px
;
margin
:
5px
;
}
.cardHeader
{
--padding-inline-start
:
0px
!
important
;
--padding-inline-end
:
0px
!
important
;
padding
:
10px
;
}
.cardContent
{
padding
:
5px
;
text-align
:
center
;
}
}
.btn-switch
{
.btn-switch
{
...
...
src/app/envCtrl/env-light/env-light.page.ts
View file @
de1e2867
...
@@ -2,6 +2,7 @@ import {Component, Input, OnInit} from '@angular/core';
...
@@ -2,6 +2,7 @@ import {Component, Input, OnInit} from '@angular/core';
import
{
Api
}
from
'../../service/api'
;
import
{
Api
}
from
'../../service/api'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
Load
}
from
'../../service/load'
;
import
{
Load
}
from
'../../service/load'
;
import
{
AlertController
}
from
'@ionic/angular'
;
@
Component
({
@
Component
({
selector
:
'v-env-light'
,
selector
:
'v-env-light'
,
...
@@ -35,7 +36,7 @@ export class EnvLightPage implements OnInit {
...
@@ -35,7 +36,7 @@ export class EnvLightPage implements OnInit {
controlModelOptions
=
[
controlModelOptions
=
[
{
modelId
:
0
,
modelValue
:
'手控模式'
},
{
modelId
:
0
,
modelValue
:
'手控模式'
},
{
modelId
:
1
,
modelValue
:
'自控模式'
},
{
modelId
:
1
,
modelValue
:
'自控模式'
},
{
modelId
:
2
,
modelValue
:
'智
慧控制
'
}];
{
modelId
:
2
,
modelValue
:
'智
控模式
'
}];
// 发送指令延时判断
// 发送指令延时判断
comm
=
{
comm
=
{
...
@@ -43,7 +44,8 @@ export class EnvLightPage implements OnInit {
...
@@ -43,7 +44,8 @@ export class EnvLightPage implements OnInit {
isLoading
:
true
isLoading
:
true
};
};
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
route
:
ActivatedRoute
)
{
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
route
:
ActivatedRoute
,
private
alertControlle
:
AlertController
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -68,43 +70,106 @@ export class EnvLightPage implements OnInit {
...
@@ -68,43 +70,106 @@ export class EnvLightPage implements OnInit {
this
.
on
=
data
.
controlConfig
.
on
;
this
.
on
=
data
.
controlConfig
.
on
;
this
.
off
=
data
.
controlConfig
.
off
;
this
.
off
=
data
.
controlConfig
.
off
;
this
.
devices
=
data
.
param
;
this
.
devices
=
data
.
param
;
this
.
devices
.
forEach
(
device
=>
{
device
.
op
=
device
.
state
===
1
?
true
:
false
;
});
// --------------------------------------------------------------------
//
START
--------------------------------------------------------------------
// TODO 测试用准备数据
// TODO 测试用准备数据
this
.
fieldRegionNo
=
'FRN136641006052720640'
;
// this.fieldRegionNo = 'FRN136641006052720640';
this
.
startDate
=
'05-01'
;
// this.startDate = '05-01';
this
.
stopDate
=
'08-31'
;
// this.stopDate = '08-31';
// this.fieldDeviceType = '照明';
// // this.fieldDeviceType = '照明';
// this.controlModel = 2;
// // this.controlModel = 2;
this
.
on
=
'19:00'
;
// this.on = '19:00';
this
.
off
=
'05:00'
;
// this.off = '05:00';
this
.
devices
=
[{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'A号照明组'
,
state
:
1
},
// this.devices = [{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'A号照明组', state: 1},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'B号照明组'
,
state
:
0
},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'B号照明组', state: 0},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'C号照明组'
,
state
:
1
},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'C号照明组', state: 1},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'D号照明组'
,
state
:
0
},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'D号照明组', state: 0},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'E号照明组'
,
state
:
1
},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'E号照明组', state: 1},
{
fieldDeviceNo
:
'136641005998194688'
,
fieldDeviceName
:
'F号照明组'
,
state
:
1
}];
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'F号照明组', state: 1}];
// --------------------------------------------------------------------
// END--------------------------------------------------------------------
// [智控(2)]的状态下:非活性(true) 以外:活性(false)
const
allDisabled
=
this
.
controlModel
===
2
?
true
:
false
;
this
.
batchSwitch
.
disabled
=
allDisabled
;
this
.
devices
.
forEach
((
device
,
i
)
=>
{
device
.
disabled
=
allDisabled
;
});
// 设置[一键控制]按钮(默认: 开启)
this
.
initButtons
();
// 当任意子按钮[关闭]的状态下: 关闭 以外:开启
this
.
batchSwitch
.
op
=
1
;
this
.
devices
.
map
((
device
)
=>
{
if
(
device
.
state
===
0
)
{
this
.
batchSwitch
.
op
=
0
;
}
});
}
}
}]);
}]);
}
}
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
;
});
}
// 设置[一键控制]按钮(默认: 开启)
// 当任意子按钮[关闭]的状态下: 关闭 以外:开启
this
.
batchSwitch
.
op
=
true
;
this
.
devices
.
map
((
device
)
=>
{
if
(
device
.
op
===
false
)
{
this
.
batchSwitch
.
op
=
false
;
}
});
}
toggle
(
btn
)
{
// btn.op = btn.op ? 1 : 0;
// event.preventDefault();
// a.loading = true;
this
.
opChangeComfirm
(
btn
);
}
async
opChangeComfirm
(
btn
)
{
const
msgHeader
=
'照明灯'
;
const
msgOp
=
btn
.
op
?
'打开'
:
'关闭'
;
let
msgContent
=
''
;
if
(
this
.
controlModel
===
0
)
{
msgContent
=
'所有'
+
msgHeader
+
'即将'
+
msgOp
+
',要继续吗?'
;
}
else
{
msgContent
=
'确认要'
+
msgOp
+
'所有'
+
msgHeader
+
',并且自动切换至手动模式吗?'
;
}
const
alert
=
await
this
.
alertControlle
.
create
({
header
:
'请注意'
,
message
:
msgContent
,
mode
:
'ios'
,
buttons
:
[
{
text
:
'取消'
,
cssClass
:
'width: 40%'
,
handler
:
()
=>
{
this
.
batchSwitch
.
op
=
!
btn
.
op
;
event
.
preventDefault
();
}
},
{
text
:
'确定'
,
cssClass
:
'width: 40%'
,
handler
:
()
=>
{
this
.
allCheck
(
btn
);
}
}
]
});
await
alert
.
present
();
}
// 一键控制
// 一键控制
allCheck
(
btn
)
{
allCheck
(
btn
)
{
btn
.
load
=
true
;
btn
.
load
=
true
;
...
@@ -117,21 +182,26 @@ export class EnvLightPage implements OnInit {
...
@@ -117,21 +182,26 @@ export class EnvLightPage implements OnInit {
this
.
comm
.
remain
=
120
;
this
.
comm
.
remain
=
120
;
// 一键开启设备
// 一键开启设备
this
.
api
.
control
.
controlBatchSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedBatchSwitch
([
req
,
(
data
)
=>
{
if
(
data
.
code
===
1
)
{
// if (data.code === 1) {
this
.
getData
(
1
);
// this.getData(1);
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
}
else
{
// } else {
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
}
// }
this
.
getData
(
0
);
this
.
api
.
presentMsgToast
(
data
.
message
);
this
.
comm
.
remain
=
0
;
this
.
comm
.
remain
=
0
;
btn
.
load
=
false
;
btn
.
load
=
false
;
}]);
}]);
// 子按钮状态
// 子按钮状态
this
.
devices
.
forEach
((
device
,
i
)
=>
{
this
.
devices
.
forEach
((
device
)
=>
{
device
.
state
=
btn
.
op
?
0
:
1
;
device
.
op
=
btn
.
op
?
0
:
1
;
});
});
// 自动控制时, 强制切换至手动模式
this
.
controlModel
=
this
.
controlModel
===
1
?
0
:
this
.
controlModel
;
}
}
// 单个设备控制
// 单个设备控制
...
@@ -143,15 +213,18 @@ export class EnvLightPage implements OnInit {
...
@@ -143,15 +213,18 @@ export class EnvLightPage implements OnInit {
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
this
.
comm
.
remain
=
20
;
this
.
comm
.
remain
=
20
;
this
.
api
.
control
.
controlSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
if
(
data
&&
data
.
code
===
1
)
{
// if (data && data.code === 1) {
this
.
getData
(
1
);
// this.getData(1);
this
.
comm
.
remain
=
0
;
// this.comm.remain = 0;
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
}
else
{
// } else {
this
.
comm
.
remain
=
0
;
// this.comm.remain = 0;
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
}
// }
this
.
getData
(
1
);
this
.
comm
.
remain
=
0
;
this
.
api
.
presentMsgToast
(
data
.
message
);
btn
.
loading
=
false
;
btn
.
loading
=
false
;
}]);
}]);
}
}
...
...
src/app/envCtrl/env-shower/env-shower.page.html
View file @
de1e2867
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
line-height: 25px;
line-height: 25px;
margin-bottom: 5px;"
>
供液泵状态
</h1>
margin-bottom: 5px;"
>
供液泵状态
</h1>
<ion-item
lines=
"full"
>
<ion-item
lines=
"full"
>
<div
[
ngClass
]="{'
sucCir
'
:
bump
.
online
,
'
errCir
'
:
!
bump
.
online
}"
></div>
<div
[
ngClass
]="{'
sucCir
'
:
bump
.
alarm =
==
0
,
'
errCir
'
:
bump
.
alarm =
==
0
}"
></div>
<span
class=
"content"
>
{{bump.
online ? '在线' : '离线
'}}
</span>
<span
class=
"content"
>
{{bump.
alarm === 1 ? '异常' : '运行
'}}
</span>
<span
class=
"content"
style=
"margin-left: 30px"
>
压力: {{bump.press}} Mpa
</span>
<span
class=
"content"
style=
"margin-left: 30px"
>
压力: {{bump.press}} Mpa
</span>
</ion-item>
</ion-item>
<h1
style=
"
<h1
style=
"
...
@@ -33,13 +33,13 @@
...
@@ -33,13 +33,13 @@
border-left: 5px solid #28c9bd;
border-left: 5px solid #28c9bd;
line-height: 25px;
line-height: 25px;
margin-bottom: 5px;"
>
时间参数
</h1>
margin-bottom: 5px;"
>
时间参数
</h1>
<ion-item
lines=
"full"
*
ngIf=
"controlConfig.a"
insert=
"false"
>
<ion-item
lines=
"full"
insert=
"false"
>
<span
class=
"content"
>
A区喷淋时间 {{controlConfig.a
}} 秒
</span>
<span
class=
"content"
>
{{param[0].fieldDeviceName}}喷淋时间 {{controlConfig.A
}} 秒
</span>
</ion-item>
</ion-item>
<ion-item
lines=
"full"
*
ngIf=
"controlConfig.b"
insert=
"false"
>
<ion-item
lines=
"full"
insert=
"false"
>
<span
class=
"content"
>
B区喷淋时间 {{controlConfig.b
}} 秒
</span>
<span
class=
"content"
>
{{param[1].fieldDeviceName}}喷淋时间 {{controlConfig.B
}} 秒
</span>
</ion-item>
</ion-item>
<ion-item
lines=
"full"
*
ngIf=
"controlConfig.interval"
insert=
"false"
>
<ion-item
lines=
"full"
insert=
"false"
>
<span
class=
"content"
>
间隔时间 {{controlConfig.interval}} 秒
</span>
<span
class=
"content"
>
间隔时间 {{controlConfig.interval}} 秒
</span>
</ion-item>
</ion-item>
...
@@ -50,15 +50,26 @@
...
@@ -50,15 +50,26 @@
line-height: 25px;
line-height: 25px;
margin-bottom: 5px;"
>
控制/状态
</h1>
margin-bottom: 5px;"
>
控制/状态
</h1>
<div>
<div>
<ion-card
*
ngFor=
"let a of param"
class=
"card"
color=
"white"
>
<ion-card
*
ngFor=
"let device of param"
class=
"card"
color=
"white"
>
<ion-card-header>
<ion-card-header
class=
"cardHeader"
>
<ion-card-title
class=
"card-title"
>
{{a.fieldDeviceName}}
</ion-card-title>
<ion-card-title
class=
"card-title"
>
<div
style=
"width:100%;text-align:center;"
>
<div
style=
"width:48%;display: inline-block; height: 40px;float: left; text-align: center; padding-top: 10px;"
>
<div
style=
"text-align: center;margin:auto"
>
{{device.fieldDeviceName}}
</div>
</div>
<div
style=
"width:48%;display: inline-block"
><img
[
src
]="'../../
assets
/
img
/
shower-
'
+
device
.
state
+
'.
png
'"
style=
"width:50px !important; margin: auto;"
></div>
</div>
</ion-card-title>
</ion-card-header>
</ion-card-header>
<ion-card-content
style=
"margin: 0px; padding-top:0px;
"
>
<ion-card-content
class=
"cardContent
"
>
<span
class=
"content"
>
压力 {{
a
.press}} MPa
</span><br>
<span
class=
"content"
>
压力 {{
device
.press}} MPa
</span><br>
<!-- <ion-toggle [checked]="a.state"></ion-toggle>-->
<!-- <ion-toggle [checked]="a.state"></ion-toggle>-->
<v-switch
class=
"btn-switch"
(
click
)="
deviceCheck
(
a
)"
[
value
]="
a
.
state
"
[
loading
]="
a
.
load
"
></v-switch>
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 0"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<ion-toggle
class=
"btn-switch"
*
ngIf=
"device.alarm === 1"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"danger"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<!--<v-switch class="btn-switch" (click)="deviceCheck(a)" [value]="a.state" [loading]="a.load"></v-switch>-->
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</div>
</div>
...
...
src/app/envCtrl/env-shower/env-shower.page.scss
View file @
de1e2867
.card
{
.card
{
float
:
none
;
float
:
none
;
display
:
inline-block
;
display
:
inline-block
;
width
:
42
%
;
width
:
44
%
;
margin
:
10px
10px
5px
10px
;
margin
:
3%
;
text-align
:
center
;
text-align
:
center
;
}
}
.card-title
{
.card-title
{
font-size
:
20
px
;
font-size
:
16
px
;
}
}
.content
{
.content
{
...
@@ -19,3 +19,33 @@
...
@@ -19,3 +19,33 @@
display
:
inline-block
;
display
:
inline-block
;
margin-top
:
5px
;
margin-top
:
5px
;
}
}
.sucCir
{
width
:
17px
;
height
:
17px
;
border-radius
:
17px
;
background-color
:
#2ecc71
;
display
:
inline-block
;
vertical-align
:
middle
;
box-shadow
:
#ccc
0
.5px
0
.5px
3px
;
}
.errCir
{
width
:
17px
;
height
:
17px
;
border-radius
:
17px
;
background-color
:
#cb0000
;
display
:
inline-block
;
vertical-align
:
middle
;
box-shadow
:
#ccc
0
.5px
0
.5px
3px
;
}
.cardHeader
{
--padding-inline-start
:
0px
!
important
;
--padding-inline-end
:
0px
!
important
;
padding
:
10px
;
}
.cardContent
{
padding
:
5px
;
text-align
:
center
;
}
src/app/envCtrl/env-shower/env-shower.page.ts
View file @
de1e2867
...
@@ -27,14 +27,15 @@ export class EnvShowerPage implements OnInit {
...
@@ -27,14 +27,15 @@ export class EnvShowerPage implements OnInit {
// 模式状态
// 模式状态
controlModel
=
0
;
controlModel
=
0
;
// 供液泵状态
// 供液泵状态
bump
=
{
online
:
true
,
press
:
0
};
bump
=
{
alarm
:
0
,
press
:
0
};
// 时间参数
// 时间参数
controlConfig
=
{
controlConfig
=
{
name
:
''
,
name
:
''
,
interval
:
0
,
// 间隔时间
interval
:
0
,
// 间隔时间
a
:
''
,
// A区喷淋时间
A
:
0
,
// A区喷淋时间
t
:
''
,
T
:
0
,
b
:
''
,
// A区喷淋时间
B
:
0
,
// A区喷淋时间
offset
:
0
};
};
// 各设备信息
// 各设备信息
param
=
[];
param
=
[];
...
@@ -42,7 +43,7 @@ export class EnvShowerPage implements OnInit {
...
@@ -42,7 +43,7 @@ export class EnvShowerPage implements OnInit {
controlModelOptions
=
[
controlModelOptions
=
[
{
modelId
:
0
,
modelValue
:
'手控模式'
},
{
modelId
:
0
,
modelValue
:
'手控模式'
},
{
modelId
:
1
,
modelValue
:
'自控模式'
},
{
modelId
:
1
,
modelValue
:
'自控模式'
},
{
modelId
:
2
,
modelValue
:
'智
慧控制
'
}];
{
modelId
:
2
,
modelValue
:
'智
控模式
'
}];
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
route
:
ActivatedRoute
)
{
}
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
route
:
ActivatedRoute
)
{
}
...
@@ -50,16 +51,21 @@ export class EnvShowerPage implements OnInit {
...
@@ -50,16 +51,21 @@ export class EnvShowerPage implements OnInit {
this
.
init
();
this
.
init
();
}
}
ionViewWillEnter
()
{
this
.
init
();
}
init
()
{
init
()
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
});
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
getData
(
0
);
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
getData
(
0
);
});
}
}
getData
(
time
)
{
getData
(
time
)
{
if
(
time
)
{
if
(
time
)
{
this
.
load
.
toLoad
(
'加载中...'
,
false
);
this
.
load
.
toLoad
(
'加载中...'
,
false
);
}
}
this
.
api
.
cowshedApp
.
getPenLinData
([{
'fieldRegionNo'
:
this
.
fieldRegionNo
},
(
data
)
=>
{
this
.
api
.
cowshedApp
.
getPenLinData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
if
(
data
)
{
if
(
data
)
{
this
.
fieldRegionNo
=
data
.
fieldRegionNo
;
this
.
fieldRegionNo
=
data
.
fieldRegionNo
;
this
.
fieldDeviceType
=
data
.
fieldDeviceType
;
this
.
fieldDeviceType
=
data
.
fieldDeviceType
;
...
@@ -67,29 +73,43 @@ export class EnvShowerPage implements OnInit {
...
@@ -67,29 +73,43 @@ export class EnvShowerPage implements OnInit {
this
.
bump
=
data
.
bump
;
this
.
bump
=
data
.
bump
;
this
.
controlConfig
=
data
.
controlConfig
;
this
.
controlConfig
=
data
.
controlConfig
;
this
.
param
=
data
.
param
;
this
.
param
=
data
.
param
;
this
.
param
.
forEach
(
device
=>
{
device
.
op
=
device
.
cycle
===
1
?
true
:
false
;
});
this
.
initButtons
();
}
}
}]);
}]);
}
}
initButtons
()
{
this
.
param
.
forEach
((
device
)
=>
{
// disabled:手控状态下 活性false 其他非活性true
device
.
disabled
=
this
.
controlModel
===
0
?
false
:
true
;
});
}
// 单个设备控制
// 单个设备控制
deviceCheck
(
btn
)
{
deviceCheck
(
btn
)
{
const
req
=
{
const
req
=
{
fieldDeviceNo
:
btn
.
fieldDeviceNo
,
fieldDeviceNo
:
btn
.
fieldDeviceNo
,
op
:
btn
.
state
?
0
:
1
,
fieldDeviceType
:
this
.
fieldDeviceType
,
op
:
btn
.
op
?
1
:
0
,
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
this
.
comm
.
remain
=
20
;
this
.
comm
.
remain
=
20
;
this
.
api
.
control
.
controlSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
if
(
data
&&
data
.
code
===
1
)
{
// if (data && data.code === 1) {
this
.
getData
(
1
);
// this.getData(1);
this
.
comm
.
remain
=
0
;
// this.comm.remain = 0;
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
}
else
{
// } else {
this
.
comm
.
remain
=
0
;
// this.comm.remain = 0;
this
.
api
.
presentMsgToast
(
data
.
message
);
// this.api.presentMsgToast(data.message);
}
// }
this
.
getData
(
0
);
this
.
comm
.
remain
=
0
;
this
.
api
.
presentMsgToast
(
data
.
message
);
btn
.
loading
=
false
;
btn
.
loading
=
false
;
}]);
}]);
}
}
}
}
src/app/envCtrl/env-waterchannel/env-waterchannel.page.html
View file @
de1e2867
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
line-height: 25px;
line-height: 25px;
margin-bottom: 5px;"
>
状态
</h1>
margin-bottom: 5px;"
>
状态
</h1>
<ion-card
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card-header>
<ion-card-header
class=
"cardTitle"
>
<ion-card-title
>
<span
[
ngClass
]="{'
sucCir
'
:
device
.
online
,
'
errCir
'
:
!
device
.
online
}
"
></span>
{{device .fieldDeviceName}}
</ion-card-title>
<ion-card-title
class=
"cardHeader"
>
<span
class=
"sucCir
"
></span>
{{device .fieldDeviceName}}
</ion-card-title>
</ion-card-header>
</ion-card-header>
<ion-card-content>
<ion-card-content
class=
"cardContent"
>
<span>
当前功率
</span>
<span
>
{{device.kw}} KW
<br></span>
<span>
当前功率
:
</span>
<span
style=
"color:#0bb8cc"
>
{{device.kw}} KW
<br></span>
<span>
估计加热设备台数
</span>
<span
>
{{device.deviceOnlineNum}} 台
</span>
<span>
估计加热设备台数
:
</span>
<span
style=
"color:#0bb8cc"
>
{{device.deviceOnlineNum}} 台
</span>
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</ion-content>
</ion-content>
src/app/envCtrl/env-waterchannel/env-waterchannel.page.scss
View file @
de1e2867
.card
{
float
:
none
;
display
:
inline-block
;
width
:
97%
;
margin
:
2%
;
}
.cardTitle
{
font-size
:
20px
;
padding
:
0px
;
}
.cardHeader
{
--padding-inline-start
:
0px
!
important
;
--padding-inline-end
:
0px
!
important
;
padding
:
10px
;
font-size
:
20px
;
text-align
:left
;
}
.cardContent
{
padding
:
0px
5px
5px
35px
;
}
.sucCir
{
width
:
17px
;
height
:
17px
;
border-radius
:
17px
;
background-color
:
#2ecc71
;
display
:
inline-block
;
vertical-align
:
middle
;
box-shadow
:
#ccc
0
.5px
0
.5px
3px
;
}
.errCir
{
width
:
17px
;
height
:
17px
;
border-radius
:
17px
;
background-color
:
#cb0000
;
display
:
inline-block
;
vertical-align
:
middle
;
box-shadow
:
#ccc
0
.5px
0
.5px
3px
;
}
src/app/envCtrl/env-waterchannel/env-waterchannel.page.ts
View file @
de1e2867
...
@@ -26,15 +26,21 @@ export class EnvWaterchannelPage implements OnInit {
...
@@ -26,15 +26,21 @@ export class EnvWaterchannelPage implements OnInit {
// this.ac.queryParams.subscribe((data) => {
// this.ac.queryParams.subscribe((data) => {
// this.fieldRegionNo = data.no;
// this.fieldRegionNo = data.no;
// });
// });
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
});
this
.
init
();
this
.
getData
(
0
);
}
init
()
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
getData
(
0
);
});
}
}
getData
(
time
)
{
getData
(
time
)
{
if
(
time
)
{
if
(
time
)
{
this
.
load
.
toLoad
(
'加载中...'
,
false
);
this
.
load
.
toLoad
(
'加载中...'
,
false
);
}
}
this
.
api
.
cowshedApp
.
getShuiCaoData
([{
'fieldRegionNo'
:
this
.
fieldRegionNo
},
(
data
)
=>
{
this
.
api
.
cowshedApp
.
getShuiCaoData
([{
fieldRegionNo
:
this
.
fieldRegionNo
},
(
data
)
=>
{
if
(
data
)
{
if
(
data
)
{
this
.
devices
=
data
.
param
;
this
.
devices
=
data
.
param
;
}
}
...
...
src/app/service/api.ts
View file @
de1e2867
...
@@ -33,7 +33,7 @@ export class Api {
...
@@ -33,7 +33,7 @@ export class Api {
public
cowshedApp
=
{
public
cowshedApp
=
{
// 牛舍首页查询
// 牛舍首页查询
getAll
RegionData
:
(
data
)
=>
this
.
trans
(
'get'
,
'/cowshedApp/getAll'
,
data
),
getAll
:
(
data
)
=>
this
.
trans
(
'get'
,
'/cowshedApp/getAll'
,
data
),
// 根据牛舍名称查询牛舍信息
// 根据牛舍名称查询牛舍信息
getAllForLike
:
(
data
)
=>
this
.
trans
(
'post'
,
'/cowshedApp/getAllForLike'
,
data
),
getAllForLike
:
(
data
)
=>
this
.
trans
(
'post'
,
'/cowshedApp/getAllForLike'
,
data
),
// 获取牛舍的基本信息
// 获取牛舍的基本信息
...
@@ -95,8 +95,8 @@ export class Api {
...
@@ -95,8 +95,8 @@ export class Api {
};
};
public
config
=
{
public
config
=
{
get
All
:
(
data
)
=>
this
.
trans
(
'post'
,
'/cowshedConfig/getAll
'
,
data
),
get
ByFieldRegionNo
:
(
data
)
=>
this
.
trans
(
'post'
,
'/config/getByFieldRegionNo
'
,
data
),
updateCo
wshedConfig
:
(
data
)
=>
this
.
trans
(
'post'
,
'/cowshedConfig/updateCowshed
Config'
,
data
),
updateCo
nfig
:
(
data
)
=>
this
.
trans
(
'post'
,
'/config/update
Config'
,
data
),
};
};
public
devicePatternModel
=
{
public
devicePatternModel
=
{
...
...
src/assets/img/shower-0.png
0 → 100644
View file @
de1e2867
1.08 KB
src/assets/img/shower-1.png
0 → 100644
View file @
de1e2867
1.3 KB
src/environments/environment.ts
View file @
de1e2867
...
@@ -4,12 +4,14 @@
...
@@ -4,12 +4,14 @@
export
const
environment
=
{
export
const
environment
=
{
// production: false,
// production: false,
url
:
'http://pasture.witium.com.cn/api'
,
// 对外访问测试网地址
// url: 'http://pasture.witium.com.cn/api', // 对外访问测试网地址
// url: 'http://172.16.1.14:8096',
// url: 'http://cloud-test.witium.com:8096', // 测试
// url: 'http://cloud-test.witium.com:8096', // 测试
// url: 'http://172.16.1.53:8096', // cy
// url: 'http://172.16.1.53:8096', // cy
// url: 'http://172.16.1.51:8097', // lin
// url: 'http://172.16.1.51:8097', // lin
// url: 'http://211.161.200.169:19200', // zz
// url: 'http://211.161.200.169:19200', // zz
//
url: 'http://172.16.1.52:8096', // zz
url
:
'http://172.16.1.52:8096'
,
// zz
// url: 'http://172.16.1.13:8096', // 测试
// url: 'http://172.16.1.13:8096', // 测试
mqttUrl
:
'172.16.1.24'
,
// mqttUrl: '172.16.1.24:48083',
mqttUrl
:
'172.16.1.24'
,
// mqttUrl: '172.16.1.24:48083',
// mqttUrl: '211.161.200.169', // 辉度外网访问mqtt地址
// mqttUrl: '211.161.200.169', // 辉度外网访问mqtt地址
...
...
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