1
0

clean_1124舊架構備份.html 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  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. .C1_position {
  26. position: absolute;
  27. top: 135px;
  28. left: 205px;
  29. width: 175px;
  30. height: 230px;
  31. border-style: solid;
  32. border-color: aqua;
  33. }
  34. .C2_position {
  35. position: absolute;
  36. top: 400px;
  37. left: 205px;
  38. width: 175px;
  39. height: 230px;
  40. border-style: solid;
  41. border-color: aqua;
  42. }
  43. .CO1_position {
  44. position: absolute;
  45. top: 135px;
  46. left: 400px;
  47. width: 175px;
  48. height: 230px;
  49. border-style: solid;
  50. border-color: aqua;
  51. }
  52. .CO2_position {
  53. position: absolute;
  54. top: 400px;
  55. left: 400px;
  56. width: 175px;
  57. height: 230px;
  58. border-style: solid;
  59. border-color: aqua;
  60. }
  61. .S1_position {
  62. position: absolute;
  63. top: 135px;
  64. left: 945px;
  65. width: 115px;
  66. height: 230px;
  67. border-style: solid;
  68. border-color: aqua;
  69. }
  70. .S2_position {
  71. position: absolute;
  72. top: 400px;
  73. left: 945px;
  74. width: 115px;
  75. height: 230px;
  76. border-style: solid;
  77. border-color: aqua;
  78. }
  79. .SO1_position {
  80. position: absolute;
  81. top: 135px;
  82. left: 1065px;
  83. width: 60px;
  84. height: 230px;
  85. border-style: solid;
  86. border-color: aqua;
  87. }
  88. .SO2_position {
  89. position: absolute;
  90. top: 400px;
  91. left: 1065px;
  92. width: 60px;
  93. height: 230px;
  94. border-style: solid;
  95. border-color: aqua;
  96. }
  97. .P1_position {
  98. position: absolute;
  99. top: 135px;
  100. left: 1150px;
  101. width: 95px;
  102. height: 230px;
  103. border-style: solid;
  104. border-color: aqua;
  105. }
  106. .P2_position {
  107. position: absolute;
  108. top: 400px;
  109. left: 1150px;
  110. width: 95px;
  111. height: 230px;
  112. border-style: solid;
  113. border-color: aqua;
  114. }
  115. .PO1_position {
  116. position: absolute;
  117. top: 135px;
  118. left: 1250px;
  119. width: 50px;
  120. height: 230px;
  121. border-style: solid;
  122. border-color: aqua;
  123. }
  124. .PO2_position {
  125. position: absolute;
  126. top: 400px;
  127. left: 1250px;
  128. width: 50px;
  129. height: 230px;
  130. border-style: solid;
  131. border-color: aqua;
  132. }
  133. </style>
  134. <script language="JavaScript">
  135. // 指定 10秒 刷新網頁一次
  136. var WebRestart
  137. // WebRestart = setTimeout(function () { location.reload() }, 10000);
  138. </script>
  139. </head>
  140. <body>
  141. <div id="wrapper">
  142. <div id="coffee_header">
  143. <!-- 匯入共同使用的 header.html 內容 -->
  144. {% include 'header.html' %}
  145. </div>
  146. <!--
  147. background-color:rgb(0, 238, 255);
  148. -->
  149. <!--
  150. <div style="text-align: left;">
  151. <a href="/index_new" style="float: left;">&nbsp;&nbsp;&nbsp;返回貨櫃首頁</a>
  152. </div>
  153. <div style="text-align: right;">
  154. <a href="/camera_clean" style="float: right;">清洗貨櫃攝影機&nbsp;&nbsp;&nbsp;</a>
  155. </div>
  156. <div style="text-align: center; margin-top: 30px; font-size: 24px;">
  157. Smart Coffee
  158. </div>
  159. -->
  160. <div>
  161. <!-- 底圖 清洗浮選貨櫃 12 個清洗浮選桶槽 -->
  162. <center><img src="../static/img/web_CleanColorPeel_container.png" style="margin: auto; width: 1430px;"></center>
  163. <!-- 清洗浮選槽 C1 -->
  164. <div id="C1" tabindex="0" class="C1_position" role="button">
  165. C1 status
  166. <!-- C1 狀態點點-->
  167. <div id="C1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  168. </div>
  169. <!-- 清洗浮選槽 C2 -->
  170. <div id="C2" tabindex="0" class="C2_position" role="button">
  171. C2 status
  172. <div id="C2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  173. </div>
  174. <!-- 清洗浮選 CO1 出料儲豆槽 -->
  175. <div id="CO1" tabindex="0" class="CO1_position" role="button">
  176. CO1 status
  177. <!-- CO1 狀態點點-->
  178. <div id="CO1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  179. </div>
  180. <!-- 清洗浮選 CO2 出料儲豆槽 -->
  181. <div id="CO2" tabindex="0" class="CO2_position" role="button">
  182. CO2 status
  183. <!-- CO2 狀態點點-->
  184. <div id="CO2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  185. </div>
  186. <!-- 色選機 S1 -->
  187. <div id="S1" tabindex="0" class="S1_position" role="button">
  188. S1 status
  189. <div id="S1_status" style="width: 20px; height: 20px; background-color: crimson; border-radius: 50%;"></div>
  190. </div>
  191. <!-- 色選機 S2 -->
  192. <div id="S2" tabindex="0" class="S2_position" role="button">
  193. S2 status
  194. <div id="S2_status" style="width: 20px; height: 20px; background-color: crimson; border-radius: 50%;"></div>
  195. </div>
  196. <!-- 色選機 SO1 出料儲豆槽 -->
  197. <div id="SO1" tabindex="0" class="SO1_position" role="button">
  198. SO1 status
  199. <div id="SO1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  200. </div>
  201. <!-- 色選機 SO2 出料儲豆槽 -->
  202. <div id="SO2" tabindex="0" class="SO2_position" role="button">
  203. SO2 status
  204. <div id="SO2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  205. </div>
  206. <!-- 脫皮機 P1 -->
  207. <div id="P1" tabindex="0" class="P1_position" role="button">
  208. P1 status
  209. <div id="P1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  210. </div>
  211. <!-- 脫皮機 P2 -->
  212. <div id="P2" tabindex="0" class="P2_position" role="button">
  213. P2 status
  214. <div id="P2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  215. </div>
  216. <!-- 脫皮機 PO1 出料儲豆槽 -->
  217. <div id="PO1" tabindex="0" class="PO1_position" role="button">
  218. PO1 status
  219. <div id="PO1_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  220. </div>
  221. <!-- 脫皮機 PO2 出料儲豆槽 -->
  222. <div id="PO2" tabindex="0" class="PO2_position" role="button">
  223. PO2 status
  224. <div id="PO2_status" style="width: 20px; height: 20px; background-color: cornflowerblue; border-radius: 50%;"></div>
  225. </div>
  226. </div>
  227. <!-- 清洗浮選 模态框 -->
  228. <div class="modal fade" id="C_Modal">
  229. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  230. <div class="modal-content">
  231. <div class="modal-header">
  232. <h4 id="C_Modal_title" class="modal-title">清洗浮選槽 C1 狀態</h4>
  233. <button type="button" class="close" data-dismiss="modal">&times;</button>
  234. </div>
  235. <!-- 模态框主体 -->
  236. <div class="modal-body">
  237. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  238. <!--<table style="border:0px gray solid;-->
  239. <tr>
  240. <td><strong><a id="C_actuator_link" href="/clean_container/1">制動器狀態</a></strong></td>
  241. <td><strong><a id="C_sensor_link" href="/clean_container/1">感測器狀態</a></strong></td>
  242. </tr>
  243. <tr>
  244. <td style="vertical-align:text-top;">
  245. <table style="border:0px gray solid;" cellpadding="3">
  246. <tr>
  247. <td>
  248. <div id="C_vacuum_status"
  249. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  250. </div>
  251. </td>
  252. <td>
  253. 真空吸料機
  254. </td>
  255. </tr>
  256. <tr>
  257. <td>
  258. <div id="tank_pump_waterInput_status"
  259. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  260. </div>
  261. </td>
  262. <td>
  263. 入水口_雙核泵
  264. </td>
  265. </tr>
  266. <tr>
  267. <td>
  268. <div id="tank_pump_waterL2L3_status"
  269. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  270. </div>
  271. </td>
  272. <td>
  273. 出水口 2、3_雙核泵
  274. </td>
  275. </tr>
  276. <tr>
  277. <td>
  278. <div id="tank_pump_waterL4L5_status"
  279. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  280. </div>
  281. </td>
  282. <td>
  283. 出水口 4、5_雙核泵
  284. </td>
  285. </tr>
  286. <tr>
  287. <td>
  288. <div id="tank_solenoid_waterL2L3_status"
  289. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  290. </div>
  291. </td>
  292. <td>
  293. 出水口 2、3_電磁閥
  294. </td>
  295. </tr>
  296. <tr>
  297. <td>
  298. <div id="tank_solenoid_waterL4L5_status"
  299. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  300. </div>
  301. </td>
  302. <td>
  303. 出水口 4、5_電磁閥
  304. </td>
  305. </tr>
  306. <tr>
  307. <td>
  308. <div id="tank_stepping_motor_status"
  309. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  310. </div>
  311. </td>
  312. <td>
  313. 步進馬達
  314. </td>
  315. </tr>
  316. </table>
  317. </td>
  318. <td style="vertical-align:text-top;">
  319. <table style="border:0px gray solid;" cellpadding="3">
  320. <tr>
  321. <td>
  322. 咖啡生豆高度
  323. </td>
  324. <td>
  325. <span id="UltraSonic_t_status"></span>
  326. </td>
  327. </tr>
  328. <tr>
  329. <td>
  330. <a id="camera_clean_tid" href=""><strong>攝影機畫面</strong></a>
  331. </td>
  332. </tr>
  333. </table>
  334. </td>
  335. </tr>
  336. </table>
  337. </div>
  338. </div>
  339. </div>
  340. </div>
  341. <!-- 清洗浮選 出料儲豆槽 模态框 -->
  342. <div class="modal fade" id="CO_Modal">
  343. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  344. <div class="modal-content">
  345. <div class="modal-header">
  346. <h4 id="CO_Modal_title" class="modal-title">清洗浮選出料儲豆槽 CO1 狀態</h4>
  347. <button type="button" class="close" data-dismiss="modal">&times;</button>
  348. </div>
  349. <!-- 模态框主体 -->
  350. <div class="modal-body">
  351. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  352. <!--<table style="border:0px gray solid;-->
  353. <tr>
  354. <td><strong><a id="CO_actuator_link" href="/clean_container/1">制動器狀態</a></strong></td>
  355. <td><strong><a id="CO_sensor_link" href="/clean_container/1">感測器狀態</a></strong></td>
  356. </tr>
  357. <tr>
  358. <td style="vertical-align:text-top;">
  359. <table style="border:0px gray solid;" cellpadding="3">
  360. <tr>
  361. <td>
  362. <div id="CO_vacuum_status"
  363. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  364. </div>
  365. </td>
  366. <td>
  367. 真空吸料機
  368. </td>
  369. </tr>
  370. </table>
  371. </td>
  372. <td style="vertical-align:text-top;">
  373. <table style="border:0px gray solid;" cellpadding="3">
  374. <tr>
  375. <td>
  376. (感測器)
  377. </td>
  378. <td>
  379. <span id="">000</span>
  380. </td>
  381. </tr>
  382. <tr>
  383. <td>
  384. <a id="CO_camera_clean_tid" href=""><strong>攝影機畫面</strong></a>
  385. </td>
  386. </tr>
  387. </table>
  388. </td>
  389. </tr>
  390. </table>
  391. </div>
  392. </div>
  393. </div>
  394. </div>
  395. <!-- 色選機 模态框 -->
  396. <!-- 色選機 出料儲豆槽 模态框 -->
  397. <div class="modal fade" id="SO_Modal">
  398. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  399. <div class="modal-content">
  400. <div class="modal-header">
  401. <h4 id="SO_Modal_title" class="modal-title">色選機出料儲豆槽 CO1 狀態</h4>
  402. <button type="button" class="close" data-dismiss="modal">&times;</button>
  403. </div>
  404. <!-- 模态框主体 -->
  405. <div class="modal-body">
  406. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  407. <!--<table style="border:0px gray solid;-->
  408. <tr>
  409. <td><strong><a id="SO_actuator_link" href="/colorselect_container/1">制動器狀態</a></strong></td>
  410. <td><strong><a id="SO_sensor_link" href="/colorselect_container/1">感測器狀態</a></strong></td>
  411. </tr>
  412. <tr>
  413. <td style="vertical-align:text-top;">
  414. <table style="border:0px gray solid;" cellpadding="3">
  415. <tr>
  416. <td>
  417. <div id="SO_vacuum_status"
  418. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  419. </div>
  420. </td>
  421. <td>
  422. 真空吸料機
  423. </td>
  424. </tr>
  425. </table>
  426. </td>
  427. <td style="vertical-align:text-top;">
  428. <table style="border:0px gray solid;" cellpadding="3">
  429. <tr>
  430. <td>
  431. (感測器)
  432. </td>
  433. <td>
  434. <span id="">000</span>
  435. </td>
  436. </tr>
  437. <tr>
  438. <td>
  439. <a id="SO_camera_colorselect_tid" href=""><strong>攝影機畫面</strong></a>
  440. </td>
  441. </tr>
  442. </table>
  443. </td>
  444. </tr>
  445. </table>
  446. </div>
  447. </div>
  448. </div>
  449. </div>
  450. <!-- 脫皮機 模态框 -->
  451. <div class="modal fade" id="P_Modal">
  452. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  453. <div class="modal-content">
  454. <div class="modal-header">
  455. <h4 id="P_Modal_title" class="modal-title">脫皮機 P1 狀態</h4>
  456. <button type="button" class="close" data-dismiss="modal">&times;</button>
  457. </div>
  458. <!-- 模态框主体 -->
  459. <div class="modal-body">
  460. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  461. <!--<table style="border:0px gray solid;-->
  462. <tr>
  463. <td><strong><a id="P_actuator_link" href="">制動器狀態</a></strong></td>
  464. <td><strong><a id="P_sensor_link" href="">感測器狀態</a></strong></td>
  465. </tr>
  466. <tr>
  467. <td style="vertical-align:text-top;">
  468. <table style="border:0px gray solid;" cellpadding="3">
  469. <tr>
  470. <td>
  471. <div id="P_vacuum_status"
  472. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  473. </div>
  474. </td>
  475. <td>
  476. 真空吸料機
  477. </td>
  478. </tr>
  479. <tr>
  480. <td>
  481. <div id="tank_motor_status"
  482. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  483. </div>
  484. </td>
  485. <td>
  486. 馬達
  487. </td>
  488. </tr>
  489. </table>
  490. </td>
  491. <td style="vertical-align:text-top;">
  492. <table style="border:0px gray solid;" cellpadding="3">
  493. <tr>
  494. <td>
  495. (感測器)
  496. </td>
  497. <td>
  498. <span id="SENSOR_t_status">000</span>
  499. </td>
  500. </tr>
  501. <tr>
  502. <td>
  503. <a id="camera_peel_tid" href=""><strong>攝影機畫面</strong></a>
  504. </td>
  505. </tr>
  506. </table>
  507. </td>
  508. </tr>
  509. </table>
  510. </div>
  511. </div>
  512. </div>
  513. </div>
  514. <!-- 脫皮機 出料儲豆槽 模态框 -->
  515. <div class="modal fade" id="PO_Modal">
  516. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  517. <div class="modal-content">
  518. <div class="modal-header">
  519. <h4 id="PO_Modal_title" class="modal-title">脫皮機出料儲豆槽 PO1 狀態</h4>
  520. <button type="button" class="close" data-dismiss="modal">&times;</button>
  521. </div>
  522. <!-- 模态框主体 -->
  523. <div class="modal-body">
  524. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  525. <!--<table style="border:0px gray solid;-->
  526. <tr>
  527. <td><strong><a id="PO_actuator_link" href="/clean_container/1">制動器狀態</a></strong></td>
  528. <td><strong><a id="PO_sensor_link" href="/clean_container/1">感測器狀態</a></strong></td>
  529. </tr>
  530. <tr>
  531. <td style="vertical-align:text-top;">
  532. <table style="border:0px gray solid;" cellpadding="3">
  533. <tr>
  534. <td>
  535. <div id="PO_vacuum_status"
  536. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  537. </div>
  538. </td>
  539. <td>
  540. 真空吸料機
  541. </td>
  542. </tr>
  543. </table>
  544. </td>
  545. <td style="vertical-align:text-top;">
  546. <table style="border:0px gray solid;" cellpadding="3">
  547. <tr>
  548. <td>
  549. (感測器)
  550. </td>
  551. <td>
  552. <span id="">000</span>
  553. </td>
  554. </tr>
  555. <tr>
  556. <td>
  557. <a id="PO_camera_peel_tid" href=""><strong>攝影機畫面</strong></a>
  558. </td>
  559. </tr>
  560. </table>
  561. </td>
  562. </tr>
  563. </table>
  564. </div>
  565. </div>
  566. </div>
  567. </div>
  568. <script>
  569. function update_data_C(ctid) {
  570. console.log('clean_tank_id:' + ctid)
  571. $.get('/loading/C' + ctid, '', function (res) {
  572. if (res.tank_vacuum == 0) {
  573. $("#C_vacuum_status").css("background-color", "#C0C0C0")
  574. } else if (res.tank_vacuum == 1) {
  575. $("#C_vacuum_status").css("background-color", "forestgreen")
  576. } else { $("#C_vacuum_status").css("background-color", "crimson") }
  577. if (res.tank_pump_waterInput == 0) {
  578. $("#tank_pump_waterInput_status").css("background-color", "#C0C0C0")
  579. } else if (res.tank_pump_waterInput == 1) {
  580. $("#tank_pump_waterInput_status").css("background-color", "forestgreen")
  581. } else { $("#tank_pump_waterInput_status").css("background-color", "crimson") }
  582. if (res.tank_pump_waterL2L3 == 0) {
  583. $("#tank_pump_waterL2L3_status").css("background-color", "#C0C0C0")
  584. } else if (res.tank_pump_waterL2L3 == 1) {
  585. $("#tank_pump_waterL2L3_status").css("background-color", "forestgreen")
  586. } else { $("#tank_pump_waterL2L3_status").css("background-color", "crimson") }
  587. if (res.tank_pump_waterL4L5 == 0) {
  588. $("#tank_pump_waterL4L5_status").css("background-color", "#C0C0C0")
  589. } else if (res.tank_pump_waterL4L5 == 1) {
  590. $("#tank_pump_waterL4L5_status").css("background-color", "forestgreen")
  591. } else { $("#tank_pump_waterL4L5_status").css("background-color", "crimson") }
  592. if (res.tank_solenoid_waterL2L3 == 0) {
  593. $("#tank_solenoid_waterL2L3_status").css("background-color", "#C0C0C0")
  594. } else if (res.tank_solenoid_waterL2L3 == 1) {
  595. $("#tank_solenoid_waterL2L3_status").css("background-color", "forestgreen")
  596. } else { $("#tank_solenoid_waterL2L3_status").css("background-color", "crimson") }
  597. if (res.tank_solenoid_waterL4L5 == 0) {
  598. $("#tank_solenoid_waterL4L5_status").css("background-color", "#C0C0C0")
  599. } else if (res.tank_solenoid_waterL4L5 == 1) {
  600. $("#tank_solenoid_waterL4L5_status").css("background-color", "forestgreen")
  601. } else { $("#tank_solenoid_waterL4L5_status").css("background-color", "crimson") }
  602. if (res.tank_stepping_motor == 'stop' || res.tank_stepping_motor == '0' ) {
  603. $("#tank_stepping_motor_status").css("background-color", "#C0C0C0")
  604. } else if (res.tank_stepping_motor == 'up' || res.tank_stepping_motor == 'down' ) {
  605. $("#tank_stepping_motor_status").css("background-color", "forestgreen")
  606. } else { $("#tank_stepping_motor_status").css("background-color", "crimson") }
  607. $("#UltraSonic_t_status").text(res.UltraSonic);
  608. }, 'json');
  609. $('#C_Modal_title').text("清洗浮選槽 C" + ctid + " 狀態");
  610. $('#C_actuator_link').attr("href", "/clean_container/" + ctid);
  611. $('#C_sensor_link').attr("href", "/clean_container/" + ctid);
  612. $('#camera_clean_tid').attr("href", "/camera_C" + ctid);
  613. $('#C_Modal').modal('show');
  614. }
  615. function update_data_SO(sotid){
  616. console.log('color-select_tank_id:' + sotid)
  617. $.get('/loading/SO' + sotid, '', function (res) {
  618. if (res.output_vacuum == 0) {
  619. $("#SO_vacuum_status").css("background-color", "#C0C0C0")
  620. } else if (res.output_vacuum == 1) {
  621. $("#SO_vacuum_status").css("background-color", "forestgreen")
  622. } else { $("#SO_vacuum_status").css("background-color", "crimson") }
  623. }, 'json');
  624. $('#SO_Modal_title').text("色選機出料儲豆槽 SO" + sotid + " 狀態");
  625. $('#SO_actuator_link').attr("href", "/colorselect_container/" + sotid);
  626. $('#SO_sensor_link').attr("href", "/colorselect_container/" + sotid);
  627. $('#SO_camera_colorselect_tid').attr("href", "/camera_SO" + sotid);
  628. $('#SO_Modal').modal('show');
  629. }
  630. function update_data_S(stid) {
  631. console.log('color-select_tank_id:' + stid)
  632. $.get('/loading/S' + stid, '', function (res) {
  633. }, 'json');
  634. $('#camera_colorselect_tid').attr("href", "/camera_S" + stid);
  635. $('#S1_Modal').modal('show');
  636. }
  637. function update_data_P(ptid) {
  638. console.log('peel_tank_id:' + ptid)
  639. $.get('/loading/P' + ptid, '', function (res) {
  640. if (res.tank_vacuum == 0) {
  641. $("#P_vacuum_status").css("background-color", "#C0C0C0")
  642. } else if (res.tank_vacuum == 1) {
  643. $("#P_vacuum_status").css("background-color", "forestgreen")
  644. } else { $("#P_vacuum_status").css("background-color", "crimson") }
  645. if (res.tank_motor > 0) {
  646. $("#tank_motor_status").css("background-color", "forestgreen")
  647. } else if (res.tank_motor == 0) {
  648. $("#tank_motor_status").css("background-color", "#C0C0C0")
  649. } else { $("#tank_motor_status").css("background-color", "crimson") }
  650. }, 'json');
  651. $('#P_Modal_title').text("脫皮機 P" + ptid + " 狀態");
  652. $('#P_actuator_link').attr("href", "/peel_container_tank/" + ptid);
  653. $('#P_sensor_link').attr("href", "/peel_container_tank/" + ptid);
  654. $('#camera_peel_tid').attr("href", "/camera_P" + ptid);
  655. $('#P_Modal').modal('show');
  656. }
  657. function update_data_CO(cotid){
  658. console.log('clean_output_tank_id:' + cotid)
  659. $.get('loading/CO' + cotid, '', function (res){
  660. if (res.output_vacuum == 0) {
  661. $("#CO_vacuum_status").css("background-color", "#C0C0C0")
  662. } else if (res.output_vacuum == 1) {
  663. $("#CO_vacuum_status").css("background-color", "forestgreen")
  664. } else { $("#CO_vacuum_status").css("background-color", "crimson") }
  665. }, 'json');
  666. $('#CO_Modal_title').text("清洗浮選出料儲豆槽 CO" + cotid + " 狀態");
  667. $('#CO_actuator_link').attr("href", "/clean_container/" + cotid);
  668. $('#CO_sensor_link').attr("href", "/clean_container/" + cotid);
  669. $('#CO_camera_clean_tid').attr("href", "/camera_CO" + cotid);
  670. $('#CO_Modal').modal('show');
  671. }
  672. function update_data_PO(potid){
  673. console.log('peel_output_tank_id' + potid)
  674. $.get('loading/PO' + potid, '', function (res){
  675. if (res.output_vacuum == 0) {
  676. $("#PO_vacuum_status").css("background-color", "#C0C0C0")
  677. } else if (res.output_vacuum == 1) {
  678. $("#PO_vacuum_status").css("background-color", "forestgreen")
  679. } else { $("#PO_vacuum_status").css("background-color", "crimson") }
  680. }, 'json');
  681. $('#PO_Modal_title').text("脫皮機出料儲豆槽 PO" + potid + " 狀態");
  682. $('#PO_actuator_link').attr("href", "/peel_container/" + potid);
  683. $('#PO_sensor_link').attr("href", "/peel_container/" + potid);
  684. $('#PO_camera_peel_tid').attr("href", "/camera_PO" + potid);
  685. $('#PO_Modal').modal('show');
  686. }
  687. var button_C1 = document.getElementById('C1');
  688. button_C1.addEventListener('click', function () { update_data_C("1") });
  689. var button_C2 = document.getElementById('C2');
  690. button_C2.addEventListener('click', function () { update_data_C("2") });
  691. var button_CO1 = document.getElementById('CO1');
  692. button_CO1.addEventListener('click', function () { update_data_CO("1") });
  693. var button_CO2 = document.getElementById('CO2');
  694. button_CO2.addEventListener('click', function () { update_data_CO("2") });
  695. var button_S1 = document.getElementById('S1');
  696. button_S1.addEventListener('click', function () { update_data_S("1") });
  697. var button_S2 = document.getElementById('S2');
  698. button_S2.addEventListener('click', function () { update_data_S("2") });
  699. var button_SO1 = document.getElementById('SO1');
  700. button_SO1.addEventListener('click', function () { update_data_SO("1") });
  701. var button_SO2 = document.getElementById('SO2');
  702. button_SO2.addEventListener('click', function () { update_data_SO("2") });
  703. var button_P1 = document.getElementById('P1');
  704. button_P1.addEventListener('click', function () { update_data_P("1") });
  705. var button_P2 = document.getElementById('P2');
  706. button_P2.addEventListener('click', function () { update_data_P("2") });
  707. var button_PO1 = document.getElementById('PO1');
  708. button_PO1.addEventListener('click', function () { update_data_PO("1") });
  709. var button_PO2 = document.getElementById('PO2');
  710. button_PO2.addEventListener('click', function () { update_data_PO("2") });
  711. </script>
  712. <!--
  713. <footer class="footer">
  714. <div style="text-align: center; margin-top: 10px; font-size: 13px; margin-bottom: 10px;">
  715. Copyright © 2021 Gold-in Tech. All Rights Reserved. 金子進科技股份有限公司 版權所有
  716. <a href="mailto:service.gitc@gmail.com" target="_blank">service.gitc@gmail.com</a>
  717. </div>
  718. </footer>
  719. -->
  720. <div id="coffee_footer">
  721. <!-- 匯入共同使用的 footer.html 內容 -->
  722. {% include 'footer.html' %}
  723. </div>
  724. </div>
  725. </body>
  726. </html>