Newer
Older
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../service/http.service";
@IonicPage()
@Component({
})
export class MyDutyPage {
changeType = 1;
nowDuty = [];
historyDuty = [];
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.getDuty();
}
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/app/getMySchedule', data)
.subscribe((res) => {
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/app/getMySchedule', data1)
.subscribe((res) => {
dutyApply(item) {
let nowTime = new Date().getTime();
if (nowTime > item.dutyDate) {
this.appService.popToastView('该条值班已过期', 'middle', 1500);
return false;
}
dutyDetail(item) {
this.navCtrl.push('DutyDetailPage', {
"id": item.applyId,
'time': item.dutyDate