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
4fa13901
Commit
4fa13901
authored
Jul 20, 2020
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改详情页tab页面跳转
parent
6fb4b693
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
335 additions
and
311 deletions
+335
-311
app-routing.module.ts
src/app/app-routing.module.ts
+9
-9
app.module.ts
src/app/app.module.ts
+5
-5
env-detail.module.ts
src/app/envCtrl/env-detail/env-detail.module.ts
+12
-7
env-detail.page.html
src/app/envCtrl/env-detail/env-detail.page.html
+36
-25
env-detail.page.ts
src/app/envCtrl/env-detail/env-detail.page.ts
+23
-0
env-fan.page.html
src/app/envCtrl/env-fan/env-fan.page.html
+64
-69
env-light.page.html
src/app/envCtrl/env-light/env-light.page.html
+78
-83
env-shower.page.html
src/app/envCtrl/env-shower/env-shower.page.html
+101
-107
mqtt.ts
src/app/service/mqtt.ts
+1
-1
environment.prod.ts
src/environments/environment.prod.ts
+4
-0
environment.ts
src/environments/environment.ts
+2
-5
No files found.
src/app/app-routing.module.ts
View file @
4fa13901
...
@@ -42,15 +42,15 @@ const routes: Routes = [
...
@@ -42,15 +42,15 @@ const routes: Routes = [
]
]
},
},
{
path
:
'login'
,
component
:
LoginPage
},
{
path
:
'login'
,
component
:
LoginPage
},
{
path
:
'env-detail'
,
{
path
:
'env-detail'
,
loadChildren
:
'./envCtrl/env-detail/env-detail.module#EnvDetailPageModule'
component
:
EnvDetailPage
,
//
component: EnvDetailPage,
children
:
[
//
children: [
{
path
:
'fan'
,
component
:
EnvFanPage
},
//
{path: 'fan', component: EnvFanPage},
{
path
:
'shower/:fieldRegionNo/:operationModel/:online'
,
component
:
EnvShowerPage
},
//
{path: 'shower/:fieldRegionNo/:operationModel/:online', component: EnvShowerPage},
{
path
:
'light/:fieldRegionNo/:operationModel/:online'
,
component
:
EnvLightPage
},
//
{path: 'light/:fieldRegionNo/:operationModel/:online', component: EnvLightPage},
{
path
:
'waterchannel/:fieldRegionNo/:operationModel/:online'
,
component
:
EnvWaterchannelPage
},
//
{path: 'waterchannel/:fieldRegionNo/:operationModel/:online', component: EnvWaterchannelPage},
{
path
:
''
,
redirectTo
:
'fan'
,
pathMatch
:
'prefix'
},
//
{path: '', redirectTo: 'fan', pathMatch : 'prefix'},
]
//
]
},
},
...
...
src/app/app.module.ts
View file @
4fa13901
...
@@ -78,11 +78,11 @@ import {DatePipe} from '@angular/common';
...
@@ -78,11 +78,11 @@ import {DatePipe} from '@angular/common';
OtherPage
,
OtherPage
,
SearchPage
,
SearchPage
,
MinePage
,
MinePage
,
EnvFanPage
,
//
EnvFanPage,
EnvShowerPage
,
//
EnvShowerPage,
EnvLightPage
,
//
EnvLightPage,
EnvWaterchannelPage
,
//
EnvWaterchannelPage,
EnvDetailPage
,
//
EnvDetailPage,
// EnvAnalPage,
// EnvAnalPage,
// EnvAlarmPage,
// EnvAlarmPage,
...
...
src/app/envCtrl/env-detail/env-detail.module.ts
View file @
4fa13901
...
@@ -17,13 +17,18 @@ const routes: Routes = [
...
@@ -17,13 +17,18 @@ const routes: Routes = [
{
{
path
:
''
,
path
:
''
,
component
:
EnvDetailPage
,
component
:
EnvDetailPage
,
//
children: [
children
:
[
// {path: 'fan', component: EnvFanPage},
// {path: 'fan', component: EnvFanPage},
// {path: 'shower', component: EnvShowerPage},
// {path: 'shower', component: EnvShowerPage},
// {path: 'light', component: EnvLightPage},
// {path: 'light', component: EnvLightPage},
// {path: 'waterchannel', component: EnvWaterchannelPage},
// {path: 'waterchannel', component: EnvWaterchannelPage},
// {path: '', redirectTo: 'fan', pathMatch: 'prefix'},
// {path: '', redirectTo: 'fan', pathMatch: 'prefix'},
// ]
// {path: 'fan', component: EnvFanPage},
// {path: 'shower/:fieldRegionNo/:operationModel/:online', component: EnvShowerPage},
// {path: 'light/:fieldRegionNo/:operationModel/:online', component: EnvLightPage},
// {path: 'waterchannel/:fieldRegionNo/:operationModel/:online', component: EnvWaterchannelPage},
// {path: '', redirectTo: 'fan', pathMatch : 'prefix'},
]
}
}
];
];
...
...
src/app/envCtrl/env-detail/env-detail.page.html
View file @
4fa13901
...
@@ -29,39 +29,50 @@
...
@@ -29,39 +29,50 @@
</div>
</div>
</ion-header>
</ion-header>
<ion-content
color=
"light"
>
<ion-content
color=
"light"
>
<ion-router-outlet></ion-router-outlet>
<!--<ion-router-outlet></ion-router-outlet>-->
<ion-tabs>
<ion-tab-bar
slot=
"top"
mode=
"ios"
style=
"--border: 0px;height: 30px;"
color=
"light-gray"
>
<ion-tab-button
tab=
"fan"
class=
"tabBtn ion-segment-button"
>
<ion-label>
风机
</ion-label>
</ion-tab-button>
<ion-tab-button
tab=
"shower"
class=
"tabBtn ion-segment-button"
[
routerLink
]="
showerLink
"
>
<!--[rootParams]="fieldRegionNo"-->
<ion-label>
喷淋
</ion-label>
</ion-tab-button>
<ion-tab-button
tab=
"light"
class=
"tabBtn ion-segment-button"
[
routerLink
]="
lightLink
"
>
<ion-label>
照明
</ion-label>
</ion-tab-button>
<ion-tab-button
tab=
"waterchannel"
class=
"tabBtn ion-segment-button"
[
routerLink
]="
waterchannelLink
"
>
<ion-label>
水槽
</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
<!--<ion-tabs>-->
<!--<ion-tabs>-->
<!--<ion-tab-bar slot="top">-->
<!--<ion-tab-bar slot="top"
mode="ios" style="--border: 0px;height: 30px;" color="light-gray"
>-->
<!--<ion-tab-button tab="fan" class="tab
Selected
">-->
<!--<ion-tab-button tab="fan" class="tab
Btn ion-segment-button
">-->
<!--<ion-label>风机</ion-label>-->
<!--<ion-label>风机</ion-label>-->
<!--</ion-tab-button>-->
<!--</ion-tab-button>-->
<!--
<!–<ion-tab-button tab="shower" class="tabSelected"> <!–[rootParams]="fieldRegionNo"–>
–>-->
<!--
<ion-tab-button tab="shower" class="tabBtn ion-segment-button" [routerLink]="showerLink"> <!–[rootParams]="fieldRegionNo"
–>-->
<!--
<!–<ion-label>喷淋</ion-label>–>
-->
<!--
<ion-label>喷淋</ion-label>
-->
<!--
<!–</ion-tab-button>–>
-->
<!--
</ion-tab-button>
-->
<!--<ion-tab-button tab="light" class="tab
Selected
">-->
<!--<ion-tab-button tab="light" class="tab
Btn ion-segment-button" [routerLink]="lightLink
">-->
<!--<ion-label>照明</ion-label>-->
<!--<ion-label>照明</ion-label>-->
<!--</ion-tab-button>-->
<!--</ion-tab-button>-->
<!--<ion-tab-button tab="waterchannel" class="tab
Selected
">-->
<!--<ion-tab-button tab="waterchannel" class="tab
Btn ion-segment-button" [routerLink]="waterchannelLink
">-->
<!--<ion-label>水槽</ion-label>-->
<!--<ion-label>水槽</ion-label>-->
<!--</ion-tab-button>-->
<!--</ion-tab-button>-->
<!--</ion-tab-bar>-->
<!--</ion-tab-bar>-->
<!--</ion-tabs>-->
<!--</ion-tabs>-->
<!--<ion-router-outlet></ion-router-outlet>-->
<ion-segment
mode=
"ios"
scrollable
style=
"position: sticky;"
color=
"secondary"
[
value
]="
selectedTab
"
(
ionChange
)="
segmentChanged
($
event
)"
>
<ion-segment-button
mode=
"ios"
style=
"border-radius: 0px 5px 0px 0px;"
value=
"fan"
s
>
<ion-label
style=
"font-size:10px"
>
风机
</ion-label>
</ion-segment-button>
<ion-segment-button
mode=
"ios"
style=
"border-radius: 0px 5px 0px 0px;"
value=
"shower"
>
<ion-label
style=
"font-size:10px"
>
喷淋
</ion-label>
</ion-segment-button>
<ion-segment-button
mode=
"ios"
style=
"border-radius: 0px 5px 0px 0px;"
value=
"light"
>
<ion-label
style=
"font-size:10px"
>
照明
</ion-label>
</ion-segment-button>
<ion-segment-button
mode=
"ios"
style=
"border-radius: 0px 5px 0px 0px;"
value=
"water"
>
<ion-label
style=
"font-size:10px"
>
水槽
</ion-label>
</ion-segment-button>
</ion-segment>
<div
*
ngIf=
"selectedTab === 'fan'"
>
<v-env-fan></v-env-fan>
</div>
<div
*
ngIf=
"selectedTab === 'shower'"
>
<v-env-shower></v-env-shower>
</div>
<div
*
ngIf=
"selectedTab === 'light'"
>
<v-env-light></v-env-light>
</div><div
*
ngIf=
"selectedTab === 'water'"
>
<v-env-waterchannel></v-env-waterchannel>
</div>
</ion-content>
</ion-content>
src/app/envCtrl/env-detail/env-detail.page.ts
View file @
4fa13901
...
@@ -29,6 +29,8 @@ export class EnvDetailPage implements OnInit {
...
@@ -29,6 +29,8 @@ export class EnvDetailPage implements OnInit {
});
});
}
}
selectedTab
=
''
;
item
:
any
=
{
item
:
any
=
{
factoryNo
:
''
,
factoryNo
:
''
,
factoryName
:
''
,
factoryName
:
''
,
...
@@ -117,6 +119,8 @@ export class EnvDetailPage implements OnInit {
...
@@ -117,6 +119,8 @@ export class EnvDetailPage implements OnInit {
this
.
getData
(
0
);
this
.
getData
(
0
);
}
}
});
});
this
.
selectedTab
=
'fan'
;
// this.showerLink = '/shower?fieldRegionNo=' + this.fieldRegionNo + '&operationModel=' + this.item.operationModel + '&online=' + this.item.online;
}
}
getData
(
time
)
{
getData
(
time
)
{
...
@@ -312,4 +316,23 @@ export class EnvDetailPage implements OnInit {
...
@@ -312,4 +316,23 @@ export class EnvDetailPage implements OnInit {
this
.
inHouseDisabled
=
false
;
this
.
inHouseDisabled
=
false
;
}
}
}
}
segmentChanged
(
e
)
{
const
tab
=
e
.
target
.
value
;
this
.
selectedTab
=
tab
;
let
query
=
'?fieldRegionNo='
+
this
.
fieldRegionNo
+
'&operationModel='
+
this
.
item
.
operationModel
+
'&online='
+
this
.
item
.
online
;
if
(
tab
===
'fan'
)
{
query
=
'/env-detail/fan'
+
query
;
}
else
if
(
tab
===
'light'
)
{
query
=
'/env-detail/light'
+
query
;
}
else
if
(
tab
===
'shower'
)
{
query
=
'/env-detail/shower'
+
query
;
}
else
if
(
tab
===
'water'
)
{
query
=
'/env-detail/water'
+
query
;
}
else
{
query
=
'/env-detail/fan'
+
query
;
}
// this.nav.navigateForward(query);
}
}
}
src/app/envCtrl/env-fan/env-fan.page.html
View file @
4fa13901
<ion-header
style=
"background-color: #F3F4F4;"
>
<div
class=
"env-detail-content"
>
</ion-header>
<ion-content
color=
"light"
style=
"height: 100%;"
>
<div
class=
"env-detail-content"
>
<h1
class=
"main-title-detail"
>
模式状态
</h1>
<h1
class=
"main-title-detail"
>
模式状态
</h1>
<ion-item
lines=
"none"
style=
"width: 98%;"
class=
"item-height"
>
<ion-item
lines=
"none"
style=
"width: 98%;"
class=
"item-height"
>
<ion-grid>
<ion-grid>
...
@@ -71,5 +66,5 @@
...
@@ -71,5 +66,5 @@
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</div>
</div>
</div>
</div>
</ion-content>
src/app/envCtrl/env-light/env-light.page.html
View file @
4fa13901
<ion-header
style=
"background-color: #F3F4F4;"
>
</ion-header>
<div
class=
"env-detail-content"
>
<ion-content
color=
"light"
style=
"height: 100%;"
>
<div
class=
"env-detail-content"
>
<h1
class=
"main-title-detail"
>
模式状态
</h1>
<h1
class=
"main-title-detail"
>
模式状态
</h1>
<ion-item
lines=
"none"
style=
"width: 98%;"
class=
"item-height"
>
<ion-item
lines=
"none"
style=
"width: 98%;"
class=
"item-height"
>
<ion-grid>
<ion-grid>
...
@@ -87,6 +83,5 @@
...
@@ -87,6 +83,5 @@
</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>
src/app/envCtrl/env-shower/env-shower.page.html
View file @
4fa13901
<ion-header
style=
"background-color: #F3F4F4;"
>
<div
class=
"env-detail-content"
>
</ion-header>
<ion-content
color=
"light"
style=
"height: 100%;"
>
<div
class=
"env-detail-content"
>
<h1
class=
"main-title-detail"
>
模式状态
</h1>
<h1
class=
"main-title-detail"
>
模式状态
</h1>
<ion-item
lines=
"none"
style=
"width: 98%;"
class=
"item-height"
>
<ion-item
lines=
"none"
style=
"width: 98%;"
class=
"item-height"
>
<ion-grid>
<ion-grid>
...
@@ -111,6 +106,5 @@
...
@@ -111,6 +106,5 @@
</ion-card-content>
</ion-card-content>
</ion-card>
</ion-card>
</div>
</div>
</div>
</div>
</ion-content>
src/app/service/mqtt.ts
View file @
4fa13901
...
@@ -14,7 +14,7 @@ export class Mqtt {
...
@@ -14,7 +14,7 @@ export class Mqtt {
topic
;
topic
;
msg
;
msg
;
private
options
=
{
private
options
=
{
keepalive
:
10
,
keepalive
:
10
0
,
clientId
:
'mqttjs_'
+
Math
.
random
().
toString
(
16
).
substr
(
2
,
8
),
clientId
:
'mqttjs_'
+
Math
.
random
().
toString
(
16
).
substr
(
2
,
8
),
protocolId
:
'MQTT'
,
protocolId
:
'MQTT'
,
protocolVersion
:
4
,
protocolVersion
:
4
,
...
...
src/environments/environment.prod.ts
View file @
4fa13901
...
@@ -5,4 +5,8 @@ export const environment = {
...
@@ -5,4 +5,8 @@ export const environment = {
url
:
'http://pasture.witium.com.cn/api/v2'
,
url
:
'http://pasture.witium.com.cn/api/v2'
,
mqttUrl
:
'211.161.200.169:48083'
,
mqttUrl
:
'211.161.200.169:48083'
,
// url: 'http://pasture.witium.com/api', // 粪污生产环境
// mqttUrl: '120.27.235.39:8083', // 粪污生产环境
};
};
src/environments/environment.ts
View file @
4fa13901
...
@@ -3,12 +3,9 @@
...
@@ -3,12 +3,9 @@
// The list of file replacements can be found in `angular.json`.
// The list of file replacements can be found in `angular.json`.
export
const
environment
=
{
export
const
environment
=
{
url
:
'http://pasture.witium.com.cn/api/v2'
,
url
:
'http://172.16.1.51:8096'
,
// zz 52
// url: 'http://172.16.1.52:8096', // zz 52
// url: 'http://pasture.witium.com.cn/api/v2', // 牛舍测试环境
mqttUrl
:
'211.161.200.169:48083'
,
mqttUrl
:
'211.161.200.169:48083'
,
// mqttUrl: '172.16.1.24',
production
:
true
,
production
:
true
,
};
};
...
...
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