dry_1008不蓋圖片.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982
  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. <style>
  20. .DryContainer_position {
  21. position: absolute;
  22. top: 180px;
  23. left: 270px;
  24. }
  25. .D1_position {
  26. position: absolute;
  27. top: 130px;
  28. left: 245px;
  29. width: 165px;
  30. height: 50px;
  31. text-align: center;
  32. font-weight: bold;
  33. }
  34. .D2_position {
  35. position: absolute;
  36. top: 130px;
  37. left: 425px;
  38. width: 155px;
  39. height: 50px;
  40. text-align: center;
  41. font-weight: bold;
  42. }
  43. .D3_position {
  44. position: absolute;
  45. top: 130px;
  46. left: 605px;
  47. width: 160px;
  48. height: 50px;
  49. text-align: center;
  50. font-weight: bold;
  51. }
  52. .D4_position {
  53. position: absolute;
  54. top: 130px;
  55. left: 780px;
  56. width: 165px;
  57. height: 50px;
  58. text-align: center;
  59. font-weight: bold;
  60. }
  61. .D5_position {
  62. position: absolute;
  63. top: 130px;
  64. left: 960px;
  65. width: 165px;
  66. height: 50px;
  67. text-align: center;
  68. font-weight: bold;
  69. }
  70. .D6_position {
  71. position: absolute;
  72. top: 130px;
  73. left: 1140px;
  74. width: 165px;
  75. height: 50px;
  76. text-align: center;
  77. font-weight: bold;
  78. }
  79. .D7_position {
  80. position: absolute;
  81. top: 615px;
  82. left: 220px;
  83. width: 165px;
  84. height: 50px;
  85. text-align: center;
  86. font-weight: bold;
  87. }
  88. .D8_position {
  89. position: absolute;
  90. top: 615px;
  91. left: 400px;
  92. width: 165px;
  93. height: 50px;
  94. text-align: center;
  95. font-weight: bold;
  96. }
  97. .D9_position {
  98. position: absolute;
  99. top: 615px;
  100. left: 580px;
  101. width: 165px;
  102. height: 50px;
  103. text-align: center;
  104. font-weight: bold;
  105. }
  106. .D10_position {
  107. position: absolute;
  108. top: 615px;
  109. left: 755px;
  110. width: 160px;
  111. height: 50px;
  112. text-align: center;
  113. font-weight: bold;
  114. }
  115. .D11_position {
  116. position: absolute;
  117. top: 615px;
  118. left: 930px;
  119. width: 170px;
  120. height: 50px;
  121. text-align: center;
  122. font-weight: bold;
  123. }
  124. .D12_position {
  125. position: absolute;
  126. top: 615px;
  127. left: 1115px;
  128. width: 165px;
  129. height: 50px;
  130. text-align: center;
  131. font-weight: bold;
  132. }
  133. .DI1_position {
  134. position: absolute;
  135. top: 130px;
  136. left: 120px;
  137. width: 100px;
  138. height: 140px;
  139. text-align: center;
  140. font-weight: bold;
  141. }
  142. .DI2_position {
  143. position: absolute;
  144. top: 615px;
  145. left: 110px;
  146. width: 100px;
  147. height: 140px;
  148. text-align: center;
  149. font-weight: bold;
  150. }
  151. .DO1_position {
  152. position: absolute;
  153. top: 130px;
  154. left: 1315px;
  155. width: 100px;
  156. height: 140px;
  157. text-align: center;
  158. font-weight: bold;
  159. }
  160. .DO2_position {
  161. position: absolute;
  162. top: 615px;
  163. left: 1315px;
  164. width: 100px;
  165. height: 140px;
  166. text-align: center;
  167. font-weight: bold;
  168. }
  169. .footer{
  170. position: absolute;
  171. bottom: 0px;
  172. width: 100%;
  173. background-color: #eee;
  174. text-align: center;
  175. }
  176. .actuator_status {
  177. width: 18px;
  178. height: 18px;
  179. background-color:black;
  180. border-radius: 50%;
  181. }
  182. </style>
  183. <script language="JavaScript">
  184. // 指定 10秒 刷新網頁一次
  185. var WebRestart
  186. // WebRestart = setTimeout(function () { location.reload() }, 10000);
  187. var status = '{{status}}';
  188. $(document).ready(function(){
  189. $("#coffee_title").text("乾燥貨櫃");
  190. });
  191. </script>
  192. </head>
  193. <body>
  194. <div id="wrapper">
  195. <div id="coffee_header">
  196. <!-- 匯入共同使用的 header.html 內容 -->
  197. {% include 'header.html' %}
  198. </div>
  199. <!--
  200. background-color:rgb(0, 238, 255);
  201. <div style="text-align: left;">
  202. <a href="/index_new" style="float: left;">&nbsp;&nbsp;&nbsp;返回貨櫃首頁</a>
  203. </div>
  204. <div style="text-align: right;">
  205. <a href="/camera_dry" style="float: right;">乾燥槽攝影機&nbsp;&nbsp;&nbsp;</a>
  206. </div>
  207. <div style="text-align: center; margin-top: 30px; font-size: 24px;">
  208. Smart Coffee
  209. </div>
  210. -->
  211. <div>
  212. <!-- 底圖 乾燥貨櫃 12 個乾燥桶槽 -->
  213. <div id="DryContainer_pic" class="DryContainer_position">
  214. <img src="../static/img/web_dry_container.png" style="margin: auto; width: 1000px;" >
  215. </div>
  216. <!-- 乾燥槽 D1 START-->
  217. <div id="D1" tabindex="0" class="D1_position" role="button">
  218. D1 status
  219. <!-- D1 狀態點點-->
  220. <div id="D1_status"
  221. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: forestgreen;"></div>
  222. </div>
  223. <!-- 乾燥槽 D1 END-->
  224. <!-- 乾燥槽 D2 -->
  225. <div id="D2" tabindex="0" class="D2_position" role="button">
  226. D2 status
  227. <div id="D2_status"
  228. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: forestgreen;"></div>
  229. </div>
  230. <!-- 乾燥槽 D3 -->
  231. <div id="D3" tabindex="0" class="D3_position" role="button">
  232. D3 status
  233. <div id="D3_status"
  234. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: forestgreen;"></div>
  235. </div>
  236. <!-- 乾燥槽 D4 -->
  237. <div id="D4" tabindex="0" class="D4_position" role="button">
  238. D4 status
  239. <div id="D4_status"
  240. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: forestgreen;"></div>
  241. </div>
  242. <!-- 乾燥槽 D5 -->
  243. <div id="D5" tabindex="0" class="D5_position" role="button">
  244. D5 status
  245. <div id="D5_status"
  246. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: forestgreen;"></div>
  247. </div>
  248. <!-- 乾燥槽 D6 -->
  249. <div id="D6" tabindex="0" class="D6_position" role="button">
  250. D6 status
  251. <div id="D6_status"
  252. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: forestgreen;"></div>
  253. </div>
  254. <!-- 乾燥槽 D7 -->
  255. <div id="D7" tabindex="0" class="D7_position" role="button">
  256. D7 status
  257. <div id="D7_status"
  258. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  259. </div>
  260. <!-- 乾燥槽 D8 -->
  261. <div id="D8" tabindex="0" class="D8_position" role="button">
  262. D8 status
  263. <div id="D8_status"
  264. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  265. </div>
  266. <!-- 乾燥槽 D9 -->
  267. <div id="D9" tabindex="0" class="D9_position" role="button">
  268. D9 status
  269. <div id="D9_status"
  270. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  271. </div>
  272. <!-- 乾燥槽 D10 -->
  273. <div id="D10" tabindex="0" class="D10_position" role="button">
  274. D10 status
  275. <div id="D10_status"
  276. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  277. </div>
  278. <!-- 乾燥槽 D11 -->
  279. <div id="D11" tabindex="0" class="D11_position" role="button">
  280. D11 status
  281. <div id="D11_status"
  282. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  283. </div>
  284. <!-- 乾燥槽 D12 -->
  285. <div id="D12" tabindex="0" class="D12_position" role="button">
  286. D12 status
  287. <div id="D12_status"
  288. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  289. </div>
  290. <!-- 乾燥槽_入料儲豆槽 DI1 -->
  291. <div id="DI1" tabindex="0" class="DI1_position" role="button">
  292. DI1 status
  293. <div id="DI1_status"
  294. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  295. </div>
  296. <!-- 乾燥槽_入料儲豆槽 DI2 -->
  297. <div id="DI2" tabindex="0" class="DI2_position" role="button">
  298. DI2 status
  299. <div id="DI2_status"
  300. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  301. </div>
  302. <!-- 乾燥槽_入料儲豆槽 DO1 -->
  303. <div id="DO1" tabindex="0" class="DO1_position" role="button">
  304. DO1 status
  305. <div id="DO1_status"
  306. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  307. </div>
  308. <!-- 乾燥槽_入料儲豆槽 DO2 -->
  309. <div id="DO2" tabindex="0" class="DO2_position" role="button">
  310. DO2 status
  311. <div id="DO2_status"
  312. style="width: 100%; height: 20px; border-style: solid; border-color: whitesmoke; background-color: #C0C0C0;"></div>
  313. </div>
  314. </div>
  315. <!-- 乾燥槽互動視窗(模态框) -->
  316. <div class="modal fade" id="D_Modal">
  317. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  318. <div class="modal-content">
  319. <!-- 互動視窗 標題 -->
  320. <div class="modal-header">
  321. <h4 id="Modal_title" class="modal-title">乾燥槽 D1 狀態</h4>
  322. <button type="button" class="close" data-dismiss="modal">&times;</button>
  323. </div>
  324. <!-- 互動視窗 內容 -->
  325. <div class="modal-body">
  326. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  327. <!--<table style="border:0px gray solid;-->
  328. <tr>
  329. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  330. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  331. </tr>
  332. <tr>
  333. <td style="vertical-align:text-top;">
  334. <table style="border:0px gray solid;" cellpadding="3">
  335. <!--font-size:12px; -->
  336. <tr>
  337. <td>
  338. <div id="tank_vacuum_status" class="actuator_status">
  339. </div>
  340. </td>
  341. <td>
  342. <a id="Vacuum" href="">真空吸料機</a>
  343. <!--<span id="tank_vacuum_t_status"></span>-->
  344. </td>
  345. </tr>
  346. <tr>
  347. <td>
  348. <div id="tank_threewayvalve_status" class="actuator_status">
  349. </div>
  350. </td>
  351. <td>
  352. <a id="ThreeWayValve" href="">三通閥</a>
  353. <!--<span id="tank_threewayvalve_t_status"></span>-->
  354. </td>
  355. </tr>
  356. <tr>
  357. <td>
  358. <div id="tank_solenoid_disinfect_status" class="actuator_status">
  359. </div>
  360. </td>
  361. <td>
  362. <a id="SolenoidDisinfect" href="">消毒電磁閥</a>
  363. <!--<span id="tank_solenoid_disinfect_t_status"></span>-->
  364. </td>
  365. </tr>
  366. <tr>
  367. <td>
  368. <div id="tank_motor_status" class="actuator_status">
  369. </div>
  370. </td>
  371. <td>
  372. <a id="Motor" href="">馬達</a>
  373. <!--<span id="tank_motor_t_status"></span>-->
  374. </td>
  375. </tr>
  376. <tr>
  377. <td>
  378. <div id="tank_blower_status" class="actuator_status">
  379. </div>
  380. </td>
  381. <td>
  382. <a id="Blower" href="">鼓風機</a>
  383. <!--<span id="tank_blower_t_status"></span>-->
  384. </td>
  385. </tr>
  386. <tr>
  387. <td>
  388. <div id="tank_heater1_status" class="actuator_status">
  389. </div>
  390. </td>
  391. <td>
  392. <a id="Heater1" href="">加熱器 1</a>
  393. <!--<span id="tank_heater1_t_status"></span>-->
  394. </td>
  395. </tr>
  396. <tr>
  397. <td>
  398. <div id="tank_heater2_status" class="actuator_status">
  399. </div>
  400. </td>
  401. <td>
  402. <a id="Heater2" href="">加熱器 2</a>
  403. <!--<span id="tank_heater2_t_status"></span>-->
  404. </td>
  405. </tr>
  406. <tr>
  407. <td>
  408. <div id="tank_temp1_enable_status" class="actuator_status">
  409. </div>
  410. </td>
  411. <td>
  412. <a id="TempEnable" href="">溫控開關</a>
  413. <!--<span id="tank_temp1_enable_t_status"></span>-->
  414. </td>
  415. </tr>
  416. <tr>
  417. <td>
  418. <div id="tank_temp1_status" class="actuator_status">
  419. </div>
  420. </td>
  421. <td>
  422. <a id="Temp" href="">設定溫度</a>
  423. <!--<span id="tank_temp1_t_status"></span>-->
  424. </td>
  425. </tr>
  426. <tr>
  427. <td>
  428. <div id="tank_solenoid_water_status" class="actuator_status">
  429. </div>
  430. </td>
  431. <td>
  432. <a id="SolenoidWater" href="">排水電磁閥</a>
  433. <!--<span id="tank_solenoid_water_t_status"></span>-->
  434. </td>
  435. </tr>
  436. <tr>
  437. <td>
  438. <div id="tank_diskvalve_status" class="actuator_status">
  439. </div>
  440. </td>
  441. <td>
  442. <a id="DiskValve" href="">蝴蝶閥</a>
  443. <!--<span id="tank_diskvalve_t_status"></span>-->
  444. </td>
  445. </tr>
  446. </table>
  447. </td>
  448. <td style="vertical-align:text-top;">
  449. <table style="border:0px gray solid;" cellpadding="3">
  450. <!--font-size:12px; -->
  451. <tr>
  452. <td>
  453. <a id="UltraSonic" href="">咖啡生豆高度</a>
  454. </td>
  455. <td>
  456. <span id="UltraSonic_t_status"></span>
  457. </td>
  458. </tr>
  459. <tr>
  460. <td>
  461. <a id="SHT11_Temp" href="">乾燥槽溫度</a>
  462. </td>
  463. <td>
  464. <span id="SHT11_Temp_t_status"></span>
  465. </td>
  466. </tr>
  467. <tr>
  468. <td>
  469. <a id="SHT11_Humidity" href="">乾燥槽濕度</a>
  470. </td>
  471. <td>
  472. <span id="SHT11_Humidity_t_status"></span>
  473. </td>
  474. </tr>
  475. <tr>
  476. <td>
  477. <a id="soil_Temp" href="">咖啡生豆溫度</a>
  478. </td>
  479. <td>
  480. <span id="soil_Temp_t_status"></span>
  481. </td>
  482. </tr>
  483. <tr>
  484. <td>
  485. <a id="soil_Humidity" href="">咖啡生豆濕度</a>
  486. </td>
  487. <td>
  488. <span id="soil_Humidity_t_status"></span>
  489. </td>
  490. </tr>
  491. <tr>
  492. <td>
  493. <a id="soil_EC" href="">咖啡生豆 EC</a>
  494. </td>
  495. <td>
  496. <span id="soil_EC_t_status"></span>
  497. </td>
  498. </tr>
  499. <tr>
  500. <td>
  501. <a id="PA" href="">桶內壓力</a>
  502. </td>
  503. <td>
  504. <span id="PA_t_status"></span>
  505. </td>
  506. </tr>
  507. <tr>
  508. <td>
  509. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  510. </td>
  511. </tr>
  512. </table>
  513. </td>
  514. </tr>
  515. </table>
  516. </div>
  517. </div>
  518. </div>
  519. </div>
  520. <!-- 乾燥槽入料儲豆槽互動視窗(模态框) -->
  521. <div class="modal fade" id="DI_Modal">
  522. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  523. <div class="modal-content">
  524. <!-- 互動視窗 標題 -->
  525. <div class="modal-header">
  526. <h4 id="Modal_title_input" class="modal-title">乾燥入料儲豆槽 DI1 狀態</h4>
  527. <button type="button" class="close" data-dismiss="modal">&times;</button>
  528. </div>
  529. <!-- 互動視窗 內容 -->
  530. <div class="modal-body">
  531. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  532. <!--<table style="border:0px gray solid;-->
  533. <tr>
  534. <td><strong><a id="actuator_link_input" href="">制動器狀態</a></strong></td>
  535. <td><strong><a id="sensor_link_input" href="">感測器狀態</a></strong></td>
  536. </tr>
  537. <tr>
  538. <td style="vertical-align:text-top;">
  539. <table style="border:0px gray solid;" cellpadding="3">
  540. <!--font-size:12px; -->
  541. <tr>
  542. <td>
  543. <div id="input_vacuum_status" class="actuator_status">
  544. </div>
  545. </td>
  546. <td>
  547. <a id="Vacuum_input" href="">真空吸料機</a>
  548. <!--<span id="tank_vacuum_t_status"></span>-->
  549. </td>
  550. </tr>
  551. </table>
  552. </td>
  553. <td style="vertical-align:text-top;">
  554. <table style="border:0px gray solid;" cellpadding="3">
  555. <!--font-size:12px; -->
  556. <tr>
  557. <td>
  558. <a id="DI_UltraSonic" href="">咖啡生豆高度</a>
  559. </td>
  560. <td>
  561. <span id="DI_UltraSonic_t_status"></span>
  562. </td>
  563. </tr>
  564. <tr>
  565. <td>
  566. <a id="DI_camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  567. </td>
  568. </tr>
  569. </table>
  570. </td>
  571. </tr>
  572. </table>
  573. </div>
  574. </div>
  575. </div>
  576. </div>
  577. <!-- 乾燥槽出料儲豆槽互動視窗(模态框) -->
  578. <div class="modal fade" id="DO_Modal">
  579. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  580. <div class="modal-content">
  581. <!-- 互動視窗 標題 -->
  582. <div class="modal-header">
  583. <h4 id="Modal_title_output" class="modal-title">乾燥入料儲豆槽 DI1 狀態</h4>
  584. <button type="button" class="close" data-dismiss="modal">&times;</button>
  585. </div>
  586. <!-- 互動視窗 內容 -->
  587. <div class="modal-body">
  588. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  589. <!--<table style="border:0px gray solid;-->
  590. <tr>
  591. <td><strong><a id="actuator_link_output" href="">制動器狀態</a></strong></td>
  592. <td><strong><a id="sensor_link_output" href="">感測器狀態</a></strong></td>
  593. </tr>
  594. <tr>
  595. <td style="vertical-align:text-top;">
  596. <table style="border:0px gray solid;" cellpadding="3">
  597. <!--font-size:12px; -->
  598. <tr>
  599. <td>
  600. <div id="output_vacuum_status"
  601. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  602. </div>
  603. </td>
  604. <td>
  605. <a id="Vacuum_output" href="">真空吸料機</a>
  606. <!--<span id="tank_vacuum_t_status"></span>-->
  607. </td>
  608. </tr>
  609. </table>
  610. </td>
  611. <td style="vertical-align:text-top;">
  612. <table style="border:0px gray solid;" cellpadding="3">
  613. <!--font-size:12px; -->
  614. <tr>
  615. <td>
  616. <a id="DO_UltraSonic" href="/chart_DO/UltraSonic/1">咖啡生豆高度</a>
  617. </td>
  618. <td>
  619. <span id="DO_UltraSonic_t_status"></span>
  620. </td>
  621. </tr>
  622. <tr>
  623. <td>
  624. <a id="DO_camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  625. </td>
  626. </tr>
  627. </table>
  628. </td>
  629. </tr>
  630. </table>
  631. </div>
  632. </div>
  633. </div>
  634. </div>
  635. <script>
  636. function update_data_D(dtid) {
  637. console.log('dry_tank_id:' + dtid)
  638. // dtid = dry_tank_id
  639. $.get('/loading/D' + dtid, '', function (res) {
  640. if (res.tank_vacuum == 0) {
  641. $("#tank_vacuum_status").css("background-color", "#C0C0C0")
  642. } else if (res.tank_vacuum == 1) {
  643. $("#tank_vacuum_status").css("background-color", "forestgreen")
  644. } else { $("#tank_vacuum_status").css("background-color", "crimson") }
  645. if (res.tank_threewayvalve == 0) {
  646. $("#tank_threewayvalve_status").css("background-color", "#C0C0C0")
  647. } else if (res.tank_threewayvalve == 1) {
  648. $("#tank_threewayvalve_status").css("background-color", "forestgreen")
  649. } else { $("#tank_threewayvalve_status").css("background-color", "crimson") }
  650. if (res.tank_diskvalve == 0) {
  651. $("#tank_diskvalve_status").css("background-color", "#C0C0C0")
  652. } else if (res.tank_diskvalve == 1) {
  653. $("#tank_diskvalve_status").css("background-color", "forestgreen")
  654. } else { $("#tank_diskvalve_status").css("background-color", "crimson") }
  655. if (res.tank_solenoid_disinfect == 0) {
  656. $("#tank_solenoid_disinfect_status").css("background-color", "#C0C0C0")
  657. } else if (res.tank_solenoid_disinfect == 1) {
  658. $("#tank_solenoid_disinfect_status").css("background-color", "forestgreen")
  659. } else { $("#tank_solenoid_disinfect_status").css("background-color", "crimson") }
  660. if (res.tank_solenoid_water == 0) {
  661. $("#tank_solenoid_water_status").css("background-color", "#C0C0C0")
  662. } else if (res.tank_solenoid_water == 1) {
  663. $("#tank_solenoid_water_status").css("background-color", "forestgreen")
  664. } else { $("#tank_solenoid_water_status").css("background-color", "crimson") }
  665. if (res.tank_motor == 0) {
  666. $("#tank_motor_status").css("background-color", "#C0C0C0")
  667. } else if (res.tank_motor > 0 || res.tank_motor < 0) {
  668. $("#tank_motor_status").css("background-color", "forestgreen")
  669. } else { $("#tank_motor_status").css("background-color", "crimson") }
  670. if (res.tank_blower == 0) {
  671. $("#tank_blower_status").css("background-color", "#C0C0C0")
  672. } else if (res.tank_blower == 1) {
  673. $("#tank_blower_status").css("background-color", "forestgreen")
  674. } else { $("#tank_blower_status").css("background-color", "crimson") }
  675. if (res.tank_heater1 == 0) {
  676. $("#tank_heater1_status").css("background-color", "#C0C0C0")
  677. } else if (res.tank_heater1 == 1) {
  678. $("#tank_heater1_status").css("background-color", "forestgreen")
  679. } else { $("#tank_heater1_status").css("background-color", "crimson") }
  680. if (res.tank_heater2 == 0) {
  681. $("#tank_heater2_status").css("background-color", "#C0C0C0")
  682. } else if (res.tank_heater2 == 1) {
  683. $("#tank_heater2_status").css("background-color", "forestgreen")
  684. } else { $("#tank_heater2_status").css("background-color", "crimson") }
  685. if (res.tank_temp1_enable == 0) {
  686. $("#tank_temp1_enable_status").css("background-color", "#C0C0C0")
  687. } else if (res.tank_temp1_enable == 1) {
  688. $("#tank_temp1_enable_status").css("background-color", "forestgreen")
  689. } else { $("#tank_temp1_enable_status").css("background-color", "crimson") }
  690. if (res.tank_temp1 == 0) {
  691. $("#tank_temp1_status").css("background-color", "#C0C0C0")
  692. } else if (res.tank_temp1 > 0) {
  693. $("#tank_temp1_status").css("background-color", "forestgreen")
  694. } else { $("#tank_temp1_status").css("background-color", "crimson") }
  695. $("#tank_vacuum_t_status").text(res.tank_vacuum);
  696. $("#tank_threewayvalve_t_status").text(res.tank_threewayvalve);
  697. $("#tank_diskvalve_t_status").text(res.tank_diskvalve);
  698. $("#tank_solenoid_disinfect_t_status").text(res.tank_solenoid_disinfect);
  699. $("#tank_solenoid_water_t_status").text(res.tank_solenoid_water);
  700. $("#tank_motor_t_status").text(res.tank_motor);
  701. $("#tank_blower_t_status").text(res.tank_blower);
  702. $("#tank_heater1_t_status").text(res.tank_heater1);
  703. $("#tank_heater2_t_status").text(res.tank_heater2);
  704. $("#tank_temp1_enable_t_status").text(res.tank_temp1_enable);
  705. $("#tank_temp1_t_status").text(res.tank_temp1);
  706. $("#UltraSonic_t_status").text(res.UltraSonic);
  707. $("#SHT11_Temp_t_status").text(res.SHT11_Temp);
  708. $("#SHT11_Humidity_t_status").text(res.SHT11_Humidity);
  709. $("#soil_Temp_t_status").text(res.soil_Temp);
  710. $("#soil_Humidity_t_status").text(res.soil_Humidity);
  711. $("#soil_EC_t_status").text(res.soil_EC);
  712. $("#PA_t_status").text(res.PA);
  713. }, 'json');
  714. $('#Modal_title').text("乾燥槽 D" + dtid + " 狀態")
  715. if (status == 2) {
  716. $('#actuator_link').attr("title", "使用者無修改權限")
  717. $('#sensor_link').attr("title", "使用者無修改權限")
  718. $('#Vacuum').attr("title", "使用者無修改權限")
  719. $('#ThreeWayValve').attr("title", "使用者無修改權限")
  720. $('#SolenoidDisinfect').attr("title", "使用者無修改權限")
  721. $('#Motor').attr("title", "使用者無修改權限")
  722. $('#Blower').attr("title", "使用者無修改權限")
  723. $('#Heater1').attr("title", "使用者無修改權限")
  724. $('#Heater2').attr("title", "使用者無修改權限")
  725. $('#TempEnable').attr("title", "使用者無修改權限")
  726. $('#Temp').attr("title", "使用者無修改權限")
  727. $('#SolenoidWater').attr("title", "使用者無修改權限")
  728. $('#DiskValve').attr("title", "使用者無修改權限")
  729. } else if ( (status == 0) || (status == 1) ) {
  730. $('#actuator_link').attr("href", "/dry_container_tank/" + dtid)
  731. $('#sensor_link').attr("href", "/dry_container_tank/" + dtid)
  732. $('#Vacuum').attr("href", "/ctrl_D_Vacuum/" + dtid)
  733. $('#ThreeWayValve').attr("href", "/ctrl_D_ThreeWayValve/" + dtid)
  734. $('#SolenoidDisinfect').attr("href", "/ctrl_D_SolenoidDisinfect/" + dtid)
  735. $('#Motor').attr("href", "/ctrl_D_Motor/" + dtid)
  736. $('#Blower').attr("href", "/ctrl_D_Blower/" + dtid)
  737. $('#Heater1').attr("href", "/ctrl_D_Heater1/" + dtid)
  738. $('#Heater2').attr("href", "/ctrl_D_Heater2/" + dtid)
  739. $('#TempEnable').attr("href", "/ctrl_D_TempEnable/" + dtid)
  740. $('#Temp').attr("href", "/ctrl_D_Temp/" + dtid)
  741. $('#SolenoidWater').attr("href", "/ctrl_D_SolenoidWater/" + dtid)
  742. $('#DiskValve').attr("href", "/ctrl_D_DiskValve/" + dtid)
  743. }
  744. $('#SHT11_Temp').attr("href", "/chart_D/SHT11_Temp/" + dtid)
  745. $('#SHT11_Humidity').attr("href", "/chart_D/SHT11_Humidity/" + dtid)
  746. $('#UltraSonic').attr("href", "/chart_D/UltraSonic/" + dtid)
  747. $('#PA').attr("href", "/chart_D/PA/" + dtid)
  748. $('#soil_Temp').attr("href", "/chart_D/soil_Temp/" + dtid)
  749. $('#soil_Humidity').attr("href", "/chart_D/soil_Humidity/" + dtid)
  750. $('#soil_EC').attr("href", "/chart_D/soil_EC/" + dtid)
  751. $('#camera_dry_tid').attr("href", "/camera_D" + dtid)
  752. $('#D_Modal').modal('show');
  753. }
  754. function update_data_DI(ditid){
  755. console.log('dry_input_tank_id:' + ditid)
  756. // ditid = dry_input_tank_id
  757. $.get('/loading/DI' + ditid, '', function (res) {
  758. if (res.input_vacuum == 0) {
  759. $("#input_vacuum_status").css("background-color", "#C0C0C0")
  760. } else if (res.input_vacuum == 1) {
  761. $("#input_vacuum_status").css("background-color", "forestgreen")
  762. } else { $("#input_vacuum_status").css("background-color", "crimson") }
  763. $("#DI_UltraSonic_t_status").text(res.input_UltraSonic);
  764. }, 'json');
  765. $('#Modal_title_input').text("乾燥入料儲豆槽 DI" + ditid + " 狀態")
  766. if (status == 2) {
  767. $('#actuator_link').attr("title", "使用者無修改權限")
  768. $('#sensor_link').attr("title", "使用者無修改權限")
  769. $('#Vacuum_input').attr("title", "使用者無修改權限")
  770. } else if ( (status == 0) || (status == 1) ) {
  771. $('#actuator_link_input').attr("href", "/dry_container_input/" + ditid)
  772. $('#sensor_link_input').attr("href", "/dry_container_input/" + ditid)
  773. $('#Vacuum_input').attr("href", "/ctrl_DI_Vacuum/" + ditid)
  774. }
  775. $('#DI_UltraSonic').attr("href", "/chart_DI/UltraSonic/" + ditid)
  776. $('#DI_camera_dry_tid').attr("href", "/camera_DI" + ditid)
  777. $('#DI_Modal').modal('show');
  778. };
  779. function update_data_DO(dotid){
  780. console.log('dry_output_tank_id:' + dotid)
  781. // dotid = dry_output_tank_id
  782. $.get('/loading/DO' + dotid, '', function (res) {
  783. if (res.output_vacuum == 0) {
  784. $("#output_vacuum_status").css("background-color", "#C0C0C0")
  785. } else if (res.output_vacuum == 1) {
  786. $("#output_vacuum_status").css("background-color", "forestgreen")
  787. } else { $("#output_vacuum_status").css("background-color", "crimson") }
  788. $("#DO_UltraSonic_t_status").text(res.output_UltraSonic);
  789. }, 'json');
  790. $('#Modal_title_output').text("乾燥出料儲豆槽 DO" + dotid + " 狀態")
  791. if (status == 2) {
  792. $('#actuator_link').attr("title", "使用者無修改權限")
  793. $('#sensor_link').attr("title", "使用者無修改權限")
  794. $('#Vacuum_output').attr("title", "使用者無修改權限")
  795. } else if ( (status == 0) || (status == 1) ) {
  796. $('#actuator_link_output').attr("href", "/dry_container_output/" + dotid)
  797. $('#sensor_link_output').attr("href", "/dry_container_output/" + dotid)
  798. $('#Vacuum_output').attr("href", "/ctrl_DO_Vacuum/" + dotid)
  799. }
  800. $('#DO_UltraSonic').attr("href", "/chart_DO/UltraSonic/" + dotid)
  801. $('#DO_camera_dry_tid').attr("href", "/camera_DO" + dotid)
  802. $('#DO_Modal').modal('show');
  803. };
  804. var button_D1 = document.getElementById('D1');
  805. button_D1.addEventListener('click', function () { update_data_D("1") });
  806. var button_D2 = document.getElementById('D2');
  807. button_D2.addEventListener('click', function () { update_data_D("2") });
  808. var button_D3 = document.getElementById('D3');
  809. button_D3.addEventListener('click', function () { update_data_D("3") });
  810. var button_D4 = document.getElementById('D4');
  811. button_D4.addEventListener('click', function () { update_data_D("4") });
  812. var button_D5 = document.getElementById('D5');
  813. button_D5.addEventListener('click', function () { update_data_D("5") });
  814. var button_D6 = document.getElementById('D6');
  815. button_D6.addEventListener('click', function () { update_data_D("6") });
  816. var button_D7 = document.getElementById('D7');
  817. button_D7.addEventListener('click', function () { update_data_D("7") });
  818. var button_D8 = document.getElementById('D8');
  819. button_D8.addEventListener('click', function () { update_data_D("8") });
  820. var button_D9 = document.getElementById('D9');
  821. button_D9.addEventListener('click', function () { update_data_D("9") });
  822. var button_D10 = document.getElementById('D10');
  823. button_D10.addEventListener('click', function () { update_data_D("10") });
  824. var button_D11 = document.getElementById('D11');
  825. button_D11.addEventListener('click', function () { update_data_D("11") });
  826. var button_D12 = document.getElementById('D12');
  827. button_D12.addEventListener('click', function () { update_data_D("12") });
  828. var button_DI1 = document.getElementById('DI1');
  829. button_DI1.addEventListener('click', function () { update_data_DI("1") });
  830. var button_DI2 = document.getElementById('DI2');
  831. button_DI2.addEventListener('click', function () { update_data_DI("2") });
  832. var button_DO1 = document.getElementById('DO1');
  833. button_DO1.addEventListener('click', function () { update_data_DO("1") });
  834. var button_DO2 = document.getElementById('DO2');
  835. button_DO2.addEventListener('click', function () { update_data_DO("2") });
  836. </script>
  837. <!--
  838. <footer class="footer">
  839. <div style="text-align: center; margin-top: 10px; font-size: 13px; margin-bottom: 10px;">
  840. Copyright © 2021 Gold-in Tech. All Rights Reserved. 金子進科技股份有限公司 版權所有
  841. <a href="mailto:service.gitc@gmail.com" target="_blank">service.gitc@gmail.com</a>
  842. </div>
  843. </footer>
  844. -->
  845. <div id="coffee_footer">
  846. <!-- 匯入共同使用的 footer.html 內容 -->
  847. {% include 'footer.html' %}
  848. </div>
  849. </div>
  850. </body>
  851. </html>