ferment.html 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050
  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. <!--
  16. <script src="../static/js/sign_in.js"></script>
  17. <link rel="stylesheet" href="../static/css/sign_in.css">
  18. -->
  19. <script>
  20. $(document).ready(function(){
  21. $("#coffee_title").text('發酵貨櫃');
  22. });
  23. </script>
  24. <style>
  25. .FermentContainer_position {
  26. position: absolute;
  27. top: 95px;
  28. left: 53px;
  29. }
  30. .F1_position {
  31. position: absolute;
  32. top: 155px;
  33. left: 240px;
  34. width: 160px;
  35. height: 210px;
  36. border-style: solid;
  37. border-color: aqua;
  38. }
  39. .F2_position {
  40. position: absolute;
  41. top: 155px;
  42. left: 415px;
  43. width: 160px;
  44. height: 210px;
  45. border-style: solid;
  46. border-color: aqua;
  47. }
  48. .F3_position {
  49. position: absolute;
  50. top: 155px;
  51. left: 595px;
  52. width: 160px;
  53. height: 210px;
  54. border-style: solid;
  55. border-color: aqua;
  56. }
  57. .F4_position {
  58. position: absolute;
  59. top: 155px;
  60. left: 780px;
  61. width: 160px;
  62. height: 210px;
  63. border-style: solid;
  64. border-color: aqua;
  65. }
  66. .F5_position {
  67. position: absolute;
  68. top: 155px;
  69. left: 960px;
  70. width: 160px;
  71. height: 210px;
  72. border-style: solid;
  73. border-color: aqua;
  74. }
  75. .F6_position {
  76. position: absolute;
  77. top: 155px;
  78. left: 1150px;
  79. width: 160px;
  80. height: 210px;
  81. border-style: solid;
  82. border-color: aqua;
  83. }
  84. .F7_position {
  85. position: absolute;
  86. top: 430px;
  87. left: 245px;
  88. width: 160px;
  89. height: 210px;
  90. border-style: solid;
  91. border-color: aqua;
  92. }
  93. .F8_position {
  94. position: absolute;
  95. top: 430px;
  96. left: 420px;
  97. width: 160px;
  98. height: 210px;
  99. border-style: solid;
  100. border-color: aqua;
  101. }
  102. .F9_position {
  103. position: absolute;
  104. top: 430px;
  105. left: 600px;
  106. width: 160px;
  107. height: 210px;
  108. border-style: solid;
  109. border-color: aqua;
  110. }
  111. .F10_position {
  112. position: absolute;
  113. top: 430px;
  114. left: 785px;
  115. width: 160px;
  116. height: 210px;
  117. border-style: solid;
  118. border-color: aqua;
  119. }
  120. .F11_position {
  121. position: absolute;
  122. top: 430px;
  123. left: 970px;
  124. width: 160px;
  125. height: 210px;
  126. border-style: solid;
  127. border-color: aqua;
  128. }
  129. .F12_position {
  130. position: absolute;
  131. top: 430px;
  132. left: 1155px;
  133. width: 160px;
  134. height: 210px;
  135. border-style: solid;
  136. border-color: aqua;
  137. }
  138. .FI1_position {
  139. position: absolute;
  140. top: 210px;
  141. left: 140px;
  142. width: 50px;
  143. height: 140px;
  144. border-style: solid;
  145. border-color: aqua;
  146. }
  147. .FI2_position {
  148. position: absolute;
  149. top: 430px;
  150. left: 140px;
  151. width: 50px;
  152. height: 140px;
  153. border-style: solid;
  154. border-color: aqua;
  155. }
  156. .FO1_position {
  157. position: absolute;
  158. top: 195px;
  159. left: 1350px;
  160. width: 50px;
  161. height: 140px;
  162. border-style: solid;
  163. border-color: aqua;
  164. }
  165. .FO2_position {
  166. position: absolute;
  167. top: 480px;
  168. left: 1350px;
  169. width: 50px;
  170. height: 140px;
  171. border-style: solid;
  172. border-color: aqua;
  173. }
  174. .footer{
  175. position: absolute;
  176. bottom: 0px;
  177. width: 100%;
  178. background-color: #eee;
  179. text-align: center;
  180. }
  181. </style>
  182. <script language="JavaScript">
  183. // 指定 10秒 刷新網頁一次
  184. var WebRestart
  185. // WebRestart = setTimeout(function () { location.reload() }, 10000);
  186. </script>
  187. </head>
  188. <body>
  189. <div id="wrapper">
  190. <div id="coffee_header">
  191. <!-- 匯入共同使用的 header.html 內容 -->
  192. {% include 'header.html' %}
  193. </div>
  194. <!--
  195. background-color:rgb(0, 238, 255);
  196. -->
  197. <!--
  198. <div style="text-align: left;">
  199. <a href="/index_new" style="float: left;">&nbsp;&nbsp;&nbsp;返回貨櫃首頁</a>
  200. </div>
  201. <div style="text-align: right;">
  202. <a href="/camera_ferment" style="float: right;">發酵槽攝影機&nbsp;&nbsp;&nbsp;</a>
  203. </div>
  204. <div style="text-align: center; margin-top: 30px; font-size: 24px;">
  205. Smart Coffee
  206. </div>
  207. -->
  208. <div>
  209. <!-- 底圖 發酵貨櫃 12 個發酵桶槽 -->
  210. <div id="FermentContainer_pic" class="FermentContainer_position" >
  211. <img src="../static/img/web_ferment_container.png" width="1450x" style="margin: auto;">
  212. </div>
  213. <!-- 發酵槽 F1 -->
  214. <div id="F1" tabindex="0" class="F1_position" role="button">
  215. F1 status
  216. <!-- F1 狀態點點-->
  217. <div id="F1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  218. </div>
  219. <!-- 發酵槽 F2 -->
  220. <div id="F2" tabindex="0" class="F2_position" role="button">
  221. F2 status
  222. <div id="F2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  223. </div>
  224. <!-- 發酵槽 F3 -->
  225. <div id="F3" tabindex="0" class="F3_position" role="button">
  226. F3 status
  227. <div id="F3_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  228. </div>
  229. <!-- 發酵槽 F4 -->
  230. <div id="F4" tabindex="0" class="F4_position" role="button">
  231. F4 status
  232. <div id="F4_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  233. </div>
  234. <!-- 發酵槽 F5 -->
  235. <div id="F5" tabindex="0" class="F5_position" role="button">
  236. F5 status
  237. <div id="F5_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  238. </div>
  239. <!-- 發酵槽 F6 -->
  240. <div id="F6" tabindex="0" class="F6_position" role="button">
  241. F6 status
  242. <div id="F6_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  243. </div>
  244. <!-- 發酵槽 F7 -->
  245. <div id="F7" tabindex="0" class="F7_position" role="button" style="vertical-align: bottom;">
  246. F7 status
  247. <div id="F7_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  248. </div>
  249. <!-- 發酵槽 F8 -->
  250. <div id="F8" tabindex="0" class="F8_position" role="button">
  251. F8 status
  252. <div id="F8_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  253. </div>
  254. <!-- 發酵槽 F9 -->
  255. <div id="F9" tabindex="0" class="F9_position" role="button">
  256. F9 status
  257. <div id="F9_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  258. </div>
  259. <!-- 發酵槽 F10 -->
  260. <div id="F10" tabindex="0" class="F10_position" role="button">
  261. F10 status
  262. <div id="F10_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  263. </div>
  264. <!-- 發酵槽 F11 -->
  265. <div id="F11" tabindex="0" class="F11_position" role="button">
  266. F11 status
  267. <div id="F11_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  268. </div>
  269. <!-- 發酵槽 F12 -->
  270. <div id="F12" tabindex="0" class="F12_position" role="button">
  271. F12 status
  272. <div id="F12_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  273. </div>
  274. <!-- 發酵槽入料儲豆槽 FI1 -->
  275. <div id="FI1" tabindex="0" class="FI1_position" role="button">
  276. FI1 status
  277. <div id="FI1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  278. </div>
  279. <!-- 發酵槽入料儲豆槽 FI2 -->
  280. <div id="FI2" tabindex="0" class="FI2_position" role="button">
  281. FI2 status
  282. <div id="FI2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  283. </div>
  284. <!-- 發酵槽出料儲豆槽 FO1 -->
  285. <div id="FO1" tabindex="0" class="FO1_position" role="button">
  286. FO1 status
  287. <div id="FO1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  288. </div>
  289. <!-- 發酵槽出料儲豆槽 FO2 -->
  290. <div id="FO2" tabindex="0" class="FO2_position" role="button">
  291. FO2 status
  292. <div id="FO2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  293. </div>
  294. </div>
  295. <!-- 發酵槽互動視窗(模态框) -->
  296. <div class="modal fade" id="F_Modal">
  297. <div class="modal-dialog modal-dialog-centered" style="width: 410px;">
  298. <div class="modal-content">
  299. <!-- 互動視窗 標題 -->
  300. <div class="modal-header">
  301. <h4 id="Modal_title" class="modal-title">發酵槽 F1 狀態</h4>
  302. <button type="button" class="close" data-dismiss="modal">&times;</button>
  303. </div>
  304. <!-- 互動視窗 內容 -->
  305. <div class="modal-body">
  306. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  307. <!--<table style="border:0px gray solid;-->
  308. <tr>
  309. <td><strong><a id="actuator_link" href="/ferment_container/1">制動器狀態</a></strong></td>
  310. <td><strong><a id="sensor_link" href="/ferment_container/1">感測器狀態</a></strong></td>
  311. </tr>
  312. <tr>
  313. <td style="vertical-align:text-top;">
  314. <table style="border:0px gray solid;" cellpadding="3">
  315. <!--font-size:12px; -->
  316. <tr>
  317. <td>
  318. <div id="tank_vacuum_status"
  319. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  320. </div>
  321. </td>
  322. <td>
  323. <a id="Vacuum" href="">真空吸料機</a>
  324. <!--<span id="tank_vacuum_t_status"></span>-->
  325. </td>
  326. </tr>
  327. <tr>
  328. <td>
  329. <div id="tank_threewayvalve_input_status"
  330. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  331. </div>
  332. </td>
  333. <td>
  334. <a id="ThreeWayValveInput" href="">入料三通閥</a>
  335. <!--<span id="tank_threewayvalve_input_t_status"></span>-->
  336. </td>
  337. </tr>
  338. <tr>
  339. <td>
  340. <div id="tank_solenoid_water_total_status"
  341. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  342. </div>
  343. </td>
  344. <td>
  345. <a id="SolenoidWaterTotal" href="">總進水電磁閥</a>
  346. <!--<span id="tank_solenoid_water_total_t_status"></span>-->
  347. </td>
  348. </tr>
  349. <tr>
  350. <td>
  351. <div id="outer_solenoid_water_status"
  352. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  353. </div>
  354. </td>
  355. <td>
  356. <a id="SolenoidOuterWater" href="">保溫夾層進水電磁閥</a>
  357. <!--<span id="outer_solenoid_water_t_status"></span>-->
  358. </td>
  359. </tr>
  360. <tr>
  361. <td>
  362. <div id="tank_solenoid_water_in_status"
  363. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  364. </div>
  365. </td>
  366. <td>
  367. <a id="SolenoidWaterIn" href="">桶內進水電磁閥</a>
  368. <!--<span id="tank_solenoid_water_in_t_status"></span>-->
  369. </td>
  370. </tr>
  371. <tr>
  372. <td>
  373. <div id="tank_pump_sensor_status"
  374. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  375. </div>
  376. </td>
  377. <td>
  378. <a id="PumpSensor" href="">感測器抽水雙核隔膜泵</a>
  379. <!--<span id="tank_pump_sensor_t_status"></span>-->
  380. </td>
  381. </tr>
  382. <tr>
  383. <td>
  384. <div id="tank_threewayvalve_bean_status"
  385. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  386. </div>
  387. </td>
  388. <td>
  389. <a id="ThreeWayValveBean" href="">感測模組下豆三通閥</a>
  390. <!--<span id="tank_threewayvalve_bean_t_status"></span>-->
  391. </td>
  392. </tr>
  393. <tr>
  394. <td>
  395. <div id="outer_threewayvalve_float_status"
  396. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  397. </div>
  398. </td>
  399. <td>
  400. <a id="ThreeWayValveFloat" href="">外桶浮選三通閥</a>
  401. <!--<span id="outer_threewayvalve_float_t_status"></span>-->
  402. </td>
  403. </tr>
  404. <tr>
  405. <td>
  406. <div id="tank_solenoid_disinfect_status"
  407. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  408. </div>
  409. </td>
  410. <td>
  411. <a id="SolenoidDisinfect" href="">桶內消毒電磁閥</a>
  412. <!--<span id="tank_solenoid_disinfect_t_status"></span>-->
  413. </td>
  414. </tr>
  415. <tr>
  416. <td>
  417. <div id="tank_motor_status"
  418. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  419. </div>
  420. </td>
  421. <td>
  422. <a id="Motor" href="">馬達</a>
  423. <!--<span id="tank_motor_t_status"></span>-->
  424. </td>
  425. </tr>
  426. <tr>
  427. <td>
  428. <div id="tank_heater1_status"
  429. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  430. </div>
  431. </td>
  432. <td>
  433. <a id="Heater1" href="">加熱器 1</a>
  434. <!--<span id="tank_heater1_t_status"></span>-->
  435. </td>
  436. </tr>
  437. <tr>
  438. <td>
  439. <div id="tank_heater2_status"
  440. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  441. </div>
  442. </td>
  443. <td>
  444. <a id="Heater2" href="">加熱器 2</a>
  445. <!--<span id="tank_heater2_t_status"></span>-->
  446. </td>
  447. </tr>
  448. <tr>
  449. <td>
  450. <div id="tank_temp_enable_status"
  451. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  452. </div>
  453. </td>
  454. <td>
  455. <a id="TempEnable" href="">溫控開關</a>
  456. <!--<span id="tank_temp_enable_t_status"></span>-->
  457. </td>
  458. </tr>
  459. <tr>
  460. <td>
  461. <div id="tank_temp_status"
  462. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  463. </div>
  464. </td>
  465. <td>
  466. <a id="temp" href="">溫度設定</a>
  467. <!--<span id="tank_temp_t_status"></span>-->
  468. </td>
  469. </tr>
  470. <tr>
  471. <td>
  472. <div id="tank_diskvalve_status"
  473. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  474. </div>
  475. </td>
  476. <td>
  477. <a id="DiskValve" href="">蝴蝶閥</a>
  478. <!--<span id="tank_diskvalve_t_status"></span>-->
  479. </td>
  480. </tr>
  481. </table>
  482. </td>
  483. <td style="vertical-align:text-top;">
  484. <table style="border:0px gray solid;" cellpadding="3">
  485. <tr>
  486. <td>
  487. <a id="UltraSonic" href="">水位/生豆高度</a>
  488. </td>
  489. <td>
  490. <span id="UltraSonic_t_status"></span>
  491. </td>
  492. </tr>
  493. <tr>
  494. <td>
  495. <a id="SHT11_Temp" href="">溫度</a>
  496. </td>
  497. <td>
  498. <span id="SHT11_Temp_t_status"></span>
  499. </td>
  500. </tr>
  501. <tr>
  502. <td>
  503. <a id="SHT11_Humidity" href="">濕度</a>
  504. </td>
  505. <td>
  506. <span id="SHT11_Humidity_t_status"></span>
  507. </td>
  508. </tr>
  509. <tr>
  510. <td>
  511. <a id="CO2" href="">二氧化碳</a>
  512. </td>
  513. <td>
  514. <span id="CO2_t_status"></span>
  515. </td>
  516. </tr>
  517. <tr>
  518. <td>
  519. <a id="PA" href="">大氣壓力</a>
  520. </td>
  521. <td>
  522. <span id="PA_t_status"></span>
  523. </td>
  524. </tr>
  525. <tr>
  526. <td>
  527. <a id="PH" href="">PH</a>
  528. </td>
  529. <td>
  530. <span id="PH_t_status"></span>
  531. </td>
  532. </tr>
  533. <tr>
  534. <td>
  535. <a id="ORP" href="">ORP</a>
  536. </td>
  537. <td>
  538. <span id="ORP_t_status"></span>
  539. </td>
  540. </tr>
  541. <tr>
  542. <td>
  543. <a id="DO" href="">DO</a>
  544. </td>
  545. <td>
  546. <span id="DO_t_status"></span>
  547. </td>
  548. </tr>
  549. <tr>
  550. <td>
  551. <a id="EC" href="">EC</a>
  552. </td>
  553. <td>
  554. <span id="EC_t_status"></span>
  555. </td>
  556. </tr>
  557. <tr>
  558. <td>
  559. 保溫夾層水位
  560. </td>
  561. <td>
  562. <!-- 滿 / 未滿 -->
  563. <span id="WaterLevel_t_status"></span>
  564. </td>
  565. </tr>
  566. <tr>
  567. <td>
  568. <a id="camera_ferment_tid" href=""><strong>攝影機畫面</strong></a>
  569. </td>
  570. </tr>
  571. </table>
  572. </td>
  573. </tr>
  574. </table>
  575. </div>
  576. </div>
  577. </div>
  578. </div>
  579. <!-- 發酵槽入料儲豆槽互動視窗(模态框) -->
  580. <div class="modal fade" id="FI_Modal">
  581. <div class="modal-dialog modal-dialog-centered" style="width: 410px;">
  582. <div class="modal-content">
  583. <!-- 互動視窗 標題 -->
  584. <div class="modal-header">
  585. <h4 id="Modal_title_input" class="modal-title">發酵入料儲豆槽 FI1 狀態</h4>
  586. <button type="button" class="close" data-dismiss="modal">&times;</button>
  587. </div>
  588. <!-- 互動視窗 內容 -->
  589. <div class="modal-body">
  590. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  591. <!--<table style="border:0px gray solid;-->
  592. <tr>
  593. <td><strong><a id="actuator_link_input" href="/ferment_container/1">制動器狀態</a></strong></td>
  594. <td><strong><a id="sensor_link_input" href="/ferment_container/1">感測器狀態</a></strong></td>
  595. </tr>
  596. <tr>
  597. <td style="vertical-align:text-top;">
  598. <table style="border:0px gray solid;" cellpadding="3">
  599. <!--font-size:12px; -->
  600. <tr>
  601. <td>
  602. <div id="input_vacuum_status"
  603. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  604. </div>
  605. </td>
  606. <td>
  607. <a id="input_Vacuum" href="">真空吸料機</a>
  608. <span id="input_vacuum_status"></span>
  609. </td>
  610. </tr>
  611. </table>
  612. </td>
  613. <td style="vertical-align:text-top;">
  614. <table style="border:0px gray solid;" cellpadding="3">
  615. <tr>
  616. <td>
  617. <a id="FI_UltraSonic" href="">咖啡生豆高度</a>
  618. </td>
  619. <td>
  620. <span id="FI_UltraSonic_t_status"></span>
  621. </td>
  622. </tr>
  623. <tr>
  624. <td>
  625. <a id="FI_camera_ferment_tid" href=""><strong>攝影機畫面</strong></a>
  626. </td>
  627. </tr>
  628. </table>
  629. </td>
  630. </tr>
  631. </table>
  632. </div>
  633. </div>
  634. </div>
  635. </div>
  636. <!-- 發酵槽出料儲豆槽互動視窗(模态框) -->
  637. <div class="modal fade" id="FO_Modal">
  638. <div class="modal-dialog modal-dialog-centered" style="width: 410px;">
  639. <div class="modal-content">
  640. <!-- 互動視窗 標題 -->
  641. <div class="modal-header">
  642. <h4 id="Modal_title_output" class="modal-title">發酵出料儲豆槽 FO1 狀態</h4>
  643. <button type="button" class="close" data-dismiss="modal">&times;</button>
  644. </div>
  645. <!-- 互動視窗 內容 -->
  646. <div class="modal-body">
  647. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  648. <!--<table style="border:0px gray solid;-->
  649. <tr>
  650. <td><strong><a id="actuator_link_output" href="/ferment_container/1">制動器狀態</a></strong></td>
  651. <td><strong><a id="sensor_link_output" href="/ferment_container/1">感測器狀態</a></strong></td>
  652. </tr>
  653. <tr>
  654. <td style="vertical-align:text-top;">
  655. <table style="border:0px gray solid;" cellpadding="3">
  656. <!--font-size:12px; -->
  657. <tr>
  658. <td>
  659. <div id="output_vacuum_status"
  660. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  661. </div>
  662. </td>
  663. <td>
  664. <a id="output_Vacuum" href="">真空吸料機</a>
  665. <span id="output_vacuum_status"></span>
  666. </td>
  667. </tr>
  668. </table>
  669. </td>
  670. <td style="vertical-align:text-top;">
  671. <table style="border:0px gray solid;" cellpadding="3">
  672. <tr>
  673. <td>
  674. <a id="FO_UltraSonic" href="">咖啡生豆高度</a>
  675. </td>
  676. <td>
  677. <span id="FO_UltraSonic_t_status"></span>
  678. </td>
  679. </tr>
  680. <tr>
  681. <td>
  682. <a id="FO_camera_ferment_tid" href=""><strong>攝影機畫面</strong></a>
  683. </td>
  684. </tr>
  685. </table>
  686. </td>
  687. </tr>
  688. </table>
  689. </div>
  690. </div>
  691. </div>
  692. </div>
  693. <script>
  694. /*
  695. var button_F1 = document.getElementById('F1');
  696. button_F1.addEventListener('click', showTankDetail);
  697. //var button_F2 = document.getElementById('F2');
  698. //button_F2.addEventListener('click', showTankDetail);
  699. var tank_num = 0;
  700. function showTankDetail() {
  701. // 打開模態框
  702. $('#Modal').modal('show');
  703. };
  704. */
  705. function update_data_F(ftid) {
  706. console.log('ferment_tank_id:' + ftid)
  707. // ftid = dry_tank_id
  708. $.get('/loading/F' + ftid, '', function (res) {
  709. if (res.tank_vacuum == 0) {
  710. $("#tank_vacuum_status").css("background-color", "#C0C0C0")
  711. } else if (res.tank_vacuum == 1) {
  712. $("#tank_vacuum_status").css("background-color", "forestgreen")
  713. } else { $("#tank_vacuum_status").css("background-color", "crimson") }
  714. if (res.tank_threewayvalve_input == 0) {
  715. $("#tank_threewayvalve_input_status").css("background-color", "#C0C0C0")
  716. } else if (res.tank_threewayvalve_input == 1) {
  717. $("#tank_threewayvalve_input_status").css("background-color", "forestgreen")
  718. } else { $("#tank_threewayvalve_input_status").css("background-color", "crimson") }
  719. if (res.tank_diskvalve == 0) {
  720. $("#tank_diskvalve_status").css("background-color", "#C0C0C0")
  721. } else if (res.tank_diskvalve == 1) {
  722. $("#tank_diskvalve_status").css("background-color", "forestgreen")
  723. } else { $("#tank_diskvalve_status").css("background-color", "crimson") }
  724. if (res.tank_solenoid_water_total == 0) {
  725. $("#tank_solenoid_water_total_status").css("background-color", "#C0C0C0")
  726. } else if (res.tank_solenoid_water_total == 1) {
  727. $("#tank_solenoid_water_total_status").css("background-color", "forestgreen")
  728. } else { $("#tank_solenoid_water_total_status").css("background-color", "crimson") }
  729. if (res.tank_solenoid_disinfect == 0) {
  730. $("#tank_solenoid_disinfect_status").css("background-color", "#C0C0C0")
  731. } else if (res.tank_solenoid_disinfect == 1) {
  732. $("#tank_solenoid_disinfect_status").css("background-color", "forestgreen")
  733. } else { $("#tank_solenoid_disinfect_status").css("background-color", "crimson") }
  734. if (res.outer_solenoid_water == 0) {
  735. $("#outer_solenoid_water_status").css("background-color", "#C0C0C0")
  736. } else if (res.outer_solenoid_water == 1) {
  737. $("#outer_solenoid_water_status").css("background-color", "forestgreen")
  738. } else { $("#outer_solenoid_water_status").css("background-color", "crimson") }
  739. if (res.tank_solenoid_water_in == 0) {
  740. $("#tank_solenoid_water_in_status").css("background-color", "#C0C0C0")
  741. } else if (res.tank_solenoid_water_in == 1) {
  742. $("#tank_solenoid_water_in_status").css("background-color", "forestgreen")
  743. } else { $("#tank_solenoid_water_in_status").css("background-color", "crimson") }
  744. if (res.tank_pump_sensor == 0) {
  745. $("#tank_pump_sensor_status").css("background-color", "#C0C0C0")
  746. } else if (res.tank_pump_sensor == 1) {
  747. $("#tank_pump_sensor_status").css("background-color", "forestgreen")
  748. } else { $("#tank_pump_sensor_status").css("background-color", "crimson") }
  749. if (res.tank_threewayvalve_bean == 0) {
  750. $("#tank_threewayvalve_bean_status").css("background-color", "#C0C0C0")
  751. } else if (res.tank_threewayvalve_bean == 1) {
  752. $("#tank_threewayvalve_bean_status").css("background-color", "forestgreen")
  753. } else { $("#tank_threewayvalve_bean_status").css("background-color", "crimson") }
  754. if (res.outer_threewayvalve_float == 0) {
  755. $("#outer_threewayvalve_float_status").css("background-color", "#C0C0C0")
  756. } else if (res.outer_threewayvalve_float == 1) {
  757. $("#outer_threewayvalve_float_status").css("background-color", "forestgreen")
  758. } else { $("#outer_threewayvalve_float_status").css("background-color", "crimson") }
  759. if (res.tank_motor == 0) {
  760. $("#tank_motor_status").css("background-color", "#C0C0C0")
  761. } else if (res.tank_motor > 0 || res.tank_motor < 0) {
  762. $("#tank_motor_status").css("background-color", "forestgreen")
  763. } else { $("#tank_motor_status").css("background-color", "crimson") }
  764. if (res.tank_heater1 == 0) {
  765. $("#tank_heater1_status").css("background-color", "#C0C0C0")
  766. } else if (res.tank_heater1 == 1) {
  767. $("#tank_heater1_status").css("background-color", "forestgreen")
  768. } else { $("#tank_heater1_status").css("background-color", "crimson") }
  769. if (res.tank_heater2 == 0) {
  770. $("#tank_heater2_status").css("background-color", "#C0C0C0")
  771. } else if (res.tank_heater2 == 1) {
  772. $("#tank_heater2_status").css("background-color", "forestgreen")
  773. } else { $("#tank_heater2_status").css("background-color", "crimson") }
  774. if (res.tank_temp_enable == 0) {
  775. $("#tank_temp_enable_status").css("background-color", "#C0C0C0")
  776. } else if (res.tank_temp_enable == 1) {
  777. $("#tank_temp_enable_status").css("background-color", "forestgreen")
  778. } else { $("#tank_temp_enable_status").css("background-color", "crimson") }
  779. if (res.tank_temp == 0) {
  780. $("#tank_temp_status").css("background-color", "#C0C0C0")
  781. } else if (res.tank_temp > 0) {
  782. $("#tank_temp_status").css("background-color", "forestgreen")
  783. } else { $("#tank_temp_status").css("background-color", "crimson") }
  784. $("#tank_vacuum_t_status").text(res.tank_vacuum);
  785. $("#tank_threewayvalve_input_t_status").text(res.tank_threewayvalve_input);
  786. $("#tank_diskvalve_t_status").text(res.tank_diskvalve);
  787. $("#tank_solenoid_water_total_t_status").text(res.tank_solenoid_water_total);
  788. $("#tank_solenoid_disinfect_t_status").text(res.tank_solenoid_disinfect);
  789. $("#outer_solenoid_water_t_status").text(res.outer_solenoid_water);
  790. $("#tank_solenoid_water_in_t_status").text(res.tank_solenoid_water_in);
  791. $("#tank_pump_sensor_t_status").text(res.tank_pump_sensor);
  792. $("#tank_threewayvalve_bean_t_status").text(res.tank_threewayvalve_bean);
  793. $("#outer_threewayvalve_float_t_status").text(res.outer_threewayvalve_float);
  794. $("#tank_motor_t_status").text(res.tank_motor);
  795. $("#tank_heater1_t_status").text(res.tank_heater1);
  796. $("#tank_heater2_t_status").text(res.tank_heater2);
  797. $("#tank_temp_enable_t_status").text(res.tank_temp_enable);
  798. $("#tank_temp_t_status").text(res.tank_temp);
  799. $("#UltraSonic_t_status").text(res.UltraSonic);
  800. $("#SHT11_Temp_t_status").text(res.SHT11_Temp);
  801. $("#SHT11_Humidity_t_status").text(res.SHT11_Humidity);
  802. $("#CO2_t_status").text(res.CO2);
  803. $("#PH_t_status").text(res.PH);
  804. $("#ORP_t_status").text(res.ORP);
  805. $("#DO_t_status").text(res.DO);
  806. $("#EC_t_status").text(res.EC);
  807. $("#PA_t_status").text(res.PA);
  808. $("#WaterLevel_t_status").text(res.WaterLevel);
  809. if (res.WaterLevel == 0) {
  810. $("#WaterLevel_t_status").text("未滿");
  811. } else if (res.WaterLevel == 1) {
  812. $("#WaterLevel_t_status").text("滿");}
  813. }, 'json');
  814. $('#Modal_title').text("發酵槽 F" + ftid + " 狀態")
  815. $('#actuator_link').attr("href", "/ferment_container_tank/" + ftid)
  816. $('#sensor_link').attr("href", "/ferment_container_tank/" + ftid)
  817. $('#Vacuum').attr("href", "/ctrl_F_Vacuum/" + ftid)
  818. $('#ThreeWayValveInput').attr("href", "/ctrl_F_ThreeWayValveInput/" + ftid)
  819. $('#SolenoidWaterTotal').attr("href", "/ctrl_F_SolenoidWaterTotal/" + ftid)
  820. $('#SolenoidOuterWater').attr("href", "/ctrl_F_SolenoidOuterWater/" + ftid)
  821. $('#SolenoidWaterIn').attr("href", "/ctrl_F_SolenoidWaterIn/" + ftid)
  822. $('#PumpSensor').attr("href", "/ctrl_F_PumpSensor/" + ftid)
  823. $('#ThreeWayValveBean').attr("href", "/ctrl_F_ThreeWayValveBean/" + ftid)
  824. $('#ThreeWayValveFloat').attr("href", "/ctrl_F_ThreeWayValveFloat/" + ftid)
  825. $('#SolenoidDisinfect').attr("href", "/ctrl_F_SolenoidDisinfect/" + ftid)
  826. $('#Motor').attr("href", "/ctrl_F_Motor/" + ftid)
  827. $('#Heater1').attr("href", "/ctrl_F_Heater1/" + ftid)
  828. $('#Heater2').attr("href", "/ctrl_F_Heater2/" + ftid)
  829. $('#TempEnable').attr("href", "/ctrl_F_TempEnable/" + ftid)
  830. $('#temp').attr("href", "/ctrl_F_Temp/" + ftid)
  831. $('#DiskValve').attr("href", "/ctrl_F_DiskValve/" + ftid)
  832. $("#LiDAR").attr("href", "/chart_F/LiDAR/" + ftid)
  833. $("#UltraSonic").attr("href", "/chart_F/UltraSonic/" + ftid)
  834. $("#SHT11_Temp").attr("href", "/chart_F/SHT11_Temp/" + ftid)
  835. $("#SHT11_Humidity").attr("href", "/chart_F/SHT11_Humidity/" + ftid)
  836. $("#CO2").attr("href", "/chart_F/CO2/" + ftid)
  837. $("#PH").attr("href", "/chart_F/PH/" + ftid)
  838. $("#ORP").attr("href", "/chart_F/ORP/" + ftid)
  839. $("#DO").attr("href", "/chart_F/DO/" + ftid)
  840. $("#EC").attr("href", "/chart_F/EC/" + ftid)
  841. $("#PA").attr("href", "/chart_F/PA/" + ftid)
  842. $('#camera_ferment_tid').attr("href", "/camera_F" + ftid)
  843. $('#F_Modal').modal('show');
  844. }
  845. function update_data_FI(fitid){
  846. console.log('ferment_input_tank_id:' + fitid)
  847. // fitid = ferment_input_tank_id
  848. $.get('/loading/FI' + fitid, '', function (res) {
  849. if (res.input_vacuum == 0) {
  850. $("#input_vacuum_status").css("background-color", "#C0C0C0")
  851. } else if (res.input_vacuum == 1) {
  852. $("#input_vacuum_status").css("background-color", "forestgreen")
  853. } else { $("#input_vacuum_status").css("background-color", "crimson") }
  854. $("#FI_UltraSonic_t_status").text(res.input_UltraSonic);
  855. }, 'json');
  856. $('#Modal_title_input').text("發酵入料儲豆槽 FI" + fitid + " 狀態")
  857. $('#actuator_link_input').attr("href", "/ferment_container_input/" + fitid)
  858. $('#sensor_link_input').attr("href", "/ferment_container_input/" + fitid)
  859. $('#input_Vacuum').attr("href", "/ctrl_FI_Vacuum/" + fitid)
  860. $('#FI_UltraSonic').attr("href", "/chart_FI/UltraSonic/" + fitid)
  861. $('#FI_camera_ferment_tid').attr("href", "/camera_FI" + fitid)
  862. $('#FI_Modal').modal('show');
  863. };
  864. function update_data_FO(fotid){
  865. console.log('ferment_output_tank_id:' + fotid)
  866. // fitid = ferment_input_tank_id
  867. $.get('/loading/FO' + fotid, '', function (res) {
  868. if (res.output_vacuum == 0) {
  869. $("#output_vacuum_status").css("background-color", "#C0C0C0")
  870. } else if (res.output_vacuum == 1) {
  871. $("#output_vacuum_status").css("background-color", "forestgreen")
  872. } else { $("#output_vacuum_status").css("background-color", "crimson") }
  873. $("#FO_UltraSonic_t_status").text(res.output_UltraSonic);
  874. }, 'json');
  875. $('#Modal_title_output').text("發酵出料儲豆槽 FO" + fotid + " 狀態")
  876. $('#actuator_link_output').attr("href", "/ferment_container_output/" + fotid)
  877. $('#sensor_link_output').attr("href", "/ferment_container_output/" + fotid)
  878. $('#output_Vacuum').attr("href", "/ctrl_FO_Vacuum/" + fotid)
  879. $('#FO_UltraSonic').attr("href", "/chart_FO/UltraSonic/" + fotid)
  880. $('#FO_camera_ferment_tid').attr("href", "/camera_FO" + fotid)
  881. $('#FO_Modal').modal('show');
  882. };
  883. var button_F1 = document.getElementById('F1');
  884. button_F1.addEventListener('click', function () { update_data_F("1") });
  885. var button_F2 = document.getElementById('F2');
  886. button_F2.addEventListener('click', function () { update_data_F("2") });
  887. var button_F3 = document.getElementById('F3');
  888. button_F3.addEventListener('click', function () { update_data_F("3") });
  889. var button_F4 = document.getElementById('F4');
  890. button_F4.addEventListener('click', function () { update_data_F("4") });
  891. var button_F5 = document.getElementById('F5');
  892. button_F5.addEventListener('click', function () { update_data_F("5") });
  893. var button_F6 = document.getElementById('F6');
  894. button_F6.addEventListener('click', function () { update_data_F("6") });
  895. var button_F7 = document.getElementById('F7');
  896. button_F7.addEventListener('click', function () { update_data_F("7") });
  897. var button_F8 = document.getElementById('F8');
  898. button_F8.addEventListener('click', function () { update_data_F("8") });
  899. var button_F9 = document.getElementById('F9');
  900. button_F9.addEventListener('click', function () { update_data_F("9") });
  901. var button_F10 = document.getElementById('F10');
  902. button_F10.addEventListener('click', function () { update_data_F("10") });
  903. var button_F11 = document.getElementById('F11');
  904. button_F11.addEventListener('click', function () { update_data_F("11") });
  905. var button_F12 = document.getElementById('F12');
  906. button_F12.addEventListener('click', function () { update_data_F("12") });
  907. var button_FI1 = document.getElementById('FI1');
  908. button_FI1.addEventListener('click', function () { update_data_FI("1") });
  909. var button_FI2 = document.getElementById('FI2');
  910. button_FI2.addEventListener('click', function () { update_data_FI("2") });
  911. var button_FO1 = document.getElementById('FO1');
  912. button_FO1.addEventListener('click', function () { update_data_FO("1") });
  913. var button_FO2 = document.getElementById('FO2');
  914. button_FO2.addEventListener('click', function () { update_data_FO("2") });
  915. </script>
  916. <footer class="footer">
  917. <div style="text-align: center; margin-top: 10px; font-size: 13px; margin-bottom: 10px;">
  918. Copyright © 2021 Gold-in Tech. All Rights Reserved. 金子進科技股份有限公司 版權所有
  919. <a href="mailto:service.gitc@gmail.com" target="_blank">service.gitc@gmail.com</a>
  920. </div>
  921. </footer>
  922. <div id="coffee_footer">
  923. <!-- 匯入共同使用的 footer.html 內容 -->
  924. {% include 'footer.html' %}
  925. </div>
  926. </div>
  927. </body>
  928. </html>