index_new.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>{{ title }}</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <!-- 新 Bootstrap4 核心 CSS 文件 -->
  8. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
  9. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  10. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  11. <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
  12. <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  13. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  14. <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  15. <!-- Rita 網頁 title 旁邊的 icon -->
  16. <!-- 參考資料 https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/26839/ -->
  17. <link rel="icon" href="..\static\img\icon-3.ico" type="image/x-icon">
  18. <!--
  19. <script src="../static/js/sign_in.js"></script>
  20. <link rel="stylesheet" href="../static/css/sign_in.css">
  21. -->
  22. <script>
  23. $(document).ready(function () {
  24. $("#coffee_title_pc").text('Smart Coffee 總貨櫃系統');
  25. $("#coffee_title_phone").text('總貨櫃系統');
  26. loading_status();
  27. });
  28. function loading_status(){
  29. $.get('/loading/container', '', function (res) {
  30. if (res.Clean_container == 'Waiting') {
  31. $("#CleanContainer_status").css("background-color", "#C0C0C0")
  32. } else if (res.Clean_container == 'Working') {
  33. $("#CleanContainer_status").css("background-color", "forestgreen")
  34. } else if (res.Clean_container == 'Warning') {
  35. $("#CleanContainer_status").css("background-color", "crimson")
  36. }
  37. if (res.ColorSelect_container == 'Waiting') {
  38. $("#ColorContainer_status").css("background-color", "#C0C0C0")
  39. } else if (res.ColorSelect_container == 'Working') {
  40. $("#ColorContainer_status").css("background-color", "forestgreen")
  41. } else if (res.ColorSelect_container == 'Warning') {
  42. $("#ColorContainer_status").css("background-color", "crimson")
  43. }
  44. if (res.Peel_container == 'Waiting') {
  45. $("#PeelContainer_status").css("background-color", "#C0C0C0")
  46. } else if (res.Peel_container == 'Working') {
  47. $("#PeelContainer_status").css("background-color", "forestgreen")
  48. } else if (res.Peel_container == 'Warning') {
  49. $("#PeelContainer_status").css("background-color", "crimson")
  50. }
  51. if (res.Ferment_container == 'Waiting') {
  52. $("#FermentContainer_status").css("background-color", "#C0C0C0")
  53. } else if (res.Ferment_container == 'Working') {
  54. $("#FermentContainer_status").css("background-color", "forestgreen")
  55. } else if (res.Ferment_container == 'Warning') {
  56. $("#FermentContainer_status").css("background-color", "crimson")
  57. }
  58. if (res.Dry_container == 'Waiting') {
  59. $("#DryContainer_status").css("background-color", "#C0C0C0")
  60. } else if (res.Dry_container == 'Working') {
  61. $("#DryContainer_status").css("background-color", "forestgreen")
  62. } else if (res.Dry_container == 'Warning') {
  63. $("#DryContainer_status").css("background-color", "crimson")
  64. }
  65. }, 'json');
  66. }
  67. </script>
  68. <style>
  69. /* .Container_position {
  70. position: absolute;
  71. top: 100px;
  72. left: 125px;
  73. width: 1295px;
  74. height: 100px;
  75. } */
  76. /* 桶槽狀態顯示的顏色條 */
  77. .div-Container-Status {
  78. width: 100%;
  79. height: 20px;
  80. background-color: #c0c0c0;
  81. text-align: center;
  82. background-color: black;
  83. }
  84. /* 各桶槽圖片大小的共同 CSS, 詳細位置數值如下 */
  85. .div_Container_position {
  86. text-align: center;
  87. font-weight: bold;
  88. border: 1px aquamarine solid;
  89. }
  90. #CleanContainer {
  91. position: absolute;
  92. top: 85px;
  93. left: 115px;
  94. width: 245px;
  95. height: 590px;
  96. }
  97. #ColorContainer {
  98. position: absolute;
  99. top: 85px;
  100. left: 370px;
  101. width: 255px;
  102. height: 590px;
  103. }
  104. #PeelContainer {
  105. position: absolute;
  106. top: 85px;
  107. left: 635px;
  108. width: 250px;
  109. height: 590px;
  110. }
  111. #FermentContainer {
  112. position: absolute;
  113. top: 85px;
  114. left: 900px;
  115. width: 220px;
  116. height: 590px;
  117. }
  118. #DryContainer {
  119. position: absolute;
  120. top: 85px;
  121. left: 1135px;
  122. width: 280px;
  123. height: 590px;
  124. }
  125. </style>
  126. </head>
  127. <body>
  128. <div id="wrapper">
  129. <div id="coffee_header">
  130. <!-- 匯入共同使用的 header.html 內容 -->
  131. {% include 'header.html' %}
  132. </div>
  133. <div style="height: 605px;">
  134. <br>
  135. <br>
  136. <!-- 底圖 各貨櫃示意圖 -->
  137. <!-- <center><img src="../static/img/Coffee_home.png" style="margin: auto; width: 1300px;"></center> -->
  138. <!-- 清洗浮選槽 -->
  139. <div id="CleanContainer" tabindex="0" class="div_Container_position" role="button">
  140. 清洗浮選狀態
  141. <div id="CleanContainer_status" class="div-Container-Status"></div>
  142. <img src="../static/img/clean.png" width="100%">
  143. </div>
  144. <!-- 色選機 -->
  145. <div id="ColorContainer" tabindex="0" class="div_Container_position" role="button">
  146. 色選機狀態
  147. <div id="ColorContainer_status" class="div-Container-Status"></div>
  148. <img src="../static/img/color.png" width="100%">
  149. </div>
  150. <!-- 脫皮機 -->
  151. <div id="PeelContainer" tabindex="0" class="div_Container_position" role="button">
  152. 脫皮機狀態
  153. <div id="PeelContainer_status" class="div-Container-Status"></div>
  154. <img src="../static/img/peel.png" width="100%">
  155. </div>
  156. <!-- 發酵槽 -->
  157. <div id="FermentContainer" tabindex="0" class="div_Container_position" role="button">
  158. 發酵槽狀態
  159. <div id="FermentContainer_status" class="div-Container-Status"></div>
  160. <img src="../static/img/ferment.png" width="100%">
  161. </div>
  162. <!-- 乾燥槽 -->
  163. <div id="DryContainer" tabindex="0" class="div_Container_position" role="button">
  164. 乾燥槽狀態
  165. <div id="DryContainer_status" class="div-Container-Status"></div>
  166. <img src="../static/img/dry.png" width="100%">
  167. </div>
  168. <br>
  169. <br>
  170. </div>
  171. <script>
  172. var button_CleanContainer = document.getElementById('CleanContainer');
  173. button_CleanContainer.addEventListener('click', function () {
  174. window.location.href = '/clean';
  175. });
  176. var button_ColorContainer = document.getElementById('ColorContainer');
  177. button_ColorContainer.addEventListener('click', function () {
  178. window.location.href = '/clean';
  179. });
  180. var button_PeelContainer = document.getElementById('PeelContainer');
  181. button_PeelContainer.addEventListener('click', function () {
  182. window.location.href = '/clean';
  183. });
  184. var button_FermentContainer = document.getElementById('FermentContainer');
  185. button_FermentContainer.addEventListener('click', function () {
  186. window.location.href = '/ferment';
  187. });
  188. var button_DryContainer = document.getElementById('DryContainer');
  189. button_DryContainer.addEventListener('click', function () {
  190. window.location.href = '/dry';
  191. });
  192. </script>
  193. <div id="coffee_footer">
  194. <!-- 匯入共同使用的 footer.html 內容 -->
  195. {% include 'footer.html' %}
  196. </div>
  197. </div>
  198. </body>
  199. </html>