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
2b78f959
Commit
2b78f959
authored
Nov 07, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微调
parent
b93536c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
env-alarm.page.html
src/app/envCtrl/env-alarm/env-alarm.page.html
+2
-2
env-alarm.page.ts
src/app/envCtrl/env-alarm/env-alarm.page.ts
+13
-0
No files found.
src/app/envCtrl/env-alarm/env-alarm.page.html
View file @
2b78f959
...
...
@@ -13,9 +13,9 @@
<i
class=
"vo v-fangzi"
></i>
<span
style=
"margin-left:10px"
>
{{item.fieldRegionName}}
</span>
<span
class=
"alarmNum"
>
{{item.total}}
</span>
<span
style=
"float:right; padding-right:
20
px;"
>
<span
style=
"float:right; padding-right:
5
px;"
>
<!--<ion-popover-controller></ion-popover-controller>-->
<a
(
click
)="
presentPopover
(
item
)"
>
近一年
</a>
<a
(
click
)="
presentPopover
(
item
)"
id=
"intervalValue"
>
近一年
</a>
</span>
</div>
</ion-card-title>
...
...
src/app/envCtrl/env-alarm/env-alarm.page.ts
View file @
2b78f959
...
...
@@ -165,10 +165,23 @@ export class EnvAlarmPage implements OnInit {
if
(
this
.
popoverElement
)
{
this
.
popoverElement
.
dismiss
().
then
(()
=>
{
this
.
popoverElement
=
null
;
});
}
this
.
displayInterval
(
interval
);
}
getStartTime
(
interval
)
{
const
time
=
new
Date
().
getTime
()
-
(
1000
*
3600
*
24
*
interval
);
return
time
;
}
displayInterval
(
interval
)
{
let
displayValue
=
''
;
switch
(
interval
)
{
case
12
:
displayValue
=
'近一年'
;
break
;
case
6
:
displayValue
=
'近六个月'
;
break
;
case
3
:
displayValue
=
'近三个月'
;
break
;
case
1
:
displayValue
=
'近一个月'
;
break
;
default
:
displayValue
=
'近一年'
;
break
;
}
document
.
getElementById
(
'intervalValue'
).
innerText
=
displayValue
;
}
}
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