Commit c2e805e7 authored by wangqinghua's avatar wangqinghua

日历

parent 681c94d5
......@@ -41,7 +41,6 @@ export class ContactPage {
this.appService.ObserverHttpGetData("/wisdomgroup/sysmanagement/org/getAllOrganization", {order: 0})
.subscribe((res: Response) => {
let data = res.json();
console.log("data:" + data);
this.organizations = data;
//移除父节点
......@@ -68,7 +67,6 @@ export class ContactPage {
.subscribe((res: Response) => {
let data = res.json();
this.ownerList = data.data.list;
console.log(this.ownerList);
}, error => {
this.appService.alert('网络异常!');
}
......@@ -108,7 +106,6 @@ export class ContactPage {
text: '取消',
role: 'cancel',
handler: () => {
console.log('Cancel clicked');
}
},
{
......
......@@ -355,13 +355,44 @@ export class HomePage {
let year = date.getFullYear();
let month = date.getMonth() + 1;
///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);
}
loadEvent(year, month) {
let date = new Date();
//1.每月的周末
//4.每月的周末
let d = new Date(year, month, 0).getDate();
for (let i = 1; i < d + 1; i++) {
date.setFullYear(year, month - 1, i);
......@@ -375,7 +406,7 @@ export class HomePage {
this.newArr.push(data);
}
}
//2.获取每月值班信息
//5.获取每月值班信息
const data = {
date: year + '/' + month + '/01'
};
......@@ -390,57 +421,35 @@ export class HomePage {
};
this.newArr.push(data);
}
//3.参加活动日期
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'
})
});
//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,
cssClass: 'dayOff4'
})
});
console.log(this.newArr);
this.optionsMulti = {
pickMode: 'multi',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay,
monthPickerFormat: monthCh,
weekStart: 0,
disableWeeks: [0, 1, 2, 3, 4, 5, 6],
daysConfig: this.newArr
};
console.log(this.optionsMulti);
}, error => {
this.appService.alert('网络异常!');
}
);
}, error => {
this.appService.alert('网络异常!');
}
);
}, error => {
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
};
console.log(this.optionsMulti);
})
});
}
onChange(e) {
......
......@@ -18,11 +18,11 @@ export class NoticePage {
}
ionViewDidEnter() {
this.addRecodings();
this.appService.ObserverHttpPost("/wisdomgroup/modules/message/findAllActivityForAppWithXQ",null)
.subscribe((res: Response) => {
let data = res.json();
this.noticeList = data;
this.addRecodings();
}, error => {
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