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({
selector: 'page-add-block', selector: 'page-add-block',
templateUrl: 'add-block.html', templateUrl: 'add-block.html',
}) })
export class AddBlockPage { export class AddBlockPage {
groupName; groupName;
constructor(public navCtrl: NavController, public navParams: NavParams,
public modalCtrl: ModalController, public appService: AppService,
public toastCtrl: ToastController) {
}
ionViewDidLoad() { constructor(public navCtrl: NavController, public navParams: NavParams,
} public modalCtrl: ModalController, public appService: AppService,
public toastCtrl: ToastController) {
}
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 = { }
groupName:this.groupName const data = {
}; 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({
selector: 'page-search', selector: 'page-search',
templateUrl: 'search.html' templateUrl: 'search.html'
}) })
export class SearchPage { export class SearchPage {
searchValue:string; searchValue: string;
picture: string = AppGlobal.picture;
contactPersons: Array<string>[];
contactPersons: Array<string>[]; //组织部门id
orgId: string = '';
orgName: string = '';
//组织部门id constructor(public navCtrl: NavController,
orgId:string = ''; public navParams: NavParams,
orgName:string = ''; public appService: AppService) {
constructor( if (!typeof(this.navParams.get("orgid")) == undefined) {
public navCtrl: NavController, this.orgId = this.navParams.get("orgid");
public navParams: NavParams, }
public appService:AppService if (!typeof(this.navParams.get("orgName")) == undefined) {
) { this.orgName = this.navParams.get("orgName");
}
if(!typeof(this.navParams.get("orgid")) == undefined){
this.orgId = this.navParams.get("orgid");
} }
if(!typeof(this.navParams.get("orgName")) == undefined){
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) => {
// let data = res.json(); // let data = res.json();
// this.contactPersons = data; // this.contactPersons = data;
// if(this.orgId !=null && this.orgId !=''){ // if(this.orgId !=null && this.orgId !=''){
// //同组织部门下 // //同组织部门下
// this.contactPersons.forEach(element => { // this.contactPersons.forEach(element => {
// element["orgName"] = this.orgName; // element["orgName"] = this.orgName;
// element["hasgeneralpersonsflag"] = false; // element["hasgeneralpersonsflag"] = false;
// }); // });
// }else{ // }else{
// this.contactPersons.forEach(element => { // this.contactPersons.forEach(element => {
// this.getOrgName(element["id"],result=>{ // this.getOrgName(element["id"],result=>{
// element["orgName"] = result["orgName"]; // element["orgName"] = result["orgName"];
// element["hasgeneralpersonsflag"] = false; // element["hasgeneralpersonsflag"] = false;
// }); // });
// }); // });
// } // }
// }, error => { // }, error => {
// this.appService.alert('网络异常!'); // this.appService.alert('网络异常!');
// } // }
// ); // );
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();
callback(data == null ? "[]" : data); callback(data == null ? "[]" : data);
}) })
.catch(error => { .catch(error => {
}); });
} }
} }
<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;
......
...@@ -69,7 +69,7 @@ export class HomePage { ...@@ -69,7 +69,7 @@ export class HomePage {
weekNo; weekNo;
noticeTips; noticeTips;
role; role;
constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService, constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService,
public appService: AppService, public http: Http, private calendar: Calendar, public storage: Storage, public appService: AppService, public http: Http, private calendar: Calendar, public storage: Storage,
...@@ -139,9 +139,9 @@ export class HomePage { ...@@ -139,9 +139,9 @@ 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 => {
this.appService.alert('系统错误!'); this.appService.alert('系统错误!');
}); });
...@@ -382,25 +382,26 @@ export class HomePage { ...@@ -382,25 +382,26 @@ 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)
.subscribe((res: Response) => { .subscribe((res: Response) => {
let response = res.json(); let response = res.json();
response.forEach(event => { response.forEach(event => {
this.newArr.push({ this.newArr.push({
date: new Date(event.formshTime), date: new Date(event.formshTime),
disable: true, disable: true,
cssClass: 'dayOff4' cssClass: 'dayOff4'
}) })
}); });
}, error => {
this.appService.alert('网络异常!');
});
this.loadEvent(year, month);
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
}); });
this.loadEvent(year, month);
} }
...@@ -436,34 +437,34 @@ export class HomePage { ...@@ -436,34 +437,34 @@ export class HomePage {
}; };
this.newArr.push(data); this.newArr.push(data);
} }
//1.获取节假日
this.appService.ObserverHttpGetOption("/wisdomgroup/workCalendar/getFestivalAboutMonth", data)
.subscribe((res) => {
let data = res.json();
data.forEach(event => {
const data = {
date: new Date(event.date),
disable: true,
cssClass: 'dayOff1'
};
this.newArr.push(data);
this.optionsMulti = {
pickMode: 'multi',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay,
monthPickerFormat: monthCh,
weekStart: 0,
disableWeeks: [0, 1, 2, 3, 4, 5, 6],
daysConfig: this.newArr
};
})
});
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
} }
); );
//1.获取节假日
this.appService.ObserverHttpGetOption("/wisdomgroup/workCalendar/getFestivalAboutMonth", data)
.subscribe((res)=>{
let data = res.json();
data.forEach(event=>{
const data = {
date: new Date(event.date),
disable: true,
cssClass: 'dayOff1'
};
this.newArr.push(data);
this.optionsMulti = {
pickMode: 'multi',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay,
monthPickerFormat: monthCh,
weekStart: 0,
disableWeeks: [0, 1, 2, 3, 4, 5, 6],
daysConfig: this.newArr
};
})
});
} }
onChange(e) { onChange(e) {
...@@ -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