Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { Response } from '@angular/http';
import { Storage } from '@ionic/storage';
import { OutGoingReportEditPage } from '../outGoingReportEdit/outGoingReportEdit';
import {AppService} from "../../../../service/http.service";
@IonicPage()
@Component({
selector: 'page-outGoingReport',
templateUrl: 'outGoingReport.html'
})
export class OutGoingReportPage {
PremanagerList: Array<String> = [];
type: number;
constructor(
public navCtrl: NavController,
public navParams: NavParams,
public appService: AppService,
public storage: Storage
) {
this.type = this.navParams.get("type");
}
//刷新
doRefresh(refresher) {
setTimeout(() => {
if (this.type == 1) {
this.initPremanagerList();
} else if (this.type == 2) {
this.initPremanagerListAboutNot();
}
refresher.complete();
}, 2000);
}
//报备
goReport(item) {
this.storage.remove("temp_userpre");
this.storage.remove("managerId");
this.storage.remove("city");
this.storage.remove("cityList");
this.storage.set('premanager', item);
this.navCtrl.push('OutGoingReportEditPage');
}
//修改报备
// editReport(item){
// this.navCtrl.push('OutGoingReportEditPage');
// }
ionViewDidLoad() {
if (this.type == 1) {
this.initPremanagerList();
this.addRecodings();
} else if (this.type == 2) {
this.initPremanagerListAboutNot();
}
}
//初始化列表,全部报备
initPremanagerList(): void {
this.appService.ObserverHttpGet("/wisdomgroup/modules/premanager/findNeedPremanager", null)
.subscribe((res: Response) => {
let data = res.json();
this.PremanagerList = data;
}, error => {
}
);
}
//初始化列表,尚未报备
initPremanagerListAboutNot(): void {
this.appService.ObserverHttpGet("/wisdomgroup/modules/premanager/findNeedPremanagerAboutNot", null)
.subscribe((res: Response) => {
let data = res.json();
this.PremanagerList = data;
}, error => {
}
);
}
//跳转到报备查看详情页面
goDetail(report){
this.navCtrl.push("OutGoingReportViewPage",{premanager:report});
}
goBack(){
this.navCtrl.popToRoot();
}
//增加阅读记录
addRecodings(){
this.appService.ObserverHttpGet("/wisdomgroup/modules/premanager/addRecodings", null)
.subscribe((res: Response) => {
}, error => {
}
);
}
}