| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%String view = "";
- if(!"".equals(request.getParameter("viewName")) && null != request.getParameter("viewName")){
- view = request.getParameter("viewName");
- }else{
- view = request.getAttribute("viewName").toString();
- }
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title>他人的日程</title>
- <link rel="stylesheet" href="/shares/fullcalendar/jquery/themes/base/jquery.ui.all.css">
- <link rel="stylesheet" href="/shares/fullcalendar/fullcalendar/cupertino/theme.css">
- <link href="${ pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
- <link href='/shares/fullcalendar/fullcalendar/fullcalendar.css' rel='stylesheet' />
- <link href='/shares/fullcalendar/fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
- <script src='/shares/fullcalendar/jquery/jquery-1.8.0.min.js'></script>
- <script src='/shares/fullcalendar/jquery/jquery-ui-1.10.2.custom.min.js'></script>
- <script src='/shares/fullcalendar/fullcalendar/fullcalendar.min.js'></script>
- <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js'></script>
- <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js'></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
- <script type="text/javascript">
- var dialog3 = null;
- var editDialog = null;
- var infoDialog = null;
- $(function (){
- var schedule_user = $("#schedule_user").ligerComboBox({
- url :'MTScheduleAction.do?task=getManager',
- textField : 'manager_name',
- valueField : 'manager_id',
- valueFieldID: 'schedule_user_',
- initValue:'${userid}',
- onSelected : function (value, text){
- $('#calendar').empty();
- loadSelect(value,text);
- }
- });
-
- });
- function loadSelect(value,text){
- $(document).ready(function() {
- var calendar = $('#calendar').fullCalendar({
- header: {
- left: 'prev,next today',
- center: 'title',
- right: 'month,agendaWeek,agendaDay'
- },
- theme: true,
- timeFormat:{agenda: 'HH:mm { - HH:mm }','': 'HH:mm { - HH:mm }' },
-
- columnFormat:{//每种视图每列显示的时间格式
- month: 'ddd',
- week: 'M/d(ddd)',
- day: 'M/d(ddd)'
- },
- titleFormat:{//视图标题时间显示的格式
- month: 'yyyy年 MMMM ',
- week: "yyyy年 MMM d{ '—'[ MMM] d日 }",
- day: 'dddd, MMM d, yyyy'
- },
- axisFormat:'HH:mm',//日视图左侧时间显示的格式
- allDaySlot:false,
- allDayText:'今天的任务',
- //contentHeight: 10000,
- //weekMode: "liquid",
- minTime:'8:00',//在日视图和周视图显示起始时间的设置
- maxTime:'22:00',//在日视图和周视图显示结束时间的设置
- slotMinutes:30,//在日视图和周视图每一行间隔的分钟,目前设为30分钟
- defaultView: '<%=view%>',
-
- monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- dayNames: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
- dayNamesShort: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
- today: ["今天"],
- firstDay: 1,
- buttonText: {
- today: '今天',
- month: '月视图',
- week: '周视图',
- day: '日视图',
- prev: '<<',
- next: '>>'
- },
-
- eventSources: [
- {
- url: 'MTScheduleAction.do?task=list&userId='+value // 把从后台取出未开始的日程记录数据进行封装以后在页面上以fullCalendar的方式进行显示
- },
- {
- url: 'MTScheduleAction.do?task=timeOutList&userId='+value, //把从后台取出超时的日程记录数据
- color: 'gray'
- },
- {
- url: 'MTScheduleAction.do?task=completeList&userId='+value, //把从后台取出完成的日程记录数据
- color: 'green'
- }
- ],
- eventMouseover: function (calEvent, jsEvent, view) {
-
- var status = "";
- if (calEvent.complete == 0){
- status = "已完成";
- }
- else if (calEvent.complete == 1 && calEvent._day != null){
- status = "未开始";
- }
- else if (calEvent.complete == 1 && calEvent._day == null){
- status = "已超时";
- }
- $(this).attr('title', "标题:" + calEvent.title + "\n" + "状态:" + status );
- $(this).css('font-weight', 'normal');
- },
-
- eventClick: function (event, jsEvent, view ) {
- var viewName = $('#calendar').fullCalendar( 'getView' ).name;
- var start = $.fullCalendar.formatDate(event.start, "yyyy-MM-dd HH:mm");
- var end = $.fullCalendar.formatDate(event.end, "yyyy-MM-dd HH:mm");
- var title = event.title;
- var schedule_level_ = event.schedule_level;
- var schedule_level = "";
- if (event.schedule_level == 1){
- schedule_level = "重要/紧急";
- }else if (event.schedule_level == 2){
- schedule_level = "重要/不紧急";
- }else if (event.schedule_level == 3){
- schedule_level = "不重要/紧急";
- }else if (event.schedule_level == 4){
- schedule_level = "不重要/不紧急";
- }else if (event.schedule_level == 0){
- schedule_level = "未指定";
- }
- var schedule_type_ = event.schedule_type;
- var schedule_type = "";
- if(event.schedule_type == 1){
- schedule_type = "个人事务";
- }else if (event.schedule_type == 2){
- schedule_type = "工作事务";
- }
- var schedule_detail = event.schedule_detail;
- var _day = event._day;
- var _hour = event._hour;
- var _minute = event._minute;
- var alarm_type1 = event.alarm_type1;
- var alarm_type2 = event.alarm_type2;
- var id = event.id;
- var complete = event.complete;
- var s = "&start="+start + "&end="+end + "&title="+encodeURI(encodeURI(title)) + "&schedule_level_="+schedule_level_
- +"&schedule_level="+encodeURI(encodeURI(schedule_level)) + "&schedule_type_="+schedule_type_
- +"&schedule_type="+encodeURI(encodeURI(schedule_type)) + "&schedule_detail="+encodeURI(encodeURI(schedule_detail))
- +"&_day="+_day + "&_hour="+_hour + "&_minute="+_minute + "&alarm_type1="+alarm_type1 + "&alarm_type2="+alarm_type2
- +"&id="+id + "&complete="+complete + "&viewName=" + viewName + "&backType=1";
- infoDialog = item( 'MTScheduleAction.do?task=info'+s + '&userId=' + value );
- },
- selectable: true,
- selectHelper: true,
- select: function(start, end, allDay) {
- var viewName = $('#calendar').fullCalendar( 'getView' ).name;
- dialog3 = item('MTScheduleAction.do?task=toCreate&startDate=' + $.fullCalendar.formatDate(start, "yyyy-MM-dd HH:mm")
- + '&endDate=' + $.fullCalendar.formatDate(end, "yyyy-MM-dd HH:mm") + '&userId=' + value
- + "&viewName=" + viewName + "&backType=1");
- }
- });
- });
- }
- $(document).ready(function() {
- $('#calendar').fullCalendar({
- header: {
- left: 'prev,next today',
- center: 'title',
- right: 'month,agendaWeek,agendaDay'
- },
- theme: true,
- timeFormat:{agenda: 'HH:mm { - HH:mm }','': 'HH:mm { - HH:mm }' },
-
- columnFormat:{//每种视图每列显示的时间格式
- month: 'ddd',
- week: 'M/d(ddd)',
- day: 'M/d(ddd)'
- },
- titleFormat:{//视图标题时间显示的格式
- month: 'yyyy年 MMMM ',
- week: "yyyy年 MMM d{ '—'[ MMM] d日 }",
- day: 'dddd, MMM d, yyyy'
- },
- axisFormat:'HH:mm',//日视图左侧时间显示的格式
- allDaySlot:false,
- allDayText:'今天的任务',
- //contentHeight: 10000,
- //weekMode: "liquid",
- minTime:'8:00',//在日视图和周视图显示起始时间的设置
- maxTime:'22:00',//在日视图和周视图显示结束时间的设置
- slotMinutes:30,//在日视图和周视图每一行间隔的分钟,目前设为30分钟
- defaultView: 'agendaWeek',
-
- monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- dayNames: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
- dayNamesShort: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
- today: ["今天"],
- firstDay: 1,
- buttonText: {
- today: '今天',
- month: '月视图',
- week: '周视图',
- day: '日视图',
- prev: '<<',
- next: '>>'
- }
- });
- });
- </script>
- </head>
- <body>
- <div id="wrap1">
-
- <div class="default_search" style="margin-bottom: 10px;">
- <ul class="list_search">
- <li class="title" >切换日程表:</li>
- <li class="text">
- <input type="text" name="schedule_user" id="schedule_user" >
- <input type="hidden" id="schedule_user_">
- </li>
- </ul>
-
- </div>
- <br><br>
- <div id='calendar'></div>
- </div>
- </body>
- </html>
|