fzfx.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. var ndate=new Date;
  2. var year=ndate.getFullYear();
  3. var month=ndate.getMonth()+1;
  4. $('#calendar-dayly').flexoCalendar({
  5. type: 'normal',
  6. setYear: year,
  7. setMonth: month,
  8. selectDate: 'each-each-each',
  9. onselect: function (date) {
  10. console.log(date)
  11. }
  12. })
  13. $('#calendar-weekly').flexoCalendar({
  14. type: 'weekly',
  15. today: true,
  16. type: 'weekly',
  17. onselect: function (date) {
  18. console.log(date)
  19. }
  20. })
  21. $('#calendar-monthly').flexoCalendar({
  22. type: 'monthly',
  23. onselect: function (date) {
  24. console.log(date)
  25. }
  26. })
  27. var $calendarTabs = $('#calendarTabs')
  28. var $calendarWrapper = $('#calendarWrapper')
  29. $calendarTabs.on('click', '.tab', function () {
  30. $calendarTabs.find('.tab').removeClass('active')
  31. $(this).addClass('active')
  32. $('#calendarWrapper .calendar-wrapper').hide().eq($(this).index()).show()
  33. })
  34. //表格显示
  35. $('#chartLeft1').click(function(){
  36. $('.left-side-table').toggle();
  37. })
  38. $('.left-side-table').click(function(){
  39. $('.left-side-table').toggle();
  40. })
  41. $(document).bind("click", function(){
  42. $('#chartBottom1 .choosebox').hide();
  43. })
  44. $("#chartBottom1 .choosepc").click(function(){
  45. $('#chartBottom1 .choosebox').toggle();
  46. event.stopPropagation();
  47. })
  48. $("#chartBottom1 .choosebox").click(function(){
  49. event.stopPropagation();
  50. })
  51. $('.tab-areas .item').click(function(){
  52. var type = $.trim($(".switch-bt-active").text());
  53. var item = $.trim($(this).text());
  54. if(type =='区域'){
  55. var build = $('select[name="build"]').val();
  56. $('.choosepc .choose-item').text(type+':'+build+'-'+item);
  57. }else{
  58. $('.choosepc .choose-item').text(type+':'+item);
  59. }
  60. $('#chartBottom1 .choosebox').hide();
  61. })
  62. $(".a_demo_two").click(function(){
  63. var i = $(this).index('.a_demo_two');
  64. $(".a_demo_two").removeClass('switch-bt-active');
  65. $(this).addClass('switch-bt-active');
  66. $('.tab-areas .tab-area').addClass('tabshow');
  67. $(".tab-areas .tab-area").eq(i).removeClass('tabshow');
  68. })