Commit c2e805e7 authored by wangqinghua's avatar wangqinghua

日历

parent 681c94d5
...@@ -41,7 +41,6 @@ export class ContactPage { ...@@ -41,7 +41,6 @@ export class ContactPage {
this.appService.ObserverHttpGetData("/wisdomgroup/sysmanagement/org/getAllOrganization", {order: 0}) this.appService.ObserverHttpGetData("/wisdomgroup/sysmanagement/org/getAllOrganization", {order: 0})
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
console.log("data:" + data);
this.organizations = data; this.organizations = data;
//移除父节点 //移除父节点
...@@ -68,7 +67,6 @@ export class ContactPage { ...@@ -68,7 +67,6 @@ export class ContactPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
this.ownerList = data.data.list; this.ownerList = data.data.list;
console.log(this.ownerList);
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
} }
...@@ -108,7 +106,6 @@ export class ContactPage { ...@@ -108,7 +106,6 @@ export class ContactPage {
text: '取消', text: '取消',
role: 'cancel', role: 'cancel',
handler: () => { handler: () => {
console.log('Cancel clicked');
} }
}, },
{ {
......
...@@ -355,13 +355,44 @@ export class HomePage { ...@@ -355,13 +355,44 @@ export class HomePage {
let year = date.getFullYear(); let year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
///schedule/app/getMyScheduleOnMonth ///schedule/app/getMyScheduleOnMonth
//2.参加活动日期
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/order/appOrderCal", null)
.subscribe((res: Response) => {
let response = res.json();
response.forEach(event => {
this.newArr.push({
date: new Date(event.batch.batchGoDate),
disable: true,
cssClass: 'dayOff2'
})
});
}, error => {
this.appService.alert('网络异常!');
});
//3.离沪日期
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/userpre/appPreCal", null)
.subscribe((res: Response) => {
let response = res.json();
response.forEach(event => {
this.newArr.push({
date: new Date(event.formshTime),
disable: true,
cssClass: 'dayOff4'
})
});
}, error => {
this.appService.alert('网络异常!');
});
this.loadEvent(year, month); this.loadEvent(year, month);
} }
loadEvent(year, month) { loadEvent(year, month) {
let date = new Date(); let date = new Date();
//1.每月的周末 //4.每月的周末
let d = new Date(year, month, 0).getDate(); let d = new Date(year, month, 0).getDate();
for (let i = 1; i < d + 1; i++) { for (let i = 1; i < d + 1; i++) {
date.setFullYear(year, month - 1, i); date.setFullYear(year, month - 1, i);
...@@ -375,7 +406,7 @@ export class HomePage { ...@@ -375,7 +406,7 @@ export class HomePage {
this.newArr.push(data); this.newArr.push(data);
} }
} }
//2.获取每月值班信息 //5.获取每月值班信息
const data = { const data = {
date: year + '/' + month + '/01' date: year + '/' + month + '/01'
}; };
...@@ -390,31 +421,22 @@ export class HomePage { ...@@ -390,31 +421,22 @@ export class HomePage {
}; };
this.newArr.push(data); this.newArr.push(data);
} }
}, error => {
this.appService.alert('网络异常!');
}
);
//3.参加活动日期 //1.获取节假日
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/order/appOrderCal", null) this.appService.ObserverHttpGetOption("/wisdomgroup/workCalendar/getFestivalAboutMonth", data)
.subscribe((res: Response) => { .subscribe((res)=>{
let response = res.json(); let data = res.json();
response.forEach(event => { data.forEach(event=>{
this.newArr.push({ const data = {
date: new Date(event.batch.batchGoDate), date: new Date(event.date),
disable: true,
cssClass: 'dayOff2'
})
});
//4.离沪日期
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/userpre/appPreCal", null)
.subscribe((res: Response) => {
let response = res.json();
response.forEach(event => {
this.newArr.push({
date: new Date(event.formshTime),
disable: true, disable: true,
cssClass: 'dayOff4' cssClass: 'dayOff1'
}) };
}); this.newArr.push(data);
console.log(this.newArr);
this.optionsMulti = { this.optionsMulti = {
pickMode: 'multi', pickMode: 'multi',
monthFormat: 'YYYY 年 MM 月 ', monthFormat: 'YYYY 年 MM 月 ',
...@@ -425,21 +447,8 @@ export class HomePage { ...@@ -425,21 +447,8 @@ export class HomePage {
daysConfig: this.newArr daysConfig: this.newArr
}; };
console.log(this.optionsMulti); console.log(this.optionsMulti);
})
}, error => { });
this.appService.alert('网络异常!');
}
);
}, error => {
this.appService.alert('网络异常!');
}
);
}, error => {
this.appService.alert('网络异常!');
}
);
} }
......
...@@ -18,11 +18,11 @@ export class NoticePage { ...@@ -18,11 +18,11 @@ export class NoticePage {
} }
ionViewDidEnter() { ionViewDidEnter() {
this.addRecodings();
this.appService.ObserverHttpPost("/wisdomgroup/modules/message/findAllActivityForAppWithXQ",null) this.appService.ObserverHttpPost("/wisdomgroup/modules/message/findAllActivityForAppWithXQ",null)
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
this.noticeList = data; this.noticeList = data;
this.addRecodings();
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
} }
......
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