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
57df9b6b
Commit
57df9b6b
authored
Jul 21, 2020
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改详情页tab页面跳转
parent
4fa13901
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
82 deletions
+70
-82
env-alarm.page.ts
src/app/envCtrl/env-alarm/env-alarm.page.ts
+0
-2
env-detail.page.html
src/app/envCtrl/env-detail/env-detail.page.html
+4
-4
env-fan.page.ts
src/app/envCtrl/env-fan/env-fan.page.ts
+14
-21
env-home.page.ts
src/app/envCtrl/env-home/env-home.page.ts
+0
-1
env-light.page.ts
src/app/envCtrl/env-light/env-light.page.ts
+12
-10
env-shower.page.ts
src/app/envCtrl/env-shower/env-shower.page.ts
+9
-7
env-waterchannel.page.html
src/app/envCtrl/env-waterchannel/env-waterchannel.page.html
+23
-27
env-waterchannel.page.ts
src/app/envCtrl/env-waterchannel/env-waterchannel.page.ts
+8
-10
No files found.
src/app/envCtrl/env-alarm/env-alarm.page.ts
View file @
57df9b6b
...
...
@@ -33,11 +33,9 @@ export class EnvAlarmPage implements OnInit {
}
ngOnInit
()
{
console
.
log
(
'env-alarm: ngOnInit'
);
this
.
init
();
this
.
eventService
.
event
.
on
(
'refreshAlarmInfo'
,
()
=>
{
console
.
log
(
'refreshAlarmInfo'
);
this
.
init
();
});
}
...
...
src/app/envCtrl/env-detail/env-detail.page.html
View file @
57df9b6b
...
...
@@ -64,15 +64,15 @@
</ion-segment>
<div
*
ngIf=
"selectedTab === 'fan'"
>
<v-env-fan></v-env-fan>
<v-env-fan
[
fieldRegionNo
]="
fieldRegionNo
"
[
operationModel
]="
item
.
operationModel
"
[
online
]="
item
.
online
"
></v-env-fan>
</div>
<div
*
ngIf=
"selectedTab === 'shower'"
>
<v-env-shower></v-env-shower>
<v-env-shower
[
fieldRegionNo
]="
fieldRegionNo
"
[
operationModel
]="
item
.
operationModel
"
[
online
]="
item
.
online
"
></v-env-shower>
</div>
<div
*
ngIf=
"selectedTab === 'light'"
>
<v-env-light></v-env-light>
<v-env-light
[
fieldRegionNo
]="
fieldRegionNo
"
[
operationModel
]="
item
.
operationModel
"
[
online
]="
item
.
online
"
></v-env-light>
</div><div
*
ngIf=
"selectedTab === 'water'"
>
<v-env-waterchannel></v-env-waterchannel>
<v-env-waterchannel
[
fieldRegionNo
]="
fieldRegionNo
"
></v-env-waterchannel>
</div>
</ion-content>
src/app/envCtrl/env-fan/env-fan.page.ts
View file @
57df9b6b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Api
}
from
'../../service/api'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
Load
}
from
'../../service/load'
;
...
...
@@ -18,9 +18,12 @@ export class EnvFanPage implements OnInit {
/* 风机 */
// 牧场区域编号
fieldRegionNo
=
''
;
operationModel
=
0
;
online
=
1
;
@
Input
()
fieldRegionNo
:
any
=
''
;
// 操作模式
@
Input
()
operationModel
:
any
=
0
;
// 在离线
@
Input
()
online
:
any
=
1
;
// 牧场设备类型
fieldDeviceType
=
''
;
// 模式状态
...
...
@@ -49,13 +52,13 @@ export class EnvFanPage implements OnInit {
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
public
alertController
:
AlertController
,
public
loading
:
Loading
,
public
eventService
:
EventService
)
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
if
(
data
&&
data
.
fieldRegionNo
!==
undefined
&&
data
.
fieldRegionNo
!==
null
&&
data
.
fieldRegionNo
!==
''
)
{
this
.
fieldRegionNo
=
data
.
fieldRegionNo
;
this
.
operationModel
=
data
.
operationModel
;
this
.
online
=
data
.
online
;
}
});
//
this.ac.queryParams.subscribe((data) => {
//
if (data && data.fieldRegionNo !== undefined && data.fieldRegionNo !== null && data.fieldRegionNo !== '') {
//
this.fieldRegionNo = data.fieldRegionNo;
//
this.operationModel = data.operationModel;
//
this.online = data.online;
//
}
//
});
}
ionViewWillEnter
()
{
...
...
@@ -93,19 +96,9 @@ export class EnvFanPage implements OnInit {
init
()
{
if
(
this
.
fieldRegionNo
!==
undefined
&&
this
.
fieldRegionNo
!==
null
&&
this
.
fieldRegionNo
!==
''
)
{
this
.
getData
(
0
);
}
else
{
this
.
ac
.
queryParams
.
subscribe
((
data
)
=>
{
if
(
data
&&
data
.
fieldRegionNo
!==
undefined
&&
data
.
fieldRegionNo
!==
null
&&
data
.
fieldRegionNo
!==
''
)
{
this
.
fieldRegionNo
=
data
.
fieldRegionNo
;
this
.
operationModel
=
data
.
operationModel
;
this
.
getData
(
0
);
}
});
}
}
getData
(
time
)
{
console
.
log
();
if
(
time
)
{
this
.
load
.
toLoad
(
'加载中...'
,
false
);
}
...
...
src/app/envCtrl/env-home/env-home.page.ts
View file @
57df9b6b
...
...
@@ -70,7 +70,6 @@ export class EnvHomePage implements OnInit {
// ionic的生命周期函数
ionViewWillEnter
()
{
console
.
log
(
'env-home: ionViewWillEnter'
);
this
.
init
();
}
...
...
src/app/envCtrl/env-light/env-light.page.ts
View file @
57df9b6b
...
...
@@ -16,9 +16,11 @@ import {EventService} from '../../service/event';
export
class
EnvLightPage
implements
OnInit
{
/* 照明 */
// 牧场区域编号
fieldRegionNo
=
''
;
operationModel
=
0
;
online
=
1
;
@
Input
()
fieldRegionNo
:
any
=
''
;
// 操作模式
@
Input
()
operationModel
:
any
=
0
;
// 在离线
@
Input
()
online
:
any
=
1
;
// 牧场设备类型
fieldDeviceType
=
''
;
// 模式状态
...
...
@@ -66,7 +68,6 @@ export class EnvLightPage implements OnInit {
}
ionViewWillEnter
()
{
console
.
log
(
'ionViewWillEnter_light'
);
this
.
init
();
}
...
...
@@ -96,12 +97,13 @@ export class EnvLightPage implements OnInit {
}
init
()
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
operationModel
=
+
params
.
get
(
'operationModel'
);
this
.
online
=
+
params
.
get
(
'online'
);
this
.
getData
(
0
);
});
// this.route.paramMap.subscribe(params => {
// this.fieldRegionNo = params.get('fieldRegionNo');
// this.operationModel = +params.get('operationModel');
// this.online = +params.get('online');
// this.getData(0);
// });
this
.
getData
(
0
);
}
...
...
src/app/envCtrl/env-shower/env-shower.page.ts
View file @
57df9b6b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Api
}
from
'../../service/api'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
Load
}
from
'../../service/load'
;
...
...
@@ -13,7 +13,14 @@ import {EventService} from '../../service/event';
})
export
class
EnvShowerPage
implements
OnInit
{
workModeSetting
=
{
'workMode'
:
'1'
,
// 牧场区域编号
@
Input
()
fieldRegionNo
:
any
=
''
;
// 操作模式
@
Input
()
operationModel
:
any
=
0
;
// 在离线
@
Input
()
online
:
any
=
1
;
workModeSetting
=
{
'workMode'
:
'1'
,
'DeviceNo'
:
''
,
'workModeOld'
:
'1'
};
...
...
@@ -25,10 +32,6 @@ export class EnvShowerPage implements OnInit {
commTmr
:
any
;
// 牧场区域编号
fieldRegionNo
=
''
;
operationModel
=
0
;
online
=
1
;
// 牧场设备类型
fieldDeviceType
=
''
;
// 模式状态
...
...
@@ -86,7 +89,6 @@ export class EnvShowerPage implements OnInit {
}
ionViewWillEnter
()
{
console
.
log
(
'ionViewWillEnter_shower'
);
this
.
init
();
}
...
...
src/app/envCtrl/env-waterchannel/env-waterchannel.page.html
View file @
57df9b6b
<ion-header>
</ion-header>
<ion-content
color=
"light"
style=
"height: 100%;"
>
<div
class=
"env-detail-content"
>
<h1
class=
"main-title-detail"
>
状态
</h1>
<div
class=
"card-div"
>
<ion-card
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card-header
class=
"cardTitle"
>
<ion-card-title
class=
"cardHeader"
>
<div
style=
"width: 100%"
>
<div
style=
"float:left; display: inline-block"
>
<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>
</ion-card-title>
</ion-card-header>
<ion-card-content
class=
"cardContent"
style=
"margin-top:5px;"
>
<div
style=
"width:100%; overflow: hidden;"
>
<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
class=
"env-detail-content"
>
<h1
class=
"main-title-detail"
>
状态
</h1>
<div
class=
"card-div"
*
ngIf=
"devices.length > 0"
>
<ion-card
*
ngFor=
"let device of devices"
class=
"card"
color=
"white"
>
<ion-card-header
class=
"cardTitle"
>
<ion-card-title
class=
"cardHeader"
>
<div
style=
"width: 100%"
>
<div
style=
"float:left; display: inline-block"
>
<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>
</ion-card-content>
</ion-card>
</div>
</ion-card-title>
</ion-card-header>
<ion-card-content
class=
"cardContent"
style=
"margin-top:5px;"
>
<div
style=
"width:100%; overflow: hidden;"
>
<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>
</div>
</
ion-content
>
</
div
>
src/app/envCtrl/env-waterchannel/env-waterchannel.page.ts
View file @
57df9b6b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Api
}
from
'../../service/api'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
Load
}
from
'../../service/load'
;
...
...
@@ -12,7 +12,8 @@ import {Loading} from '../../service/loading';
})
export
class
EnvWaterchannelPage
implements
OnInit
{
// 牧场区域编号
fieldRegionNo
=
''
;
@
Input
()
fieldRegionNo
:
any
=
''
;
// 牧场设备
devices
=
[];
...
...
@@ -25,10 +26,6 @@ export class EnvWaterchannelPage implements OnInit {
constructor
(
private
api
:
Api
,
private
ac
:
ActivatedRoute
,
private
load
:
Load
,
private
route
:
ActivatedRoute
,
public
loading
:
Loading
)
{
}
ngOnInit
()
{
// this.ac.queryParams.subscribe((data) => {
// this.fieldRegionNo = data.no;
// });
console
.
log
(
'env-waterChannel: ngOnInit'
);
this
.
init
();
}
...
...
@@ -39,10 +36,11 @@ export class EnvWaterchannelPage implements OnInit {
// }
init
()
{
this
.
route
.
paramMap
.
subscribe
(
params
=>
{
this
.
fieldRegionNo
=
params
.
get
(
'fieldRegionNo'
);
this
.
getData
(
0
);
});
// this.route.paramMap.subscribe(params => {
// this.fieldRegionNo = params.get('fieldRegionNo');
// this.getData(0);
// });
this
.
getData
(
0
);
}
getData
(
time
)
{
...
...
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