Commit 2998a412 authored by wangqinghua's avatar wangqinghua

值班

parent 6a3479d8
/node_modules /node_modules
/platforms/android/
/www /www
/.sourcemaps /.sourcemaps
/plugins /plugins
/platforms /platforms
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" /> <excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/platforms" /> <excludeFolder url="file://$MODULE_DIR$/platforms" />
<excludeFolder url="file://$MODULE_DIR$/platforms/android" />
<excludeFolder url="file://$MODULE_DIR$/temp" /> <excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" /> <excludeFolder url="file://$MODULE_DIR$/tmp" />
</content> </content>
<content url="file://$MODULE_DIR$/platforms/android" />
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"proxies": [ "proxies": [
{ {
"path": "/wisdomgroup", "path": "/wisdomgroup",
"proxyUrl": "http://10.10.202.54:8080/wisdomgroup" "proxyUrl": "http://180.168.156.212:2931/wisdomgroup"
} }
] ]
} }
\ No newline at end of file
...@@ -46,7 +46,6 @@ export class MyApp { ...@@ -46,7 +46,6 @@ export class MyApp {
}); });
//log角标数目显示 //log角标数目显示
badge.set(10); badge.set(10);
}); });
} }
} }
...@@ -3,3 +3,6 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; ...@@ -3,3 +3,6 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module'; import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule); platformBrowserDynamic().bootstrapModule(AppModule);
export const monthCh = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
export const weekDay = ['日', '一', '二', '三', '四', '五', '六'];
...@@ -18,9 +18,9 @@ export class DutySignUpPage { ...@@ -18,9 +18,9 @@ export class DutySignUpPage {
ionViewDidLoad() { ionViewDidLoad() {
this.id = this.navParams.get('id'); this.id = this.navParams.get('id');
const data = { const data = {
'id':this.id 'id':'fdc14f03746743bea1d9167b165ca76b'
}; };
this.appService.ObserverHttpGet('/schedule/hasSignIn',data) this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/hasSignIn',data)
.subscribe((res)=>{ .subscribe((res)=>{
console.log(res); console.log(res);
}) })
...@@ -31,7 +31,7 @@ export class DutySignUpPage { ...@@ -31,7 +31,7 @@ export class DutySignUpPage {
id:this.id, //值班记录id, id:this.id, //值班记录id,
address:'' //签到地址 address:'' //签到地址
}; };
this.appService.ObserverHttpGet('/schedule/signIn',data) this.appService.ObserverHttpGet('/wisdomgroup/schedule/signIn',data)
.subscribe((res)=>{ .subscribe((res)=>{
console.log(res); console.log(res);
}) })
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
<ion-content direction="y" scrollbar-y="true" class="bgc-e7e8ed"> <ion-content direction="y" scrollbar-y="true" class="bgc-e7e8ed">
<ng-container *ngIf="changeType == 1"> <ng-container *ngIf="changeType == 1">
<ion-calendar [(ngModel)]="date" <ion-calendar [(ngModel)]="date"
(onSelect)="onChange($event)" (onChange)="onChange($event)"
[options]="optionsMulti" [options]="options"
[type]="type" type="string"
[format]="'YYYY-MM-DD'"> format="YYYY-MM-DD">
</ion-calendar> </ion-calendar>
<div> <div>
<ion-item> <ion-item>
......
...@@ -6,6 +6,7 @@ import {DutyApplyPage} from "../duty-apply/duty-apply"; ...@@ -6,6 +6,7 @@ import {DutyApplyPage} from "../duty-apply/duty-apply";
import {DutyDetailPage} from "../duty-detail/duty-detail"; import {DutyDetailPage} from "../duty-detail/duty-detail";
import {DutySignUpPage} from "../duty-sign-up/duty-sign-up"; import {DutySignUpPage} from "../duty-sign-up/duty-sign-up";
import { DayConfig } from "ion2-calendar"; import { DayConfig } from "ion2-calendar";
import {monthCh, weekDay} from "../../../app/main";
declare var Swiper; declare var Swiper;
@IonicPage() @IonicPage()
...@@ -20,34 +21,25 @@ export class DutyPage { ...@@ -20,34 +21,25 @@ export class DutyPage {
{name:'我的值班'}, {name:'我的值班'},
] ]
swiperIndex; swiperIndex;
optionsMulti: CalendarComponentOptions ={};
changeType = 1; changeType = 1;
dayObj; dayObj;
nightObj; nightObj;
nowDuty; nowDuty;
historyDuty; historyDuty;
date: string[] = ['2018-01-01', '2018-01-02', '2018-01-05'];
options: CalendarComponentOptions = {
from: new Date(2000, 0, 1),
monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay,
monthPickerFormat:monthCh,
pickMode: 'multi',
color:'danger'
};
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) { public appService: AppService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
let _daysConfig: DayConfig[] = [];
for (let i = 0; i < 31; i++) {
_daysConfig.push({
date: new Date(2018, 8, i + 1),
marked:true,
cssClass:'lass on-selected'
})
}
console.log(_daysConfig);
this.optionsMulti = {
pickMode: 'multi',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: ['天', '一', '二', '三', '四', '五', '六'],
weekStart: 1,
daysConfig:_daysConfig,
color:'danger'
};
const date = new Date().toLocaleDateString(); const date = new Date().toLocaleDateString();
this.getDuty(date); this.getDuty(date);
......
...@@ -37,6 +37,8 @@ export class LoginPage { ...@@ -37,6 +37,8 @@ export class LoginPage {
} }
ionViewDidLoad(){ ionViewDidLoad(){
alert("123");
this.storage.get("userLoginInfo").then((value)=>{ this.storage.get("userLoginInfo").then((value)=>{
if(value!=null && value != ''){ if(value!=null && value != ''){
this.user = value; this.user = value;
......
...@@ -9,5 +9,6 @@ ...@@ -9,5 +9,6 @@
<ion-content padding> <ion-content padding>
<button *ngIf="applyType == 'replace'" class="submit-btn submit" (click)="replace()">确认替班</button>
<button *ngIf="applyType == 'change'" class="submit-btn submit" (click)="change()">确认换班</button>
</ion-content> </ion-content>
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 {AppService} from "../../../service/appHttpService"; import {AppService} from "../../../service/appHttpService";
...@@ -19,38 +19,43 @@ export class ChangeApplySurePage { ...@@ -19,38 +19,43 @@ export class ChangeApplySurePage {
} }
ionViewDidLoad() { ionViewDidLoad() {
console.log('ionViewDidLoad ChangeApplySurePage');
this.personId = this.navParams.get('personId'); this.personId = this.navParams.get('personId');
this.nowId = this.navParams.get('nowId'); this.nowId = this.navParams.get('nowId');
this.changeId = this.navParams.get('changeId'); this.changeId = this.navParams.get('changeId');
if(this.personId){ console.log('personId:' + this.personId);
console.log('nowId:' + this.nowId);
console.log('changeId:' + this.changeId);
if (this.personId) {
this.applyType = 'replace'; //值班 this.applyType = 'replace'; //值班
}else{ } else {
this.applyType = 'change'; //替班 this.applyType = 'change'; //替班
} }
} }
//换 //替
change(){ replace() {
const data = { const data = {
id:'', //值班记录id id: this.nowId, //值班记录id
personId:'' //替班人id personId: this.personId //替班人id
}; };
this.appService.ObserverHttpGet('/wisdomgroup/schedule/change',data) console.log(data);
.subscribe((res)=>{ this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/replace', data)
.subscribe((res) => {
console.log(res.json()); console.log(res.json());
}) })
} }
//替 //换
replace(){ change() {
const data = { const data = {
nowId:'', //值班记录id nowId: this.nowId, //值班记录id
changeId:'' //互换的值班ID changeId: this.changeId //互换的值班ID
}; };
this.appService.ObserverHttpGet('/wisdomgroup/schedule/replace ',data) console.log(data);
.subscribe((res)=>{ this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/change',data)
.subscribe((res) => {
console.log(res.json()); console.log(res.json());
}) })
} }
......
...@@ -13,6 +13,7 @@ export class DutyApplyHandlePage { ...@@ -13,6 +13,7 @@ export class DutyApplyHandlePage {
applyDetail = { applyDetail = {
id:'', id:'',
scheduleId:'',
reason:'' reason:''
}; };
personDetail = { personDetail = {
...@@ -40,13 +41,13 @@ export class DutyApplyHandlePage { ...@@ -40,13 +41,13 @@ export class DutyApplyHandlePage {
switch (type){ switch (type){
case '1':{ //换班 case '1':{ //换班
this.navCtrl.push('SelectChangePersonPage',{ this.navCtrl.push('SelectChangePersonPage',{
nowId:this.applyDetail.id nowId:this.applyDetail.scheduleId
}); });
break; break;
} }
case '2':{ //替班 case '2':{ //替班
this.navCtrl.push('SelectRelayPersonPage',{ this.navCtrl.push('SelectRelayPersonPage',{
id:this.applyDetail.id id:this.applyDetail.scheduleId
}); });
break; break;
} }
......
<!--
Generated template for the SelectChangePersonPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header> <ion-header>
<ion-navbar> <ion-navbar>
<ion-title>选择换班人员</ion-title> <ion-title>选择换班人员</ion-title>
</ion-navbar> </ion-navbar>
<div class="duty">
<div class="dutyItem" (click)="change(0)">
<span class="{{changeType == 0?'duty-title':''}}">白班</span>
</div>
<div class="dutyItem" (click)="change(1)">
<span class="{{changeType == 1?'duty-title':''}}">夜班</span>
</div>
</div>
</ion-header> </ion-header>
...@@ -18,8 +21,7 @@ ...@@ -18,8 +21,7 @@
<ion-item *ngFor="let item of list;" > <ion-item *ngFor="let item of list;" >
<div (click)="select(item)"> <div (click)="select(item)">
<span>{{item.dutyDate | date:'yyyy-MM-dd'}}</span> <span>{{item.dutyDate | date:'yyyy-MM-dd'}}</span>
<span *ngIf="item.nightName">夜班:{{item.nightName}}</span> <span>{{item.name}}</span>
<span *ngIf="item.dayName">白班:{{item.dayName}}</span>
</div> </div>
</ion-item> </ion-item>
......
page-select-change-person { page-select-change-person {
.duty{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.duty div{
width: 50%;
text-align: center;
position: relative;
}
.duty-title{
position: relative;
color: #24bafc;
}
.duty-title::after{
content: '';
position: absolute;
width: 100%;
height: 2px;
background-color: #24bafc;
bottom: -8px;
left: 0px;
}
} }
...@@ -19,6 +19,7 @@ export class SelectChangePersonPage { ...@@ -19,6 +19,7 @@ export class SelectChangePersonPage {
nowId; nowId;
list = []; list = [];
changeType = 0;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) { public appService: AppService) {
} }
...@@ -30,9 +31,10 @@ export class SelectChangePersonPage { ...@@ -30,9 +31,10 @@ export class SelectChangePersonPage {
getMonth(){ getMonth(){
const data = { const data = {
date:'2018/10/01' date:'2018/10/01',
type:this.changeType
}; };
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/getScheduleByMonth',data) this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/getScheduleByMonthAndType',data)
.subscribe((res)=>{ .subscribe((res)=>{
this.list = res.json(); this.list = res.json();
console.log(res.json()) console.log(res.json())
...@@ -42,9 +44,14 @@ export class SelectChangePersonPage { ...@@ -42,9 +44,14 @@ export class SelectChangePersonPage {
//换班 //换班
select(item){ select(item){
this.navCtrl.push('ChangeApplySurePage',{ this.navCtrl.push('ChangeApplySurePage',{
'changeId':'', 'changeId':item.id,
'nowId':this.nowId 'nowId':this.nowId
}) })
} }
change(type){
this.changeType = type;
this.getMonth();
}
} }
...@@ -3,10 +3,25 @@ ...@@ -3,10 +3,25 @@
<ion-navbar> <ion-navbar>
<ion-title>选择替班人员</ion-title> <ion-title>选择替班人员</ion-title>
</ion-navbar> </ion-navbar>
<div class="duty">
<div class="dutyItem" (click)="change(0)">
<span class="{{changeType == 0?'duty-title':''}}"></span>
</div>
<div class="dutyItem" (click)="change(1)">
<span class="{{changeType == 1?'duty-title':''}}"></span>
</div>
</div>
</ion-header> </ion-header>
<ion-content padding> <ion-content padding>
<ion-list>
<ion-item *ngFor="let item of list">
<div (click)="selectPerson(item)">
<span>{{item.name}}</span>
<span>{{item.orgName}}</span>
<span>{{item.phoneNumber}}</span>
</div>
</ion-item>
</ion-list>
</ion-content> </ion-content>
page-select-relay-person { page-select-relay-person {
.duty{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.duty div{
width: 50%;
text-align: center;
position: relative;
}
.duty-title{
position: relative;
color: #24bafc;
}
.duty-title::after{
content: '';
position: absolute;
width: 100%;
height: 2px;
background-color: #24bafc;
bottom: -8px;
left: 0px;
}
} }
...@@ -18,32 +18,41 @@ import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure"; ...@@ -18,32 +18,41 @@ import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure";
export class SelectRelayPersonPage { export class SelectRelayPersonPage {
id; id;
list;
changeType = 0;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) { public appService: AppService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.id = this.navParams.get('id'); this.id = this.navParams.get('id');
console.log('nowId:'+this.id);
this.getPerson(); this.getPerson();
} }
getPerson(){ getPerson(){
const data = { const data = {
date:'2018/10/01', date:'2018/10/01',
gender:'0', gender:this.changeType,
id:'' id:''
}; };
this.appService.ObserverHttpGetOption('/wisdomgroup/dutyPerson/getPersonListOutOfMine',data) this.appService.ObserverHttpGetOption('/wisdomgroup/dutyPerson/getPersonListOutOfMine',data)
.subscribe((res)=>{ .subscribe((res)=>{
this.list = res.json();
}) })
} }
//替班 //替班
selectPerson(item){ selectPerson(item){
this.navCtrl.push('ChangeApplySurePage',{ this.navCtrl.push('ChangeApplySurePage',{
'personId':item.personId, 'personId':item.id,
'nowId':this.id 'nowId':this.id
}) })
} }
change(type){
this.changeType = type;
this.getPerson();
}
} }
...@@ -80,7 +80,7 @@ export class AppService { ...@@ -80,7 +80,7 @@ export class AppService {
//get请求带?的 //get请求带?的
ObserverHttpGetOption(url,params): Observable<any>{ ObserverHttpGetOption(url,params): Observable<any>{
// return this.http.get(AppGlobal.domain+url+this.encode(params,"get")) //app // return this.http.get(AppGlobal.domain+url+this.encode(params,"get")); //app
return this.http.get(url ,{ return this.http.get(url ,{
params:params params:params
}); //本地 }); //本地
......
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