Newer
Older
import { Component } from '@angular/core';
import {IonicPage, NavController, NavParams, ViewController} from 'ionic-angular';
import {Response} from "@angular/http";
import {AppService} from "../../../../../service/http.service";
@Component({
selector: 'page-person',
templateUrl: 'person.html',
})
export class PersonPage {
group; //组织id
batchList = [];
constructor(public navCtrl: NavController, public navParams: NavParams,
public viewCtrl: ViewController, public appService: AppService) {
}
ionViewDidEnter() {
this.appService.ObserverHttpGetData("/wisdomgroup/sysmanagement/usergroup/search.ajax",null)
.subscribe((res: Response) => {
let data = res.json();
this.batchList = data.list;
}, (error) => {
alert('error:' +error);
this.appService.alert(error.json());
}
);
}
dismiss() {
this.viewCtrl.dismiss(this.batchList[this.group]);
}
}