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
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure";
import { Storage } from "@ionic/storage";
import { DatePipe } from "@angular/common";
import {AppService} from "../../../../service/http.service";
@IonicPage()
@Component({
selector: 'page-select-relay-person',
templateUrl: 'select-relay-person.html',
})
export class SelectRelayPersonPage {
gender; //性别 1 男 0女
scheduleId;
date;
list;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService,public storage: Storage,private datepipe: DatePipe) {
}
ionViewDidLoad() {
this.scheduleId = this.navParams.get('scheduleId');
this.date = this.datepipe.transform( this.navParams.get('date'),'yyyy/MM/dd');
this.storage.get("user").then((res)=>{
this.gender = res.userDetail.user.gender;
this.getPerson();
});
}
getPerson(){
const data = {
date:this.date,
gender:this.gender,
id:''
};
this.appService.ObserverHttpGetOption('/wisdomgroup/dutyPerson/getPersonListOutOfMine',data)
.subscribe((res)=>{
this.list = res.json();
})
}
//替班
selectPerson(item){
this.navCtrl.push('ChangeApplySurePage',{
'item':item,
'applyId':this.navParams.get('applyId'),
'personId':item.id,
'nowId':this.scheduleId
})
}
change(type){
// this.changeType = type;
this.getPerson();
}
}