tip.jsp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  4. <!DOCTYPE html>
  5. <!--[if IE 9]><html class="no-js ie9"><![endif]-->
  6. <!--[if gt IE 9]><!--><html class="no-js"><!--<![endif]-->
  7. <head>
  8. <meta charset="UTF-8" />
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="stylesheet" type="text/css" href="<%=basePath %>/My/Calendario/css/calendar.css" />
  12. <link rel="stylesheet" type="text/css" href="<%=basePath %>/My/Calendario/css/custom_2.css" />
  13. <style type="text/css">
  14. .custom-prev{
  15. width: 16px;
  16. height: 16px;
  17. cursor: pointer;
  18. float: left;
  19. margin-top:11px;
  20. line-height:40px;
  21. background-image: url('images/pagination_icons.png');
  22. background-position: -16px 0px;
  23. }
  24. .custom-next{
  25. width: 16px;
  26. height: 16px;
  27. cursor: pointer;
  28. float: left;
  29. margin-top:11px;
  30. background-image: url('images/pagination_icons.png');
  31. background-position: -32px 0px;
  32. }
  33. </style>
  34. <script src="<%=basePath %>/My/Calendario/js/modernizr.custom.63321.js"></script>
  35. <script type="text/javascript">
  36. /**查询*/
  37. function searchState(day){
  38. parent.searchState(day);
  39. }
  40. </script>
  41. </head>
  42. <body>
  43. <div class="container" style="height:330px;width:340px;">
  44. <div style="width: 320px;margin-left: auto;margin-right: auto;text-align: center;">
  45. <div style="width: 300px;height: 40px;overflow: hidden;margin-left: auto;margin-right: auto;text-align: center;background-color: #fff;">
  46. <div style="width:200px;height: 40px;line-height:40px; font-size:20px; font-weight:bold; margin-left:auto;margin-right:auto; text-align: center;color: #1369d8;">
  47. <div id="custom-prev" class="custom-prev" style="cursor: pointer;"></div>
  48. <div id="mydate" style="width: 166px;height: 38px;float: left;text-align: center;margin-left:auto;margin-right:auto;">
  49. </div>
  50. <div id="custom-year" style="float:left;display: none;"></div>
  51. <div id="custom-month"style="float:left;display: none;"></div>
  52. <div id="custom-next" class="custom-next" style="cursor: pointer;"></div>
  53. </div>
  54. </div>
  55. <div id="calendar" class="fc-calendar-container"></div>
  56. </div>
  57. <div style="width:300px;height:180px;margin-left: auto;margin-right: auto;text-align: center;margin-top: 5px;">
  58. <div style="margin-left:auto;margin-right:auto;text-align:center;width:260px;height:174px;overflow:hidden;background-image: url(images/tips.png)">
  59. <div style="margin-top: 45px;font-size: 18px;font-weight:bold; color: white;">温馨提示</div>
  60. <div style="margin-top: 10px;font-size: 14px;font-weight:bold; text-align: left;margin-left:10px;">
  61. <span id="month1"></span>月中低收入人员收件数:<span id="count1"></span>
  62. </div>
  63. <div style="margin-top: 10px;font-size: 14px;font-weight:bold;text-align: left;margin-left:10px;">
  64. <span id="month2"></span>月新就业人员收件数:<span id="count2"></span>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. <script src="<%=basePath %>/My/Calendario/js/jquery.min.js"></script>
  70. <script type="text/javascript" src="<%=basePath %>/My/Calendario/js/jquery.calendario.js"></script>
  71. <script type="text/javascript">
  72. var transEndEventNames = {
  73. 'WebkitTransition' : 'webkitTransitionEnd',
  74. 'MozTransition' : 'transitionend',
  75. 'OTransition' : 'oTransitionEnd',
  76. 'msTransition' : 'MSTransitionEnd',
  77. 'transition' : 'transitionend'
  78. },
  79. transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
  80. $wrapper = $( '#custom-inner' ),
  81. $calendar = $( '#calendar' ),
  82. cal,
  83. $day,
  84. $week,
  85. $month,
  86. $year;
  87. $(function() {
  88. updateTask();
  89. $( '#custom-next' ).on( 'click', function() {
  90. cal.gotoNextMonth( updateMonthYear );
  91. } );
  92. $( '#custom-prev' ).on( 'click', function() {
  93. cal.gotoPreviousMonth( updateMonthYear );
  94. } );
  95. //alert(cal.getYear());
  96. //$("#mydate").html(cal.getYear() + "年" + cal.getMonthName() + "月");
  97. var date=new Date;
  98. var month=date.getMonth()+1;
  99. $("#month1").text(month);
  100. $("#month2").text(month);
  101. //当前月份中低收入人员收件数
  102. $.ajax({
  103. type: "post",//使用post方法访问后台
  104. dataType: "json",//返回json格式的数据
  105. url: "securityPersonApplyAction_pickUpCount?type=1",
  106. complete :function(){$("#load").hide();},
  107. success: function(msg){
  108. $("#count1").text(msg.obj);
  109. }
  110. });
  111. //当前月份新就业人员收件数
  112. $.ajax({
  113. type: "post",//使用post方法访问后台
  114. dataType: "json",//返回json格式的数据
  115. url: "securityPersonApplyAction_pickUpCount?type=2",
  116. complete :function(){$("#load").hide();},
  117. success: function(msg){
  118. $("#count2").text(msg.obj);
  119. }
  120. });
  121. });
  122. function updateMonthYear() {
  123. $month.html( cal.getMonthName() + "月");
  124. $year.html( cal.getYear() + "年");
  125. $("#mydate").html(cal.getYear() + "年" + cal.getMonthName() + "月");
  126. }
  127. function showEvents( $contentEl, dateProperties ) {
  128. searchState(dateProperties.year + "-" + dateProperties.month + "-" + dateProperties.day);
  129. }
  130. function updateTask(){
  131. $.ajax({
  132. type: "post",//使用post方法访问后台
  133. dataType: "json",//返回json格式的数据
  134. url: "taskAction_listMyTask",//要访问的后台地址
  135. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  136. success: function(msg){//msg为返回的数据,在这里做数据绑定
  137. if(msg.success){
  138. var codropsEvents = {};
  139. for(var i = 0;i<msg.obj.length;i++){
  140. codropsEvents[msg.obj[i].date] = msg.obj[i].cnt;
  141. }
  142. cal = $calendar.calendario( {
  143. onDayClick : function( $el, $contentEl, dateProperties ) {
  144. if( $contentEl.length > 0 ) {
  145. showEvents( $contentEl, dateProperties );
  146. }
  147. },
  148. caldata : codropsEvents,
  149. displayWeekAbbr : true
  150. } ),
  151. $month = $( '#custom-month' ).html( cal.getMonthName() + "月"),
  152. $year = $( '#custom-year' ).html( cal.getYear() + "年");
  153. $("#mydate").html(cal.getYear() + "年" + cal.getMonthName() + "月");
  154. }
  155. }
  156. });
  157. }
  158. </script>
  159. </body>
  160. </html>