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
6011ef3c
Commit
6011ef3c
authored
Nov 22, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整layout
parent
d942ae78
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
389 additions
and
203 deletions
+389
-203
config.xml
config.xml
+1
-1
env-add-model.page.html
src/app/envCtrl/env-add-model/env-add-model.page.html
+1
-1
env-add-model.page.scss
src/app/envCtrl/env-add-model/env-add-model.page.scss
+1
-1
env-alarm-detail.page.html
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.html
+17
-14
env-alarm-detail.page.scss
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.scss
+2
-2
env-alarm-detail.page.ts
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.ts
+18
-2
env-alarm.page.html
src/app/envCtrl/env-alarm/env-alarm.page.html
+1
-1
env-alarm.page.ts
src/app/envCtrl/env-alarm/env-alarm.page.ts
+1
-1
env-anal-detail.page.html
src/app/envCtrl/env-anal-detail/env-anal-detail.page.html
+15
-10
env-anal.page.html
src/app/envCtrl/env-anal/env-anal.page.html
+17
-17
env-cfg.page.scss
src/app/envCtrl/env-cfg/env-cfg.page.scss
+1
-1
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+75
-27
env-change-model.page.html
src/app/envCtrl/env-change-model/env-change-model.page.html
+11
-2
env-change-model.page.scss
src/app/envCtrl/env-change-model/env-change-model.page.scss
+27
-0
env-detail.page.html
src/app/envCtrl/env-detail/env-detail.page.html
+2
-2
env-detail.page.ts
src/app/envCtrl/env-detail/env-detail.page.ts
+9
-9
env-fan.page.html
src/app/envCtrl/env-fan/env-fan.page.html
+11
-8
env-fan.page.ts
src/app/envCtrl/env-fan/env-fan.page.ts
+18
-7
env-history.page.html
src/app/envCtrl/env-history/env-history.page.html
+13
-11
env-history.page.scss
src/app/envCtrl/env-history/env-history.page.scss
+16
-1
env-history.page.ts
src/app/envCtrl/env-history/env-history.page.ts
+17
-9
env-home.page.html
src/app/envCtrl/env-home/env-home.page.html
+12
-6
env-home.page.scss
src/app/envCtrl/env-home/env-home.page.scss
+17
-5
env-light.page.html
src/app/envCtrl/env-light/env-light.page.html
+16
-13
env-light.page.scss
src/app/envCtrl/env-light/env-light.page.scss
+0
-1
env-light.page.ts
src/app/envCtrl/env-light/env-light.page.ts
+6
-6
env-shower.page.html
src/app/envCtrl/env-shower/env-shower.page.html
+11
-13
env-shower.page.ts
src/app/envCtrl/env-shower/env-shower.page.ts
+2
-2
env-waterchannel.page.html
src/app/envCtrl/env-waterchannel/env-waterchannel.page.html
+10
-5
env-waterchannel.page.scss
src/app/envCtrl/env-waterchannel/env-waterchannel.page.scss
+3
-2
tabs.page.html
src/app/envCtrl/tabs/tabs.page.html
+2
-2
constants.ts
src/app/service/constants.ts
+5
-0
alarm-small.png
src/assets/img/alarm-small.png
+0
-0
light-small.png
src/assets/img/light-small.png
+0
-0
shower-small.png
src/assets/img/shower-small.png
+0
-0
water-channel.png
src/assets/img/water-channel.png
+0
-0
global.scss
src/global.scss
+21
-17
variables.scss
src/theme/variables.scss
+10
-4
No files found.
config.xml
View file @
6011ef3c
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<widget
id=
"com.witium.muchang.test"
version=
"2.9.
2
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<widget
id=
"com.witium.muchang.test"
version=
"2.9.
3
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<name>
牧场云
</name>
<name>
牧场云
</name>
<description>
test
</description>
<description>
test
</description>
<author
email=
"frank.feng@witium.com"
href=
"http://muchang.witium.com/"
>
Van.chen - frank.feng
</author>
<author
email=
"frank.feng@witium.com"
href=
"http://muchang.witium.com/"
>
Van.chen - frank.feng
</author>
...
...
src/app/envCtrl/env-add-model/env-add-model.page.html
View file @
6011ef3c
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<div
class=
"top-line"
>
<div
class=
"top-line"
>
</div>
</div>
<div
class=
"top-img"
>
<div
class=
"top-img"
>
<img
src=
"../../../assets/img/
喷淋
.png"
class=
"img"
>
<img
src=
"../../../assets/img/
shower-small
.png"
class=
"img"
>
</div>
</div>
<div
class=
"top-line"
>
<div
class=
"top-line"
>
</div>
</div>
...
...
src/app/envCtrl/env-add-model/env-add-model.page.scss
View file @
6011ef3c
...
@@ -46,6 +46,6 @@
...
@@ -46,6 +46,6 @@
height
:
2px
;
height
:
2px
;
border-bottom
:
1px
solid
lightgray
;
border-bottom
:
1px
solid
lightgray
;
display
:
inline-block
;
display
:
inline-block
;
margin
:
15px
0px
14px
5px
;
margin
:
15px
1%
14px
1%
;
;
float
:
left
;
float
:
left
;
}
}
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.html
View file @
6011ef3c
...
@@ -7,22 +7,25 @@
...
@@ -7,22 +7,25 @@
<ion-title
class=
"appTitle"
>
{{fieldRegionName}}告警详情
</ion-title>
<ion-title
class=
"appTitle"
>
{{fieldRegionName}}告警详情
</ion-title>
</ion-toolbar>
</ion-toolbar>
<div
style=
"
margin-top:10px;
"
>
<div
style=
""
>
<ion-segment
mode=
"ios"
style=
"position: sticky;"
color=
"secondary"
(
ionChange
)="
segmentChanged
($
event
)"
>
<ion-segment
mode=
"ios"
style=
"position: sticky;
height: 35px;
"
color=
"secondary"
(
ionChange
)="
segmentChanged
($
event
)"
>
<ion-segment-button
mode=
"ios"
value=
"trouble"
[
checked
]="
isTroubleDis
"
class=
"ion-segment-button"
>
<ion-segment-button
mode=
"ios"
value=
"trouble"
[
checked
]="
isTroubleDis
"
class=
"ion-segment-button"
style=
"--border-radius:0xp;"
>
<ion-label>
故障
</ion-label>
<ion-label>
故障
</ion-label>
</ion-segment-button>
</ion-segment-button>
<ion-segment-button
mode=
"ios"
value=
"alarm"
[
checked
]="
isAlarmDis
"
class=
"ion-segment-button"
>
<ion-segment-button
mode=
"ios"
value=
"alarm"
[
checked
]="
isAlarmDis
"
class=
"ion-segment-button"
style=
"--border-radius:0xp;"
>
<ion-label>
预警
</ion-label>
<ion-label>
预警
</ion-label>
</ion-segment-button>
</ion-segment-button>
</ion-segment>
</ion-segment>
<ion-item
lines=
"full"
class=
"ionItem"
style=
"height: 45px;"
>
<!-- color="gray" -->
<ion-item
lines=
"full"
class=
"ionItem"
style=
"height: 45px;"
>
<!-- color="gray" -->
<div
style=
"float:left; display: inline-block; position: relative; width:40%; padding-top: 10px;"
>
<div
style=
"float:left; display: inline-block; position: relative; width:40%; padding-top: 10px;"
>
<!--<ion-select class="selectBtn font-content" interface="popover" placeholder="状态" [(ngModel)]="disposeState" (ionChange)="refresh()" id="selectState">-->
<!--<ion-select-option value="全部" class="popLabel">全部</ion-select-option>-->
<!--<ion-select-option value="0" class="popLabel">待修复</ion-select-option>-->
<!--<ion-select-option value="1" class="popLabel">已修复</ion-select-option>-->
<!--</ion-select>-->
<ion-select
class=
"selectBtn font-content"
interface=
"popover"
placeholder=
"状态"
[(
ngModel
)]="
disposeState
"
(
ionChange
)="
refresh
()"
id=
"selectState"
>
<ion-select
class=
"selectBtn font-content"
interface=
"popover"
placeholder=
"状态"
[(
ngModel
)]="
disposeState
"
(
ionChange
)="
refresh
()"
id=
"selectState"
>
<ion-select-option
value=
"全部"
class=
"popLabel"
>
全部
</ion-select-option>
<ion-select-option
*
ngFor=
"let option of stateOptions"
[
value
]="
option
.
modelId
"
>
{{option.modelValue}}
</ion-select-option>
<ion-select-option
value=
"0"
class=
"popLabel"
>
待修复
</ion-select-option>
<ion-select-option
value=
"1"
class=
"popLabel"
>
已修复
</ion-select-option>
</ion-select>
</ion-select>
</div>
</div>
<div
style=
"float:left; display: inline-block; position: relative; width:40%; padding-top: 10px;"
>
<div
style=
"float:left; display: inline-block; position: relative; width:40%; padding-top: 10px;"
>
...
@@ -89,15 +92,15 @@
...
@@ -89,15 +92,15 @@
<div
id=
"parentDiv"
>
<div
id=
"parentDiv"
>
<div
style=
"width:65%; float: left"
>
<div
style=
"width:65%; float: left"
>
<h3
style=
"margin-bottom: 5px;"
class=
"font-content-title"
>
{{item.description}}
</h3>
<h3
style=
"margin-bottom: 5px;"
class=
"font-content-title"
>
{{item.description}}
</h3>
<div
*
ngIf=
"item.data !== null && item.data.temp !== undefined && item.data.temp !== null && item.data.temp !== ''"
class=
"warnContent font-content"
>
温度: {{item.data.temp}} ℃
</div>
<div
*
ngIf=
"item.data !== null && item.data.temp !== undefined && item.data.temp !== null && item.data.temp !== ''"
class=
"warnContent font-content"
>
温度: {{item.data.temp
| number:'0.1-1'
}} ℃
</div>
<div
*
ngIf=
"item.data !== null && item.data.humi !== undefined && item.data.humi !== null && item.data.humi !== ''"
class=
"warnContent font-content"
>
湿度: {{item.data.humi}} %
</div>
<div
*
ngIf=
"item.data !== null && item.data.humi !== undefined && item.data.humi !== null && item.data.humi !== ''"
class=
"warnContent font-content"
>
湿度: {{item.data.humi
| number:'0.0-0'
}} %
</div>
<div
*
ngIf=
"item.data !== null && item.data.heatStressLevel !== undefined && item.data.heatStressLevel !== null && item.data.heatStressLevel !== ''"
class=
"warnContent font-content"
>
热应激等级: {{item.data.heatStressLevel}}
</div>
<div
*
ngIf=
"item.data !== null && item.data.heatStressLevel !== undefined && item.data.heatStressLevel !== null && item.data.heatStressLevel !== ''"
class=
"warnContent font-content"
>
热应激等级: {{item.data.heatStressLevel}}
</div>
<div
*
ngIf=
"item.data !== null && item.data.liquidPump !== undefined && item.data.liquidPump !== null && item.data.liquidPump !== ''"
class=
"warnContent font-content"
>
供液泵
压力: {{item.data.liquidPump
}} MPa
</div>
<div
*
ngIf=
"item.data !== null && item.data.liquidPump !== undefined && item.data.liquidPump !== null && item.data.liquidPump !== ''"
class=
"warnContent font-content"
>
供液泵
: {{item.data.liquidPump | number:'0.0-3'
}} MPa
</div>
<div
*
ngIf=
"item.data !== null && item.data.press !== undefined && item.data.press !== null && item.data.press !== ''"
class=
"warnContent font-content"
>
电磁阀
压力: {{item.data.press
}} MPa
</div>
<div
*
ngIf=
"item.data !== null && item.data.press !== undefined && item.data.press !== null && item.data.press !== ''"
class=
"warnContent font-content"
>
电磁阀
: {{item.data.press | number:'0.0-3'
}} MPa
</div>
<div
*
ngIf=
"item.data !== null && item.data.NH3 !== undefined && item.data.NH3 !== null && item.data.NH3 !== ''"
class=
"warnContent font-content"
>
氨气: {{item.data.NH3}} ppm
</div>
<div
*
ngIf=
"item.data !== null && item.data.NH3 !== undefined && item.data.NH3 !== null && item.data.NH3 !== ''"
class=
"warnContent font-content"
>
氨气: {{item.data.NH3
| number:'0.0-2'
}} ppm
</div>
</div>
</div>
<div
style=
"width:35%; float: left"
>
<div
style=
"width:35%; float: left"
>
<div
*
ngIf=
"displayArea === 'trouble' && item.disposeState === 0"
>
is
<div
*
ngIf=
"displayArea === 'trouble' && item.disposeState === 0"
>
<ion-button
color=
"secondary"
style=
"display: inline-block; width: 55px; height: 30px; font-size: 12px; border-radius: 20px;"
(
click
)="
onRecvClick
(
item
)"
>
确认修复
</ion-button>
<ion-button
color=
"secondary"
style=
"display: inline-block; width: 55px; height: 30px; font-size: 12px; border-radius: 20px;"
(
click
)="
onRecvClick
(
item
)"
>
确认修复
</ion-button>
</div>
</div>
<img
*
ngIf=
"displayArea === 'trouble' && item.disposeState === 1"
[
src
]="'../../
assets
/
img
/
troubleDisposeState
'
+
item
.
disposeState
+
'.
png
'"
class=
"warnIcon"
>
<img
*
ngIf=
"displayArea === 'trouble' && item.disposeState === 1"
[
src
]="'../../
assets
/
img
/
troubleDisposeState
'
+
item
.
disposeState
+
'.
png
'"
class=
"warnIcon"
>
...
@@ -115,7 +118,7 @@
...
@@ -115,7 +118,7 @@
<ion-infinite-scroll
threshold=
"100px"
(
ionInfinite
)="
loadData
($
event
)"
id=
"infiniteScroll"
>
<ion-infinite-scroll
threshold=
"100px"
(
ionInfinite
)="
loadData
($
event
)"
id=
"infiniteScroll"
>
<ion-infinite-scroll-content
<ion-infinite-scroll-content
loadingSpinner=
"bubbles"
loadingSpinner=
"bubbles"
loadingText=
"
加载中...
"
>
loadingText=
""
>
</ion-infinite-scroll-content>
</ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-infinite-scroll>
</div>
</div>
...
...
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.scss
View file @
6011ef3c
...
@@ -134,8 +134,8 @@
...
@@ -134,8 +134,8 @@
position
:
absolute
;
position
:
absolute
;
width
:
8px
;
width
:
8px
;
height
:
8px
;
height
:
8px
;
border
:
4px
solid
#
28C0C6
;
border
:
4px
solid
#
61C7CC
;
background-color
:
#
28C0C6
;
background-color
:
#
61C7CC
;
border-radius
:
100%
;
border-radius
:
100%
;
top
:
35%
;
top
:
35%
;
right
:
-24px
;
right
:
-24px
;
...
...
src/app/envCtrl/env-alarm-detail/env-alarm-detail.page.ts
View file @
6011ef3c
...
@@ -6,6 +6,7 @@ import {DatePipe} from '@angular/common';
...
@@ -6,6 +6,7 @@ import {DatePipe} from '@angular/common';
import
{
IonInfiniteScroll
}
from
'@ionic/angular'
;
import
{
IonInfiniteScroll
}
from
'@ionic/angular'
;
import
{
Loading
}
from
'../../service/loading'
;
import
{
Loading
}
from
'../../service/loading'
;
import
{
Load
}
from
'../../service/load'
;
import
{
Load
}
from
'../../service/load'
;
import
{
Constants
}
from
'../../service/constants'
;
@
Component
({
@
Component
({
selector
:
'v-env-alarm-detail'
,
selector
:
'v-env-alarm-detail'
,
...
@@ -43,6 +44,11 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -43,6 +44,11 @@ export class EnvAlarmDetailPage implements OnInit {
'workModeOld'
:
'1'
'workModeOld'
:
'1'
};
};
stateOptions
=
[
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'0'
,
modelValue
:
'待修复'
},
{
modelId
:
'1'
,
modelValue
:
'已修复'
}];
typeOptions
=
[
typeOptions
=
[
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'环境'
,
modelValue
:
'环境'
},
{
modelId
:
'环境'
,
modelValue
:
'环境'
},
...
@@ -114,6 +120,11 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -114,6 +120,11 @@ export class EnvAlarmDetailPage implements OnInit {
{
modelId
:
'喷淋'
,
modelValue
:
'喷淋'
},
{
modelId
:
'喷淋'
,
modelValue
:
'喷淋'
},
{
modelId
:
'照明'
,
modelValue
:
'照明'
},
{
modelId
:
'照明'
,
modelValue
:
'照明'
},
{
modelId
:
'水槽'
,
modelValue
:
'水槽'
}];
{
modelId
:
'水槽'
,
modelValue
:
'水槽'
}];
this
.
stateOptions
=
[
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'0'
,
modelValue
:
'待修复'
},
{
modelId
:
'1'
,
modelValue
:
'已修复'
}];
}
else
{
}
else
{
this
.
typeOptions
=
[
this
.
typeOptions
=
[
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
...
@@ -122,6 +133,11 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -122,6 +133,11 @@ export class EnvAlarmDetailPage implements OnInit {
{
modelId
:
'喷淋'
,
modelValue
:
'喷淋'
},
{
modelId
:
'喷淋'
,
modelValue
:
'喷淋'
},
{
modelId
:
'照明'
,
modelValue
:
'照明'
},
{
modelId
:
'照明'
,
modelValue
:
'照明'
},
{
modelId
:
'水槽'
,
modelValue
:
'水槽'
}];
{
modelId
:
'水槽'
,
modelValue
:
'水槽'
}];
this
.
stateOptions
=
[
{
modelId
:
'全部'
,
modelValue
:
'全部'
},
{
modelId
:
'0'
,
modelValue
:
'待解决'
},
{
modelId
:
'1'
,
modelValue
:
'已解决'
}];
}
}
}
}
...
@@ -295,7 +311,7 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -295,7 +311,7 @@ export class EnvAlarmDetailPage implements OnInit {
disposeState
:
1
,
disposeState
:
1
,
isReal
:
real
===
1
?
1
:
0
isReal
:
real
===
1
?
1
:
0
};
};
this
.
loading
.
presentLoading
(
60
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_SHORT
);
this
.
api
.
troubleLog
.
processingFailure
([
req
,
(
data
)
=>
{
this
.
api
.
troubleLog
.
processingFailure
([
req
,
(
data
)
=>
{
if
(
data
&&
data
.
code
===
1
)
{
if
(
data
&&
data
.
code
===
1
)
{
this
.
api
.
presentMsgToast
(
data
.
message
);
this
.
api
.
presentMsgToast
(
data
.
message
);
...
@@ -354,7 +370,7 @@ export class EnvAlarmDetailPage implements OnInit {
...
@@ -354,7 +370,7 @@ export class EnvAlarmDetailPage implements OnInit {
cssClass
:
'main-color'
,
cssClass
:
'main-color'
,
mode
:
'ios'
,
mode
:
'ios'
,
message
:
''
,
message
:
''
,
duration
:
20
00
duration
:
15
00
});
});
await
loading
.
present
();
await
loading
.
present
();
...
...
src/app/envCtrl/env-alarm/env-alarm.page.html
View file @
6011ef3c
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</div>
</div>
<ion-badge
color=
"danger"
mode=
"ios"
*
ngIf=
"item.total > 0"
class=
"badge"
>
{{item.total}}
</ion-badge>
<ion-badge
color=
"danger"
mode=
"ios"
*
ngIf=
"item.total > 0"
class=
"badge"
>
{{item.total}}
</ion-badge>
</div>
</div>
<div
style=
"width: 30%; padding-right: 5px; display: inline-block; font-size: 13px; color:#6
1
C7CC"
>
<div
style=
"width: 30%; padding-right: 5px; display: inline-block; font-size: 13px; color:#6
2
C7CC"
>
<ion-select
interface=
"popover"
placeholder=
""
style=
"padding: 0px; text-align: right;"
[(
ngModel
)]="
item
.
interval
"
(
ionChange
)="
dismissPopover
(
item
)"
>
<ion-select
interface=
"popover"
placeholder=
""
style=
"padding: 0px; text-align: right;"
[(
ngModel
)]="
item
.
interval
"
(
ionChange
)="
dismissPopover
(
item
)"
>
<ion-select-option
value=
"12"
class=
"popLabel"
>
近一年
</ion-select-option>
<ion-select-option
value=
"12"
class=
"popLabel"
>
近一年
</ion-select-option>
<ion-select-option
value=
"6"
class=
"popLabel"
>
近六个月
</ion-select-option>
<ion-select-option
value=
"6"
class=
"popLabel"
>
近六个月
</ion-select-option>
...
...
src/app/envCtrl/env-alarm/env-alarm.page.ts
View file @
6011ef3c
...
@@ -76,7 +76,7 @@ export class EnvAlarmPage implements OnInit {
...
@@ -76,7 +76,7 @@ export class EnvAlarmPage implements OnInit {
}
}
toControl
(
one
,
displayArea
)
{
toControl
(
one
,
displayArea
)
{
const
query
=
'/env-alarmDetail?no='
+
one
.
fieldRegionNo
const
query
=
'/env-alarmDetail?no='
+
one
.
fieldRegionNo
+
'&displayArea='
+
displayArea
+
'&interval='
+
this
.
curInterval
.
toString
()
;
+
'&displayArea='
+
displayArea
+
'&interval='
+
one
.
interval
;
// this.tf.transfer({
// this.tf.transfer({
// url: '/' + one.url,
// url: '/' + one.url,
// query: query,
// query: query,
...
...
src/app/envCtrl/env-anal-detail/env-anal-detail.page.html
View file @
6011ef3c
...
@@ -9,26 +9,31 @@
...
@@ -9,26 +9,31 @@
<ion-content
color=
'light'
>
<ion-content
color=
'light'
>
<
ion-item
lines=
"full
"
>
<
div
style=
"width:100%; background-color: unset
"
>
<div
style=
"width: 100%"
>
<div
style=
"width: 100%"
>
<div
style=
"width:20%; display: inline-block;"
>
<div
style=
"width:20%; display: inline-block; float: left; padding-top: 8px; padding-left: 20px;"
>
<span>
选择日期
</span>
<span
class=
"font-sub-title"
style=
"display: inline-block; "
>
选择日期
</span>
</div>
<div
style=
"width:60%; text-align: left;padding-left: 20px; display: inline-block;"
>
<div
style=
" padding-right: 5px; display: inline-block;"
>
<ion-datetime
displayFormat=
"YYYY-MM-DD"
cancelText=
"取消"
doneText=
"确认"
[(
ngModel
)]="
today
"
class=
"font-input"
style=
"display: inline-block;"
></ion-datetime>
</div>
<!--<div style="float:left; display: inline-block;">-->
<!--<!–<img src="../../assets/img/calendar-small.png" style="width: 25px !important; display: inline-block;">–>-->
<!--</div>-->
</div>
</div>
<div
style=
"width:70%; text-align: left;padding-left: 20px; display: inline-block;"
>
<ion-datetime
displayFormat=
"YYYY-MM-DD"
cancelText=
"取消"
doneText=
"确认"
[(
ngModel
)]="
today
"
style=
"font-size:16px"
></ion-datetime>
</div>
</div>
</div>
</div>
</ion-item>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
>
<ion-item
lines=
"full"
class=
"inputItem"
*
ngFor=
"let item of fieldRegionNameList"
>
<ion-item
lines=
"full"
class=
"inputItem"
style=
"width:94%;margin-left:2%; margin-right:2%;"
*
ngFor=
"let item of fieldRegionNameList"
>
<div
style=
"width:45%;
font-size:16px;
"
>
<div
style=
"width:45%;
"
class=
"font-content
"
>
{{item.name}}单产奶量
{{item.name}}单产奶量
</div>
</div>
<div
style=
"width:25%; padding-left:10px; font-size:16px;"
>
<div
style=
"width:25%; padding-left:10px; font-size:16px;"
>
<ion-input
class=
"inputText"
[(
ngModel
)]="
item
.
num
"
></ion-input>
<ion-input
class=
"inputText"
[(
ngModel
)]="
item
.
num
"
></ion-input>
</div>
</div>
<div
style=
"width:30%; text-align:right; padding-right:15px;
font-size:14px;
"
>
<div
style=
"width:30%; text-align:right; padding-right:15px;
"
class=
"font-smaller
"
>
公斤(kg)/头
公斤(kg)/头
</div>
</div>
</ion-item>
</ion-item>
...
@@ -36,7 +41,7 @@
...
@@ -36,7 +41,7 @@
<div
style=
"text-align: center; width:100%; position: absolute; bottom: 10px;"
>
<div
style=
"text-align: center; width:100%; position: absolute; bottom: 10px;"
>
<ion-item
width=
"100%"
lines=
"none"
>
<ion-item
width=
"100%"
lines=
"none"
>
<ion-button
color=
"secondary"
class=
"saveBtn"
round
(
click
)="
save
($
event
)"
>
提交
</ion-button>
<ion-button
color=
"secondary"
style=
"height:35px;"
class=
"saveBtn"
round
(
click
)="
save
($
event
)"
>
提交
</ion-button>
</ion-item>
</ion-item>
</div>
</div>
...
...
src/app/envCtrl/env-anal/env-anal.page.html
View file @
6011ef3c
...
@@ -29,13 +29,13 @@
...
@@ -29,13 +29,13 @@
<div
class=
"rankIcon"
>
<div
class=
"rankIcon"
>
<img
[
src
]="'../../
assets
/
img
/
rank1
.
png
'"
>
<img
[
src
]="'../../
assets
/
img
/
rank1
.
png
'"
>
</div>
</div>
<div
class=
"rankName"
>
<div
class=
"rankName
font-content
"
>
5号牛舍
5号牛舍
</div>
</div>
<div
class=
"rankProgress"
>
<div
class=
"rankProgress"
>
<ion-progress-bar
color=
"secondary"
value=
"1"
></ion-progress-bar>
<ion-progress-bar
color=
"secondary"
value=
"1"
></ion-progress-bar>
</div>
</div>
<div
class=
"rankValue"
>
<div
class=
"rankValue
font-content
"
>
140
140
</div>
</div>
</ion-item>
</ion-item>
...
@@ -43,13 +43,13 @@
...
@@ -43,13 +43,13 @@
<div
class=
"rankIcon"
>
<div
class=
"rankIcon"
>
<img
[
src
]="'../../
assets
/
img
/
rank2
.
png
'"
>
<img
[
src
]="'../../
assets
/
img
/
rank2
.
png
'"
>
</div>
</div>
<div
class=
"rankName"
>
<div
class=
"rankName
font-content
"
>
8号牛舍
8号牛舍
</div>
</div>
<div
class=
"rankProgress"
>
<div
class=
"rankProgress"
>
<ion-progress-bar
color=
"secondary"
value=
"0.80"
></ion-progress-bar>
<ion-progress-bar
color=
"secondary"
value=
"0.80"
></ion-progress-bar>
</div>
</div>
<div
class=
"rankValue"
>
<div
class=
"rankValue
font-content
"
>
125
125
</div>
</div>
</ion-item>
</ion-item>
...
@@ -58,55 +58,55 @@
...
@@ -58,55 +58,55 @@
<div
class=
"rankIcon"
>
<div
class=
"rankIcon"
>
<img
[
src
]="'../../
assets
/
img
/
rank3
.
png
'"
>
<img
[
src
]="'../../
assets
/
img
/
rank3
.
png
'"
>
</div>
</div>
<div
class=
"rankName"
>
<div
class=
"rankName
font-content
"
>
1号牛舍
1号牛舍
</div>
</div>
<div
class=
"rankProgress"
>
<div
class=
"rankProgress"
>
<ion-progress-bar
color=
"secondary"
value=
"0.75"
></ion-progress-bar>
<ion-progress-bar
color=
"secondary"
value=
"0.75"
></ion-progress-bar>
</div>
</div>
<div
class=
"rankValue"
>
<div
class=
"rankValue
font-content
"
>
105
105
</div>
</div>
</ion-item>
</ion-item>
<ion-item
lines=
"full"
class=
"rankItem fix-item-padding"
>
<ion-item
lines=
"full"
class=
"rankItem fix-item-padding"
>
<div
class=
"rankIcon"
>
<div
class=
"rankIcon
font-content
"
>
24
24
</div>
</div>
<div
class=
"rankName"
>
<div
class=
"rankName
font-content
"
>
20号牛舍
20号牛舍
</div>
</div>
<div
class=
"rankProgress"
>
<div
class=
"rankProgress"
>
<ion-progress-bar
color=
"medium"
value=
"0.50"
></ion-progress-bar>
<ion-progress-bar
color=
"medium"
value=
"0.50"
></ion-progress-bar>
</div>
</div>
<div
class=
"rankValue"
>
<div
class=
"rankValue
font-content
"
>
55
55
</div>
</div>
</ion-item>
</ion-item>
<ion-item
lines=
"full"
class=
"rankItem fix-item-padding"
>
<ion-item
lines=
"full"
class=
"rankItem fix-item-padding"
>
<div
class=
"rankIcon"
>
<div
class=
"rankIcon
font-content
"
>
25
25
</div>
</div>
<div
class=
"rankName"
>
<div
class=
"rankName
font-content
"
>
23号牛舍
23号牛舍
</div>
</div>
<div
class=
"rankProgress"
>
<div
class=
"rankProgress"
>
<ion-progress-bar
color=
"medium"
value=
"0.3"
></ion-progress-bar>
<ion-progress-bar
color=
"medium"
value=
"0.3"
></ion-progress-bar>
</div>
</div>
<div
class=
"rankValue"
>
<div
class=
"rankValue
font-content
"
>
35
35
</div>
</div>
</ion-item>
</ion-item>
<ion-item
lines=
"full"
class=
"rankItem fix-item-padding"
>
<ion-item
lines=
"full"
class=
"rankItem fix-item-padding"
>
<div
class=
"rankIcon"
>
<div
class=
"rankIcon
font-content
"
>
26
26
</div>
</div>
<div
class=
"rankName"
>
<div
class=
"rankName
font-content
"
>
11号牛舍
11号牛舍
</div>
</div>
<div
class=
"rankProgress"
>
<div
class=
"rankProgress"
>
<ion-progress-bar
color=
"medium"
value=
"0.2"
></ion-progress-bar>
<ion-progress-bar
color=
"medium"
value=
"0.2"
></ion-progress-bar>
</div>
</div>
<div
class=
"rankValue"
>
<div
class=
"rankValue
font-content
"
>
20
20
</div>
</div>
</ion-item>
</ion-item>
...
@@ -127,8 +127,8 @@
...
@@ -127,8 +127,8 @@
<div
style=
"width:100%; padding-left:10px; padding-right:10px; height: 300px"
>
<div
style=
"width:100%; padding-left:10px; padding-right:10px; height: 300px"
>
<div
style=
"width:95%; background-color: #fff; border-radius: 10px 10px 0px 0px"
>
<div
style=
"width:95%; background-color: #fff; border-radius: 10px 10px 0px 0px"
>
<div
style=
"width:85%; margin:auto; padding-top: 10px"
>
<div
style=
"width:85%; margin:auto; padding-top: 10px"
>
<ion-segment
scrollable
style=
"position: sticky; margin-top:10px;"
color=
"secondary"
(
ionChange
)="
segmentChanged
($
event
)"
>
<ion-segment
mode=
"ios"
scrollable
style=
"position: sticky; margin-top:10px;"
color=
"secondary"
(
ionChange
)="
segmentChanged
($
event
)"
>
<ion-segment-button
style=
"border-radius: 20px; margin-right:5px"
*
ngFor=
"let item of fieldRegionNameList"
[
value
]="
item
.
name
"
[
checked
]="
item
.
checked
"
>
<ion-segment-button
mode=
"ios"
style=
"border-radius: 20px; margin-right:5px"
*
ngFor=
"let item of fieldRegionNameList"
[
value
]="
item
.
name
"
[
checked
]="
item
.
checked
"
>
<ion-label
style=
"font-size:10px"
>
{{item.name}}
</ion-label>
<ion-label
style=
"font-size:10px"
>
{{item.name}}
</ion-label>
</ion-segment-button>
</ion-segment-button>
</ion-segment>
</ion-segment>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.scss
View file @
6011ef3c
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
.selectFont
{
.selectFont
{
font-weight
:
normal
;
font-weight
:
normal
;
font-size
:
13px
;
font-size
:
13px
;
color
:
#8
e8e8e
;
color
:
#8
28282
;
}
}
.popContent
{
.popContent
{
...
...
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
6011ef3c
...
@@ -387,10 +387,12 @@ export class EnvCfgPage implements OnInit {
...
@@ -387,10 +387,12 @@ export class EnvCfgPage implements OnInit {
this
.
curCowshed
.
config
.
push
(
this
.
waterChannel
);
this
.
curCowshed
.
config
.
push
(
this
.
waterChannel
);
this
.
updateDateFormat
();
this
.
updateDateFormat
();
if
(
this
.
validate
())
{
if
(
this
.
validate
())
{
this
.
sortShowerModels
();
this
.
updateModels
();
this
.
updateModels
();
// this.load.toLoad('加载中...', false);
// this.load.toLoad('加载中...', false);
// this.comm.remain = 150;
// this.comm.remain = 150;
this
.
loading
.
presentLoading
(
150
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_LONG
);
this
.
curCowshed
.
isWisdomModel
=
this
.
curCowshed
.
isWisdomModelChecked
?
1
:
0
;
this
.
curCowshed
.
isWisdomModel
=
this
.
curCowshed
.
isWisdomModelChecked
?
1
:
0
;
// 回舍时默认设备都为打开状态
// 回舍时默认设备都为打开状态
this
.
curCowshed
.
back
.
forEach
(
one
=>
(
one
.
flag
=
true
));
this
.
curCowshed
.
back
.
forEach
(
one
=>
(
one
.
flag
=
true
));
...
@@ -446,6 +448,17 @@ export class EnvCfgPage implements OnInit {
...
@@ -446,6 +448,17 @@ export class EnvCfgPage implements OnInit {
this
.
curCowshed
.
config
.
push
(
this
.
waterChannel
);
this
.
curCowshed
.
config
.
push
(
this
.
waterChannel
);
}
}
sortShowerModels
()
{
this
.
shower
.
controlConfig
.
sort
(
(
a
,
b
)
=>
{
// return parseInt(a['T']) > parseInt(b['T']) ? 1 : parseInt(a['T']) === parseInt(b['T']) ? 0 : -1;
return
a
[
'config'
][
'T'
]
>
b
[
'config'
][
'T'
]
?
1
:
a
[
'config'
][
'T'
]
===
b
[
'config'
][
'T'
]
?
0
:
-
1
;
});
this
.
shower
.
controlConfig
.
forEach
((
allCfg
,
index
)
=>
{
allCfg
.
id
=
index
+
1
;
allCfg
.
config
.
id
=
index
+
1
;
});
}
validate
()
{
validate
()
{
if
(
this
.
isEmpty
(
this
.
curCowshed
.
propertyConfig
.
toft
))
{
if
(
this
.
isEmpty
(
this
.
curCowshed
.
propertyConfig
.
toft
))
{
this
.
api
.
presentMsgToast
(
'请输入偏差温度'
);
this
.
api
.
presentMsgToast
(
'请输入偏差温度'
);
...
@@ -602,24 +615,33 @@ export class EnvCfgPage implements OnInit {
...
@@ -602,24 +615,33 @@ export class EnvCfgPage implements OnInit {
}
}
validateDateFromTo
(
dateFrom
,
dateTo
)
{
validateDateFromTo
(
dateFrom
,
dateTo
)
{
let
hasError
=
false
;
// 日期范围check不要
const
fromMonth
=
parseInt
(
dateFrom
.
slice
(
0
,
2
),
10
);
// let hasError = false;
const
fromDay
=
parseInt
(
dateFrom
.
slice
(
3
,
5
),
10
);
// const fromMonth = parseInt(dateFrom.slice(0, 2), 10);
const
from
=
new
Date
(
new
Date
().
getFullYear
(),
fromMonth
,
fromDay
).
valueOf
();
// const fromDay = parseInt(dateFrom.slice(3, 5), 10);
const
toMonth
=
parseInt
(
dateTo
.
slice
(
0
,
2
),
10
);
// const from = new Date(new Date().getFullYear(), fromMonth, fromDay).valueOf();
const
toDay
=
parseInt
(
dateTo
.
slice
(
3
,
5
),
10
);
// const toMonth = parseInt(dateTo.slice(0, 2), 10);
const
to
=
new
Date
(
new
Date
().
getFullYear
(),
toMonth
,
toDay
).
valueOf
();
// const toDay = parseInt(dateTo.slice(3, 5), 10);
// const to = new Date(new Date().getFullYear(), toMonth, toDay).valueOf();
if
(
from
>
to
)
{
//
hasError
=
true
;
// if (from > to) {
}
// hasError = true;
return
hasError
;
// }
return
false
;
}
}
onReferenceModel
()
{
onReferenceModel
()
{
let
popFanModels
=
{};
let
popFanModels
:
any
=
{};
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'风机'
},
(
data
)
=>
{
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'风机'
},
(
data
)
=>
{
if
(
data
)
{
if
(
data
)
{
if
(
data
.
constructor
===
Array
&&
data
.
length
>
0
)
{
data
.
forEach
(
model
=>
{
if
(
model
.
configJson
!==
undefined
)
{
const
configJson
=
JSON
.
parse
(
model
.
configJson
.
toString
());
model
.
configJson
=
configJson
;
}
});
}
popFanModels
=
data
;
popFanModels
=
data
;
this
.
selectModel
(
'风机'
,
1
,
popFanModels
);
this
.
selectModel
(
'风机'
,
1
,
popFanModels
);
}
}
...
@@ -628,10 +650,16 @@ export class EnvCfgPage implements OnInit {
...
@@ -628,10 +650,16 @@ export class EnvCfgPage implements OnInit {
}
}
onAddModel
()
{
onAddModel
()
{
let
popShowerModels
=
{};
let
popShowerModels
:
any
=
{};
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'喷淋'
},
(
data
)
=>
{
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'喷淋'
},
(
data
)
=>
{
if
(
data
)
{
if
(
data
&&
data
.
constructor
===
Array
&&
data
.
length
>
0
)
{
data
.
forEach
(
model
=>
{
if
(
model
.
configJson
!==
undefined
)
{
const
configJson
=
JSON
.
parse
(
model
.
configJson
.
toString
());
model
.
configJson
=
configJson
;
}
});
popShowerModels
=
data
;
popShowerModels
=
data
;
this
.
selectModel
(
'喷淋'
,
2
,
popShowerModels
);
this
.
selectModel
(
'喷淋'
,
2
,
popShowerModels
);
}
}
...
@@ -640,11 +668,17 @@ export class EnvCfgPage implements OnInit {
...
@@ -640,11 +668,17 @@ export class EnvCfgPage implements OnInit {
}
}
onChangeModel
()
{
onChangeModel
()
{
let
popLightModels
=
{};
let
popLightModels
:
any
=
{};
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'照明'
},
(
data
)
=>
{
this
.
api
.
devicePatternModel
.
getByFactoryNoAndType
([{
factoryNo
:
this
.
curCowshed
.
factoryNo
,
fieldDeviceType
:
'照明'
},
(
data
)
=>
{
if
(
data
)
{
if
(
data
&&
data
.
constructor
===
Array
&&
data
.
length
>
0
)
{
data
.
forEach
(
model
=>
{
if
(
model
.
configJson
!==
undefined
)
{
const
configs
=
JSON
.
parse
(
model
.
configJson
);
model
.
configJson
=
configs
;
}
});
popLightModels
=
data
;
popLightModels
=
data
;
this
.
selectModel
(
'照明'
,
3
,
popLightModels
);
this
.
selectModel
(
'照明'
,
3
,
popLightModels
);
}
}
...
@@ -656,18 +690,24 @@ export class EnvCfgPage implements OnInit {
...
@@ -656,18 +690,24 @@ export class EnvCfgPage implements OnInit {
referenceModel
(
models
,
selectedName
)
{
referenceModel
(
models
,
selectedName
)
{
if
(
selectedName
)
{
if
(
selectedName
)
{
const
selectedModel
=
models
.
filter
(
data
=>
data
.
patternModelName
===
selectedName
);
const
selectedModel
=
models
.
filter
(
data
=>
data
.
patternModelName
===
selectedName
);
this
.
fan
.
controlConfig
.
TU
=
selectedModel
[
0
].
configJson
.
TU
;
this
.
fan
.
controlConfig
.
config
.
TU
=
selectedModel
[
0
].
configJson
.
TU
;
this
.
fan
.
controlConfig
.
TL
=
selectedModel
[
0
].
configJson
.
TL
;
this
.
fan
.
controlConfig
.
config
.
TL
=
selectedModel
[
0
].
configJson
.
TL
;
}
}
}
}
// 喷淋:添加模式
// 喷淋:添加模式
addModel
(
models
,
selectedName
)
{
addModel
(
models
,
selectedName
)
{
if
(
selectedName
)
{
if
(
selectedName
)
{
const
modelCount
=
this
.
light
.
controlConfig
.
length
;
const
modelCount
=
this
.
shower
.
controlConfig
.
length
;
const
selectedModel
=
models
.
filter
(
data
=>
data
.
patternModelName
===
selectedName
);
const
selectedModel
=
models
.
filter
(
data
=>
data
.
patternModelName
===
selectedName
);
selectedModel
[
0
].
configJson
.
id
=
modelCount
+
1
;
const
configs
=
[];
this
.
shower
.
controlConfig
.
push
(
selectedModel
[
0
].
configJson
);
selectedModel
.
forEach
(
(
model
,
index
)
=>
{
configs
.
push
(
{
id
:
modelCount
+
index
+
1
,
config
:
model
.
configJson
});
});
configs
.
forEach
(
config
=>
{
this
.
shower
.
controlConfig
.
push
(
config
);
});
}
}
}
}
...
@@ -675,10 +715,18 @@ export class EnvCfgPage implements OnInit {
...
@@ -675,10 +715,18 @@ export class EnvCfgPage implements OnInit {
changeModel
(
models
,
selectedName
)
{
changeModel
(
models
,
selectedName
)
{
if
(
selectedName
)
{
if
(
selectedName
)
{
const
selectedModel
=
models
.
filter
(
data
=>
data
.
patternModelName
===
selectedName
);
const
selectedModel
=
models
.
filter
(
data
=>
data
.
patternModelName
===
selectedName
);
selectedModel
[
0
].
configJson
.
forEach
((
item
,
index
)
=>
{
const
configs
=
[];
item
.
id
=
index
+
1
;
if
(
selectedModel
[
0
].
configJson
.
constructor
===
Array
&&
selectedModel
[
0
].
configJson
.
length
>
0
)
{
selectedModel
[
0
].
configJson
.
forEach
(
(
model
,
index
)
=>
{
model
.
id
=
index
+
1
;
const
configValue
=
{
id
:
0
,
config
:
{}};
configValue
.
id
=
index
+
1
;
configValue
.
config
=
model
;
configs
.
push
(
configValue
);
});
});
this
.
light
.
controlConfig
=
selectedModel
[
0
].
configJson
;
}
this
.
light
.
controlConfig
=
configs
;
}
}
}
}
...
...
src/app/envCtrl/env-change-model/env-change-model.page.html
View file @
6011ef3c
...
@@ -7,7 +7,16 @@
...
@@ -7,7 +7,16 @@
</ion-toolbar>
</ion-toolbar>
</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=
"width: 100%; margin-top:15px;"
>
<div
class=
"top-line"
>
</div>
<div
class=
"top-img"
>
<img
src=
"../../../assets/img/light-small.png"
class=
"img"
>
</div>
<div
class=
"top-line"
>
</div>
</div>
<div
style=
"max-height: calc(100% - 100px);overflow-y:auto;"
class=
"parentDiv"
>
<ion-item-sliding
*
ngFor=
"let allCfg of controlConfig"
>
<ion-item-sliding
*
ngFor=
"let allCfg of controlConfig"
>
<ion-item
class=
"fanItem"
>
<ion-item
class=
"fanItem"
>
<ion-grid>
<ion-grid>
...
@@ -29,7 +38,7 @@
...
@@ -29,7 +38,7 @@
</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:
60
px"
>
~
</ion-label>
<ion-label
style=
"width:
15
px"
>
~
</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
)]="
allCfg
.
config
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
<ion-datetime
class=
"inputDateTime timepicker"
[(
ngModel
)]="
allCfg
.
config
.
stopDate
"
displayFormat=
"MM-DD"
cancelText=
"取消"
doneText=
"确认"
></ion-datetime>
</ion-item>
</ion-item>
...
...
src/app/envCtrl/env-change-model/env-change-model.page.scss
View file @
6011ef3c
...
@@ -26,3 +26,30 @@
...
@@ -26,3 +26,30 @@
width
:
35%
;
width
:
35%
;
}
}
.parentDiv
{
width
:
94%
;
//margin-top: 10px;
background-color
:
#ffffff
;
border-radius
:
7px
;
padding
:
5px
;
}
.img
{
width
:
40px
!
important
;
}
.top-img
{
width
:
16%
;
display
:
inline-block
;
text-align
:
center
;
float
:
left
;
}
.top-line
{
width
:
40%
;
height
:
2px
;
border-bottom
:
1px
solid
lightgray
;
display
:
inline-block
;
margin
:
15px
1%
14px
1%
;;
float
:
left
;
}
src/app/envCtrl/env-detail/env-detail.page.html
View file @
6011ef3c
...
@@ -12,14 +12,14 @@
...
@@ -12,14 +12,14 @@
<span
[
ngClass
]="{'
online
'
:
item
.
online
,
'
offline
'
:
!
item
.
online
}"
>
{{item.online ? '在线' : '离线'}}
</span>
<span
[
ngClass
]="{'
online
'
:
item
.
online
,
'
offline
'
:
!
item
.
online
}"
>
{{item.online ? '在线' : '离线'}}
</span>
<span
*
ngIf=
"item.operationModel === 1 || item.operationModel === 0"
class=
"online"
>
{{item.operationModel ? '远控' :'现控'}}
</span>
<span
*
ngIf=
"item.operationModel === 1 || item.operationModel === 0"
class=
"online"
>
{{item.operationModel ? '远控' :'现控'}}
</span>
<span
*
ngIf=
"item.operationModel === 4"
class=
"offline"
>
现控
</span>
<span
*
ngIf=
"item.operationModel === 4"
class=
"offline"
>
现控
</span>
<span
*
ngIf=
"item.operationModel"
[
ngClass
]="{'
online
'
:
item
.
isWisdomModel
,
'
offline
'
:
!
item
.
isWisdomModel
}"
class=
"online"
>
智控
</span>
<span
*
ngIf=
"item.operationModel
=== 1
"
[
ngClass
]="{'
online
'
:
item
.
isWisdomModel
,
'
offline
'
:
!
item
.
isWisdomModel
}"
class=
"online"
>
智控
</span>
<span
*
ngIf=
"item.ts"
class=
"right font-ts"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</span>
<span
*
ngIf=
"item.ts"
class=
"right font-ts"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</span>
</div>
</div>
<div
style=
"background-color: #F0F0F0;"
align=
"center"
>
<div
style=
"background-color: #F0F0F0;"
align=
"center"
>
<v-kanban-small
class=
"home-bar"
name=
"温度"
[
inData
]="
item
.
temp
"
iconWidth=
"50%"
unit=
"℃"
[
iconImg
]="'../../
assets
/
img
/
icon-temp
.
png
'"
[
fontColor
]="
item
.
tempColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"温度"
[
inData
]="
item
.
temp
"
iconWidth=
"50%"
unit=
"℃"
[
iconImg
]="'../../
assets
/
img
/
icon-temp
.
png
'"
[
fontColor
]="
item
.
tempColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"湿度"
[
inData
]="
item
.
humi
"
iconWidth=
"50%"
unit=
"% RH"
[
iconImg
]="'../../
assets
/
img
/
icon-humi
.
png
'"
[
fontColor
]="
item
.
humiColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"湿度"
[
inData
]="
item
.
humi
"
iconWidth=
"50%"
unit=
"% RH"
[
iconImg
]="'../../
assets
/
img
/
icon-humi
.
png
'"
[
fontColor
]="
item
.
humiColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"热应激"
[
inData
]="
item
.
heatStressLevelName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-heat
.
png
'"
[
fontColor
]="
item
.
heatStressColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"热应激"
[
inData
]="
item
.
heatStressLevelName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-heat
.
png
'"
[
fontColor
]="
item
.
heatStressColor
"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"在离舍"
[
inData
]="
inHouseName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-house
.
png
'"
iconColor=
"#6
1
C7CC"
fontSize=
"14px"
></v-kanban-small>
<v-kanban-small
class=
"home-bar"
name=
"在离舍"
[
inData
]="
inHouseName
"
iconWidth=
"35%"
[
iconImg
]="'../../
assets
/
img
/
icon-house
.
png
'"
iconColor=
"#6
2
C7CC"
fontSize=
"14px"
></v-kanban-small>
</div>
</div>
<div
class=
"inHouseDiv font-content-title"
>
<div
class=
"inHouseDiv font-content-title"
>
<ion-label
class=
"inHouseLabel normalColor"
>
在离舍开关控制
</ion-label>
<ion-label
class=
"inHouseLabel normalColor"
>
在离舍开关控制
</ion-label>
...
...
src/app/envCtrl/env-detail/env-detail.page.ts
View file @
6011ef3c
...
@@ -34,10 +34,10 @@ export class EnvDetailPage implements OnInit {
...
@@ -34,10 +34,10 @@ export class EnvDetailPage implements OnInit {
fieldRegionName
:
''
,
fieldRegionName
:
''
,
temp
:
0
,
temp
:
0
,
humi
:
0
,
humi
:
0
,
// tempColor: '#6
1
C7CC',
// tempColor: '#6
2
C7CC',
// humiColor: '#6
1
C7CC',
// humiColor: '#6
2
C7CC',
heatStressLevel
:
0
,
heatStressLevel
:
0
,
// heatStressColor: '#6
1
C7CC',
// heatStressColor: '#6
2
C7CC',
heatStressLevelName
:
'无'
,
heatStressLevelName
:
'无'
,
online
:
0
,
online
:
0
,
operationModel
:
1
,
operationModel
:
1
,
...
@@ -118,8 +118,8 @@ export class EnvDetailPage implements OnInit {
...
@@ -118,8 +118,8 @@ export class EnvDetailPage implements OnInit {
this
.
waterchannelLink
=
'/env-detail/waterchannel/'
+
this
.
fieldRegionNo
+
'/'
+
this
.
item
.
operationModel
;
this
.
waterchannelLink
=
'/env-detail/waterchannel/'
+
this
.
fieldRegionNo
+
'/'
+
this
.
item
.
operationModel
;
if
(
this
.
item
)
{
if
(
this
.
item
)
{
this
.
item
.
heatStressColor
=
this
.
item
.
heatStressLevel
===
0
?
'#6
1
C7CC'
:
this
.
item
.
heatStressColor
=
this
.
item
.
heatStressLevel
===
0
?
'#6
2
C7CC'
:
this
.
item
.
heatStressLevel
===
1
?
'#6
1
C7CC'
:
this
.
item
.
heatStressLevel
===
1
?
'#6
2
C7CC'
:
this
.
item
.
heatStressLevel
===
2
?
'#F8B72D'
:
this
.
item
.
heatStressLevel
===
2
?
'#F8B72D'
:
this
.
item
.
heatStressLevel
===
3
?
'#F2401C'
:
'#F2401C'
;
this
.
item
.
heatStressLevel
===
3
?
'#F2401C'
:
'#F2401C'
;
...
@@ -140,12 +140,12 @@ export class EnvDetailPage implements OnInit {
...
@@ -140,12 +140,12 @@ export class EnvDetailPage implements OnInit {
console
.
log
(
'低于下限'
);
console
.
log
(
'低于下限'
);
return
'#F2401C'
;
return
'#F2401C'
;
}
else
{
}
else
{
return
'#6
1
C7CC'
;
return
'#6
2
C7CC'
;
}
}
}
}
}
}
}
}
return
'#6
1
C7CC'
;
return
'#6
2
C7CC'
;
}
}
getHeatStressLevelName
(
level
)
{
getHeatStressLevelName
(
level
)
{
...
@@ -198,7 +198,7 @@ export class EnvDetailPage implements OnInit {
...
@@ -198,7 +198,7 @@ export class EnvDetailPage implements OnInit {
opt
.
ts
=
new
Date
().
valueOf
();
opt
.
ts
=
new
Date
().
valueOf
();
// this.comm.remain = 20;
// this.comm.remain = 20;
this
.
loading
.
presentLoading
(
80
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_LONG
);
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);
...
@@ -228,7 +228,7 @@ export class EnvDetailPage implements OnInit {
...
@@ -228,7 +228,7 @@ export class EnvDetailPage implements OnInit {
setConfusionModelControll
()
{
setConfusionModelControll
()
{
// 混乱模式
// 混乱模式
if
(
this
.
item
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
if
(
+
this
.
item
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
this
.
inHouseDisabled
=
true
;
this
.
inHouseDisabled
=
true
;
}
else
{
}
else
{
this
.
inHouseDisabled
=
false
;
this
.
inHouseDisabled
=
false
;
...
...
src/app/envCtrl/env-fan/env-fan.page.html
View file @
6011ef3c
...
@@ -42,29 +42,32 @@
...
@@ -42,29 +42,32 @@
<h1
class=
"main-title-detail"
>
控制状态
</h1>
<h1
class=
"main-title-detail"
>
控制状态
</h1>
<ion-item
*
ngIf=
"batchSwitch"
lines=
"none"
insert=
"false"
style=
"width: 98%;"
>
<ion-item
*
ngIf=
"batchSwitch"
lines=
"none"
insert=
"false"
style=
"width: 98%;"
>
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
<div
style=
"width:
20
%; display: inline-block; float:left;"
>
<div
style=
"width:
15
%; display: inline-block; float:left;"
>
<img
src=
"../../assets/img/batchSwitch.png"
class=
"icon-batch-switch"
>
<img
src=
"../../assets/img/batchSwitch.png"
class=
"icon-batch-switch"
>
</div>
</div>
<div
class=
"label-batch-switch font-content"
>
<div
class=
"label-batch-switch font-content"
style=
"width:20%; display: inline-block; float:left;"
>
一键控制
一键控制
</div>
</div>
</div>
<div
style=
"width:30%; display: inline-block; float:left;"
>
<ion-toggle
color=
"secondary"
mode=
"ios"
style=
"display:inline-block"
slot=
"end"
[
checked
]="
batchSwitch
.
op
"
[
disabled
]="
batchSwitch
.
disabled
"
<ion-toggle
color=
"secondary"
mode=
"ios"
style=
"display:inline-block"
slot=
"end"
[
checked
]="
batchSwitch
.
op
"
[
disabled
]="
batchSwitch
.
disabled
"
[(
ngModel
)]="
batchSwitch
.
op
"
(
load
)="
batchSwitch
.
load
"
(
click
)="
toggle
(
batchSwitch
)"
></ion-toggle>
[(
ngModel
)]="
batchSwitch
.
op
"
(
load
)="
batchSwitch
.
load
"
(
click
)="
toggle
(
batchSwitch
)"
></ion-toggle>
</div>
</div>
</ion-item>
</ion-item>
<div
class=
"card-div"
>
<div
class=
"card-div"
>
<ion-card
mode=
"ios"
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card
mode=
"ios"
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card-header
mode=
"ios"
class=
"cardHeader"
>
<ion-card-header
mode=
"ios"
class=
"cardHeader"
>
<ion-card-subtitle
mode=
"ios"
align=
"center"
class=
"font-mini"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
<ion-card-subtitle
*
ngIf=
"device.alarm === 0"
mode=
"ios"
align=
"center"
class=
"font-mini"
style=
"color: #828282 !important;"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
<ion-card-subtitle
*
ngIf=
"device.alarm === 1"
mode=
"ios"
align=
"center"
class=
"font-mini"
style=
"color: #F2401C !important;"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
</ion-card-header>
</ion-card-header>
<ion-card-content
mode=
"ios"
class=
"cardContent"
>
<ion-card-content
mode=
"ios"
class=
"cardContent"
>
<ion-toggle
mode=
"ios"
class=
"btn-switch"
*
ngIf=
"device.alarm === 0"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"secondary"
<ion-toggle
mode=
"ios"
class=
"btn-switch"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"secondary"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<ion-toggle
mode=
"ios"
class=
"btn-switch"
*
ngIf=
"device.alarm === 1"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"danger"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<!--<ion-toggle mode="ios" class="btn-switch" *ngIf="device.alarm === 1" [checked]="device.op" [disabled]="device.disabled" color="danger"-->
<!--[(ngModel)]="device.op" (click)="deviceCheck(device)"></ion-toggle>-->
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</div>
</div>
...
...
src/app/envCtrl/env-fan/env-fan.page.ts
View file @
6011ef3c
...
@@ -44,7 +44,15 @@ export class EnvFanPage implements OnInit {
...
@@ -44,7 +44,15 @@ export class EnvFanPage implements OnInit {
commTmr
:
any
;
commTmr
:
any
;
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
alertController
:
AlertController
,
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
alertController
:
AlertController
,
public
loading
:
Loading
)
{
}
public
loading
:
Loading
)
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
if
(
data
&&
data
.
no
!==
null
)
{
this
.
fieldRegionNo
=
data
.
no
;
this
.
operationModel
=
data
.
operationModel
;
}
});
}
ngOnInit
()
{
ngOnInit
()
{
// this.ionViewWillEnter();
// this.ionViewWillEnter();
...
@@ -75,9 +83,12 @@ export class EnvFanPage implements OnInit {
...
@@ -75,9 +83,12 @@ export class EnvFanPage implements OnInit {
init
()
{
init
()
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
if
(
data
&&
data
.
no
!==
null
)
{
this
.
fieldRegionNo
=
data
.
no
;
this
.
fieldRegionNo
=
data
.
no
;
this
.
operationModel
=
data
.
operationModel
;
this
.
operationModel
=
data
.
operationModel
;
this
.
getData
(
0
);
this
.
getData
(
0
);
}
});
});
}
}
getData
(
time
)
{
getData
(
time
)
{
...
@@ -162,7 +173,7 @@ export class EnvFanPage implements OnInit {
...
@@ -162,7 +173,7 @@ export class EnvFanPage implements OnInit {
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
// this.comm.remain = 150;
// this.comm.remain = 150;
this
.
loading
.
presentLoading
(
150
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_LONG
);
// 一键开启设备
// 一键开启设备
this
.
api
.
control
.
controlCowedBatchSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedBatchSwitch
([
req
,
(
data
)
=>
{
// if (data.code === 1) {
// if (data.code === 1) {
...
@@ -203,7 +214,7 @@ export class EnvFanPage implements OnInit {
...
@@ -203,7 +214,7 @@ export class EnvFanPage implements OnInit {
};
};
// this.comm.remain = 60;
// this.comm.remain = 60;
this
.
loading
.
presentLoading
(
80
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_SHORT
);
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
if
(
data
&&
data
.
code
===
1
)
{
if
(
data
&&
data
.
code
===
1
)
{
...
@@ -221,7 +232,7 @@ export class EnvFanPage implements OnInit {
...
@@ -221,7 +232,7 @@ export class EnvFanPage implements OnInit {
setConfusionModelControll
()
{
setConfusionModelControll
()
{
// 混乱模式
// 混乱模式
if
(
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
if
(
+
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
this
.
batchSwitch
.
disabled
=
true
;
this
.
batchSwitch
.
disabled
=
true
;
this
.
devices
.
forEach
((
device
)
=>
{
this
.
devices
.
forEach
((
device
)
=>
{
device
.
disabled
=
true
;
device
.
disabled
=
true
;
...
...
src/app/envCtrl/env-history/env-history.page.html
View file @
6011ef3c
...
@@ -9,15 +9,15 @@
...
@@ -9,15 +9,15 @@
<ion-content
color=
'light'
style=
"height: 100%; padding-top: 30px;"
>
<ion-content
color=
'light'
style=
"height: 100%; padding-top: 30px;"
>
<div
style=
"padding-top: 10px"
>
<div
style=
"padding-top: 10px"
>
<h1
class=
"
subTit
tle"
>
牛舍热应激状态
</h1>
<h1
class=
"
main-ti
tle"
>
牛舍热应激状态
</h1>
<div
style=
"width:100%; padding: 10px"
>
<div
style=
"width:100%; padding: 10px"
>
<img
[
src
]="'../../
assets
/
img
/
level-
'
+
heatStressLevel
+
'.
png
'"
style=
"width:50px !important"
>
<img
[
src
]="'../../
assets
/
img
/
level-
'
+
heatStressLevel
+
'.
png
'"
style=
"width:50px !important"
>
</div>
</div>
<h1
class=
"
subTit
tle"
>
近8个小时环境参数曲线
</h1>
<h1
class=
"
main-ti
tle"
>
近8个小时环境参数曲线
</h1>
<div
echarts
[
options
]="
chartOption
"
class=
"demo-chart"
></div>
<div
echarts
[
options
]="
chartOption
"
class=
"demo-chart"
></div>
<h1
class=
"
subTit
tle"
>
近8个小时环境参数表
</h1>
<h1
class=
"
main-ti
tle"
>
近8个小时环境参数表
</h1>
<div
style=
"width: 98%
"
>
<div
class=
"div-table
"
>
<!--<ngx-datatable class="material" [rows]="tableRows" [columnMode]="'force'" [scrollbarH]="true" [scrollbarV]="true" style="text-align: center; font-size:14px">-->
<!--<ngx-datatable class="material" [rows]="tableRows" [columnMode]="'force'" [scrollbarH]="true" [scrollbarV]="true" style="text-align: center; font-size:14px">-->
<!--<ngx-datatable-column name="时间" prop="ts" [width]="80">-->
<!--<ngx-datatable-column name="时间" prop="ts" [width]="80">-->
<!--</ngx-datatable-column>-->
<!--</ngx-datatable-column>-->
...
@@ -51,20 +51,22 @@
...
@@ -51,20 +51,22 @@
<!--</ngx-datatable>-->
<!--</ngx-datatable>-->
<ngx-datatable
class=
"material"
<ngx-datatable
class=
"material"
[
rows
]="
tableRows
"
[
rows
]="
tableRows
"
[
columnMode
]="
'
force
'
"
[
columnMode
]="
ColumnMode
.
force
"
[
scrollbarH
]="
true
"
[
scrollbarH
]="
true
"
[
scrollbarV
]="
true
"
[
scrollbarV
]="
true
"
[
headerHeight
]="
50
"
[
headerHeight
]="
50
"
style=
"text-align: center; font-size:14px"
>
[
rowClass
]="
getRowClass
"
<ngx-datatable-column
name=
"时间"
prop=
"ts"
[
width
]="
70
"
>
[
cssClasses
]="'
font-content
'"
style=
"text-align: center; background-color: #ffffff;"
class=
"font-content"
>
<ngx-datatable-column
name=
"时间"
prop=
"ts"
[
width
]="
70
"
[
headerClass
]="
getHeaderClass
"
>
</ngx-datatable-column>
</ngx-datatable-column>
<ngx-datatable-column
name=
"热应激"
prop=
"thi"
[
width
]="
70
"
>
<ngx-datatable-column
name=
"热应激"
prop=
"thi"
[
width
]="
70
"
[
headerClass
]="
getHeaderClass
"
>
</ngx-datatable-column>
</ngx-datatable-column>
<ngx-datatable-column
name=
"温度<br>℃"
prop=
"temp"
[
width
]="
60
"
>
<ngx-datatable-column
name=
"温度<br>℃"
prop=
"temp"
[
width
]="
60
"
[
headerClass
]="
getHeaderClass
"
>
</ngx-datatable-column>
</ngx-datatable-column>
<ngx-datatable-column
name=
"湿度<br>% RH"
prop=
"humi"
[
width
]="
60
"
>
<ngx-datatable-column
name=
"湿度<br>% RH"
prop=
"humi"
[
width
]="
60
"
[
headerClass
]="
getHeaderClass
"
>
</ngx-datatable-column>
</ngx-datatable-column>
<ngx-datatable-column
name=
"氨气浓度<br>ppm"
prop=
"NH3"
[
width
]="
90
"
>
<ngx-datatable-column
name=
"氨气浓度<br>ppm"
prop=
"NH3"
[
width
]="
90
"
[
headerClass
]="
getHeaderClass
"
>
</ngx-datatable-column>
</ngx-datatable-column>
</ngx-datatable>
</ngx-datatable>
</div>
</div>
...
...
src/app/envCtrl/env-history/env-history.page.scss
View file @
6011ef3c
...
@@ -36,8 +36,11 @@
...
@@ -36,8 +36,11 @@
}
}
.demo-chart
{
.demo-chart
{
width
:
100
%
;
width
:
96
%
;
height
:
230px
;
height
:
230px
;
margin-left
:
2%
;
margin-right
:
2%
;
margin-bottom
:
15px
;
}
}
.title
{
.title
{
...
@@ -54,3 +57,15 @@
...
@@ -54,3 +57,15 @@
line-height
:
25px
;
line-height
:
25px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
.div-table
{
width
:
96%
;
margin-left
:
2%
;
margin-right
:
2%
;
margin-bottom
:
10px
;
}
.table-header
{
// background-color: #222428;
// color: #ffffff;
}
src/app/envCtrl/env-history/env-history.page.ts
View file @
6011ef3c
...
@@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core';
...
@@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core';
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
Api
}
from
'../../service/api'
;
import
{
Api
}
from
'../../service/api'
;
import
{
Load
}
from
'../../service/load'
;
import
{
Load
}
from
'../../service/load'
;
import
{
NgxDatatableModule
}
from
'@swimlane/ngx-datatable'
;
import
{
NgxDatatableModule
,
ColumnMode
}
from
'@swimlane/ngx-datatable'
;
import
{
DateFormatter
}
from
'@angular/common/src/pipes/deprecated/intl'
;
import
{
DateFormatter
}
from
'@angular/common/src/pipes/deprecated/intl'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
DatePipe
}
from
'@angular/common'
;
...
@@ -13,6 +13,7 @@ import {DatePipe} from '@angular/common';
...
@@ -13,6 +13,7 @@ import {DatePipe} from '@angular/common';
})
})
export
class
EnvHistoryPage
implements
OnInit
{
export
class
EnvHistoryPage
implements
OnInit
{
ColumnMode
=
ColumnMode
;
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
datePipe
:
DatePipe
)
{
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
datePipe
:
DatePipe
)
{
}
}
...
@@ -37,7 +38,8 @@ export class EnvHistoryPage implements OnInit {
...
@@ -37,7 +38,8 @@ export class EnvHistoryPage implements OnInit {
{
column
:
'temp'
,
width
:
70
},
{
column
:
'temp'
,
width
:
70
},
{
column
:
'humi'
,
width
:
70
},
{
column
:
'humi'
,
width
:
70
},
{
column
:
'NH3'
,
width
:
90
}
{
column
:
'NH3'
,
width
:
90
}
]
];
rowCount
=
0
;
ngOnInit
()
{
ngOnInit
()
{
this
.
init
();
this
.
init
();
...
@@ -140,8 +142,9 @@ export class EnvHistoryPage implements OnInit {
...
@@ -140,8 +142,9 @@ export class EnvHistoryPage implements OnInit {
paintTable
(
param
)
{
paintTable
(
param
)
{
this
.
tableRows
=
[];
this
.
tableRows
=
[];
param
.
map
(
item
=>
{
param
.
map
(
(
item
,
index
)
=>
{
this
.
tableRows
.
push
({
this
.
tableRows
.
push
({
id
:
index
+
1
,
ts
:
this
.
datePipe
.
transform
(
item
.
ts
,
'hh:mm'
),
ts
:
this
.
datePipe
.
transform
(
item
.
ts
,
'hh:mm'
),
thi
:
item
.
heatStressLevel
,
thi
:
item
.
heatStressLevel
,
temp
:
item
.
temp
.
toFixed
(
2
),
temp
:
item
.
temp
.
toFixed
(
2
),
...
@@ -150,11 +153,16 @@ export class EnvHistoryPage implements OnInit {
...
@@ -150,11 +153,16 @@ export class EnvHistoryPage implements OnInit {
});
});
});
});
// this.tableColumns.forEach((col: any) => {
// const colReWidth = this.tableColumnWidths.find(colWidth => colWidth.column === col.prop);
// if (colReWidth) {
// col.width = colReWidth.width;
// }
// });
}
}
getRowClass
(
row
)
{
return
{
'light-color'
:
row
.
id
%
2
===
0
};
}
getHeaderClass
()
{
return
'table-header'
;
}
}
}
src/app/envCtrl/env-home/env-home.page.html
View file @
6011ef3c
...
@@ -34,19 +34,25 @@
...
@@ -34,19 +34,25 @@
[
iconImg1
]="'../../
assets
/
img
/
level-good
.
png
'"
[
iconImg1
]="'../../
assets
/
img
/
level-good
.
png
'"
[
iconImg2
]="'../../
assets
/
img
/
level-bad
.
png
'"
[
iconImg2
]="'../../
assets
/
img
/
level-bad
.
png
'"
[
iconImg3
]="'../../
assets
/
img
/
alarm
.
png
'"
[
iconImg3
]="'../../
assets
/
img
/
alarm
.
png
'"
iconColor1=
"#6
1
C7CC"
iconColor2=
"#F8B72D"
iconColor3=
"#F2401C"
iconColor1=
"#6
2
C7CC"
iconColor2=
"#F8B72D"
iconColor3=
"#F2401C"
fontSize=
"30px"
></v-kanban-double>
fontSize=
"30px"
></v-kanban-double>
<!--<v-kanban-large class="home-bar" name="热应激" [inData]="thiBad" [iconImg]="'../../assets/img/level-bad.png'" iconColor="#FAB139" fontSize="25px" iconWidth="45px !important"></v-kanban-large>-->
<!--<v-kanban-large class="home-bar" name="热应激" [inData]="thiBad" [iconImg]="'../../assets/img/level-bad.png'" iconColor="#FAB139" fontSize="25px" iconWidth="45px !important"></v-kanban-large>-->
<!--<v-kanban-large class="kanban-large" name="故障总数" [inData]="alarmTotal" [iconImg]="'../../assets/img/alarm.png'" iconColor="#F2401C" fontSize="25px" iconWidth="45px !important"></v-kanban-large>-->
<!--<v-kanban-large class="kanban-large" name="故障总数" [inData]="alarmTotal" [iconImg]="'../../assets/img/alarm.png'" iconColor="#F2401C" fontSize="25px" iconWidth="45px !important"></v-kanban-large>-->
</div>
</div>
<h1
class=
"main-title"
>
牛舍列表
</h1>
<h1
class=
"main-title"
>
牛舍列表
</h1>
<ion-list
*
ngIf=
"items.length > 0"
mode=
"md"
class=
"list
view"
insert =
"false"
line=
"none"
style=
"width:96%;margin-left: 2%
"
>
<ion-list
*
ngIf=
"items.length > 0"
mode=
"md"
class=
"list
-view"
insert =
"false"
line=
"none
"
>
<ion-item
*
ngFor=
"let item of items"
(
click
)="
toControl
(
item
)"
class=
"ion-item"
style=
"width: 100%; --padding-start: 0px"
>
<ion-item
*
ngFor=
"let item of items"
(
click
)="
toControl
(
item
)"
class=
"ion-item"
style=
"width: 100%; --padding-start: 0px"
>
<div
class=
"item"
>
<div
class=
"item"
>
<div
class=
"top"
>
<div
class=
"top"
>
<div
style=
"float:left;padding-top:3px;"
><img
[
src
]="'../../
assets
/
img
/
house
.
png
'"
style=
"display: inline-block;margin-left: 10px; margin-right: 10px;width:20px !important"
>
</div>
<div
style=
"float:left;padding-top:3px;"
>
<div
style=
"width:80%; float:left; padding-top: 4px;"
>
<img
[
src
]="'../../
assets
/
img
/
house
.
png
'"
style=
"display: inline-block;margin-left: 10px; margin-right: 10px;width:20px !important"
>
<span
style=
"text-align: center"
class=
"font-sub-title"
>
{{item.fieldRegionName}}
</span><span
style=
"text-align: center; font-size:12px; padding-left:10px; color:red;"
*
ngIf=
"item.operationModel === 4"
>
(部分设备处于现控状态)
</span></div>
</div>
<div
style=
"width:60%; float:left; padding-top: 4px;"
>
<span
style=
"text-align: center"
class=
"font-sub-title"
>
{{item.fieldRegionName}}
</span><span
style=
"text-align: center; font-size:12px; padding-left:10px; color:red;"
*
ngIf=
"item.operationModel === 4"
>
(部分设备处于现控状态)
</span>
</div>
<div
style=
"width:25%; float:left; padding-top: 4px; text-align:right;"
>
<img
*
ngIf=
"item.alarm"
src=
"../../../assets/img/alarm-small.png"
style=
"display: inline-block; width:25px !important"
>
</div>
</div>
</div>
<div
class=
"content font-content"
>
<div
class=
"content font-content"
>
<div
class=
"detailInfo"
style=
"width: 40%"
>
热应激:
<span
class=
"warmColor{{item.heatStressLevel}}"
>
{{item.heatStressLevelName}}
</span></div>
<div
class=
"detailInfo"
style=
"width: 40%"
>
热应激:
<span
class=
"warmColor{{item.heatStressLevel}}"
>
{{item.heatStressLevelName}}
</span></div>
...
@@ -67,7 +73,7 @@
...
@@ -67,7 +73,7 @@
<!-- 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
!== null
"
[
ngClass
]="{'
online
'
:
item
.
isWisdomModel
,
'
offline
'
:
!
item
.
isWisdomModel
}"
class=
"online"
>
智控
</div>
<div
*
ngIf=
"item.operationModel
=== 1
"
[
ngClass
]="{'
online
'
:
item
.
isWisdomModel
,
'
offline
'
:
!
item
.
isWisdomModel
}"
class=
"online"
>
智控
</div>
<div
*
ngIf=
"item.ts !== null"
class=
"right font-note"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</div>
<div
*
ngIf=
"item.ts !== null"
class=
"right font-note"
>
{{item.ts | date: 'yyyy-MM-dd HH:mm'}}
</div>
</div>
</div>
</div>
</div>
...
...
src/app/envCtrl/env-home/env-home.page.scss
View file @
6011ef3c
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
}
}
.item
{
.item
{
margin-bottom
:
10px
;
margin-top
:
5px
;
margin-bottom
:
5px
;
padding
:
0px
3px
0px
;
padding
:
0px
3px
0px
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
display
:block
;
display
:block
;
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
//font-size: 17px;
//font-size: 17px;
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
overflow
:hidden
;
i
.vo.v-tixing
{
i
.vo.v-tixing
{
float
:
right
;
float
:
right
;
...
@@ -43,15 +45,18 @@
...
@@ -43,15 +45,18 @@
.bottom
{
.bottom
{
//border-top: 1px solid #ccc;
//border-top: 1px solid #ccc;
padding
:
3px
;
padding
:
3px
5px
3px
5px
;
color
:
#aaa
;
color
:
#aaa
;
margin-top
:
60px
;
//
margin-top: 60px;
width
:
100%
;
width
:
100%
;
overflow
:hidden
;
}
}
.content
{
.content
{
width
:
100%
;
width
:
100%
;
margin-top
:
25px
;
padding-left
:
10px
;
// margin-top: 25px;
color
:
#aaa
;
color
:
#aaa
;
overflow
:hidden
;
// text-align: center;
// text-align: center;
}
}
...
@@ -63,7 +68,7 @@
...
@@ -63,7 +68,7 @@
//.online {
//.online {
// border-radius: 6px;
// border-radius: 6px;
// background-color: #6
1
C7CC;
// background-color: #6
2
C7CC;
// display: inline-block;
// display: inline-block;
// vertical-align: middle;
// vertical-align: middle;
// box-shadow: #ccc 0.5px 0.5px 3px;
// box-shadow: #ccc 0.5px 0.5px 3px;
...
@@ -90,6 +95,7 @@
...
@@ -90,6 +95,7 @@
.right
{
.right
{
float
:
right
;
float
:
right
;
padding-top
:
5px
;
padding-top
:
5px
;
padding-right
:
10px
;
}
}
.topSearch
{
.topSearch
{
...
@@ -122,3 +128,9 @@
...
@@ -122,3 +128,9 @@
margin
:
3px
;
margin
:
3px
;
width
:
32%
;
width
:
32%
;
}
}
.list-view
{
width
:
96%
;
margin-left
:
2%
;
padding-bottom
:
0px
;
}
src/app/envCtrl/env-light/env-light.page.html
View file @
6011ef3c
...
@@ -39,11 +39,11 @@
...
@@ -39,11 +39,11 @@
</ion-grid>
</ion-grid>
</ion-item>
</ion-item>
<h1
class=
"main-title-detail"
>
时间模式
</h1>
<h1
class=
"main-title-detail"
*
ngIf=
"controlModel === 2"
>
时间模式
</h1>
<ion-item
lines=
"none"
>
<ion-item
lines=
"none"
*
ngIf=
"controlModel === 2 || controlModel === 3"
>
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
<div
class=
"div-calender bk-calender"
>
<div
class=
"div-calender bk-calender"
>
<div
class=
"font-sub-title div-calender-value"
>
{{name}}
</div>
<div
class=
"font-sub-title div-calender-value
content-text-color
"
>
{{name}}
</div>
</div>
</div>
<div
style=
"width:35%; display: inline-block; float:left; margin-top:35px"
>
<div
style=
"width:35%; display: inline-block; float:left; margin-top:35px"
>
<span
class=
"font-content"
>
开启时间:
<span
class=
"main-color"
>
{{on}}
</span></span>
<span
class=
"font-content"
>
开启时间:
<span
class=
"main-color"
>
{{on}}
</span></span>
...
@@ -58,29 +58,32 @@
...
@@ -58,29 +58,32 @@
<h1
class=
"main-title-detail"
>
控制状态
</h1>
<h1
class=
"main-title-detail"
>
控制状态
</h1>
<ion-item
*
ngIf=
"devices"
lines=
"none"
insert=
"false"
>
<ion-item
*
ngIf=
"devices"
lines=
"none"
insert=
"false"
>
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
<div
style=
"width:
20
%; display: inline-block; float:left;"
>
<div
style=
"width:
15
%; display: inline-block; float:left;"
>
<img
src=
"../../assets/img/batchSwitch.png"
class=
"icon-batch-switch"
>
<img
src=
"../../assets/img/batchSwitch.png"
class=
"icon-batch-switch"
>
</div>
</div>
<div
class=
"label-batch-switch font-content"
>
<div
class=
"label-batch-switch font-content"
style=
"width:20%; display: inline-block; float:left;"
>
一键控制
一键控制
</div>
</div>
</div
>
<div
style=
"width:30%; display: inline-block; float:left;"
>
<ion-toggle
color=
"secondary"
mode=
"ios"
style=
"display:inline-block"
slot=
"end"
[
checked
]="
batchSwitch
.
op
"
[
disabled
]="
batchSwitch
.
disabled
"
<ion-toggle
color=
"secondary"
mode=
"ios"
style=
"display:inline-block"
slot=
"end"
[
checked
]="
batchSwitch
.
op
"
[
disabled
]="
batchSwitch
.
disabled
"
[(
ngModel
)]="
batchSwitch
.
op
"
(
load
)="
batchSwitch
.
load
"
(
click
)="
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>-->
</div>
</div>
</ion-item>
</ion-item>
<div
class=
"card-div"
>
<div
class=
"card-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
class=
"cardHeader"
>
<ion-card-header
class=
"cardHeader"
>
<ion-card-subtitle
align=
"center"
class=
"font-mini"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
<ion-card-subtitle
*
ngIf=
"device.alarm === 0"
align=
"center"
class=
"font-mini"
style=
"color: #828282 !important;"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
<ion-card-subtitle
*
ngIf=
"device.alarm === 1"
align=
"center"
class=
"font-mini"
style=
"color: #F2401C !important;"
>
{{device.fieldDeviceName}}
</ion-card-subtitle>
</ion-card-header>
</ion-card-header>
<ion-card-content
class=
"cardContent"
>
<ion-card-content
class=
"cardContent"
>
<ion-toggle
mode=
"ios"
class=
"btn-switch"
*
ngIf=
"device.alarm === 0"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"secondary"
<ion-toggle
mode=
"ios"
class=
"btn-switch"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"secondary"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<ion-toggle
mode=
"ios"
class=
"btn-switch"
*
ngIf=
"device.alarm === 1"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"danger"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
[(
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-toggle mode="ios" class="btn-switch" *ngIf="device.alarm === 1" [checked]="device.op" [disabled]="device.disabled" color="danger"-->
<!--[(ngModel)]="device.op" (click)="deviceCheck(device)"></ion-toggle>-->
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</div>
</div>
...
...
src/app/envCtrl/env-light/env-light.page.scss
View file @
6011ef3c
...
@@ -46,5 +46,4 @@ i.vo {
...
@@ -46,5 +46,4 @@ i.vo {
margin-top
:
35px
;
margin-top
:
35px
;
text-align
:
center
;
text-align
:
center
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#565050
;
}
}
src/app/envCtrl/env-light/env-light.page.ts
View file @
6011ef3c
...
@@ -121,8 +121,8 @@ export class EnvLightPage implements OnInit {
...
@@ -121,8 +121,8 @@ export class EnvLightPage implements OnInit {
initButtons
()
{
initButtons
()
{
if
(
this
.
controlModel
===
Constants
.
CONTROLL_REMOTR
||
this
.
controlModel
===
Constants
.
CONTROLL_SELF
)
{
if
(
this
.
controlModel
===
Constants
.
CONTROLL_REMOTR
)
{
// 远控
+自控
的场合
// 远控
(手控)
的场合
// 一键控制: 活性
// 一键控制: 活性
this
.
batchSwitch
.
disabled
=
false
;
this
.
batchSwitch
.
disabled
=
false
;
this
.
devices
.
forEach
((
device
)
=>
{
this
.
devices
.
forEach
((
device
)
=>
{
...
@@ -131,7 +131,7 @@ export class EnvLightPage implements OnInit {
...
@@ -131,7 +131,7 @@ export class EnvLightPage implements OnInit {
}
else
{
}
else
{
// 其他
// 其他
// 一键控制: 非活性
// 一键控制: 非活性
this
.
batchSwitch
.
disabled
=
fals
e
;
this
.
batchSwitch
.
disabled
=
tru
e
;
}
}
if
(
this
.
controlModel
===
Constants
.
CONTROLL_REMOTR
)
{
if
(
this
.
controlModel
===
Constants
.
CONTROLL_REMOTR
)
{
...
@@ -206,7 +206,7 @@ export class EnvLightPage implements OnInit {
...
@@ -206,7 +206,7 @@ export class EnvLightPage implements OnInit {
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
// this.comm.remain = 150;
// this.comm.remain = 150;
this
.
loading
.
presentLoading
(
150
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_LONG
);
// 一键开启设备
// 一键开启设备
this
.
api
.
control
.
controlCowedBatchSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedBatchSwitch
([
req
,
(
data
)
=>
{
...
@@ -244,7 +244,7 @@ export class EnvLightPage implements OnInit {
...
@@ -244,7 +244,7 @@ export class EnvLightPage implements OnInit {
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
// this.comm.remain = 60;
// this.comm.remain = 60;
this
.
loading
.
presentLoading
(
80
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_SHORT
);
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
if
(
data
&&
data
.
code
===
1
)
{
if
(
data
&&
data
.
code
===
1
)
{
this
.
comm
.
remain
=
0
;
this
.
comm
.
remain
=
0
;
...
@@ -262,7 +262,7 @@ export class EnvLightPage implements OnInit {
...
@@ -262,7 +262,7 @@ export class EnvLightPage implements OnInit {
setConfusionModelControll
()
{
setConfusionModelControll
()
{
// 混乱模式
// 混乱模式
if
(
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
if
(
+
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
this
.
batchSwitch
.
disabled
=
true
;
this
.
batchSwitch
.
disabled
=
true
;
this
.
devices
.
forEach
((
device
)
=>
{
this
.
devices
.
forEach
((
device
)
=>
{
device
.
disabled
=
true
;
device
.
disabled
=
true
;
...
...
src/app/envCtrl/env-shower/env-shower.page.html
View file @
6011ef3c
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
</div>
</div>
<div
style=
"display: inline-block; float:left; padding-top: 2px;"
>
<div
style=
"display: inline-block; float:left; padding-top: 2px;"
>
<span
class=
"font-content"
>
{{bump.alarm === 1 ? '异常' : '运行'}}
</span>
<span
class=
"font-content"
>
{{bump.alarm === 1 ? '异常' : '运行'}}
</span>
<span
class=
"font-content"
style=
"margin-left: 30px"
>
压力:
<span
class=
"main-color"
>
{{bump.press}} Mpa
</span></span>
<span
class=
"font-content"
style=
"margin-left: 30px"
>
压力:
<span
class=
"main-color"
>
{{bump.press
| number:'0.0-3'
}} Mpa
</span></span>
</div>
</div>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -63,20 +63,20 @@
...
@@ -63,20 +63,20 @@
<ion-grid>
<ion-grid>
<ion-row>
<ion-row>
<ion-col>
<ion-col>
<div
style=
"width:100%"
>
<div
style=
"width:100%
;padding-left: 3px;
"
>
<span
class=
"font-content"
>
{{fieldDeviceNameA}}喷淋时间:
<span
class=
"main-color"
>
{{controlConfig.a}} 秒
</span></span>
<span
class=
"font-content"
>
{{fieldDeviceNameA}}喷淋时间:
<span
class=
"main-color"
>
{{controlConfig.a}} 秒
</span></span>
</div>
</div>
</ion-col>
</ion-col>
<ion-col>
<ion-col>
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
<span
class=
"font-content"
>
{{fieldDeviceNameB}}喷淋时间:
<span
class=
"main-color"
>
{{controlConfig.b
}} 秒
</span></span>
<span
class=
"font-content"
>
间隔时间:
<span
class=
"main-color"
>
{{controlConfig.interval
}} 秒
</span></span>
</div>
</div>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
<ion-row>
<ion-row>
<ion-col>
<ion-col>
<div
style=
"width:100%"
>
<div
style=
"width:100%
;padding-left: 3px;
"
>
<span
class=
"font-content"
>
间隔时间:
<span
class=
"main-color"
>
{{controlConfig.interval
}} 秒
</span></span>
<span
class=
"font-content"
>
{{fieldDeviceNameB}}喷淋时间:
<span
class=
"main-color"
>
{{controlConfig.b
}} 秒
</span></span>
</div>
</div>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
...
@@ -90,12 +90,14 @@
...
@@ -90,12 +90,14 @@
<ion-card-title
class=
"card-title"
>
<ion-card-title
class=
"card-title"
>
<div
style=
"width:100%;text-align:center;"
>
<div
style=
"width:100%;text-align:center;"
>
<div
class=
"card-title-label"
>
<div
class=
"card-title-label"
>
<div
style=
"text-align: center;margin:auto"
>
{{device.fieldDeviceName}}
</div>
<div
*
ngIf=
"device.alarm === 0"
style=
"text-align: center;margin:auto; color: #828282 !important;"
>
{{device.fieldDeviceName}}
</div>
<div
*
ngIf=
"device.alarm === 1"
style=
"text-align: center;margin:auto; color: #F2401C !important;"
>
{{device.fieldDeviceName}}
</div>
</div>
</div>
<div
style=
"width:48%;display: inline-block"
>
<div
style=
"width:48%;display: inline-block"
>
<img
*
ngIf=
"device.cycle === 1 && device.state === 1"
src=
"../../assets/img/shower-ing.gif"
style=
"width:50px !important; margin: auto;"
>
<img
*
ngIf=
"device.cycle === 1 && device.state === 1"
src=
"../../assets/img/shower-ing.gif"
style=
"width:50px !important; margin: auto;"
>
<img
*
ngIf=
"device.cycle === 1 && device.state === 0"
src=
"../../assets/img/shower-1.png"
style=
"width:50px !important; margin: auto;"
>
<img
*
ngIf=
"device.cycle === 1 && device.state === 0"
src=
"../../assets/img/shower-1.png"
style=
"width:50px !important; margin: auto;"
>
<img
*
ngIf=
"device.cycle === 0 && device.state === 0"
src=
"../../assets/img/shower-0.png"
style=
"width:50px !important; margin: auto;"
>
<img
*
ngIf=
"device.cycle === 0 && device.state === 0"
src=
"../../assets/img/shower-0.png"
style=
"width:50px !important; margin: auto;"
>
<img
*
ngIf=
"device.cycle === 0 && device.state === 1"
src=
"../../assets/img/shower-0.png"
style=
"width:50px !important; margin: auto;"
>
</div>
</div>
</div>
</div>
</ion-card-title>
</ion-card-title>
...
@@ -103,16 +105,12 @@
...
@@ -103,16 +105,12 @@
</ion-card-header>
</ion-card-header>
<ion-card-content
class=
"cardContent"
>
<ion-card-content
class=
"cardContent"
>
<span
class=
"font-content"
>
压力:
<span
class=
"main-color"
>
{{device.press}} MPa
</span></span><br>
<span
class=
"font-content"
>
压力:
<span
class=
"main-color"
>
{{device.press | number:'0.0-3'}} MPa
</span></span><br>
<!-- <ion-toggle [checked]="a.state"></ion-toggle>-->
<ion-toggle
mode=
"ios"
class=
"btn-switch"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"secondary"
<ion-toggle
mode=
"ios"
class=
"btn-switch"
*
ngIf=
"device.alarm === 0"
[
checked
]="
device
.
op
"
[
disabled
]="
device
.
disabled
"
color=
"secondary"
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
[(
ngModel
)]="
device
.
op
"
(
click
)="
deviceCheck
(
device
)"
></ion-toggle>
<ion-toggle
mode=
"ios"
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>
</div>
</div>
<!--<v-loading-bump style="z-index: 9999; color: red" [remain]="comm.remain" *ngIf="comm.isLoading"></v-loading-bump>-->
</ion-content>
</ion-content>
src/app/envCtrl/env-shower/env-shower.page.ts
View file @
6011ef3c
...
@@ -168,7 +168,7 @@ export class EnvShowerPage implements OnInit {
...
@@ -168,7 +168,7 @@ export class EnvShowerPage implements OnInit {
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
// this.comm.remain = 60;
// this.comm.remain = 60;
this
.
loading
.
presentLoading
(
80
);
this
.
loading
.
presentLoading
(
Constants
.
LOADING_SHORT
);
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlCowedSwitch
([
req
,
(
data
)
=>
{
if
(
data
&&
data
.
code
===
1
)
{
if
(
data
&&
data
.
code
===
1
)
{
this
.
comm
.
remain
=
0
;
this
.
comm
.
remain
=
0
;
...
@@ -187,7 +187,7 @@ export class EnvShowerPage implements OnInit {
...
@@ -187,7 +187,7 @@ export class EnvShowerPage implements OnInit {
setConfusionModelControll
()
{
setConfusionModelControll
()
{
// 混乱模式
// 混乱模式
if
(
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
if
(
+
this
.
operationModel
===
Constants
.
CONTROLL_CONFUSION
)
{
this
.
param
.
forEach
((
device
)
=>
{
this
.
param
.
forEach
((
device
)
=>
{
device
.
disabled
=
true
;
device
.
disabled
=
true
;
});
});
...
...
src/app/envCtrl/env-waterchannel/env-waterchannel.page.html
View file @
6011ef3c
...
@@ -9,15 +9,20 @@
...
@@ -9,15 +9,20 @@
<ion-card-header
class=
"cardTitle"
>
<ion-card-header
class=
"cardTitle"
>
<ion-card-title
class=
"cardHeader"
>
<ion-card-title
class=
"cardHeader"
>
<div
style=
"width: 100%"
>
<div
style=
"width: 100%"
>
<div
style=
"width:10%; float:left; display: inline-block"
><img
src=
"../../assets/img/model-on.png"
class=
"modelState"
></div>
<div
style=
"float:left; display: inline-block"
>
<div
style=
"width:88%; float:left; display: inline-block;padding-top: 2px;"
class=
"font-sub-title"
>
{{device .fieldDeviceName}}
</div>
<img
src=
"../../assets/img/water-channel.png"
class=
"modelState"
style=
"margin-right: 5px !important;"
></div>
<div
style=
"width:88%; float:left; display: inline-block;padding-top: 2px;"
class=
"font-content-title"
>
{{device .fieldDeviceName}}
</div>
</div>
</div>
</ion-card-title>
</ion-card-title>
</ion-card-header>
</ion-card-header>
<ion-card-content
class=
"cardContent font-content"
style=
"margin-top:15px;"
>
<ion-card-content
class=
"cardContent"
style=
"margin-top:5px;"
>
<span>
当前功率 :
</span>
<span
style=
"color:#0bb8cc"
>
{{device.kw}} KW
<br></span>
<div
style=
"width:100%; overflow: hidden;"
>
<span>
估计加热设备台数 :
</span>
<span
style=
"color:#0bb8cc"
>
{{device.deviceOnlineNum}} 台
</span>
<span
class=
"font-content"
>
当前功率 :
</span>
<span
class=
"main-color font-input"
>
{{device.kw}} KW
<br></span>
</div>
<div
style=
"width:100%; overflow: hidden;"
>
<span
class=
"font-content"
>
估计加热设备台数 :
</span>
<span
class=
"main-color font-input"
>
{{device.deviceOnlineNum}} 台
</span>
</div>
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</div>
</div>
...
...
src/app/envCtrl/env-waterchannel/env-waterchannel.page.scss
View file @
6011ef3c
...
@@ -13,12 +13,13 @@
...
@@ -13,12 +13,13 @@
.cardHeader
{
.cardHeader
{
--padding-inline-start
:
0px
!
important
;
--padding-inline-start
:
0px
!
important
;
--padding-inline-end
:
0px
!
important
;
--padding-inline-end
:
0px
!
important
;
padding
:
10px
;
padding-top
:
10px
;
padding-left
:
10px
;
font-size
:
18px
;
font-size
:
18px
;
text-align
:left
;
text-align
:left
;
}
}
.cardContent
{
.cardContent
{
padding
:
0px
5px
5px
3
5
px
;
padding
:
0px
5px
5px
3
8
px
;
}
}
.sucCir
{
.sucCir
{
...
...
src/app/envCtrl/tabs/tabs.page.html
View file @
6011ef3c
<router-outlet
name=
'tabs'
(
activate
)='
onActivate
($
event
)'
></router-outlet>
<router-outlet
name=
'tabs'
(
activate
)='
onActivate
($
event
)'
></router-outlet>
<ion-content>
<ion-content>
<ion-tabs>
<ion-tabs>
<ion-tab-bar
slot=
"bottom"
>
<ion-tab-bar
slot=
"bottom"
colo=
"secondary"
>
<ion-tab-button
tab=
"tab-home"
selected=
"true"
>
<ion-tab-button
tab=
"tab-home"
selected=
"true"
color=
""
>
<ion-label>
首页
</ion-label>
<ion-label>
首页
</ion-label>
<ion-icon
name=
"home"
></ion-icon>
<ion-icon
name=
"home"
></ion-icon>
</ion-tab-button>
</ion-tab-button>
...
...
src/app/service/constants.ts
View file @
6011ef3c
...
@@ -15,4 +15,9 @@ export class Constants {
...
@@ -15,4 +15,9 @@ export class Constants {
public
static
CONTROLL_SELF
=
2
;
// 自控
public
static
CONTROLL_SELF
=
2
;
// 自控
public
static
CONTROLL_WISDOM
=
3
;
// 智慧控制
public
static
CONTROLL_WISDOM
=
3
;
// 智慧控制
public
static
CONTROLL_CONFUSION
=
4
;
// 智慧控制
public
static
CONTROLL_CONFUSION
=
4
;
// 智慧控制
public
static
LOADING_SHORT
=
10
;
// 单个开关
public
static
LOADING_LONG
=
40
;
// 一键控制等
}
}
src/assets/img/alarm-small.png
0 → 100644
View file @
6011ef3c
1.25 KB
src/assets/img/light-small.png
0 → 100644
View file @
6011ef3c
1.43 KB
src/assets/img/shower-small.png
0 → 100644
View file @
6011ef3c
1.28 KB
src/assets/img/water-channel.png
0 → 100644
View file @
6011ef3c
525 Bytes
src/global.scss
View file @
6011ef3c
...
@@ -163,7 +163,7 @@ img {
...
@@ -163,7 +163,7 @@ img {
.font-content
{
.font-content
{
font-size
:
13px
!
important
;
font-size
:
13px
!
important
;
color
:
#8
e8e8e
!
important
;
color
:
#8
28282
!
important
;
}
}
.font-input
{
.font-input
{
...
@@ -172,22 +172,22 @@ img {
...
@@ -172,22 +172,22 @@ img {
.font-note
{
.font-note
{
font-size
:
13px
;
font-size
:
13px
;
color
:
#8
e8e8e
;
color
:
#8
28282
;
}
}
.font-smaller
{
.font-smaller
{
font-size
:
12px
!
important
;
font-size
:
12px
!
important
;
color
:
#8
e8e8e
!
important
;
color
:
#8
28282
!
important
;
}
}
.font-mini
{
.font-mini
{
font-size
:
10px
;
font-size
:
10px
!
important
;
color
:
#8
e8e8e
!
important
;
color
:
#8
28282
;
}
}
.font-ts
{
.font-ts
{
font-size
:
13px
;
font-size
:
13px
;
color
:
#8
e8e8e
;
color
:
#8
28282
;
}
}
.font-alarm
{
.font-alarm
{
...
@@ -196,7 +196,7 @@ img {
...
@@ -196,7 +196,7 @@ img {
}
}
.content-text-color
{
.content-text-color
{
color
:
#8
e8e8e
;
color
:
#8
28282
;
}
}
.note-text-color
{
.note-text-color
{
...
@@ -204,12 +204,16 @@ img {
...
@@ -204,12 +204,16 @@ img {
}
}
.main-color
{
.main-color
{
color
:
#6
1
C7CC
;
color
:
#6
2
C7CC
;
}
}
.light-color
{
// color: #828282;
// background-color: rgba(119, 249, 254, 0.8);
}
.spinnerColor
{
.spinnerColor
{
--spinner-color
:
#6
1
C7CC
;
--spinner-color
:
#6
2
C7CC
;
}
}
.alarmColor
{
.alarmColor
{
...
@@ -217,13 +221,13 @@ img {
...
@@ -217,13 +221,13 @@ img {
}
}
.normalColor
{
.normalColor
{
color
:
#8
e8e8e
;
color
:
#8
28282
;
}
}
.main-title
{
.main-title
{
font-size
:
16px
;
font-size
:
16px
;
padding-left
:
5px
;
padding-left
:
5px
;
border-left
:
5px
solid
#6
1
C7CC
;
border-left
:
5px
solid
#6
2
C7CC
;
line-height
:
25px
;
line-height
:
25px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
margin-left
:
10px
;
margin-left
:
10px
;
...
@@ -234,7 +238,7 @@ img {
...
@@ -234,7 +238,7 @@ img {
background-color
:
#ffffff
;
background-color
:
#ffffff
;
font-size
:
16px
;
font-size
:
16px
;
padding-left
:
5px
;
padding-left
:
5px
;
border-left
:
5px
solid
#6
1
C7CC
;
border-left
:
5px
solid
#6
2
C7CC
;
line-height
:
25px
;
line-height
:
25px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
margin-left
:
5px
;
margin-left
:
5px
;
...
@@ -277,8 +281,8 @@ img {
...
@@ -277,8 +281,8 @@ img {
}
}
.online
{
.online
{
border-radius
:
6
px
;
border-radius
:
10
px
;
background-color
:
#6
1
C7CC
;
background-color
:
#6
2
C7CC
;
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
vertical-align
:
middle
;
box-shadow
:
#ccc
0
.5px
0
.5px
3px
;
box-shadow
:
#ccc
0
.5px
0
.5px
3px
;
...
@@ -286,11 +290,11 @@ img {
...
@@ -286,11 +290,11 @@ img {
color
:
white
;
color
:
white
;
margin-left
:
5px
;
margin-left
:
5px
;
margin-right
:
2px
;
margin-right
:
2px
;
font-size
:
1
3
px
;
font-size
:
1
2
px
;
}
}
.offline
{
.offline
{
border-radius
:
6
px
;
border-radius
:
10
px
;
background-color
:
#9ea7b4
;
background-color
:
#9ea7b4
;
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
vertical-align
:
middle
;
...
@@ -299,7 +303,7 @@ img {
...
@@ -299,7 +303,7 @@ img {
color
:
white
;
color
:
white
;
margin-left
:
5px
;
margin-left
:
5px
;
margin-right
:
2px
;
margin-right
:
2px
;
font-size
:
1
3
px
;
font-size
:
1
2
px
;
}
}
...
...
src/theme/variables.scss
View file @
6011ef3c
...
@@ -12,13 +12,19 @@
...
@@ -12,13 +12,19 @@
--ion-color-primary-tint
:
#4c8dff
;
--ion-color-primary-tint
:
#4c8dff
;
/** secondary **/
/** secondary **/
// --ion-color-secondary: #0cd1e8;
--ion-color-secondary
:
#62C7CC
;
--ion-color-secondary
:
#61C7CC
;
--ion-color-secondary-rgb
:
12
,
209
,
232
;
--ion-color-secondary-rgb
:
12
,
209
,
232
;
--ion-color-secondary-contrast
:
#ffffff
;
--ion-color-secondary-contrast
:
#ffffff
;
--ion-color-secondary-contrast-rgb
:
255
,
255
,
255
;
--ion-color-secondary-contrast-rgb
:
255
,
255
,
255
;
--ion-color-secondary-shade
:
#61C7CC
;
--ion-color-secondary-shade
:
#62C7CC
;
--ion-color-secondary-tint
:
#61C7CC
;
--ion-color-secondary-tint
:
#62C7CC
;
// --ion-color-secondary: #0cd1e8;
//--ion-color-secondary: #61C7CC;
//--ion-color-secondary-rgb: 12, 209, 232;
//--ion-color-secondary-contrast: #ffffff;
//--ion-color-secondary-contrast-rgb: 255, 255, 255;
//--ion-color-secondary-shade: #61C7CC;
//--ion-color-secondary-tint: #61C7CC;
/** tertiary **/
/** tertiary **/
--ion-color-tertiary
:
#7044ff
;
--ion-color-tertiary
:
#7044ff
;
...
...
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