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
531ae561
Commit
531ae561
authored
Sep 12, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
牛舍配置页微调
parent
4be9e4f0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
84 deletions
+96
-84
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+82
-18
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
+12
-64
env-history.page.html
src/app/envCtrl/env-history/env-history.page.html
+1
-1
No files found.
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
531ae561
...
...
@@ -34,7 +34,7 @@
<ion-item
class=
"fanItem"
>
<ion-label
position=
"fixed"
>
偏差湿度
</ion-label>
<ion-input
[(
ngModel
)]="
curCowshed
.
propertyConfig
.
hoft
"
></ion-input>
<ion-label
position=
"fixed"
>
℃
</ion-label>
<ion-label
position=
"fixed"
>
%
</ion-label>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -84,13 +84,14 @@
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
模式名
</ion-label>
<ion-input
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:5
0px;"
></ion-input>
<ion-input
[(
ngModel
)]="
cfg
.
name
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:8
0px;"
></ion-input>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"timepickerItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
间隔时间
</ion-label>
<ion-input
[(
ngModel
)]="
cfg
.
intverval
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -99,6 +100,7 @@
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
设置温度
</ion-label>
<ion-input
[(
ngModel
)]="
cfg
.
T
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-label>
℃
</ion-label>
</ion-item>
</ion-col>
<!-- <ion-col size="auto" style="font-size: 13px;">-->
...
...
@@ -113,12 +115,14 @@
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
A区喷水时间
</ion-label>
<ion-input
[(
ngModel
)]="
cfg
.
A
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-col>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
<ion-item
class=
"fanItem"
lines=
"none"
>
<ion-label
style=
"width:80px"
>
B区喷水时间
</ion-label>
<ion-input
[(
ngModel
)]="
cfg
.
B
"
(
ionFocus
)="
fanTempHaveFouch
()"
style=
"width:50px;"
></ion-input>
<ion-label>
秒
</ion-label>
</ion-item>
</ion-col>
</ion-row>
...
...
@@ -192,7 +196,7 @@
<ion-label>
水槽预警时间段配置
</ion-label>
</ion-item-divider>
<ion-item-sliding>
<ion-item
style=
"--padding-start: 0px
"
>
<ion-item
class=
"fanItem
"
>
<ion-grid>
<ion-row
style=
"width: 100%"
>
<ion-col
size=
"auto"
style=
"font-size: 13px;"
>
...
...
@@ -224,16 +228,47 @@
<ion-item-divider>
<ion-label>
牛群在/离舍配置
</ion-label>
</ion-item-divider>
<ion-item
class=
"
cow
"
>
<ion-item
class=
"
fanItem
"
>
<ion-grid>
<!--<ion-row>-->
<!--<ion-col>牛群回舍时需恢复上述的设备</ion-col>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col *ngFor="let device of curCowshed.leave">-->
<!--<ion-item lines="none" class="cow">-->
<!--<ion-label>{{device}}</ion-label>-->
<!--<!– <ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="curCowshed.propertyConfig.toft"></ion-checkbox>–>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col>牛群离舍时需完全关闭的设备</ion-col>-->
<!--</ion-row>-->
<!--<ion-row>-->
<!--<ion-col *ngFor="let device of curCowshed.back">-->
<!--<ion-item lines="none" class="cow">-->
<!--<ion-label>{{device}}</ion-label>-->
<!--<!– <ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="curCowshed.propertyConfig.toft"></ion-checkbox>–>-->
<!--</ion-item>-->
<!--</ion-col>-->
<!--</ion-row>-->
<ion-row>
<ion-col>
牛群回舍时需恢复上述的设备
</ion-col>
</ion-row>
<ion-row>
<ion-col
*
ngFor=
"let device of curCowshed.leave"
>
<ion-item
lines=
"none"
class=
"cow"
>
<ion-label>
{{device}}
</ion-label>
<!-- <ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="curCowshed.propertyConfig.toft"></ion-checkbox>-->
<ion-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>
...
...
@@ -241,21 +276,50 @@
<ion-col>
牛群离舍时需完全关闭的设备
</ion-col>
</ion-row>
<ion-row>
<ion-col
*
ngFor=
"let device of curCowshed.back"
>
<ion-item
lines=
"none"
class=
"cow"
>
<ion-label>
{{device}}
</ion-label>
<!-- <ion-checkbox color="primary" class="cowCheckBox" slot="start" [(ngModel)]="curCowshed.propertyConfig.toft"></ion-checkbox>-->
<ion-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-item>
<ion-item-divider>
<ion-label>
环境参数预警配置
</ion-label>
</ion-item-divider>
<ion-item
class=
"fanItem"
>
<ion-grid>
<div>
<ngx-datatable
class=
'material'
[
rows
]="
environmentConfig
"
[
columnMode
]="'
force
'"
[
scrollbarH
]="
true
"
style=
"white-space: nowrap; text-align: center"
>
<ngx-datatable-column
name=
""
prop=
"tittle"
width=
"10"
>
</ngx-datatable-column>
<ngx-datatable-column
name=
"上限"
prop=
"top"
width=
"10"
>
</ngx-datatable-column>
<ngx-datatable-column
name=
"下限"
prop=
"lower"
width=
"10"
>
</ngx-datatable-column>
<ngx-datatable-column
name=
""
prop=
"symbol"
width=
"10"
>
</ngx-datatable-column>
</ngx-datatable>
</div>
</ion-grid>
</ion-item>
<ion-item-divider>
<ion-label>
环境参数配置
</ion-label>
</ion-item-divider>
<ion-item
class=
"
thi
"
>
<ion-item
class=
"
fanItem
"
>
<ion-grid>
<ion-row>
<ion-item
lines=
"none"
class=
"thiItem"
>
热应激配置
</ion-item>
...
...
@@ -271,9 +335,9 @@
<ion-col
class=
"thiItem"
>
THI值(
<
)</
ion-col
>
<ion-col
class=
"thiItem"
>
预警等级
</ion-col>
</ion-row>
<ion-row
*
ngFor=
"let heatStress of curCowshed.heatStressList"
align=
"center"
>
<ion-col
class=
"thiItem"
>
<ion-label>
{{heatStress.heatStressLevel}}
</ion-label>
</ion-col>
<ion-col
class=
"thiItem"
>
<ion-input
(
ionFocus
)="
fanTempHaveFouch
()"
disabled=
"true"
>
{{heatStress.thi}}
</ion-input>
</ion-col>
<ion-row
*
ngFor=
"let heatStress of curCowshed.heatStressList"
>
<ion-col
class=
"thiItem"
>
{{heatStress.heatStressLevel}}
</ion-col>
<ion-col
class=
"thiItem"
>
{{heatStress.thi}}
</ion-col>
<ion-col
class=
"thiItem"
>
<ion-select
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
heatStress
.
alarmLevel
"
[(
value
)]="
heatStress
.
alarmLevel
"
(
ionChange
)="
workModeEvent
(
heatStress
)"
>
<ion-select-option
value=
"无"
>
无
</ion-select-option>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.scss
View file @
531ae561
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
531ae561
...
...
@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core';
import
{
PickerController
}
from
'@ionic/angular'
;
import
{
Api
}
from
'../../service/api'
;
import
{
Load
}
from
'../../service/load'
;
import
{
NgxDatatableModule
}
from
'@swimlane/ngx-datatable'
;
@
Component
({
selector
:
'v-env-cfg'
,
...
...
@@ -27,45 +28,6 @@ export class EnvCfgPage implements OnInit {
'selecting'
:
false
,
};
fanCfg
=
[{
'name'
:
'模式一'
,
'timeInterval'
:
25
,
'tempSet'
:
25
,
'tempOffset'
:
3
,
'ATmr'
:
20
,
'BTmr'
:
20
,
},
{
'name'
:
'模式二'
,
'timeInterval'
:
25
,
'tempSet'
:
30
,
'tempOffset'
:
3
,
'ATmr'
:
20
,
'BTmr'
:
20
,
},
{
'name'
:
'模式三'
,
'timeInterval'
:
25
,
'tempSet'
:
20
,
'tempOffset'
:
3
,
'ATmr'
:
20
,
'BTmr'
:
20
,
},
];
lightCfg
=
[{
'name'
:
'模式一'
,
'timeInterval'
:
25
,
'startTime'
:
25
,
'endTime'
:
3
,
'onTime'
:
20
,
'offTime'
:
20
,
},
{
'name'
:
'模式二'
,
'timeInterval'
:
25
,
'startTime'
:
30
,
'endTime'
:
3
,
'onTime'
:
20
,
'offTime'
:
20
,
},
];
constructor
(
private
pickerController
:
PickerController
,
private
api
:
Api
,
private
load
:
Load
)
{
}
...
...
@@ -90,6 +52,8 @@ export class EnvCfgPage implements OnInit {
penLin
:
any
=
{};
zhaoMing
:
any
=
{};
shuiCao
:
any
=
{};
// 环境参数预警配置
environmentConfig
=
[];
async
openPicker
(
numColumns
=
1
,
numOptions
=
5
,
columnOptions
=
this
.
defaultColumnOptions
)
{
const
picker
=
await
this
.
pickerController
.
create
({
...
...
@@ -240,6 +204,7 @@ export class EnvCfgPage implements OnInit {
ts
:
'2019-08-05 23:44'
,
},
];
// ----------------------------------------------------
}
workModeEvent
(
item
)
{
...
...
@@ -384,7 +349,6 @@ export class EnvCfgPage implements OnInit {
// 显示牛舍配置信息
initConfig
()
{
const
configInfo
=
this
.
curCowshed
.
config
;
const
heatStressListInfo
=
this
.
curCowshed
.
heatStressList
;
// 各设备配置情报
if
(
configInfo
&&
configInfo
.
constructor
===
Array
)
{
configInfo
.
map
((
value
,
index
)
=>
{
...
...
@@ -406,29 +370,13 @@ export class EnvCfgPage implements OnInit {
}
});
}
// if (heatStressListInfo && heatStressListInfo.constructor === Array) {
// heatStressListInfo.map((value, index) => {
// switch (value.heatStressLevel) {
// case '无应激':
// this.heatStressLevel_0 = value;
// break;
// case '轻度应激' :
// this.heatStressLevel_1 = value;
// break;
// case '中度应激' :
// this.heatStressLevel_2 = value;
// break;
// case '重度应激' :
// this.heatStressLevel_3 = value;
// break;
// case 'II重度应激' :
// this.heatStressLevel_4 = value;
// break;
// default:
// break;
// }
//
// });
// }
// 环境预警参数
if
(
this
.
curCowshed
.
environmentConfigJson
)
{
const
temperatureCfg
=
{
tittle
:
'温度'
,
top
:
this
.
curCowshed
.
environmentConfigJson
.
TU
,
lower
:
this
.
curCowshed
.
environmentConfigJson
.
TL
,
symbol
:
'℃'
};
const
humidityCfg
=
{
tittle
:
'湿度'
,
top
:
this
.
curCowshed
.
environmentConfigJson
.
HU
,
lower
:
this
.
curCowshed
.
environmentConfigJson
.
HL
,
symbol
:
'%'
};
this
.
environmentConfig
.
push
(
temperatureCfg
,
humidityCfg
);
}
}
}
src/app/envCtrl/env-history/env-history.page.html
View file @
531ae561
...
...
@@ -15,7 +15,7 @@
<div
echarts
[
options
]="
chartOption
"
class=
"demo-chart"
></div>
<h1
class=
"subTittle"
>
近8个小时环境参数表
</h1>
<div>
<ngx-datatable
class=
'material'
[
rows
]="
rows
"
[
columnMode
]="'
force
'"
[
scrollbarH
]="
true
"[
scrollbarV
]="
true
"
style=
"white-space: nowrap; text-align: center"
>
<ngx-datatable
class=
'material'
[
rows
]="
rows
"
[
columnMode
]="'
force
'"
[
scrollbarH
]="
true
"
[
scrollbarV
]="
true
"
style=
"white-space: nowrap; text-align: center"
>
<ngx-datatable-column
name=
"时间"
prop=
"time"
width=
"100"
>
</ngx-datatable-column>
<ngx-datatable-column
name=
"热应激"
prop=
"thi"
width=
"60"
>
...
...
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