Newer
Older
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {Response} from "@angular/http";
import {AppService} from "../../../service/http.service";
import {ListPage} from "../surveyManage/list/list";
import {ChangeApplyListPage} from "../manageDuty/change-apply-list/change-apply-list";
import {MySurveyPage} from "../mySurvey/my-survey/my-survey";
import {SurveryPage} from "../mySurvey/survery/survery";
hasNew = {
activity: 0,
notice: 0,
premanager: 0,
message: 0,
test: 0,
};
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService,public tabsSer:TabsService) {
}
ionViewDidLoad() {
this.getRole();
}
/**
* 获取是否有新的信息
*/
getHasNew() {
//获取是否有新活动
this.tabsSer.hasNewActivity().subscribe(
(res) => {
this.hasNew.activity = res;
}
)
//获取是否有新通知
this.tabsSer.hasNewNotice().subscribe(
(res) => {
this.hasNew.notice = res;
}
)
//获取是否有新通知
this.tabsSer.hasNewMessage().subscribe(
(res) => {
this.hasNew.message = res;
}
)
//获取是否有新报备
this.tabsSer.hasNewPremanager().subscribe(
(res) => {
this.hasNew.premanager = res;
}
)
//获取是否有新问卷
this.tabsSer.hasNewTest().subscribe(
(res) => {
this.hasNew.test = res;
}
)
}
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
this.role = res.json();
}, error => {
this.appService.alert('系统错误!');
});
}
}
goAnnouncement() {
this.navCtrl.push("AnnouncementPage");
}
//外出报备跳转
goOutGoingReportAboutAll() {
this.navCtrl.push("OutGoingReportPage", {
type: 1
});
}
//报备跟踪
replayManage() {
this.navCtrl.push('ChangeApplyListPage');
}
//前往
goTo(page) {
this.navCtrl.push(page);