<ion-header>
	<ion-navbar>
		<ion-title text-center>处室人员报备情况</ion-title>
		<ion-buttons end>
			<button ion-button (click)="search()" class="color-fff margin-right-10">
				<ion-icon ios="ios-search" md="md-search"></ion-icon>
			</button>
		</ion-buttons>
	</ion-navbar>
</ion-header>
<ion-content class="content">
	<div class="activity-title">
		{{title}}
	</div>

	<div class="content-box">
		<div class="content-box-item {{type == 1?'bgc-34b4fc':''}}" (click)="change(1)">
			<span class="item-title">未报备</span>
			<span class="item-count">{{itemsOfNotReport.length}}人</span>
		</div>

		<div class="content-box-item {{type == 2?'bgc-34b4fc':''}}" (click)="change(2)">
			<span class="item-title">离沪</span>
			<span class="item-count">{{itemsOfLeave.length}}人</span>
		</div>
		<div class="content-box-item {{type == 3?'bgc-34b4fc':''}}" (click)="change(3)">
			<span class="item-title">不离沪</span>
			<span class="item-count">{{itemsOfNotLeave.length}}人</span>
		</div>
	</div>

	<ion-list>
		<ion-item *ngFor="let item of items">
			<div class="group">
				<div class="inner-group">
					<img src="./assets/imgs/head.png" class="person-photo">
					<div class="item-box">
						<p class="person-name">{{item.name}}
							<ion-icon class="person-sex-male" *ngIf="item.gender === 1" name="male"></ion-icon>
							<ion-icon class="person-sex-female" *ngIf="item.gender === 0" name="female"></ion-icon>
						</p>
						<p *ngIf="type == 2" class="person-batch">离沪时间：{{item.leaveDate}}-{{item.backDate}}</p>
						<p *ngIf="type == 2" class="person-batch">离沪地点：{{item.address}}</p>
					</div>
				</div>
				<div>
					<p>
						<button disabled ion-button round class="btn color1" *ngIf="type == 1">未报备</button>
						<button disabled ion-button round class="btn color2" *ngIf="type == 2">离沪</button>
						<button disabled ion-button round class="btn color3" *ngIf="type == 3">不离沪</button>
					</p>
					<p *ngIf="type == 1" (click)="goReport(item)" style="color:#24bafc;margin-top: 6px">协助报备</p>
				</div>

			</div>
		</ion-item>
	</ion-list>
</ion-content>