tower.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {% extends "index.html" %}
  2. {% block title %}水塔監控{% endblock %}
  3. {% block head %}
  4. {{ super() }}
  5. {% endblock %}
  6. {% block body %}
  7. <script type="text/javascript">
  8. // var xhr = new XMLHttpRequest();
  9. // var url = "tower/org";
  10. // var obj="";
  11. // xhr.open("GET",url);
  12. // xhr.onload = function(){
  13. // obj = JSON.parse(xhr.responseText);
  14. // insertHTML();
  15. // };
  16. // xhr.send();
  17. // function insertHTML(){
  18. // var aria = document.getElementById('test');
  19. // aria.innerHTML=xhr.responseText;
  20. // }
  21. </script>
  22. <script type="text/javascript" src="/static/tower.js"></script>
  23. <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.js"></script>
  24. <div id='select_boxes'>
  25. <select class="select-item" id="company-list" onChange="onChangeColumn1();">
  26. <option value=0>公司A</option>
  27. </select>
  28. <select class="select-item" id="factory-list" onChange="onChangeColumn2();">
  29. <option value=0>工廠A</option>
  30. </select>
  31. <select class="select-item" id="department-list" onChange="onChangeColumn3();">
  32. <option value=0>廠區A</option>
  33. </select>
  34. <select class="select-item" id="towerGroup-list">
  35. <option value=0>機組1</option>
  36. </select>
  37. <button class="me-0" id="tower_btn" onclick="click_button();"><i class="fas fa-search me-2"></i>搜尋</button>
  38. </div>
  39. <div id="tower-box">
  40. <div id="tower-img" class="card pb-5">
  41. <h1 style="color:#002e86">監控區</h1>
  42. <h1 class="my-0 py-0">
  43. <hr class="mt-1 mb-5" style="background:#002e86; height: 1px; opacity: 1;">
  44. </h1>
  45. <div class="text-center">
  46. <img style="width: 60%;" src="/static/img/1631004814192.jpg" class="img-fluid" alt="...">
  47. </div>
  48. </div>
  49. <div style="padding: 15px;">
  50. <h1 style="color:#002e86">水塔資訊</h1>
  51. <div style="padding: 15px;">
  52. <div id="tower"></div>
  53. </div>
  54. </div>
  55. </div>
  56. <div id='test'></div>
  57. <div id='tower_info'></div>
  58. <div class="mt-3" id='tower_perfrom'></div>
  59. <div class="card mt-5">
  60. <h1 style="color:#002e86">水塔效能趨勢圖</h1>
  61. <h1 class="my-0 py-0">
  62. <hr class="mt-1 mb-3" style="background:#002e86; height: 1px; opacity: 1;">
  63. </h1>
  64. <div style="padding: 15px;">
  65. <canvas style="width: 50%;" id="channel_predict"></canvas>
  66. </div>
  67. </div>
  68. <script>
  69. function navlinkactive() {
  70. $('#nav-tower').addClass('active');
  71. }
  72. navlinkactive();
  73. </script>
  74. {% endblock %}