fzfx.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. })
  69. // 中间下拉框点击事件
  70. $("#ln-Dropdown.ydfscts").click(function(e) {
  71. $(".ln-Dropdown-content.ydfscts").slideToggle(300);
  72. if(e.target.nodeName == 'LI') {
  73. console.dir(e.target.attributes.value.value)
  74. $('#ln-Dropdown.ydfscts').eq(0)[0].children[0].innerText = e.target.innerText
  75. }
  76. })
  77. // 下部下拉框点击事件
  78. $("#ln-Dropdown.charts3").click(function (e) {
  79. $(".ln-Dropdown-content.charts3").slideToggle(300);
  80. if (e.target.nodeName == 'LI') {
  81. console.dir(e.target.attributes.value.value)
  82. $('#ln-Dropdown.charts3').eq(0)[0].children[0].innerText = e.target.innerText
  83. }
  84. })