Newer
Older
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams} from 'ionic-angular';
import { Response } from '@angular/http';
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
@IonicPage()
@Component({
selector: 'page-outGoingReportView',
templateUrl: 'outGoingReportView.html',
})
export class OutGoingReportViewPage {
//报备
premanager;
dategap:string = "";
//个人报备详情
userpre;
picture: string;
//离沪地点显示
locations : string;
//离沪说明
detailsdesc : string;
//详细说明展示
isCover: boolean = false;
//具体介绍
hidden() {
this.isCover = false;
}
show() {
this.isCover = true;
}
isleaveFlag = false;
//是否 截止未报备
isNotSignAndHasOverTime :boolean = false;
constructor(
public navCtrl: NavController,
public navParams: NavParams,
public appService: AppService,
public storage: Storage
) {
this.premanager = this.navParams.get("premanager");
//加载报备的图片
this.picture = AppGlobal.picture + this.premanager["uploadPic"];
//是否未报备已截止
if(!this.premanager["reported"] && this.premanager["isOverTimeFlag"]){
this.isNotSignAndHasOverTime = true;
}
//this.appService.alert(this.isNotSignAndHasOverTime);
//编辑初始化:查询
if(this.premanager!=null ){
if(this.premanager["reported"]){
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre",{premanagerId:this.premanager.id.toString()})
.subscribe((res: Response) => {
let resultback = res.json();
this.locations = "";
for (let index = 0; index < resultback.areaList.length; index++) {
const element = resultback.areaList[index];
this.locations += element["areaName"]+",";
}
this.locations = this.locations.substring(0,this.locations.lastIndexOf(","));
this.dategap = resultback.formshTime+"~"+resultback.comeshTime;
this.detailsdesc = resultback.userpreDesc;
if(resultback.isorFromsh == 1){
this.isleaveFlag = true;
}
}, error => {
this.appService.alert('网络异常!');
}
);
}
}
}
ionViewDidLoad() {
console.log('ionViewDidLoad OutGoingReportViewPage');
}
}