ctrl_D_ThreeWayValve.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  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. <!-- <meta http-equiv="refresh" content="60" /> 每 content 秒網頁自動更新-->
  8. <!-- 新 Bootstrap4 核心 CSS 文件 -->
  9. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
  10. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  11. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  12. <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
  13. <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  14. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  15. <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  16. <!--可用來建立使用者小圖示-->
  17. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  18. <!-- Rita 乾燥貨櫃 - 入料、桶槽、出料制動器 function-->
  19. <script type="text/javascript" src="../static/js/dry_function.js"></script>
  20. <script language="JavaScript">
  21. // 指定 秒 刷新網頁一次
  22. var tid = '{{tid}}';
  23. console.log('tid:' + tid)
  24. var tank_num = '{{tid}}';
  25. $(function(){
  26. $("#ctrl_D_ThreeWayValve_title").text('乾燥槽 D' + tid + ' 三通閥')
  27. $("#dry_tank_page").text('乾燥槽 D' + tid + ' 操作介面 ')
  28. $('#dry_tank_page').attr("href", "/dry_container/" + tid)
  29. $("#coffee_title").text('D' + tid + ' 乾燥槽_三通閥');
  30. });
  31. </script>
  32. <style>
  33. .footer{
  34. position: absolute;
  35. width: 100%;
  36. background-color: #eee;
  37. text-align: center;
  38. }
  39. body {
  40. margin: 0;
  41. }
  42. .navbar-dark .navbar-nav .nav-link {
  43. color: white;
  44. cursor: pointer;
  45. text-decoration: none;
  46. width: 110px;
  47. height: 46px;
  48. }
  49. .nav-top {
  50. line-height: 40px;
  51. background-color: #C4C4C4;
  52. }
  53. .website_title {
  54. font-family: Roboto;
  55. font-style: normal;
  56. font-weight: normal;
  57. font-size: 30px;
  58. color: #000000;
  59. }
  60. .navbar-nav>li {
  61. float: none;
  62. display: inline-block;
  63. width: 100px;
  64. margin: 0 auto;
  65. text-align: center;
  66. }
  67. .navbar-nav>li a {
  68. font-size: 20px;
  69. }
  70. .main-page {
  71. margin-top: 200px;
  72. }
  73. .page-title {
  74. font-family: Roboto;
  75. font-style: normal;
  76. font-weight: bold;
  77. font-size: 36px;
  78. }
  79. .flex {
  80. display: flex;
  81. flex-direction: row;
  82. flex-wrap: wrap;
  83. justify-content: center;
  84. }
  85. .set-link {
  86. display: inline-block;
  87. width: 350px;
  88. height: 100px;
  89. line-height: 100px;
  90. background: #008CBA;
  91. border: 1px solid #CFCFCF;
  92. box-sizing: border-box;
  93. color: #FFFFFF;
  94. border-radius: 10px;
  95. font-size: 36px;
  96. }
  97. .cmn-toggle {
  98. position: absolute;
  99. margin-left: 0px;
  100. visibility: hidden;
  101. }
  102. .cmn-toggle+label {
  103. display: block;
  104. position: relative;
  105. cursor: pointer;
  106. outline: none;
  107. user-select: none;
  108. }
  109. input.cmn-toggle-round-flat+label {
  110. padding: 2px;
  111. width: 60px;
  112. height: 30px;
  113. background-color: #C0C0C0;
  114. border-radius: 60px;
  115. transition: background 0.4s;
  116. }
  117. input.cmn-toggle-round-flat+label:before,
  118. input.cmn-toggle-round-flat+label:after {
  119. display: block;
  120. position: absolute;
  121. content: "";
  122. }
  123. input.cmn-toggle-round-flat+label:before {
  124. top: 2px;
  125. left: 2px;
  126. bottom: 2px;
  127. right: 2px;
  128. background-color: #fff;
  129. border-radius: 60px;
  130. transition: background 0.4s;
  131. }
  132. input.cmn-toggle-round-flat+label:after {
  133. top: 4px;
  134. left: 4px;
  135. bottom: 4px;
  136. width: 24px;
  137. background-color: #dddddd;
  138. border-radius: 52px;
  139. transition: margin 0.4s, background 0.4s;
  140. }
  141. input.cmn-toggle-round-flat:checked+label {
  142. background-color: #C0C0C0;
  143. }
  144. input.cmn-toggle-round-flat:checked+label:after {
  145. margin-left: 27px;
  146. background-color: #008CBA;
  147. }
  148. @media(max-width:373px) {
  149. .card {
  150. margin-right: 0px;
  151. }
  152. .set-link {
  153. width: 250px;
  154. }
  155. }
  156. @media(max-width:577px) {}
  157. @media(min-width:576px) {}
  158. @media(min-width:768px) {
  159. .navbar-nav>li {
  160. margin-left: 0px;
  161. }
  162. .navbar-nav .li-block {
  163. display: none;
  164. }
  165. }
  166. @media(min-width:991px) {
  167. .navbar-nav>li {
  168. margin-left: 20px;
  169. }
  170. .navbar-nav .li-block {
  171. display: none;
  172. }
  173. }
  174. @media(min-width:1200px) {
  175. .navbar-nav>li {
  176. margin-left: 50px;
  177. }
  178. .navbar-nav .li-block {
  179. display: inline-block;
  180. width: 100px;
  181. }
  182. }
  183. @media(min-width:1400px) {
  184. .navbar-nav .li-block {
  185. display: inline-block;
  186. width: 200px;
  187. }
  188. }
  189. @media(min-width:1689px) {
  190. .navbar-nav>li {
  191. margin-left: 50px;
  192. }
  193. .navbar-nav .li-block {
  194. display: inline-block;
  195. width: 500px;
  196. }
  197. }
  198. </style>
  199. </head>
  200. <body>
  201. <div id="wrapper">
  202. <div id="coffee_header">
  203. <!-- 匯入共同使用的 header.html 內容 -->
  204. {% include 'header.html' %}
  205. </div>
  206. <!--
  207. <div style="text-align: left;">
  208. <a href="/dry" style="float: left;">&nbsp;&nbsp;&nbsp;返回乾燥貨櫃首頁</a>
  209. </div>
  210. <div style="text-align: right;">
  211. <a id="dry_tank_page" href="/index_new" style="float: right;">___________________</a>
  212. </div>
  213. <div id="ctrl_D_ThreeWayValve_title" style="text-align: center; margin-top: 30px; font-size: 24px; margin-bottom: 15px;">
  214. 乾燥槽 D_ 三通閥
  215. </div>
  216. -->
  217. <table border="1" style="margin: auto; font-size:18px; border:2px #cccccc solid;" width=700px cellpadding="8">
  218. <tr>
  219. <!--
  220. <td rowspan="3">
  221. 手動控制
  222. </td>
  223. -->
  224. <td>
  225. 三通閥 狀態
  226. </td>
  227. <td>
  228. {% if tank_threewayvalve == 1 %}
  229. <span style="color:#008CBA; font-size:18px;"><strong>ON</strong></span>
  230. {% elif tank_threewayvalve == 0 %}
  231. <span style="color:#acacac; font-size:18px;"><strong>OFF</strong></span>
  232. {% else %}
  233. <span style="color: #fc7373;; font-size:18px;">ERROR</span>
  234. {% endif %}
  235. </td>
  236. </tr>
  237. <tr>
  238. <td>開啟 三通閥 吸料</td>
  239. <td><input type="button" value="ON" onclick="tankThreeWayValve_ON()"></td>
  240. </tr>
  241. <tr>
  242. <td>關閉 三通閥 排氣</td>
  243. <td><input type="button" value="OFF" onclick="tankThreeWayValve_OFF()"></td>
  244. </tr>
  245. </table>
  246. <br>
  247. <div style="text-align: center;">
  248. 狀態更新時間(秒):
  249. <input name="webupdate_time" type="text" value="5" style="width: 40px;">
  250. <input type="button" value="設定更新時間" onclick="changeUpdate()">
  251. </div>
  252. <script language="JavaScript">
  253. function changeUpdate() {
  254. // clearInterval(WebUpdate_set);
  255. var webupdate_time = $("input[name=webupdate_time]").val()
  256. console.log('webupdate_time' + webupdate_time)
  257. WebUpdate_set = setInterval(function(){WebUpdate(dtn)} , webupdate_time * 1000);
  258. }
  259. // jQuery 更新感測器制動器狀態
  260. function WebUpdate(dtn) {
  261. $.get('/loading/D' + dtn, '', function (res) {
  262. if (res.tank_vacuum == 0) {
  263. $("#cmn-toggle-08").prop('checked', false);
  264. } else if (res.tank_vacuum == 1) {
  265. $("#cmn-toggle-08").prop('checked', true);
  266. }
  267. $("#UltraSonic_t_status").text(res.UltraSonic);
  268. }, 'json');
  269. }
  270. </script>
  271. <br>
  272. <footer class="footer">
  273. <div style="text-align: center; margin-top: 10px; font-size: 13px; margin-bottom: 10px;">
  274. Copyright © 2021 Gold-in Tech. All Rights Reserved. 金子進科技股份有限公司 版權所有
  275. <a href="mailto:service.gitc@gmail.com" target="_blank">service.gitc@gmail.com</a>
  276. </div>
  277. </footer>
  278. <div id="coffee_footer">
  279. <!-- 匯入共同使用的 footer.html 內容 -->
  280. {% include 'footer.html' %}
  281. </div>
  282. </div>
  283. </body>
  284. </html>