清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | function getCalendarData() { $('#calendar').fullCalendar({ weekMode: {fixed: 5}, header: {left: '', center: 'title', right: 'prev,today,next'}, titleFormat: "YYYY年MM月", handleWindowResize: false, eventLimit: true, // allow "more" link when too many events monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], firstDay: 1, buttonText: { today: '今天', prev: '上一月', next: '下一月' }, firstDay: 1, editable: false, events: function (start, end, timezone, callback) { $.ajax({ type: "GET", url: '/routine/myschedules', dataType: 'json', data: {start: "" + start, end: "" + end, filter: $("#hid").val()}, success: function (doc) { var events = []; for (var i = 0; i < doc.meeting.length ; i++) { var m = doc .meeting[i]; events.push({ key: "meeting", id: m.id, typeId: m.meetingType.typeId, title: m.title, content: "时间:" + ameutils.convertTime(m.meetingDate, "yyyy-MM-dd hh:mm:ss") + " 类型:" + m.meetingType.typeName, start: ameutils.convertTime(m.meetingDate, "yyyy-MM-dd"), time: ameutils.convertTime(m.meetingDate, "yyyy-MM-dd hh:mm:ss"), backgroundColor: '#E0FFFF', textColor: '#000000', borderColor: '#E0FFFF', }); } for (var i = 0 ; i < doc.outgoing.length; i++) { var o = doc .outgoing[i]; events.push({ key: "outgoing", id: o.id, typeId: o.outgoingType.type, title: o.title, content: "时间:" + ameutils.convertTime(o.startTime, "yyyy-MM-dd") + " 类型:" + o.outgoingType.typeName, start: ameutils.convertTime(o.startTime, "yyyy-MM-dd"), time: ameutils.convertTime(o.startTime, "yyyy-MM-dd"), backgroundColor: '#E0FFFF', textColor: '#000000', borderColor: '#E0FFFF', constraint: 'availableForMeeting' }); if (o.outgoingType.type == 10) outgoingnum2 = outgoingnum2 + 1; else outgoingnum1 = outgoingnum1 + 1; } var neihtml = "" ; for (var i = 0 ; i < doc.bulletins.length; i++) { var b = doc .bulletins[i]; neihtml += '<dl>'; neihtml += '< dt >'; neihtml += '< h4 >' + b.title + '</ h4 >'; neihtml += '< span class = "f12 font-grey-silver" >2015-05-18 07:13</ span > </ dt >'; neihtml += '< dd >'; neihtml += '< p >' + b.content + '</ p >'; neihtml += '</ dd >'; neihtml += '</ dl >'; } var waihtml = ""; for (var i = 0; i < doc.announcements.length ; i++) { var a = doc .announcements[i]; waihtml += '<dl>'; waihtml += '< dt >'; waihtml += '< h4 >' + a.title + '</ h4 >'; waihtml += '< span class = "f12 font-grey-silver" >2015-05-18 07:13</ span > </ dt >'; waihtml += '< dd >'; waihtml += '< p >' + a.type + '</ p >'; waihtml += '</ dd >'; waihtml += '</ dl >'; } $("#meetingnum").html(doc.meetingnum); $("#outgoingnum1").html(doc.outgoingnum1); $("#outgoingnum2").html(doc.outgoingnum2); $("#nei").html(neihtml); $("#wai").html(waihtml); callback(events); } }); }, loading: function (isLoading, view) { if (isLoading == false) { $(".fc-more").parent("div").css("text-align", "center"); } }, eventRender: function (calEvent, element, view) { element.attr("id", calEvent.id); element.attr("tabindex", "0"); element.attr("role", "button"); element.attr("data-toggle", "popover"); element.attr("data-trigger", "focus"); element.attr("data-content", calEvent.content); if (calEvent.key == "meeting") { element.attr("data-original-title", calEvent.title); element.find("div").prepend('< i class = "fa fa-stop font-red-haze" ></ i >'); } if (calEvent.key == "outgoing") { element.attr("data-original-title", calEvent.title); if (calEvent.typeId == 10) {//请假 element.find("div").prepend('< i class = "fa fa-stop font-yellow-crusta" ></ i >'); } else { element.find("div").prepend('< i class = "fa fa-stop font-blue-steel" ></ i >'); } } }, selectable: true }); } |