Commit 2b78f959 authored by yating.lin's avatar yating.lin

微调

parent b93536c7
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
<i class="vo v-fangzi"></i> <i class="vo v-fangzi"></i>
<span style="margin-left:10px">{{item.fieldRegionName}}</span> <span style="margin-left:10px">{{item.fieldRegionName}}</span>
<span class="alarmNum">{{item.total}}</span> <span class="alarmNum">{{item.total}}</span>
<span style="float:right; padding-right: 20px;"> <span style="float:right; padding-right: 5px;">
<!--<ion-popover-controller></ion-popover-controller>--> <!--<ion-popover-controller></ion-popover-controller>-->
<a (click)="presentPopover(item)">近一年</a> <a (click)="presentPopover(item)" id="intervalValue">近一年</a>
</span> </span>
</div> </div>
</ion-card-title> </ion-card-title>
......
...@@ -165,10 +165,23 @@ export class EnvAlarmPage implements OnInit { ...@@ -165,10 +165,23 @@ export class EnvAlarmPage implements OnInit {
if (this.popoverElement) { if (this.popoverElement) {
this.popoverElement.dismiss().then(() => { this.popoverElement = null; }); this.popoverElement.dismiss().then(() => { this.popoverElement = null; });
} }
this.displayInterval(interval);
} }
getStartTime(interval) { getStartTime(interval) {
const time = new Date().getTime() - ( 1000 * 3600 * 24 * interval ); const time = new Date().getTime() - ( 1000 * 3600 * 24 * interval );
return time; 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;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment