Commit 1fc3e46d authored by wangqinghua's avatar wangqinghua

color

parent 0aef8abf
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="1.1.9" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="io.ionic.starter" version="1.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>智汇19号</name> <name>智汇19号</name>
<description>An awesome Ionic/Cordova app.</description> <description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author> <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
...@@ -23,7 +23,7 @@ page-add-block { ...@@ -23,7 +23,7 @@ page-add-block {
align-items: center; align-items: center;
justify-content: left; justify-content: left;
box-sizing: border-box; box-sizing: border-box;
padding: 10px 0 10px 15px; padding: 10px 10px 10px 15px;
} }
...@@ -69,7 +69,7 @@ page-add-block { ...@@ -69,7 +69,7 @@ page-add-block {
.input{ .input{
height: 38px; height: 38px;
border: 1px solid #ddd; border: 1px solid #ddd;
width: 80%; width: 100%;
border-radius: 5px; border-radius: 5px;
padding: 1px 5px; padding: 1px 5px;
} }
......
import { Component } from '@angular/core'; import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams, ModalController, App, ToastController} from 'ionic-angular'; import {IonicPage, NavController, NavParams, ModalController, App, ToastController} from 'ionic-angular';
import {SelectBlockPage} from "../select-block/select-block"; import {SelectBlockPage} from "../select-block/select-block";
import {Response} from "@angular/http"; import {Response} from "@angular/http";
import { AppService } from "../../../service/appHttpService"; import {AppService} from "../../../service/appHttpService";
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -12,6 +12,7 @@ import { AppService } from "../../../service/appHttpService"; ...@@ -12,6 +12,7 @@ import { AppService } from "../../../service/appHttpService";
export class AddBlockPage { export class AddBlockPage {
groupName; groupName;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public modalCtrl: ModalController, public appService: AppService, public modalCtrl: ModalController, public appService: AppService,
public toastCtrl: ToastController) { public toastCtrl: ToastController) {
...@@ -20,29 +21,31 @@ export class AddBlockPage { ...@@ -20,29 +21,31 @@ export class AddBlockPage {
ionViewDidLoad() { ionViewDidLoad() {
} }
goSelectmodal(){ goSelectmodal() {
this.navCtrl.push('SelectBlockPage'); this.navCtrl.push('SelectBlockPage');
} }
//创建分组 //创建分组
done(){ done() {
if(!this.groupName){ if (!this.groupName) {
this.appService.popToastView('请填写分组名称','middle',1500); this.appService.popToastView('请填写分组名称', 'middle', 1500);
return;
} }
const data = { const data = {
groupName:this.groupName groupName: this.groupName
}; };
this.appService.ObserverHttpPostData("/wisdomgroup/modules/telpBook/",data) this.appService.ObserverHttpPostData("/wisdomgroup/modules/telpBook/", data)
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
this.appService.popToastView('创建成功!','middle',1500); this.appService.popToastView('创建成功!', 'middle', 1500);
this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
} }
); );
} }
cancel(){ cancel() {
this.navCtrl.pop(); this.navCtrl.pop();
} }
} }
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<ion-item *ngFor="let contactPerson of contactPersons" (click)="contactPersonInfo(contactPerson)"> <ion-item *ngFor="let contactPerson of contactPersons" (click)="contactPersonInfo(contactPerson)">
<div class="contact-box"> <div class="contact-box">
<ng-container *ngIf="contactPersonInfo?.picUrl && contactPersonInfo?.picUrl != ''"> <ng-container *ngIf="contactPerson?.picUrl && contactPerson?.picUrl != ''">
<img src="{{picture+contactPersonInfo.picUrl}}" class="contact-img" (click)="go(item)"> <img src="{{picture+contactPerson.picUrl}}" class="contact-img">
</ng-container> </ng-container>
<ng-container *ngIf="!contactPersonInfo?.picUrl || contactPersonInfo?.picUrl == ''"> <ng-container *ngIf="!contactPerson?.picUrl || contactPerson?.picUrl == ''">
<img src="./assets/imgs/man.png" class="contact-img" *ngIf="contactPerson.gender =='1'||contactPerson.gender==null"> <img src="./assets/imgs/man.png" class="contact-img" *ngIf="contactPerson.gender =='1'||contactPerson.gender==null">
<img src="./assets/imgs/woman.png" class="contact-img" *ngIf="contactPerson.gender =='0'"> <img src="./assets/imgs/woman.png" class="contact-img" *ngIf="contactPerson.gender =='0'">
</ng-container> </ng-container>
......
...@@ -80,6 +80,7 @@ page-search { ...@@ -80,6 +80,7 @@ page-search {
.contact-img{ .contact-img{
width: 4rem; width: 4rem;
height: 4rem; height: 4rem;
border-radius: 2px;
} }
.contact-name{ .contact-name{
......
import { Component} from '@angular/core'; import {Component} from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import {IonicPage, NavController, NavParams} from 'ionic-angular';
import { Response } from '@angular/http'; import {Response} from '@angular/http';
import { AppService } from '../../../service/appHttpService'; import {AppGlobal, AppService} from '../../../service/appHttpService';
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -11,35 +11,33 @@ import { AppService } from '../../../service/appHttpService'; ...@@ -11,35 +11,33 @@ import { AppService } from '../../../service/appHttpService';
export class SearchPage { export class SearchPage {
searchValue:string; searchValue: string;
picture: string = AppGlobal.picture;
contactPersons: Array<string>[]; contactPersons: Array<string>[];
//组织部门id //组织部门id
orgId:string = ''; orgId: string = '';
orgName:string = ''; orgName: string = '';
constructor( constructor(public navCtrl: NavController,
public navCtrl: NavController,
public navParams: NavParams, public navParams: NavParams,
public appService:AppService public appService: AppService) {
) {
if(!typeof(this.navParams.get("orgid")) == undefined){ if (!typeof(this.navParams.get("orgid")) == undefined) {
this.orgId = this.navParams.get("orgid"); this.orgId = this.navParams.get("orgid");
} }
if(!typeof(this.navParams.get("orgName")) == undefined){ if (!typeof(this.navParams.get("orgName")) == undefined) {
this.orgName = this.navParams.get("orgName"); this.orgName = this.navParams.get("orgName");
} }
} }
clearValue(){ clearValue() {
this.searchValue=""; this.searchValue = "";
} }
searchUser(){ searchUser() {
console.log("searchValue:"+this.searchValue); console.log("searchValue:" + this.searchValue);
// let nameval = encodeURIComponent(this.searchValue) ; // let nameval = encodeURIComponent(this.searchValue) ;
// this.appService.ObserverHttpPost("/wisdomgroup/app/getUserByName",{"name":nameval,"orgId":this.orgId}) // this.appService.ObserverHttpPost("/wisdomgroup/app/getUserByName",{"name":nameval,"orgId":this.orgId})
// .subscribe((res: Response) => { // .subscribe((res: Response) => {
...@@ -64,25 +62,25 @@ export class SearchPage { ...@@ -64,25 +62,25 @@ export class SearchPage {
// } // }
// ); // );
const data = { const data = {
name:this.searchValue, name: this.searchValue,
pageNumber:1, pageNumber: 1,
pageSize:100, pageSize: 100,
}; };
this.appService.ObserverHttpNoForm('/wisdomgroup/app/getUserByName',data) this.appService.ObserverHttpNoForm('/wisdomgroup/app/getUserByName', data)
.subscribe((res)=>{ .subscribe((res) => {
this.contactPersons = res.json().list; this.contactPersons = res.json().list;
}) })
} }
//跳转联系人信息页面 //跳转联系人信息页面
contactPersonInfo(contactPerson){ contactPersonInfo(contactPerson) {
this.navCtrl.push("ContractPersoninfoPage",{"id":contactPerson.id}); this.navCtrl.push("ContractPersoninfoPage", {"id": contactPerson.id});
} }
//根据用户id获取部门信息 //根据用户id获取部门信息
getOrgName(id,callback?): any { getOrgName(id, callback?): any {
this.appService.ObserverHttpPost("/wisdomgroup/app/getOrgName",{"userid":id}) this.appService.ObserverHttpPost("/wisdomgroup/app/getOrgName", {"userid": id})
.toPromise() .toPromise()
.then(res => { .then(res => {
var data = res.json(); var data = res.json();
......
<ion-header>
<ion-navbar>
<ion-title>问卷调查</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { SurveryPage } from './survery';
@NgModule({
declarations: [
SurveryPage,
],
imports: [
IonicPageModule.forChild(SurveryPage),
],
})
export class SurveryPageModule {}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-survery',
templateUrl: 'survery.html',
})
export class SurveryPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad SurveryPage');
}
}
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<div class="item3" style="padding-top: 0px;"> <div class="item3" style="padding-top: 0px;">
<div class="item3-2" style="background-color:#f8f8f8;" (click)="gotoNotice()"> <div class="item3-2" style="background-color:#f8f8f8;" (click)="gotoNotice()">
<div class="card3" style="width: 15%;"> <div class="card3" style="width: 15%;">
<span *ngIf="" class="img-tips"></span> <span *ngIf="hasNewNotice == 1" class="img-tips"></span>
<img src="./assets/imgs/home/icon-mail.png" alt=""> <img src="./assets/imgs/home/icon-mail.png" alt="">
</div> </div>
<div class="card3" style="width: 75%;"> <div class="card3" style="width: 75%;">
......
...@@ -51,6 +51,10 @@ page-home { ...@@ -51,6 +51,10 @@ page-home {
} }
.card3-item{ .card3-item{
margin: 3px 0; margin: 3px 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width:100%;
} }
.card{ .card{
height: 100%; height: 100%;
...@@ -114,7 +118,7 @@ page-home { ...@@ -114,7 +118,7 @@ page-home {
box-sizing: border-box; box-sizing: border-box;
padding:3px; padding:3px;
position: relative; position: relative;
font-size: 1.1rem; font-size: 1.2rem;
} }
.img-tips{ .img-tips{
position: absolute; position: absolute;
......
...@@ -139,7 +139,7 @@ export class HomePage { ...@@ -139,7 +139,7 @@ export class HomePage {
} }
//获取权限 //获取权限
getRole(){ getRole() {
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => { this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
this.role = res.json(); this.role = res.json();
}, error => { }, error => {
...@@ -382,9 +382,6 @@ export class HomePage { ...@@ -382,9 +382,6 @@ export class HomePage {
cssClass: 'dayOff2' cssClass: 'dayOff2'
}) })
}); });
}, error => {
this.appService.alert('网络异常!');
});
//3.离沪日期 //3.离沪日期
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/userpre/appPreCal", null) this.appService.ObserverHttpGetOption("/wisdomgroup/modules/userpre/appPreCal", null)
...@@ -401,6 +398,10 @@ export class HomePage { ...@@ -401,6 +398,10 @@ export class HomePage {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
}); });
this.loadEvent(year, month); this.loadEvent(year, month);
}, error => {
this.appService.alert('网络异常!');
});
} }
...@@ -436,16 +437,12 @@ export class HomePage { ...@@ -436,16 +437,12 @@ export class HomePage {
}; };
this.newArr.push(data); this.newArr.push(data);
} }
}, error => {
this.appService.alert('网络异常!');
}
);
//1.获取节假日 //1.获取节假日
this.appService.ObserverHttpGetOption("/wisdomgroup/workCalendar/getFestivalAboutMonth", data) this.appService.ObserverHttpGetOption("/wisdomgroup/workCalendar/getFestivalAboutMonth", data)
.subscribe((res)=>{ .subscribe((res) => {
let data = res.json(); let data = res.json();
data.forEach(event=>{ data.forEach(event => {
const data = { const data = {
date: new Date(event.date), date: new Date(event.date),
disable: true, disable: true,
...@@ -463,6 +460,10 @@ export class HomePage { ...@@ -463,6 +460,10 @@ export class HomePage {
}; };
}) })
}); });
}, error => {
this.appService.alert('网络异常!');
}
);
} }
...@@ -474,6 +475,10 @@ export class HomePage { ...@@ -474,6 +475,10 @@ export class HomePage {
this.loadEvent(e.newMonth.years, e.newMonth.months); this.loadEvent(e.newMonth.years, e.newMonth.months);
} }
ionViewDidLeave() {
this.newArr = [];
}
} }
//定义星期实体 //定义星期实体
......
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