zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
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
100
101
102
103
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 
<%-- <link rel='stylesheet' href='${pageContext.request.contextPath}/pms/equ/wcplan/js/cupertino/jquery-ui.min.css' /> --%>
<link href='${pageContext.request.contextPath}/jslib/js/fullcalendar.css' rel='stylesheet' />
<link href='${pageContext.request.contextPath}/jslib/js/fullcalendar.print.css'/>
<script src='${pageContext.request.contextPath}/jslib/js/moment.min.js'></script>
<%-- <script src='${pageContext.request.contextPath}/pms/equ/wcplan/js/jquery.min.js'></script> --%>
<script src='${pageContext.request.contextPath}/jslib/js/fullcalendar.min.js'></script>
<script src='${pageContext.request.contextPath}/jslib/js/lang-all.js'></script>
 
<script type="text/javascript">
$(document).ready(function() {
    $('#calendar').fullCalendar({
         editable: true,
         eventSources: [
            // your event source
            {
                url: '${pageContext.request.contextPath}/pms/paul/queryPaulCalendar.do',
                type: 'GET',
                
                //endParam:$.fullCalendar.formatDate('startParam','yyyy-MM-dd'),
                error: function() {
                    alert('加载失败!');
                },
                //color: 'yellow',   // a non-ajax option
                textColor: 'black', // a non-ajax option
                editable:false
            }
        ],
        selectable:false,
        lang: 'zh-cn',
        //events:eventsList,
        header: {
            left:   '',
            center: 'title',
            right:  'today prev,next'
        },
        eventClick: function(calEvent, jsEvent, view) {
            //alert(calEvent.id);
            
            //日保养日历
            var d=parent.$.modalDialog({
                title : '设备轮保日历',
                width : 750,
                height : 520,
                href : '${pageContext.request.contextPath}/pms/paul/gotoDetail.do?id='+calEvent.id,
                buttons : [ {
                    text : '关闭',
                    iconCls:'icon-standard-disk',
                    handler : function() {
                        d.dialog('destroy');
                    }
                } ]
            });
        }
    });
    
    jQuery('.fc-button-prev').unbind('click');  
    jQuery('.fc-button-next').unbind('click');  
    //重新注册事件
    jQuery('.fc-button-prev').bind('click', prev);  
    jQuery('.fc-button-next').bind('click', next);  
    //jQuery('.fc-button-today').bind('click', next);  
    function prev() {  
        $('#calendar').fullCalendar('prev');
    } 
    function next() {  
        $('#calendar').fullCalendar('next');
    }
});
 
</script>
<style>
 
    body {
        margin: 0;
        padding: 0;
        font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
        font-size: 14px;
    }
 
    #top {
        background: #eee;
        border-bottom: 1px solid #ddd;
        padding: 0 10px;
        line-height: 40px;
        font-size: 12px;
    }
 
    #calendar {
        max-width: 600px;
        margin: 5px auto;
        padding: 0 10px;
    }
 
 
</style>
 
 
<div id="main"  style="width:720px;heigth:540px;">
   <div id='calendar'></div>
</div>