Commit ba7776a0 authored by wangqinghua's avatar wangqinghua

color

parent 880c9ac9
<!--
Generated template for the ActivitySearchPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>activitySearch</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ActivitySearchPage } from './activity-search';
@NgModule({
declarations: [
ActivitySearchPage,
],
imports: [
IonicPageModule.forChild(ActivitySearchPage),
],
})
export class ActivitySearchPageModule {}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the ActivitySearchPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-activity-search',
templateUrl: 'activity-search.html',
})
export class ActivitySearchPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad ActivitySearchPage');
}
}
<ion-header>
<ion-navbar>
<ion-title class="padding-0" 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">
......
......@@ -37,30 +37,6 @@ export class SearchPage {
}
searchUser() {
console.log("searchValue:" + this.searchValue);
// let nameval = encodeURIComponent(this.searchValue) ;
// this.appService.ObserverHttpPost("/wisdomgroup/app/getUserByName",{"name":nameval,"orgId":this.orgId})
// .subscribe((res: Response) => {
// let data = res.json();
// this.contactPersons = data;
// if(this.orgId !=null && this.orgId !=''){
// //同组织部门下
// this.contactPersons.forEach(element => {
// element["orgName"] = this.orgName;
// element["hasgeneralpersonsflag"] = false;
// });
// }else{
// this.contactPersons.forEach(element => {
// this.getOrgName(element["id"],result=>{
// element["orgName"] = result["orgName"];
// element["hasgeneralpersonsflag"] = false;
// });
// });
// }
// }, error => {
// this.appService.alert('网络异常!');
// }
// );
const data = {
name: this.searchValue,
pageNumber: 1,
......
<ion-header>
<ion-navbar>
<ion-navbar>
<div class="search-header">
<ion-input type="text" placeholder="按姓名搜索" [(ngModel)]="searchValue" (ionChange)="searchUser()"></ion-input>
<ion-icon name="close" class="clear" (click)="clearValue()"></ion-icon>
</div>
</ion-navbar>
</ion-navbar>
</ion-header>
<ion-content>
<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 ion-button round class="btn color1" *ngIf="item.type == 2">未报备</button>
<button ion-button round class="btn color2" *ngIf="item.type == 1">离沪</button>
<button ion-button round class="btn color3" *ngIf="item.type == 0">不离沪</button>
</p>
<p *ngIf="item.type == 2" (click)="goReport(item)" style="color:#24bafc;margin-top: 6px">协助报备</p>
</div>
</div>
</ion-item>
</ion-list>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ReportSearchPage } from './report-search';
@NgModule({
declarations: [
ReportSearchPage,
],
imports: [
IonicPageModule.forChild(ReportSearchPage),
],
})
export class ReportSearchPageModule {}
page-report-search {
ion-input, ion-textarea{
color: #fff;
}
.header-ios .toolbar-ios:last-child .toolbar-background-ios{
border: none;
}
.searchToolBar {
display: flex;
flex-direction: row;
align-items: center;
justify-content: left;
box-sizing: border-box;
}
.clear{
background-color: #cccccc;
width: 15px;
height: 15px;
border-radius: 15px;
text-align: center;
margin-right: 10px;
}
.search-header{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 100%;
margin-left: 5px;
}
.activity-title {
background-color: #f5f5f5;
font-size: 12px;
color: #b2b2b2;
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
}
.content-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
border-bottom: 1px solid #cccccc;
}
.content-box-item {
width: 105px;
padding: 12px;
margin: 8px 7px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 14px;
border-radius: 2px;
color: white;
border: 1px solid #34b4fc;
}
.content-box-item.bgc-34b4fc .item-title,
.content-box-item.bgc-34b4fc .item-count{
color: white;
}
.item-title{
color: #34b4fc;
}
.item-count{
color: #999999;
}
.i1 {
background-color: #70c1df;
}
.i2 {
background-color: #64d262;
}
.i3 {
background-color: #ef8355;
}
.btn {
background-color: white;
border: 1px solid #90da91;
color: #90da91;
margin: 0 0;
font-size: 6px;
}
.color1 {
border-color: #93cfe5;
color: #93cfe5;
border-radius: 3px;
}
.color2 {
border-color: #90db90;
color: #90db90;
border-radius: 3px;
}
.color3 {
border-color: #f3a778;
color: #f3a778;
border-radius: 3px;
}
.group {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
.inner-group {
display: flex;
flex-direction: row;
align-items: center;
justify-content: left;
box-sizing: border-box;
}
.person-photo {
width: 48px;
height: 48px;
margin-right: 10px;
}
.item-box {
display: inline-block;
}
.person-name {
font-size: 18px;
color: black;
}
.person-sex-male {
font-size: 14px;
color: #6bc7fd;
font-weight: bolder;
margin-left: 5px;
}
.person-sex-female {
font-size: 14px;
color: #f0a7ea;
font-weight: bolder;
margin-left: 5px;
}
.person-batch {
font-size: 14px;
color: #666666;
}
.back-btn {
width: 30px;
height: 30px;
}
.bgc-34b4fc{
background-color: #34b4fc;
}
.text-input::-webkit-input-placeholder{
color:#fff;
}
}
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
import {Storage} from "@ionic/storage";
@IonicPage()
@Component({
selector: 'page-report-search',
templateUrl: 'report-search.html',
})
export class ReportSearchPage {
premanager;
searchValue = '';
items;
id;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService, public storage: Storage) {
}
ionViewDidEnter() {
this.premanager = this.navParams.get('premanager');
this.id = this.navParams.get('id');
this.searchUser();
}
clearValue() {
this.searchValue = "";
}
searchUser() {
const data = {
name: this.searchValue,
id: this.id
};
this.appService.ObserverHttpPostOption('/wisdomgroup/modules/premanager/getUserAboutPre', data).subscribe((res) => {
this.items = res.json();
})
}
//协助报备
goReport(item) {
this.storage.remove("temp_userpre");
this.storage.remove("managerId");
this.storage.remove("city");
this.storage.remove("cityList");
this.storage.remove("person");
this.storage.set('premanager', this.premanager);
this.storage.set('person', item);
this.navCtrl.push('OutGoingReportEditPage', {premanager: this.premanager});
}
}
<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">
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController, ToastController } from 'ionic-angular';
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams, AlertController, ToastController} from 'ionic-angular';
import { Http, Response} from '@angular/http';
import { Storage } from '@ionic/storage';
import { AppService } from '../../../service/appHttpService';
import {Http, Response} from '@angular/http';
import {Storage} from '@ionic/storage';
import {AppService} from '../../../service/appHttpService';
import {ReportSearchPage} from "../report-search/report-search";
@IonicPage()
@Component({
......@@ -24,20 +25,19 @@ export class ReportDetailPage {
constructor(public navCtrl: NavController,
public navParams: NavParams,
public alertCtrl: AlertController,
public http: Http,public storage: Storage,
public http: Http, public storage: Storage,
public appService: AppService, public toast: ToastController) {
}
ionViewDidLoad(){
ionViewDidLoad() {
this.premanager = this.navParams.get('item');
this.title = this.navParams.get("title");
this.id = this.navParams.get("id");
// this.init();
}
ionViewDidEnter(){
ionViewDidEnter() {
this.getUserAboutLeave(this.id);
this.getUserAboutNotLeave(this.id);
this.getUserAboutNotReport(this.id);
......@@ -45,7 +45,7 @@ export class ReportDetailPage {
//获取处室下所有未报备人员
getUserAboutNotReport(id) {
this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getUserAboutNotReport", { id: id })
this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getUserAboutNotReport", {id: id})
.subscribe((res: Response) => {
let data = res.json();
this.itemsOfNotReport = data;
......@@ -59,7 +59,7 @@ export class ReportDetailPage {
//获取处室下所有离沪报备人员
getUserAboutLeave(id) {
this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getUserAboutLeave", { id: id })
this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getUserAboutLeave", {id: id})
.subscribe((res: Response) => {
let data = res.json();
console.log(data);
......@@ -72,7 +72,7 @@ export class ReportDetailPage {
//获取处室下所有不离沪报备人员
getUserAboutNotLeave(id) {
this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getUserAboutNotLeave", { id: id })
this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getUserAboutNotLeave", {id: id})
.subscribe((res: Response) => {
let data = res.json();
console.log(data);
......@@ -86,14 +86,14 @@ export class ReportDetailPage {
//切换
change(type) {
if (type == 1) {
this.type=type;
this.type = type;
this.items = this.itemsOfNotReport;
} else if (type == 2) {
this.type=type;
this.type = type;
this.items = this.itemsOfLeave;
} else if (type == 3) {
this.type=type;
this.items=this.itemsOfNotLeave;
this.type = type;
this.items = this.itemsOfNotLeave;
}
}
......@@ -108,18 +108,11 @@ export class ReportDetailPage {
this.storage.set('premanager', this.premanager);
this.storage.set('person', item);
this.navCtrl.push('OutGoingReportEditPage', { premanager: this.premanager });
this.navCtrl.push('OutGoingReportEditPage', {premanager: this.premanager});
}
//查询人员
init(){
const data = {
name:'刘',
id:this.id
};
this.appService.ObserverHttpPostOption('/wisdomgroup/modules/premanager/getUserAboutPre',data).
subscribe((res)=>{
})
search(){
this.navCtrl.push('ReportSearchPage',{id:this.id,'premanager':this.premanager});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment