Newer
Older
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
import {DutyApplyHandlePage} from "../duty-apply-handle/duty-apply-handle";
import {DutyChangeDetailPage} from "../duty-change-detail/duty-change-detail";
selector: 'page-change-apply-list',
templateUrl: 'change-apply-list.html',
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidEnter() {
const len = this.navCtrl.length() - 2 - 1;
this.navCtrl.remove(2, len);
this.getList();
}
getList() {
//0 未处理 1 已处理
const data = {
type: 0
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/applyListOfType', data)
.subscribe((res) => {
this.noList = res.json();
}
);
const data1 = {
type: 1
};
this.appService.ObserverHttpGetOption('/wisdomgroup/changeApply/app/applyListOfType', data1)
.subscribe((res) => {
this.doneList = res.json();
}
);
goApplyDetail(item) {
this.navCtrl.push('DutyApplyHandlePage', {'item': item});
goToDetail(item) {
this.navCtrl.push('DutyChangeDetailPage', {'item': item});