check_team_schedule.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. $(document).ready(function() {
  2. $('#calendar').calendar();
  3. var calendar = $('#calendar').data('zui.calendar');
  4. var newEvents =
  5. [
  6. {title: '考核二班-晚班', start: '2017-5-1 ', end: '2017-5-1 '},
  7. {title: '考核三班-晚班', start: '2017-5-1 ', end: '2017-5-1 '},
  8. {title: '考核四班-晚班', start: '2017-5-1 ', end: '2017-5-1 '},
  9. {title: '考核一班-休息', start: '2017-5-1 ', end: '2017-5-1 '},
  10. {title: '考核二班-晚班', start: '2017-5-12 ', end: '2017-5-12 '},
  11. {title: '考核三班-晚班', start: '2017-5-12 ', end: '2017-5-12 '},
  12. {title: '考核四班-晚班', start: '2017-5-12 ', end: '2017-5-12 '},
  13. {title: '考核一班-休息', start: '2017-5-12 ', end: '2017-5-12 '},
  14. {title: '未排班', start: '2017-5-11 ', end: '2017-5-11 '},
  15. {title: '未排班', start: '2017-5-11 ', end: '2017-5-11'},
  16. {title: '未排班', start: '2017-5-11 ', end: '2017-5-11 '},
  17. {title: '未排班', start: '2017-5-11 ', end: '2017-5-11 '},
  18. {title: '未排班', start: '2017-5-13 ', end: '2017-5-13 '},
  19. {title: '未排班', start: '2017-5-13 ', end: '2017-5-13'},
  20. {title: '未排班', start: '2017-5-13 ', end: '2017-5-13 '},
  21. ];
  22. calendar.addEvents(newEvents);
  23. // 请求稽查人员排班数据
  24. var data = {
  25. "dept_id":1 ,
  26. "start_time":new Date(),
  27. "end_time":new Date()
  28. }
  29. post_common_service( "teamClass/getClassList",data,function(data){
  30. console.log(data );
  31. },function(error){})
  32. $('#calendar').calendar().on("clickEvent.zui.calendar", function(event) {
  33. console.log(event.event);
  34. // alert(event.event.title);
  35. // console.log("你点击了一个事件");
  36. // 处理 clickEvent 事件
  37. // ...
  38. // 对话框弹出
  39. $('#myModal').modal();
  40. });
  41. })