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
b251c0b2
Commit
b251c0b2
authored
Jun 17, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alarm页面修改
parent
8a34da97
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
33 deletions
+23
-33
alarm.page.html
src/app/alarm/alarm.page.html
+3
-11
alarm.page.scss
src/app/alarm/alarm.page.scss
+4
-2
alarm.page.ts
src/app/alarm/alarm.page.ts
+16
-20
No files found.
src/app/alarm/alarm.page.html
View file @
b251c0b2
...
@@ -4,17 +4,9 @@
...
@@ -4,17 +4,9 @@
style=
"background-color: #28c9bd"
style=
"background-color: #28c9bd"
>
报警信息
</Navbar>
>
报警信息
</Navbar>
<!--<SegmentedControl class = "nav-title" [values]="['今日报警信息', '近一周报警信息']"-->
<SegmentedControl
class=
"nav-title"
[
values
]="['今日报警信息',
'近一周报警信息']"
<!--(onChange)="choose($event)"></SegmentedControl>-->
(
onChange
)="
choose
($
event
)"
></SegmentedControl>
<ion-segment
class =
"nav-title"
(
ionChange
)="
choose
($
event
)"
color=
"secondary"
>
<ion-segment-button
value=
"day"
>
<ion-label>
今日报警信息
</ion-label>
</ion-segment-button>
<ion-segment-button
value=
"week"
>
<ion-label>
近一周报警信息
</ion-label>
</ion-segment-button>
</ion-segment>
<div
class=
"alarmCon"
>
<div
class=
"alarmCon"
>
<div
class=
"alarmItemBefore"
*
ngIf=
"itemExit;else other_content"
>
<div
class=
"alarmItemBefore"
*
ngIf=
"itemExit;else other_content"
>
...
...
src/app/alarm/alarm.page.scss
View file @
b251c0b2
...
@@ -20,8 +20,10 @@
...
@@ -20,8 +20,10 @@
}
}
.nav-title
{
.nav-title
{
height
:
40px
;
height
:
30px
;
padding
:
5px
0
;
border-bottom
:
1px
solid
#ccc
;
border-bottom
:
1px
solid
#ccc
;
border-radius
:
0
;
}
}
.empty-content
{
.empty-content
{
...
@@ -34,4 +36,4 @@
...
@@ -34,4 +36,4 @@
margin-top
:
2em
;
margin-top
:
2em
;
font-size
:
32px
;
font-size
:
32px
;
}
}
}
}
\ No newline at end of file
src/app/alarm/alarm.page.ts
View file @
b251c0b2
...
@@ -13,16 +13,11 @@ export class AlarmPage implements OnInit {
...
@@ -13,16 +13,11 @@ export class AlarmPage implements OnInit {
constructor
(
private
tf
:
Transfer
,
private
api
:
Api
,
private
load
:
Load
)
{
constructor
(
private
tf
:
Transfer
,
private
api
:
Api
,
private
load
:
Load
)
{
}
}
req
=
{
startTime
:
0
,
endTime
:
0
};
req
=
{
startTime
:
0
,
endTime
:
0
};
itemExit
=
false
;
itemExit
=
false
;
data
=
[
data
=
[];
{
time
:
1506743279334
,
con
:
'11111111111111111111111'
,
name
:
'池子名字'
},
{
time
:
1506743273434
,
con
:
'22222222222222222222222'
,
name
:
'池子名字'
},
{
time
:
1506743212334
,
con
:
'33333333333333333333333'
,
name
:
'池子名字'
},
{
time
:
1506743314334
,
con
:
'44444444444444444444444'
,
name
:
'池子名字'
}
];
ngOnInit
()
{
ngOnInit
()
{
this
.
getData
();
this
.
getData
();
...
@@ -30,10 +25,7 @@ export class AlarmPage implements OnInit {
...
@@ -30,10 +25,7 @@ export class AlarmPage implements OnInit {
getData
()
{
getData
()
{
this
.
load
.
toLoad
(
'加载中...'
,
false
);
this
.
load
.
toLoad
(
'加载中...'
,
false
);
setTimeout
(()
=>
{
this
.
getAlarmOneDay
();
this
.
getAlarmOneDay
();
this
.
load
.
offLoad
();
},
2000
);
}
}
getAlarmOneWeek
()
{
getAlarmOneWeek
()
{
...
@@ -53,10 +45,11 @@ export class AlarmPage implements OnInit {
...
@@ -53,10 +45,11 @@ export class AlarmPage implements OnInit {
this
.
itemExit
=
false
;
this
.
itemExit
=
false
;
}
}
data
.
map
((
value
,
index
)
=>
{
data
.
map
((
value
,
index
)
=>
{
const
it
=
{
time
:
1506743279334
,
con
:
'11111111111111111111111'
,
name
:
'池子名字'
};
const
it
=
{
it
.
con
=
value
.
description
;
con
:
value
.
description
,
it
.
time
=
value
.
alarmTime
;
time
:
value
.
alarmTime
,
it
.
name
=
value
.
fieldRegionName
;
name
:
value
.
fieldRegionName
,
};
this
.
data
.
push
(
it
);
this
.
data
.
push
(
it
);
});
});
...
@@ -84,20 +77,23 @@ export class AlarmPage implements OnInit {
...
@@ -84,20 +77,23 @@ export class AlarmPage implements OnInit {
}
}
data
.
map
((
value
,
index
)
=>
{
data
.
map
((
value
,
index
)
=>
{
const
it
=
{
time
:
1506743279334
,
con
:
'11111111111111111111111'
,
name
:
'池子名字'
};
const
it
=
{
it
.
con
=
value
.
description
;
con
:
value
.
description
,
it
.
time
=
value
.
alarmTime
;
time
:
value
.
alarmTime
,
it
.
name
=
value
.
fieldRegionName
;
name
:
value
.
fieldRegionName
,
};
this
.
data
.
push
(
it
);
this
.
data
.
push
(
it
);
});
});
}
else
{
}
else
{
this
.
itemExit
=
false
;
this
.
itemExit
=
false
;
}
}
this
.
load
.
offLoad
();
}]);
}]);
}
}
choose
(
e
)
{
choose
(
e
)
{
if
(
e
.
detail
.
value
===
'day'
)
{
if
(
e
.
selectedIndex
===
0
)
{
this
.
getAlarmOneDay
();
this
.
getAlarmOneDay
();
}
else
{
}
else
{
this
.
getAlarmOneWeek
();
this
.
getAlarmOneWeek
();
...
...
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