demo.html 114 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961
  1. <!-- 宣告我們要套用模板 -->
  2. {% extends "base.html" %}
  3. {% block title %}{{ title }}{% endblock %}
  4. {% block script %}
  5. <script language="JavaScript">
  6. var status = '{{status}}';
  7. var username = '{{username}}';
  8. $(document).ready(function(){
  9. $("#coffee_title_pc").text("DEMO 貨櫃");
  10. $("#coffee_title_phone").text("DEMO 貨櫃");
  11. $('#navbarDropdown_user_pc').text(username);
  12. $('#navbarDropdown_user_phone').text(username);
  13. loading_D_status();
  14. });
  15. clean_input_status = ['{{CI1}}', '{{CI2}}']
  16. clean_tank_status = ['{{C1}}', '{{C2}}']
  17. reclaimedwater_tank_status = ['{{R1}}']
  18. colorselect_tank_status = ['{{S1}}', '{{S2}}']
  19. peel_tank_status = ['{{P1}}', '{{P2}}']
  20. ferment_tank_status = ['{{F1}}', '{{F2}}']
  21. dry_tank_status = ['{{D1}}']
  22. peel_output_status = ['{{PO1}}']
  23. peel_outputb_status = ['{{POb1}}']
  24. function loading_D_status(){
  25. // 狀態 入料儲豆槽
  26. for (let i=0; i<clean_input_status.length; i++) {
  27. if (clean_input_status[i] == 'CI_InputtingBean') {
  28. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  29. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("入豆中")
  30. } else if (clean_input_status[i] == 'CI_Waiting') {
  31. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  32. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("空桶等待")
  33. } else if (clean_input_status[i] == 'CI_OutputtingBean') {
  34. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  35. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("可出豆")
  36. } else if (clean_input_status[i] == 'CI_Warning') {
  37. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  38. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("發生錯誤")
  39. $("#DM_InputBean_"+parseInt(i+1)+"_status").css("color", "crimson")
  40. } else {
  41. console.log('DM_InputBean pass')
  42. }
  43. }
  44. // 狀態 清洗槽 1
  45. for (let i=0; i<clean_tank_status.length; i++) {
  46. if (clean_tank_status[i] == 'C_InputtingBean') {
  47. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  48. $("#DM_Clean_"+parseInt(i+1)+"_status").text("入豆中")
  49. } else if (clean_tank_status[i] == 'C_Waiting') {
  50. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  51. $("#DM_Clean_"+parseInt(i+1)+"_status").text("空桶等待")
  52. } else if (clean_tank_status[i] == 'C_InputtingWater') {
  53. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  54. $("#DM_Clean_"+parseInt(i+1)+"_status").text("內外桶入水中")
  55. } else if (clean_tank_status[i] == 'C_Cleaning') {
  56. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "plum")
  57. $("#DM_Clean_"+parseInt(i+1)+"_status").text("清洗中")
  58. } else if (clean_tank_status[i] == 'C_OutputtingWater') {
  59. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  60. $("#DM_Clean_"+parseInt(i+1)+"_status").text(" 內桶排水中")
  61. } else if (clean_tank_status[i] == 'C_OutputtingBean') {
  62. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  63. $("#DM_Clean_"+parseInt(i+1)+"_status").text("可出豆")
  64. } else if (clean_tank_status[i] == 'C_Warning') {
  65. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  66. $("#DM_Clean_"+parseInt(i+1)+"_status").text("發生錯誤")
  67. $("#DM_Clean_"+parseInt(i+1)+"_status").css("color", "crimson")
  68. } else {
  69. console.log('DM_Clean pass')
  70. }
  71. }
  72. // 狀態 中水桶
  73. for (let i=0; i<reclaimedwater_tank_status.length; i++) {
  74. if (reclaimedwater_tank_status[i] == 'R_InputtingWater') {
  75. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  76. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 入水中")
  77. } else if (reclaimedwater_tank_status[i] == 'R_Waiting') {
  78. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  79. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 空桶等待")
  80. } else if (reclaimedwater_tank_status[i] == 'R_OutputtingWater') {
  81. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  82. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 排水中")
  83. } else if (reclaimedwater_tank_status[i] == 'R_Stand_by') {
  84. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "HotPink")
  85. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 待命")
  86. } else if (reclaimedwater_tank_status[i] == 'R_Warning') {
  87. console.log('[動作] R桶警告 R' + parseInt(i+1) + ' 警告')
  88. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  89. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 警告")
  90. } else {
  91. console.log('pass')
  92. }
  93. }
  94. // 狀態 色選機
  95. for (let i=0; i<colorselect_tank_status.length; i++) {
  96. if (colorselect_tank_status[i] == 'S_InputtingBean') {
  97. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  98. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("入豆中")
  99. } else if (colorselect_tank_status[i] == 'S_Waiting') {
  100. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  101. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("空桶等待")
  102. } else if (colorselect_tank_status[i] == 'S_OutputtingBean') {
  103. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  104. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("可出豆")
  105. } else if (colorselect_tank_status[i] == 'S_Warning') {
  106. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  107. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("發生錯誤")
  108. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").css("color", "crimson")
  109. } else {
  110. console.log('DM_ColorSelect pass')
  111. }
  112. }
  113. // 狀態 脫皮機
  114. for (let i=0; i<peel_tank_status.length; i++) {
  115. if (peel_tank_status[i] == 'P_InputtingBean') {
  116. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  117. $("#DM_Peel_"+parseInt(i+1)+"_status").text("入豆中")
  118. } else if (peel_tank_status[i] == 'P_Waiting') {
  119. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  120. $("#DM_Peel_"+parseInt(i+1)+"_status").text("空桶等待")
  121. } else if (peel_tank_status[i] == 'P_OutputtingBean') {
  122. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  123. $("#DM_Peel_"+parseInt(i+1)+"_status").text("可出豆")
  124. } else if (peel_tank_status[i] == 'P_Warning') {
  125. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  126. $("#DM_Peel_"+parseInt(i+1)+"_status").text("發生錯誤")
  127. $("#DM_Peel_"+parseInt(i+1)+"_status").css("color", "crimson")
  128. } else {
  129. console.log('DM_DM_Peel pass')
  130. }
  131. }
  132. // 狀態 發酵槽 1
  133. for (let i=0; i<ferment_tank_status.length; i++) {
  134. if (ferment_tank_status[i] == 'F_InputtingBean') {
  135. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  136. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入豆中")
  137. } else if (ferment_tank_status[i] == 'F_Waiting') {
  138. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  139. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("空桶等待")
  140. } else if (ferment_tank_status[i] == 'F_OutputtingBean') {
  141. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  142. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("可出豆")
  143. } else if (ferment_tank_status[i] == 'F_InputtingBean_Pause') {
  144. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  145. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入豆暫停")
  146. } else if (ferment_tank_status[i] == 'F_InputtingBean_Finish') {
  147. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  148. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入豆完成")
  149. } else if (ferment_tank_status[i] == 'F_InputtingWater') {
  150. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  151. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入水中")
  152. } else if (ferment_tank_status[i] == 'F_Fermenting') {
  153. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  154. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("發酵中")
  155. } else if (ferment_tank_status[i] == 'F_Warning') {
  156. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  157. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("發生錯誤")
  158. $("#DM_Ferment_"+parseInt(i+1)+"_status").css("color", "crimson")
  159. } else {
  160. console.log('DM_Ferment pass')
  161. }
  162. }
  163. // 狀態 乾燥槽
  164. for (let i=0; i<dry_tank_status.length; i++) {
  165. if (dry_tank_status[i] == 'D_InputtingBean') {
  166. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  167. $("#DM_Dry_"+parseInt(i+1)+"_status").text("入豆中")
  168. } else if (dry_tank_status[i] == 'D_Waiting') {
  169. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  170. $("#DM_Dry_"+parseInt(i+1)+"_status").text("空桶等待")
  171. } else if (dry_tank_status[i] == 'D_InputtingWater') {
  172. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  173. $("#DM_Dry_"+parseInt(i+1)+"_status").text(" 外桶入水中")
  174. } else if (dry_tank_status[i] == 'D_Drying') {
  175. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  176. $("#DM_Dry_"+parseInt(i+1)+"_status").text("乾燥中")
  177. } else if (dry_tank_status[i] == 'D_OutputtingBean') {
  178. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  179. $("#DM_Dry_"+parseInt(i+1)+"_status").text("可出豆")
  180. } else if (dry_tank_status[i] == 'D_Warning') {
  181. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  182. $("#DM_Dry_"+parseInt(i+1)+"_status").text("發生錯誤")
  183. $("#DM_Dry_"+parseInt(i+1)+"_status").css("color", "crimson")
  184. } else {
  185. console.log('DM_InputBean pass')
  186. }
  187. }
  188. for (let i=0; i<peel_output_status.length; i++) {
  189. if (peel_output_status[i] == 'PO_InputtingBean') {
  190. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  191. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 入豆中")
  192. } else if (peel_output_status[i] == 'PO_Waiting') {
  193. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  194. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 空桶等待")
  195. } else if (peel_output_status[i] == 'PO_OutputtingBean') {
  196. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  197. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 可出豆")
  198. } else if (peel_output_status[i] == 'PO_Stand_by') {
  199. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "HotPink")
  200. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 待命")
  201. } else {
  202. console.log('pass')
  203. }
  204. }
  205. for (let i=0; i<peel_outputb_status.length; i++) {
  206. if (peel_outputb_status[i] == 'PO_InputtingBean') {
  207. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  208. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 入豆中")
  209. } else if (peel_outputb_status[i] == 'PO_Waiting') {
  210. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  211. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 空桶等待")
  212. } else if (peel_outputb_status[i] == 'PO_OutputtingBean') {
  213. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  214. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 可出豆")
  215. } else if (peel_outputb_status[i] == 'PO_Stand_by') {
  216. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "HotPink")
  217. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 待命")
  218. } else {
  219. console.log('pass')
  220. }
  221. }
  222. }
  223. </script>
  224. <script language="JavaScript">
  225. function myrefresh()
  226. {
  227. $.get('/demo_auto_data', function (resText) {
  228. clean_input_status = [resText.CI1,resText.CI2]
  229. clean_tank_status = [resText.C1, resText.C2]
  230. reclaimedwater_tank_status = [resText.R1]
  231. colorselect_tank_status = [resText.S1, resText.S2]
  232. peel_tank_status = [resText.P1, resText.P2]
  233. ferment_tank_status = [resText.F1, resText.F2]
  234. dry_tank_status = [resText.D1]
  235. peel_output_status = [resText.PO1]
  236. peel_outputb_status = [resText.POb1]
  237. // 狀態 入料儲豆槽
  238. for (let i=0; i<clean_input_status.length; i++) {
  239. if (clean_input_status[i] == 'CI_InputtingBean') {
  240. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  241. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("入豆中")
  242. } else if (clean_input_status[i] == 'CI_Waiting') {
  243. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  244. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("空桶等待")
  245. } else if (clean_input_status[i] == 'CI_OutputtingBean') {
  246. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  247. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("可出豆")
  248. } else if (clean_input_status[i] == 'CI_Warning') {
  249. $("#DM_InputBean_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  250. $("#DM_InputBean_"+parseInt(i+1)+"_status").text("發生錯誤")
  251. } else {
  252. console.log('DM_InputBean pass')
  253. }
  254. }
  255. // 狀態 清洗槽 1
  256. for (let i=0; i<clean_tank_status.length; i++) {
  257. if (clean_tank_status[i] == 'C_InputtingBean') {
  258. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  259. $("#DM_Clean_"+parseInt(i+1)+"_status").text("入豆中")
  260. } else if (clean_tank_status[i] == 'C_Waiting') {
  261. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  262. $("#DM_Clean_"+parseInt(i+1)+"_status").text("空桶等待")
  263. } else if (clean_tank_status[i] == 'C_InputtingWater') {
  264. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  265. $("#DM_Clean_"+parseInt(i+1)+"_status").text("內外桶入水中")
  266. } else if (clean_tank_status[i] == 'C_Cleaning') {
  267. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "plum")
  268. $("#DM_Clean_"+parseInt(i+1)+"_status").text("清洗中")
  269. } else if (clean_tank_status[i] == 'C_OutputtingWater') {
  270. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  271. $("#DM_Clean_"+parseInt(i+1)+"_status").text(" 內桶排水中")
  272. } else if (clean_tank_status[i] == 'C_OutputtingBean') {
  273. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  274. $("#DM_Clean_"+parseInt(i+1)+"_status").text("可出豆")
  275. } else if (clean_tank_status[i] == 'C_Warning') {
  276. $("#DM_Clean_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  277. $("#DM_Clean_"+parseInt(i+1)+"_status").text("發生錯誤")
  278. } else {
  279. console.log('DM_Clean pass')
  280. }
  281. }
  282. // 狀態 中水桶
  283. for (let i=0; i<reclaimedwater_tank_status.length; i++) {
  284. if (reclaimedwater_tank_status[i] == 'R_InputtingWater') {
  285. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  286. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 入水中")
  287. } else if (reclaimedwater_tank_status[i] == 'R_Waiting') {
  288. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  289. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 空桶等待")
  290. } else if (reclaimedwater_tank_status[i] == 'R_OutputtingWater') {
  291. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  292. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 排水中")
  293. } else if (reclaimedwater_tank_status[i] == 'R_Stand_by') {
  294. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "HotPink")
  295. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 待命")
  296. } else if (reclaimedwater_tank_status[i] == 'R_Warning') {
  297. console.log('[動作] R桶警告 R' + parseInt(i+1) + ' 警告')
  298. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  299. $("#DM_ReclaimedWater_"+parseInt(i+1)+"_status").text(" 警告")
  300. } else {
  301. console.log('pass')
  302. }
  303. }
  304. // 狀態 色選機
  305. for (let i=0; i<colorselect_tank_status.length; i++) {
  306. if (colorselect_tank_status[i] == 'S_InputtingBean') {
  307. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  308. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("入豆中")
  309. } else if (colorselect_tank_status[i] == 'S_Waiting') {
  310. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  311. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("空桶等待")
  312. } else if (colorselect_tank_status[i] == 'S_OutputtingBean') {
  313. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  314. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("可出豆")
  315. } else if (colorselect_tank_status[i] == 'S_Warning') {
  316. $("#DM_ColorSelect_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  317. $("#DM_ColorSelect_"+parseInt(i+1)+"_status").text("發生錯誤")
  318. } else {
  319. console.log('DM_ColorSelect pass')
  320. }
  321. }
  322. // 狀態 脫皮機
  323. for (let i=0; i<peel_tank_status.length; i++) {
  324. if (peel_tank_status[i] == 'P_InputtingBean') {
  325. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  326. $("#DM_Peel_"+parseInt(i+1)+"_status").text("入豆中")
  327. } else if (peel_tank_status[i] == 'P_Waiting') {
  328. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  329. $("#DM_Peel_"+parseInt(i+1)+"_status").text("空桶等待")
  330. } else if (peel_tank_status[i] == 'P_OutputtingBean') {
  331. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  332. $("#DM_Peel_"+parseInt(i+1)+"_status").text("可出豆")
  333. } else if (peel_tank_status[i] == 'P_Warning') {
  334. $("#DM_Peel_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  335. $("#DM_Peel_"+parseInt(i+1)+"_status").text("發生錯誤")
  336. } else {
  337. console.log('DM_DM_Peel pass')
  338. }
  339. }
  340. // 狀態 發酵槽 1
  341. for (let i=0; i<ferment_tank_status.length; i++) {
  342. if (ferment_tank_status[i] == 'F_InputtingBean') {
  343. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  344. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入豆中")
  345. } else if (ferment_tank_status[i] == 'F_Waiting') {
  346. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  347. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("空桶等待")
  348. } else if (ferment_tank_status[i] == 'F_OutputtingBean') {
  349. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  350. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("可出豆")
  351. } else if (ferment_tank_status[i] == 'F_InputtingBean_Pause') {
  352. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  353. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入豆暫停")
  354. } else if (ferment_tank_status[i] == 'F_InputtingBean_Finish') {
  355. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  356. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入豆完成")
  357. } else if (ferment_tank_status[i] == 'F_InputtingWater') {
  358. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  359. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("入水中")
  360. } else if (ferment_tank_status[i] == 'F_Fermenting') {
  361. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  362. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("發酵中")
  363. } else if (ferment_tank_status[i] == 'F_Warning') {
  364. $("#DM_Ferment_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  365. $("#DM_Ferment_"+parseInt(i+1)+"_status").text("發生錯誤")
  366. } else {
  367. console.log('DM_Ferment pass')
  368. }
  369. }
  370. // 狀態 乾燥槽
  371. for (let i=0; i<dry_tank_status.length; i++) {
  372. if (dry_tank_status[i] == 'D_InputtingBean') {
  373. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  374. $("#DM_Dry_"+parseInt(i+1)+"_status").text("入豆中")
  375. } else if (dry_tank_status[i] == 'D_Waiting') {
  376. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  377. $("#DM_Dry_"+parseInt(i+1)+"_status").text("空桶等待")
  378. } else if (dry_tank_status[i] == 'D_InputtingWater') {
  379. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "DeepSkyBlue")
  380. $("#DM_Dry_"+parseInt(i+1)+"_status").text(" 外桶入水中")
  381. } else if (dry_tank_status[i] == 'D_Drying') {
  382. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  383. $("#DM_Dry_"+parseInt(i+1)+"_status").text("乾燥中")
  384. } else if (dry_tank_status[i] == 'D_OutputtingBean') {
  385. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  386. $("#DM_Dry_"+parseInt(i+1)+"_status").text("可出豆")
  387. } else if (dry_tank_status[i] == 'D_Warning') {
  388. $("#DM_Dry_"+parseInt(i+1)+"_bar").css("background-color", "crimson")
  389. $("#DM_Dry_"+parseInt(i+1)+"_status").text("發生錯誤")
  390. } else {
  391. console.log('DM_InputBean pass')
  392. }
  393. }
  394. for (let i=0; i<peel_output_status.length; i++) {
  395. if (peel_output_status[i] == 'PO_InputtingBean') {
  396. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  397. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 入豆中")
  398. } else if (peel_output_status[i] == 'PO_Waiting') {
  399. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  400. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 空桶等待")
  401. } else if (peel_output_status[i] == 'PO_OutputtingBean') {
  402. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  403. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 可出豆")
  404. } else if (peel_output_status[i] == 'PO_Stand_by') {
  405. $("#DM_OutputBean_"+parseInt(i+1)+"_bar").css("background-color", "HotPink")
  406. $("#DM_OutputBean_"+parseInt(i+1)+"_status").text(" 待命")
  407. } else {
  408. console.log('pass')
  409. }
  410. }
  411. for (let i=0; i<peel_outputb_status.length; i++) {
  412. if (peel_outputb_status[i] == 'PO_InputtingBean') {
  413. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  414. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 入豆中")
  415. } else if (peel_outputb_status[i] == 'PO_Waiting') {
  416. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "lightgray")
  417. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 空桶等待")
  418. } else if (peel_outputb_status[i] == 'PO_OutputtingBean') {
  419. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "MediumSeaGreen")
  420. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 可出豆")
  421. } else if (peel_outputb_status[i] == 'PO_Stand_by') {
  422. $("#DM_BadBean_"+parseInt(i+1)+"_bar").css("background-color", "HotPink")
  423. $("#DM_BadBean_"+parseInt(i+1)+"_status").text(" 待命")
  424. } else {
  425. console.log('pass')
  426. }
  427. }
  428. },'json');
  429. }
  430. setInterval('myrefresh()',1000);
  431. </script>
  432. {% endblock %}
  433. {% block style %}
  434. <style>
  435. /* 各桶槽狀態大小的共同 CSS */
  436. .div_DryTank_position {
  437. text-align: center;
  438. font-weight: bold;
  439. border: 0px aquamarine solid;
  440. }
  441. .td-clickable:hover {
  442. /* background-color: rgb(238, 236, 236); */
  443. background-color: lavender;
  444. transition-duration: 0.5s;
  445. cursor: pointer;
  446. }
  447. /* 桶槽狀態顯示的顏色條 */
  448. .div_DryTank_Status {
  449. height: 20px;
  450. border-style: solid;
  451. border-color: whitesmoke;
  452. background-color: black;
  453. }
  454. /* 制動器狀態的圈圈 */
  455. .actuator_status {
  456. width: 18px;
  457. height: 18px;
  458. background-color:black;
  459. border-radius: 50%;
  460. }
  461. /* 狀態外框的 CSS */
  462. .table_css {
  463. border: 0px lightsteelblue solid;
  464. margin-right: auto;
  465. margin-left: auto;
  466. text-align: center;
  467. margin-top: 5px;
  468. width: 80%;
  469. }
  470. </style>
  471. {% endblock %}
  472. {% block main %}
  473. <!-- 乾燥槽 互動視窗(模态框) -->
  474. <div class="modal fade" id="D_Modal">
  475. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  476. <div class="modal-content">
  477. <!-- 互動視窗 標題 -->
  478. <div class="modal-header">
  479. <h4 id="Modal_title" class="modal-title">乾燥槽 D1 狀態</h4>
  480. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  481. </div>
  482. <!-- 互動視窗 內容 -->
  483. <div class="modal-body">
  484. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  485. <!--<table style="border:0px gray solid;-->
  486. <tr>
  487. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  488. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  489. </tr>
  490. <tr>
  491. <td style="vertical-align:text-top;">
  492. <table style="border:0px gray solid;" cellpadding="3">
  493. <!--font-size:12px; -->
  494. <tr>
  495. <td>
  496. <div id="tank_vacuum_status" class="actuator_status">
  497. </div>
  498. </td>
  499. <td>
  500. <a id="Vacuum" href="">真空吸料機</a>
  501. <!--<span id="tank_vacuum_t_status"></span>-->
  502. </td>
  503. </tr>
  504. <tr>
  505. <td>
  506. <div id="tank_threewayvalve_input_status" class="actuator_status">
  507. </div>
  508. </td>
  509. <td>
  510. <a id="ThreeWayValveInput" href="">入料三通閥</a>
  511. <!--<span id="tank_threewayvalve_t_status"></span>-->
  512. </td>
  513. </tr>
  514. <tr>
  515. <td>
  516. <div id="tank_threewayvalve_bean_status" class="actuator_status">
  517. </div>
  518. </td>
  519. <td>
  520. <a id="ThreeWayValveBean" href="">測豆三通閥</a>
  521. <!--<span id="tank_threewayvalve_t_status"></span>-->
  522. </td>
  523. </tr>
  524. <tr>
  525. <td>
  526. <div id="tank_solenoid_disinfect_status" class="actuator_status">
  527. </div>
  528. </td>
  529. <td>
  530. <a id="SolenoidDisinfect" href="">消毒電磁閥</a>
  531. <!--<span id="tank_solenoid_disinfect_t_status"></span>-->
  532. </td>
  533. </tr>
  534. <tr>
  535. <td>
  536. <div id="tank_motor_status" class="actuator_status">
  537. </div>
  538. </td>
  539. <td>
  540. <a id="Motor" href="">馬達</a>
  541. <!--<span id="tank_motor_t_status"></span>-->
  542. </td>
  543. </tr>
  544. <tr>
  545. <td>
  546. <div id="tank_blower_status" class="actuator_status">
  547. </div>
  548. </td>
  549. <td>
  550. <a id="Blower" href="">鼓風機</a>
  551. <!--<span id="tank_blower_t_status"></span>-->
  552. </td>
  553. </tr>
  554. <tr>
  555. <td>
  556. <div id="tank_heater1_status" class="actuator_status">
  557. </div>
  558. </td>
  559. <td>
  560. <a id="Heater1" href="">加熱器 1</a>
  561. <!--<span id="tank_heater1_t_status"></span>-->
  562. </td>
  563. </tr>
  564. <tr>
  565. <td>
  566. <div id="tank_heater2_status" class="actuator_status">
  567. </div>
  568. </td>
  569. <td>
  570. <a id="Heater2" href="">加熱器 2</a>
  571. <!--<span id="tank_heater2_t_status"></span>-->
  572. </td>
  573. </tr>
  574. <tr>
  575. <td>
  576. <div id="tank_temp1_enable_status" class="actuator_status">
  577. </div>
  578. </td>
  579. <td>
  580. <a id="TempEnable" href="">溫控開關</a>
  581. <!--<span id="tank_temp1_enable_t_status"></span>-->
  582. </td>
  583. </tr>
  584. <tr>
  585. <td>
  586. <div id="tank_temp1_status" class="actuator_status">
  587. </div>
  588. </td>
  589. <td>
  590. <a id="Temp" href="">設定溫度</a>
  591. <!--<span id="tank_temp1_t_status"></span>-->
  592. </td>
  593. </tr>
  594. <tr>
  595. <td>
  596. <div id="tank_solenoid_water_status" class="actuator_status">
  597. </div>
  598. </td>
  599. <td>
  600. <a id="SolenoidWater" href="">排水電磁閥</a>
  601. <!--<span id="tank_solenoid_water_t_status"></span>-->
  602. </td>
  603. </tr>
  604. <tr>
  605. <td>
  606. <div id="tank_diskvalve_status" class="actuator_status">
  607. </div>
  608. </td>
  609. <td>
  610. <a id="DiskValve" href="">蝴蝶閥</a>
  611. <!--<span id="tank_diskvalve_t_status"></span>-->
  612. </td>
  613. </tr>
  614. </table>
  615. </td>
  616. <td style="vertical-align:text-top;">
  617. <table style="border:0px gray solid;" cellpadding="3">
  618. <!--font-size:12px; -->
  619. <tr>
  620. <td>
  621. <a id="UltraSonic" href="">咖啡生豆高度</a>
  622. </td>
  623. <td>
  624. <span id="UltraSonic_t_status"></span>
  625. </td>
  626. </tr>
  627. <tr>
  628. <td>
  629. <a id="SHT11_Temp" href="">乾燥槽溫度</a>
  630. </td>
  631. <td>
  632. <span id="SHT11_Temp_t_status"></span>
  633. </td>
  634. </tr>
  635. <tr>
  636. <td>
  637. <a id="SHT11_Humidity" href="">乾燥槽濕度</a>
  638. </td>
  639. <td>
  640. <span id="SHT11_Humidity_t_status"></span>
  641. </td>
  642. </tr>
  643. <tr>
  644. <td>
  645. <a id="soil_Temp" href="">咖啡生豆溫度</a>
  646. </td>
  647. <td>
  648. <span id="soil_Temp_t_status"></span>
  649. </td>
  650. </tr>
  651. <tr>
  652. <td>
  653. <a id="soil_Humidity" href="">咖啡生豆濕度</a>
  654. </td>
  655. <td>
  656. <span id="soil_Humidity_t_status"></span>
  657. </td>
  658. </tr>
  659. <tr>
  660. <td>
  661. <a id="soil_EC" href="">咖啡生豆 EC</a>
  662. </td>
  663. <td>
  664. <span id="soil_EC_t_status"></span>
  665. </td>
  666. </tr>
  667. <tr>
  668. <td>
  669. <a id="PA" href="">桶內壓力</a>
  670. </td>
  671. <td>
  672. <span id="PA_t_status"></span>
  673. </td>
  674. </tr>
  675. <tr>
  676. <td>
  677. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  678. </td>
  679. </tr>
  680. </table>
  681. </td>
  682. </tr>
  683. </table>
  684. </div>
  685. </div>
  686. </div>
  687. </div>
  688. <!-- 入料儲豆槽 互動視窗(模态框) -->
  689. <div class="modal fade" id="IB_Modal">
  690. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  691. <div class="modal-content">
  692. <!-- 互動視窗 標題 -->
  693. <div class="modal-header">
  694. <h4 id="Modal_IB_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  695. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  696. </div>
  697. <!-- 互動視窗 內容 -->
  698. <div class="modal-body">
  699. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  700. <!--<table style="border:0px gray solid;-->
  701. <tr>
  702. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  703. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  704. </tr>
  705. <tr>
  706. <td style="vertical-align:text-top;">
  707. <table style="border:0px gray solid;" cellpadding="3">
  708. <!--font-size:12px; -->
  709. <tr>
  710. <td>
  711. <div id="tank_vacuum_status" class="actuator_status">
  712. </div>
  713. </td>
  714. <td>
  715. <a id="Vacuum" href="">真空吸料機</a>
  716. <!--<span id="tank_vacuum_t_status"></span>-->
  717. </td>
  718. </tr>
  719. </table>
  720. </td>
  721. <td style="vertical-align:text-top;">
  722. <table style="border:0px gray solid;" cellpadding="3">
  723. <!--font-size:12px; -->
  724. <tr>
  725. <td>
  726. <a id="UltraSonic" href="">咖啡生豆高度</a>
  727. </td>
  728. <td>
  729. <span id="UltraSonic_t_status"></span>
  730. </td>
  731. </tr>
  732. <tr>
  733. <td>
  734. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  735. </td>
  736. </tr>
  737. </table>
  738. </td>
  739. </tr>
  740. </table>
  741. </div>
  742. </div>
  743. </div>
  744. </div>
  745. <!-- 清洗槽 互動視窗(模态框) -->
  746. <div class="modal fade" id="C_Modal">
  747. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  748. <div class="modal-content">
  749. <!-- 互動視窗 標題 -->
  750. <div class="modal-header">
  751. <h4 id="Modal_C_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  752. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  753. </div>
  754. <!-- 互動視窗 內容 -->
  755. <div class="modal-body">
  756. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  757. <!--<table style="border:0px gray solid;-->
  758. <tr>
  759. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  760. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  761. </tr>
  762. <tr>
  763. <td style="vertical-align:text-top;">
  764. <table style="border:0px gray solid;" cellpadding="3">
  765. <!--font-size:12px; -->
  766. <tr>
  767. <td>
  768. <div id="tank_vacuum_status" class="actuator_status">
  769. </div>
  770. </td>
  771. <td>
  772. <a id="Vacuum" href="">真空吸料機</a>
  773. <!--<span id="tank_vacuum_t_status"></span>-->
  774. </td>
  775. </tr>
  776. </table>
  777. </td>
  778. <td style="vertical-align:text-top;">
  779. <table style="border:0px gray solid;" cellpadding="3">
  780. <!--font-size:12px; -->
  781. <tr>
  782. <td>
  783. <a id="UltraSonic" href="">咖啡生豆高度</a>
  784. </td>
  785. <td>
  786. <span id="UltraSonic_t_status"></span>
  787. </td>
  788. </tr>
  789. <tr>
  790. <td>
  791. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  792. </td>
  793. </tr>
  794. </table>
  795. </td>
  796. </tr>
  797. </table>
  798. </div>
  799. </div>
  800. </div>
  801. </div>
  802. <!-- 中水桶 互動視窗(模态框) -->
  803. <div class="modal fade" id="RW_Modal">
  804. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  805. <div class="modal-content">
  806. <!-- 互動視窗 標題 -->
  807. <div class="modal-header">
  808. <h4 id="Modal_RW_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  809. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  810. </div>
  811. <!-- 互動視窗 內容 -->
  812. <div class="modal-body">
  813. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  814. <!--<table style="border:0px gray solid;-->
  815. <tr>
  816. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  817. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  818. </tr>
  819. <tr>
  820. <td style="vertical-align:text-top;">
  821. <table style="border:0px gray solid;" cellpadding="3">
  822. <!--font-size:12px; -->
  823. <tr>
  824. <td>
  825. <div id="tank_vacuum_status" class="actuator_status">
  826. </div>
  827. </td>
  828. <td>
  829. <a id="Vacuum" href="">真空吸料機</a>
  830. <!--<span id="tank_vacuum_t_status"></span>-->
  831. </td>
  832. </tr>
  833. </table>
  834. </td>
  835. <td style="vertical-align:text-top;">
  836. <table style="border:0px gray solid;" cellpadding="3">
  837. <!--font-size:12px; -->
  838. <tr>
  839. <td>
  840. <a id="UltraSonic" href="">咖啡生豆高度</a>
  841. </td>
  842. <td>
  843. <span id="UltraSonic_t_status"></span>
  844. </td>
  845. </tr>
  846. <tr>
  847. <td>
  848. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  849. </td>
  850. </tr>
  851. </table>
  852. </td>
  853. </tr>
  854. </table>
  855. </div>
  856. </div>
  857. </div>
  858. </div>
  859. <!-- 色選機 互動視窗(模态框) -->
  860. <div class="modal fade" id="CS_Modal">
  861. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  862. <div class="modal-content">
  863. <!-- 互動視窗 標題 -->
  864. <div class="modal-header">
  865. <h4 id="Modal_CS_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  866. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  867. </div>
  868. <!-- 互動視窗 內容 -->
  869. <div class="modal-body">
  870. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  871. <!--<table style="border:0px gray solid;-->
  872. <tr>
  873. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  874. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  875. </tr>
  876. <tr>
  877. <td style="vertical-align:text-top;">
  878. <table style="border:0px gray solid;" cellpadding="3">
  879. <!--font-size:12px; -->
  880. <tr>
  881. <td>
  882. <div id="tank_vacuum_status" class="actuator_status">
  883. </div>
  884. </td>
  885. <td>
  886. <a id="Vacuum" href="">真空吸料機</a>
  887. <!--<span id="tank_vacuum_t_status"></span>-->
  888. </td>
  889. </tr>
  890. </table>
  891. </td>
  892. <td style="vertical-align:text-top;">
  893. <table style="border:0px gray solid;" cellpadding="3">
  894. <!--font-size:12px; -->
  895. <tr>
  896. <td>
  897. <a id="UltraSonic" href="">咖啡生豆高度</a>
  898. </td>
  899. <td>
  900. <span id="UltraSonic_t_status"></span>
  901. </td>
  902. </tr>
  903. <tr>
  904. <td>
  905. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  906. </td>
  907. </tr>
  908. </table>
  909. </td>
  910. </tr>
  911. </table>
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. <!-- 脫皮機 互動視窗(模态框) -->
  917. <div class="modal fade" id="P_Modal">
  918. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  919. <div class="modal-content">
  920. <!-- 互動視窗 標題 -->
  921. <div class="modal-header">
  922. <h4 id="Modal_P_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  923. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  924. </div>
  925. <!-- 互動視窗 內容 -->
  926. <div class="modal-body">
  927. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  928. <!--<table style="border:0px gray solid;-->
  929. <tr>
  930. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  931. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  932. </tr>
  933. <tr>
  934. <td style="vertical-align:text-top;">
  935. <table style="border:0px gray solid;" cellpadding="3">
  936. <tr>
  937. <td>
  938. <div id="P_vacuum_status" class="actuator_status">
  939. </div>
  940. </td>
  941. <td>
  942. 真空吸料機
  943. </td>
  944. </tr>
  945. <tr>
  946. <td>
  947. <div id="tank_motor_status" class="actuator_status">
  948. </div>
  949. </td>
  950. <td>
  951. 馬達
  952. </td>
  953. </tr>
  954. </table>
  955. </td>
  956. <td style="vertical-align:text-top;">
  957. <table style="border:0px gray solid;" cellpadding="3">
  958. <!--font-size:12px; -->
  959. <tr>
  960. <td>
  961. <a id="UltraSonic" href="">咖啡生豆高度</a>
  962. </td>
  963. <td>
  964. <span id="UltraSonic_t_status"></span>
  965. </td>
  966. </tr>
  967. <tr>
  968. <td>
  969. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  970. </td>
  971. </tr>
  972. </table>
  973. </td>
  974. </tr>
  975. </table>
  976. </div>
  977. </div>
  978. </div>
  979. </div>
  980. <!-- 發酵槽 互動視窗(模态框) -->
  981. <div class="modal fade" id="F_Modal">
  982. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  983. <div class="modal-content">
  984. <!-- 互動視窗 標題 -->
  985. <div class="modal-header">
  986. <h4 id="Modal_F_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  987. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  988. </div>
  989. <!-- 互動視窗 內容 -->
  990. <div class="modal-body">
  991. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  992. <!--<table style="border:0px gray solid;-->
  993. <tr>
  994. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  995. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  996. </tr>
  997. <tr>
  998. <td style="vertical-align:text-top;">
  999. <table style="border:0px gray solid;" cellpadding="3">
  1000. <!--font-size:12px; -->
  1001. <tr>
  1002. <td>
  1003. <div id="tank_vacuum_status"
  1004. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1005. </div>
  1006. </td>
  1007. <td>
  1008. <a id="Vacuum" href="">真空吸料機</a>
  1009. <!--<span id="tank_vacuum_t_status"></span>-->
  1010. </td>
  1011. </tr>
  1012. <tr>
  1013. <td>
  1014. <div id="tank_threewayvalve_input_status"
  1015. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1016. </div>
  1017. </td>
  1018. <td>
  1019. <a id="ThreeWayValveInput" href="">入料三通閥</a>
  1020. <!--<span id="tank_threewayvalve_input_t_status"></span>-->
  1021. </td>
  1022. </tr>
  1023. <!-- <tr>
  1024. <td>
  1025. <div id="tank_solenoid_water_total_status"
  1026. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1027. </div>
  1028. </td>
  1029. <td>
  1030. <a id="SolenoidWaterTotal" href="">總進水電磁閥</a>
  1031. <span id="tank_solenoid_water_total_t_status"></span>
  1032. </td>
  1033. </tr> -->
  1034. <tr>
  1035. <td>
  1036. <div id="outer_solenoid_water_status"
  1037. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1038. </div>
  1039. </td>
  1040. <td>
  1041. <a id="SolenoidOuterWater" href="">保溫夾層進水電磁閥</a>
  1042. <!--<span id="outer_solenoid_water_t_status"></span>-->
  1043. </td>
  1044. </tr>
  1045. <tr>
  1046. <td>
  1047. <div id="tank_solenoid_water_in_status"
  1048. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1049. </div>
  1050. </td>
  1051. <td>
  1052. <a id="SolenoidWaterIn" href="">桶內進水電磁閥</a>
  1053. <!--<span id="tank_solenoid_water_in_t_status"></span>-->
  1054. </td>
  1055. </tr>
  1056. <tr>
  1057. <td>
  1058. <div id="tank_pump_sensor_status"
  1059. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1060. </div>
  1061. </td>
  1062. <td>
  1063. <a id="PumpSensor" href="">感測器抽水雙核隔膜泵</a>
  1064. <!--<span id="tank_pump_sensor_t_status"></span>-->
  1065. </td>
  1066. </tr>
  1067. <!-- <tr>
  1068. <td>
  1069. <div id="tank_threewayvalve_bean_status"
  1070. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1071. </div>
  1072. </td>
  1073. <td>
  1074. <a id="ThreeWayValveBean" href="">感測模組下豆三通閥</a>
  1075. <span id="tank_threewayvalve_bean_t_status"></span>
  1076. </td>
  1077. </tr> -->
  1078. <tr>
  1079. <td>
  1080. <div id="outer_threewayvalve_float_status"
  1081. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1082. </div>
  1083. </td>
  1084. <td>
  1085. <a id="ThreeWayValveFloat" href="">外桶浮選三通閥</a>
  1086. <!--<span id="outer_threewayvalve_float_t_status"></span>-->
  1087. </td>
  1088. </tr>
  1089. <tr>
  1090. <td>
  1091. <div id="tank_solenoid_disinfect_status"
  1092. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1093. </div>
  1094. </td>
  1095. <td>
  1096. <a id="SolenoidDisinfect" href="">桶內消毒電磁閥</a>
  1097. <!--<span id="tank_solenoid_disinfect_t_status"></span>-->
  1098. </td>
  1099. </tr>
  1100. <tr>
  1101. <td>
  1102. <div id="tank_motor_status"
  1103. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1104. </div>
  1105. </td>
  1106. <td>
  1107. <a id="Motor" href="">馬達</a>
  1108. <!--<span id="tank_motor_t_status"></span>-->
  1109. </td>
  1110. </tr>
  1111. <tr>
  1112. <td>
  1113. <div id="tank_heater1_status"
  1114. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1115. </div>
  1116. </td>
  1117. <td>
  1118. <a id="Heater1" href="">加熱器 1</a>
  1119. <!--<span id="tank_heater1_t_status"></span>-->
  1120. </td>
  1121. </tr>
  1122. <tr>
  1123. <td>
  1124. <div id="tank_heater2_status"
  1125. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1126. </div>
  1127. </td>
  1128. <td>
  1129. <a id="Heater2" href="">加熱器 2</a>
  1130. <!--<span id="tank_heater2_t_status"></span>-->
  1131. </td>
  1132. </tr>
  1133. <tr>
  1134. <td>
  1135. <div id="tank_temp_enable_status"
  1136. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1137. </div>
  1138. </td>
  1139. <td>
  1140. <a id="TempEnable" href="">溫控開關</a>
  1141. <!--<span id="tank_temp_enable_t_status"></span>-->
  1142. </td>
  1143. </tr>
  1144. <tr>
  1145. <td>
  1146. <div id="tank_temp_status"
  1147. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1148. </div>
  1149. </td>
  1150. <td>
  1151. <a id="temp" href="">溫度設定</a>
  1152. <!--<span id="tank_temp_t_status"></span>-->
  1153. </td>
  1154. </tr>
  1155. <tr>
  1156. <td>
  1157. <div id="tank_diskvalve_status"
  1158. style="width: 18px; height: 18px; background-color:black; border-radius: 50%;">
  1159. </div>
  1160. </td>
  1161. <td>
  1162. <a id="DiskValve" href="">蝴蝶閥</a>
  1163. <!--<span id="tank_diskvalve_t_status"></span>-->
  1164. </td>
  1165. </tr>
  1166. </table>
  1167. </td>
  1168. <td style="vertical-align:text-top;">
  1169. <table style="border:0px gray solid;" cellpadding="3">
  1170. <!--font-size:12px; -->
  1171. <tr>
  1172. <td>
  1173. <a id="UltraSonic" href="">水位/生豆高度</a>
  1174. </td>
  1175. <td>
  1176. <span id="UltraSonic_t_status"></span>
  1177. </td>
  1178. </tr>
  1179. <tr>
  1180. <td>
  1181. <a id="motorEncoder" href="">馬達編碼器</a>
  1182. </td>
  1183. <td>
  1184. <span id="motorEncoder_t_status"></span>
  1185. </td>
  1186. </tr>
  1187. <tr>
  1188. <td>
  1189. <a id="SHT11_Temp" href="">溫度</a>
  1190. </td>
  1191. <td>
  1192. <span id="SHT11_Temp_t_status"></span>
  1193. </td>
  1194. </tr>
  1195. <tr>
  1196. <td>
  1197. <a id="SHT11_Humidity" href="">濕度</a>
  1198. </td>
  1199. <td>
  1200. <span id="SHT11_Humidity_t_status"></span>
  1201. </td>
  1202. </tr>
  1203. <tr>
  1204. <td>
  1205. <a id="CO2" href="">二氧化碳</a>
  1206. </td>
  1207. <td>
  1208. <span id="CO2_t_status"></span>
  1209. </td>
  1210. </tr>
  1211. <tr>
  1212. <td>
  1213. <a id="PA" href="">大氣壓力</a>
  1214. </td>
  1215. <td>
  1216. <span id="PA_t_status"></span>
  1217. </td>
  1218. </tr>
  1219. <tr>
  1220. <td>
  1221. <a id="PH" href="">PH</a>
  1222. </td>
  1223. <td>
  1224. <span id="PH_t_status"></span>
  1225. </td>
  1226. </tr>
  1227. <tr>
  1228. <td>
  1229. <a id="ORP" href="">ORP</a>
  1230. </td>
  1231. <td>
  1232. <span id="ORP_t_status"></span>
  1233. </td>
  1234. </tr>
  1235. <tr>
  1236. <td>
  1237. <a id="DO" href="">DO</a>
  1238. </td>
  1239. <td>
  1240. <span id="DO_t_status"></span>
  1241. </td>
  1242. </tr>
  1243. <tr>
  1244. <td>
  1245. <a id="EC" href="">EC</a>
  1246. </td>
  1247. <td>
  1248. <span id="EC_t_status"></span>
  1249. </td>
  1250. </tr>
  1251. <tr>
  1252. <td>
  1253. 保溫夾層水位
  1254. </td>
  1255. <td>
  1256. <!-- 滿 / 未滿 -->
  1257. <span id="WaterLevel_t_status"></span>
  1258. </td>
  1259. </tr>
  1260. <tr>
  1261. <td>
  1262. <a id="camera_ferment_tid" href=""><strong>攝影機畫面</strong></a>
  1263. </td>
  1264. </tr>
  1265. </table>
  1266. </td>
  1267. </tr>
  1268. </table>
  1269. </div>
  1270. </div>
  1271. </div>
  1272. </div>
  1273. <!-- 乾燥槽 互動視窗(模态框) -->
  1274. <div class="modal fade" id="D_Modal">
  1275. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  1276. <div class="modal-content">
  1277. <!-- 互動視窗 標題 -->
  1278. <div class="modal-header">
  1279. <h4 id="Modal_D_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  1280. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1281. </div>
  1282. <!-- 互動視窗 內容 -->
  1283. <div class="modal-body">
  1284. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  1285. <!--<table style="border:0px gray solid;-->
  1286. <tr>
  1287. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  1288. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  1289. </tr>
  1290. <tr>
  1291. <td style="vertical-align:text-top;">
  1292. <table style="border:0px gray solid;" cellpadding="3">
  1293. <!--font-size:12px; -->
  1294. <tr>
  1295. <td>
  1296. <div id="tank_vacuum_status" class="actuator_status">
  1297. </div>
  1298. </td>
  1299. <td>
  1300. <a id="Vacuum" href="">真空吸料機</a>
  1301. <!--<span id="tank_vacuum_t_status"></span>-->
  1302. </td>
  1303. </tr>
  1304. </table>
  1305. </td>
  1306. <td style="vertical-align:text-top;">
  1307. <table style="border:0px gray solid;" cellpadding="3">
  1308. <!--font-size:12px; -->
  1309. <tr>
  1310. <td>
  1311. <a id="UltraSonic" href="">咖啡生豆高度</a>
  1312. </td>
  1313. <td>
  1314. <span id="UltraSonic_t_status"></span>
  1315. </td>
  1316. </tr>
  1317. <tr>
  1318. <td>
  1319. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  1320. </td>
  1321. </tr>
  1322. </table>
  1323. </td>
  1324. </tr>
  1325. </table>
  1326. </div>
  1327. </div>
  1328. </div>
  1329. </div>
  1330. <!-- 壞果儲豆槽 互動視窗(模态框) -->
  1331. <div class="modal fade" id="BB_Modal">
  1332. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  1333. <div class="modal-content">
  1334. <!-- 互動視窗 標題 -->
  1335. <div class="modal-header">
  1336. <h4 id="Modal_BB_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  1337. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1338. </div>
  1339. <!-- 互動視窗 內容 -->
  1340. <div class="modal-body">
  1341. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  1342. <!--<table style="border:0px gray solid;-->
  1343. <tr>
  1344. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  1345. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  1346. </tr>
  1347. <tr>
  1348. <td style="vertical-align:text-top;">
  1349. <table style="border:0px gray solid;" cellpadding="3">
  1350. <!--font-size:12px; -->
  1351. <tr>
  1352. <td>
  1353. <div id="tank_vacuum_status" class="actuator_status">
  1354. </div>
  1355. </td>
  1356. <td>
  1357. <a id="Vacuum" href="">真空吸料機</a>
  1358. <!--<span id="tank_vacuum_t_status"></span>-->
  1359. </td>
  1360. </tr>
  1361. </table>
  1362. </td>
  1363. <td style="vertical-align:text-top;">
  1364. <table style="border:0px gray solid;" cellpadding="3">
  1365. <!--font-size:12px; -->
  1366. <tr>
  1367. <td>
  1368. <a id="UltraSonic" href="">咖啡生豆高度</a>
  1369. </td>
  1370. <td>
  1371. <span id="UltraSonic_t_status"></span>
  1372. </td>
  1373. </tr>
  1374. <tr>
  1375. <td>
  1376. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  1377. </td>
  1378. </tr>
  1379. </table>
  1380. </td>
  1381. </tr>
  1382. </table>
  1383. </div>
  1384. </div>
  1385. </div>
  1386. </div>
  1387. <!-- 出料儲豆槽 互動視窗(模态框) -->
  1388. <div class="modal fade" id="OB_Modal">
  1389. <div class="modal-dialog modal-dialog-centered" style="width: 400px;">
  1390. <div class="modal-content">
  1391. <!-- 互動視窗 標題 -->
  1392. <div class="modal-header">
  1393. <h4 id="Modal_OB_title" class="modal-title">入料儲豆槽 IB 狀態</h4>
  1394. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1395. </div>
  1396. <!-- 互動視窗 內容 -->
  1397. <div class="modal-body">
  1398. <table style="border:0px gray solid; width: 100%;" cellpadding="3">
  1399. <!--<table style="border:0px gray solid;-->
  1400. <tr>
  1401. <td><strong><a id="actuator_link" href="">制動器狀態</a></strong></td>
  1402. <td><strong><a id="sensor_link" href="">感測器狀態</a></strong></td>
  1403. </tr>
  1404. <tr>
  1405. <td style="vertical-align:text-top;">
  1406. <table style="border:0px gray solid;" cellpadding="3">
  1407. <!--font-size:12px; -->
  1408. <tr>
  1409. <td>
  1410. <div id="tank_vacuum_status" class="actuator_status">
  1411. </div>
  1412. </td>
  1413. <td>
  1414. <a id="Vacuum" href="">真空吸料機</a>
  1415. <!--<span id="tank_vacuum_t_status"></span>-->
  1416. </td>
  1417. </tr>
  1418. </table>
  1419. </td>
  1420. <td style="vertical-align:text-top;">
  1421. <table style="border:0px gray solid;" cellpadding="3">
  1422. <!--font-size:12px; -->
  1423. <tr>
  1424. <td>
  1425. <a id="UltraSonic" href="">咖啡生豆高度</a>
  1426. </td>
  1427. <td>
  1428. <span id="UltraSonic_t_status"></span>
  1429. </td>
  1430. </tr>
  1431. <tr>
  1432. <td>
  1433. <a id="camera_dry_tid" href=""><strong>攝影機畫面</strong></a>
  1434. </td>
  1435. </tr>
  1436. </table>
  1437. </td>
  1438. </tr>
  1439. </table>
  1440. </div>
  1441. </div>
  1442. </div>
  1443. </div>
  1444. </div>
  1445. <div class="album py-5 bg-light">
  1446. <div class="container">
  1447. <div class="row row-cols-1 row-cols-sm-1 row-cols-md-1 g-3">
  1448. <div class="col">
  1449. <div class="card shadow-sm">
  1450. <div class="card-body">
  1451. <div class="d-flex justify-content-between align-items-center">
  1452. <table class="table_css" cellpadding="6" border="1" style="width: 100%" >
  1453. <tr>
  1454. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1455. <div id="DM_InputBean_1" tabindex="0" class="div_DryTank_position" role="button">
  1456. <span class="demo_status_css">CI1</span><br>
  1457. <span id="DM_InputBean_1_status" class="demo_status_css"></span>
  1458. </div>
  1459. </td>
  1460. <td style="width: 10px; font-weight: 900; border: lightsteelblue 1px solid;">
  1461. 入料
  1462. </td>
  1463. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1464. <div id="DM_Clean_1" tabindex="0" class="div_DryTank_position" role="button">
  1465. <span class="demo_status_css">C1</span><br>
  1466. <span id="DM_Clean_1_status" class="demo_status_css"></span>
  1467. </div>
  1468. </td>
  1469. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1470. <div id="DM_ReclaimedWater_1" tabindex="0" class="div_DryTank_position" role="button">
  1471. <span class="demo_status_css">R1</span><br>
  1472. <span id="DM_ReclaimedWater_1_status" class="demo_status_css"></span>
  1473. </div>
  1474. </td>
  1475. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1476. <div id="DM_ColorSelect_1" tabindex="0" class="div_DryTank_position" role="button">
  1477. <span class="demo_status_css">S1</span><br>
  1478. <span id="DM_ColorSelect_1_status" class="demo_status_css"></span>
  1479. </div>
  1480. </td>
  1481. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1482. <div id="DM_Peel_1" tabindex="0" class="div_DryTank_position" role="button">
  1483. <span class="demo_status_css">P1</span><br>
  1484. <span id="DM_Peel_1_status" class="demo_status_css"></span>
  1485. </div>
  1486. </td>
  1487. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1488. <div id="DM_Ferment_1" tabindex="0" class="div_DryTank_position" role="button">
  1489. <span class="demo_status_css">F1</span><br>
  1490. <span id="DM_Ferment_1_status" class="demo_status_css"></span>
  1491. </div>
  1492. </td>
  1493. <td style="width: 10px; font-weight: 900; border: lightsteelblue 1px solid;">
  1494. 出料
  1495. </td>
  1496. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1497. <div id="DM_BadBean_1" tabindex="0" class="div_DryTank_position" role="button">
  1498. <span class="demo_status_css">BPO1</span><br>
  1499. <span id="DM_BadBean_1_status" class="demo_status_css"></span>
  1500. </div>
  1501. </td>
  1502. </tr>
  1503. <tr>
  1504. <td style="border: lightsteelblue 1px solid;">
  1505. <center><div id="DM_InputBean_1_bar" class="div_DryTank_Status "></div></center>
  1506. </td>
  1507. <td style="border: lightsteelblue 1px solid;">
  1508. </td>
  1509. <td style="border: lightsteelblue 1px solid;">
  1510. <center><div id="DM_Clean_1_bar" class="div_DryTank_Status"></div></center>
  1511. </td>
  1512. <td style="border: lightsteelblue 1px solid;">
  1513. <center><div id="DM_ReclaimedWater_1_bar" class="div_DryTank_Status"></div></center>
  1514. </td>
  1515. <td style="border: lightsteelblue 1px solid;">
  1516. <center><div id="DM_ColorSelect_1_bar" class="div_DryTank_Status"></div></center>
  1517. </td>
  1518. <td style="border: lightsteelblue 1px solid;">
  1519. <center><div id="DM_Peel_1_bar" class="div_DryTank_Status"></div></center>
  1520. </td>
  1521. <td style="border: lightsteelblue 1px solid;">
  1522. <center><div id="DM_Ferment_1_bar" class="div_DryTank_Status"></div></center>
  1523. </td>
  1524. <td style="border: lightsteelblue 1px solid;">
  1525. </td>
  1526. <td style="border: lightsteelblue 1px solid;">
  1527. <center><div id="DM_BadBean_1_bar" class="div_DryTank_Status"></div></center>
  1528. </td>
  1529. </tr>
  1530. </table>
  1531. </div>
  1532. </div>
  1533. <img src="../static/img/web_demo_container.png" width="100%">
  1534. <div class="card-body">
  1535. <div class="d-flex justify-content-between align-items-center">
  1536. <table class="table_css" cellpadding="6" border="1" style="width: 100%">
  1537. <tr>
  1538. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1539. <div id="DM_InputBean_2" tabindex="0" class="div_DryTank_position" role="button">
  1540. <span class="demo_status_css">CI2</span><br>
  1541. <span id="DM_InputBean_2_status" class="demo_status_css"></span>
  1542. </div>
  1543. </td>
  1544. <td style=" font-weight: 900; border: lightsteelblue 1px solid;">
  1545. 入料
  1546. </td>
  1547. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1548. <div id="DM_Clean_2" tabindex="0" class="div_DryTank_position" role="button">
  1549. <span class="demo_status_css">C2</span><br>
  1550. <span id="DM_Clean_2_status" class="demo_status_css"></span>
  1551. </div>
  1552. </td>
  1553. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1554. <div id="DM_ColorSelect_2" tabindex="0" class="div_DryTank_position" role="button">
  1555. <span class="demo_status_css">S2</span><br>
  1556. <span id="DM_ColorSelect_2_status" class="demo_status_css"></span>
  1557. </div>
  1558. </td>
  1559. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1560. <div id="DM_Peel_2" tabindex="0" class="div_DryTank_position" role="button">
  1561. <span class="demo_status_css">P2</span><br>
  1562. <span id="DM_Peel_2_status" class="demo_status_css"></span>
  1563. </div>
  1564. </td>
  1565. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1566. <div id="DM_Ferment_2" tabindex="0" class="div_DryTank_position" role="button">
  1567. <span class="demo_status_css">F2</span><br>
  1568. <span id="DM_Ferment_2_status" class="demo_status_css"></span>
  1569. </div>
  1570. </td>
  1571. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1572. <div id="DM_Dry_1" tabindex="0" class="div_DryTank_position" role="button">
  1573. <span class="demo_status_css">D1</span><br>
  1574. <span id="DM_Dry_1_status" class="demo_status_css"></span>
  1575. </div>
  1576. </td>
  1577. <td style=" font-weight: 900; border: lightsteelblue 1px solid;">
  1578. 出料
  1579. </td>
  1580. <td class="td-clickable" width="14%" style="border: lightsteelblue 1px solid;">
  1581. <div id="DM_OutputBean_1" tabindex="0" class="div_DryTank_position" role="button">
  1582. <span class="demo_status_css">PO1</span><br>
  1583. <span id="DM_OutputBean_1_status" class="demo_status_css"></span>
  1584. </div>
  1585. </td>
  1586. </tr>
  1587. <tr>
  1588. <td style="border: lightsteelblue 1px solid;">
  1589. <center><div id="DM_InputBean_2_bar" class="div_DryTank_Status"></div></center>
  1590. </td>
  1591. <td style="border: lightsteelblue 1px solid;">
  1592. </td>
  1593. <td style="border: lightsteelblue 1px solid;">
  1594. <center><div id="DM_Clean_2_bar" class="div_DryTank_Status"></div></center>
  1595. </td>
  1596. <td style="border: lightsteelblue 1px solid;">
  1597. <center><div id="DM_ColorSelect_2_bar" class="div_DryTank_Status"></div></center>
  1598. </td>
  1599. <td style="border: lightsteelblue 1px solid;">
  1600. <center><div id="DM_Peel_2_bar" class="div_DryTank_Status"></div></center>
  1601. </td>
  1602. <td style="border: lightsteelblue 1px solid;">
  1603. <center><div id="DM_Ferment_2_bar" class="div_DryTank_Status"></div></center>
  1604. </td>
  1605. <td style="border: lightsteelblue 1px solid;">
  1606. <center><div id="DM_Dry_1_bar" class="div_DryTank_Status"></div></center>
  1607. </td>
  1608. <td style="border: lightsteelblue 1px solid;">
  1609. </td>
  1610. <td style="border: lightsteelblue 1px solid;">
  1611. <center><div id="DM_OutputBean_1_bar" class="div_DryTank_Status"></div></center>
  1612. </td>
  1613. </tr>
  1614. </table>
  1615. </div>
  1616. </div>
  1617. </div>
  1618. </div>
  1619. </div>
  1620. </div>
  1621. </div>
  1622. {% endblock %}
  1623. {% block script2 %}
  1624. <script>
  1625. // modal D
  1626. function update_data_D(dtid) {
  1627. console.log('dry_tank_id:' + dtid)
  1628. // dtid = dry_tank_id
  1629. $.get('/loading/D' + dtid, '', function (res) {
  1630. if (res.tank_vacuum == 0) {
  1631. $("#tank_vacuum_status").css("background-color", "#C0C0C0")
  1632. } else if (res.tank_vacuum == 1) {
  1633. $("#tank_vacuum_status").css("background-color", "forestgreen")
  1634. } else { $("#tank_vacuum_status").css("background-color", "crimson") }
  1635. if (res.tank_threewayvalve_input == 0) {
  1636. $("#tank_threewayvalve_input_status").css("background-color", "#C0C0C0")
  1637. } else if (res.tank_threewayvalve_input == 1) {
  1638. $("#tank_threewayvalve_input_status").css("background-color", "forestgreen")
  1639. } else { $("#tank_threewayvalve_input_status").css("background-color", "crimson") }
  1640. if (res.tank_threewayvalve_bean == 0) {
  1641. $("#tank_threewayvalve_bean_status").css("background-color", "#C0C0C0")
  1642. } else if (res.tank_threewayvalve_bean == 1) {
  1643. $("#tank_threewayvalve_bean_status").css("background-color", "forestgreen")
  1644. } else { $("#tank_threewayvalve_bean_status").css("background-color", "crimson") }
  1645. if (res.tank_diskvalve == 0) {
  1646. $("#tank_diskvalve_status").css("background-color", "#C0C0C0")
  1647. } else if (res.tank_diskvalve == 1) {
  1648. $("#tank_diskvalve_status").css("background-color", "forestgreen")
  1649. } else { $("#tank_diskvalve_status").css("background-color", "crimson") }
  1650. if (res.tank_solenoid_disinfect == 0) {
  1651. $("#tank_solenoid_disinfect_status").css("background-color", "#C0C0C0")
  1652. } else if (res.tank_solenoid_disinfect == 1) {
  1653. $("#tank_solenoid_disinfect_status").css("background-color", "forestgreen")
  1654. } else { $("#tank_solenoid_disinfect_status").css("background-color", "crimson") }
  1655. if (res.tank_solenoid_water == 0) {
  1656. $("#tank_solenoid_water_status").css("background-color", "#C0C0C0")
  1657. } else if (res.tank_solenoid_water == 1) {
  1658. $("#tank_solenoid_water_status").css("background-color", "forestgreen")
  1659. } else { $("#tank_solenoid_water_status").css("background-color", "crimson") }
  1660. if (res.tank_motor == 0) {
  1661. $("#tank_motor_status").css("background-color", "#C0C0C0")
  1662. } else if (res.tank_motor > 0 || res.tank_motor < 0) {
  1663. $("#tank_motor_status").css("background-color", "forestgreen")
  1664. } else { $("#tank_motor_status").css("background-color", "crimson") }
  1665. if (res.tank_blower == 0) {
  1666. $("#tank_blower_status").css("background-color", "#C0C0C0")
  1667. } else if (res.tank_blower == 1) {
  1668. $("#tank_blower_status").css("background-color", "forestgreen")
  1669. } else { $("#tank_blower_status").css("background-color", "crimson") }
  1670. if (res.tank_heater1 == 0) {
  1671. $("#tank_heater1_status").css("background-color", "#C0C0C0")
  1672. } else if (res.tank_heater1 == 1) {
  1673. $("#tank_heater1_status").css("background-color", "forestgreen")
  1674. } else { $("#tank_heater1_status").css("background-color", "crimson") }
  1675. if (res.tank_heater2 == 0) {
  1676. $("#tank_heater2_status").css("background-color", "#C0C0C0")
  1677. } else if (res.tank_heater2 == 1) {
  1678. $("#tank_heater2_status").css("background-color", "forestgreen")
  1679. } else { $("#tank_heater2_status").css("background-color", "crimson") }
  1680. if (res.tank_temp1_enable == 0) {
  1681. $("#tank_temp1_enable_status").css("background-color", "#C0C0C0")
  1682. } else if (res.tank_temp1_enable == 1) {
  1683. $("#tank_temp1_enable_status").css("background-color", "forestgreen")
  1684. } else { $("#tank_temp1_enable_status").css("background-color", "crimson") }
  1685. if (res.tank_temp1 == 0) {
  1686. $("#tank_temp1_status").css("background-color", "#C0C0C0")
  1687. } else if (res.tank_temp1 > 0) {
  1688. $("#tank_temp1_status").css("background-color", "forestgreen")
  1689. } else { $("#tank_temp1_status").css("background-color", "crimson") }
  1690. $("#tank_vacuum_t_status").text(res.tank_vacuum);
  1691. $("#tank_threewayvalve_t_status").text(res.tank_threewayvalve);
  1692. $("#tank_diskvalve_t_status").text(res.tank_diskvalve);
  1693. $("#tank_solenoid_disinfect_t_status").text(res.tank_solenoid_disinfect);
  1694. $("#tank_solenoid_water_t_status").text(res.tank_solenoid_water);
  1695. $("#tank_motor_t_status").text(res.tank_motor);
  1696. $("#tank_blower_t_status").text(res.tank_blower);
  1697. $("#tank_heater1_t_status").text(res.tank_heater1);
  1698. $("#tank_heater2_t_status").text(res.tank_heater2);
  1699. $("#tank_temp1_enable_t_status").text(res.tank_temp1_enable);
  1700. $("#tank_temp1_t_status").text(res.tank_temp1);
  1701. $("#UltraSonic_t_status").text(res.UltraSonic);
  1702. $("#SHT11_Temp_t_status").text(res.SHT11_Temp);
  1703. $("#SHT11_Humidity_t_status").text(res.SHT11_Humidity);
  1704. $("#soil_Temp_t_status").text(res.soil_Temp);
  1705. $("#soil_Humidity_t_status").text(res.soil_Humidity);
  1706. $("#soil_EC_t_status").text(res.soil_EC);
  1707. $("#PA_t_status").text(res.PA);
  1708. }, 'json');
  1709. $('#Modal_title').text("乾燥槽 D" + dtid + " 狀態")
  1710. if (status == 2) {
  1711. $('#actuator_link').attr("title", "該使用者無修改權限")
  1712. $('#sensor_link').attr("title", "該使用者無修改權限")
  1713. $('#Vacuum').attr("title", "該使用者無修改權限")
  1714. $('#ThreeWayValveInput').attr("title", "該使用者無修改權限")
  1715. $('#ThreeWayValveBean').attr("title", "該使用者無修改權限")
  1716. $('#SolenoidDisinfect').attr("title", "該使用者無修改權限")
  1717. $('#Motor').attr("title", "該使用者無修改權限")
  1718. $('#Blower').attr("title", "該使用者無修改權限")
  1719. $('#Heater1').attr("title", "該使用者無修改權限")
  1720. $('#Heater2').attr("title", "該使用者無修改權限")
  1721. $('#TempEnable').attr("title", "該使用者無修改權限")
  1722. $('#Temp').attr("title", "該使用者無修改權限")
  1723. $('#SolenoidWater').attr("title", "該使用者無修改權限")
  1724. $('#DiskValve').attr("title", "該使用者無修改權限")
  1725. } else if ( (status == 0) || (status == 1) ) {
  1726. $('#actuator_link').attr("href", "/dry_container_tank/" + dtid)
  1727. $('#sensor_link').attr("href", "/dry_container_tank/" + dtid)
  1728. $('#Vacuum').attr("href", "/ctrl_D_Vacuum/" + dtid)
  1729. $('#ThreeWayValveInput').attr("href", "/ctrl_D_ThreeWayValveInput/" + dtid)
  1730. $('#ThreeWayValveBean').attr("href", "/ctrl_D_ThreeWayValveBean/" + dtid)
  1731. $('#SolenoidDisinfect').attr("href", "/ctrl_D_SolenoidDisinfect/" + dtid)
  1732. $('#Motor').attr("href", "/ctrl_D_Motor/" + dtid)
  1733. $('#Blower').attr("href", "/ctrl_D_Blower/" + dtid)
  1734. $('#Heater1').attr("href", "/ctrl_D_Heater1/" + dtid)
  1735. $('#Heater2').attr("href", "/ctrl_D_Heater2/" + dtid)
  1736. $('#TempEnable').attr("href", "/ctrl_D_TempEnable/" + dtid)
  1737. $('#Temp').attr("href", "/ctrl_D_Temp/" + dtid)
  1738. $('#SolenoidWater').attr("href", "/ctrl_D_SolenoidWater/" + dtid)
  1739. $('#DiskValve').attr("href", "/ctrl_D_DiskValve/" + dtid)
  1740. }
  1741. $('#SHT11_Temp').attr("href", "/chart_D/SHT11_Temp/" + dtid)
  1742. $('#SHT11_Humidity').attr("href", "/chart_D/SHT11_Humidity/" + dtid)
  1743. $('#UltraSonic').attr("href", "/chart_D/UltraSonic/" + dtid)
  1744. $('#PA').attr("href", "/chart_D/PA/" + dtid)
  1745. $('#soil_Temp').attr("href", "/chart_D/soil_Temp/" + dtid)
  1746. $('#soil_Humidity').attr("href", "/chart_D/soil_Humidity/" + dtid)
  1747. $('#soil_EC').attr("href", "/chart_D/soil_EC/" + dtid)
  1748. $('#camera_dry_tid').attr("href", "/camera_D" + dtid)
  1749. setTimeout(function(){ $('#D_Modal').modal('show'); }, 300)
  1750. }
  1751. // modal IB
  1752. function update_data_IB(id) {
  1753. // ajax 制動器感測器數值
  1754. $('#Modal_IB_title').text("入料儲豆槽 " + id + " 狀態")
  1755. setTimeout(function(){ $('#IB_Modal').modal('show'); }, 300)
  1756. }
  1757. // modal C
  1758. function update_data_C(id) {
  1759. // ajax 制動器感測器數值
  1760. $('#Modal_C_title').text("清洗槽 " + id + " 狀態")
  1761. setTimeout(function(){ $('#C_Modal').modal('show'); }, 300)
  1762. }
  1763. // modal RW
  1764. function update_data_RW(id) {
  1765. // ajax 制動器感測器數值
  1766. $('#Modal_RW_title').text("中水桶 " + id + " 狀態")
  1767. setTimeout(function(){ $('#RW_Modal').modal('show'); }, 300)
  1768. }
  1769. // modal CS
  1770. function update_data_CS(id) {
  1771. // ajax 制動器感測器數值
  1772. $('#Modal_CS_title').text("色選機 " + id + " 狀態")
  1773. setTimeout(function(){ $('#CS_Modal').modal('show'); }, 300)
  1774. }
  1775. // modal P
  1776. function update_data_P(id) {
  1777. // ajax 制動器感測器數值
  1778. $('#Modal_P_title').text("脫皮機 " + id + " 狀態")
  1779. setTimeout(function(){ $('#P_Modal').modal('show'); }, 300)
  1780. }
  1781. // modal F
  1782. function update_data_F(id) {
  1783. // ajax 制動器感測器數值
  1784. $('#Modal_F_title').text("發酵槽 " + id + " 狀態")
  1785. setTimeout(function(){ $('#F_Modal').modal('show'); }, 300)
  1786. }
  1787. // modal D
  1788. function update_data_D(id) {
  1789. // ajax 制動器感測器數值
  1790. $('#Modal_D_title').text("乾燥槽 " + id + " 狀態")
  1791. setTimeout(function(){ $('#D_Modal').modal('show'); }, 300)
  1792. }
  1793. // modal BB
  1794. function update_data_BB(id) {
  1795. // ajax 制動器感測器數值
  1796. $('#Modal_BB_title').text("壞果儲豆槽 " + id + " 狀態")
  1797. setTimeout(function(){ $('#BB_Modal').modal('show'); }, 300)
  1798. }
  1799. // modal OB
  1800. function update_data_OB(id) {
  1801. // ajax 制動器感測器數值
  1802. $('#Modal_OB_title').text("出料儲豆槽 " + id + " 狀態")
  1803. setTimeout(function(){ $('#OB_Modal').modal('show'); }, 300)
  1804. }
  1805. var DM_InputBean_1 = document.getElementById('DM_InputBean_1');
  1806. DM_InputBean_1.addEventListener('click', function () { update_data_IB("1") });
  1807. var DM_InputBean_2 = document.getElementById('DM_InputBean_2');
  1808. DM_InputBean_2.addEventListener('click', function () { update_data_IB("2") });
  1809. var DM_Clean_1 = document.getElementById('DM_Clean_1');
  1810. DM_Clean_1.addEventListener('click', function () { update_data_C("1") });
  1811. var DM_Clean_2 = document.getElementById('DM_Clean_2');
  1812. DM_Clean_2.addEventListener('click', function () { update_data_C("2") });
  1813. var DM_ReclaimedWater_1 = document.getElementById('DM_ReclaimedWater_1');
  1814. DM_ReclaimedWater_1.addEventListener('click', function () { update_data_RW("1") });
  1815. var DM_ColorSelect_1 = document.getElementById('DM_ColorSelect_1');
  1816. DM_ColorSelect_1.addEventListener('click', function () { update_data_CS("1") });
  1817. var DM_ColorSelect_2 = document.getElementById('DM_ColorSelect_2');
  1818. DM_ColorSelect_2.addEventListener('click', function () { update_data_CS("2") });
  1819. var DM_Peel_1 = document.getElementById('DM_Peel_1');
  1820. DM_Peel_1.addEventListener('click', function () { update_data_P("1") });
  1821. var DM_Peel_2 = document.getElementById('DM_Peel_2');
  1822. DM_Peel_2.addEventListener('click', function () { update_data_P("2") });
  1823. var DM_Ferment_1 = document.getElementById('DM_Ferment_1');
  1824. DM_Ferment_1.addEventListener('click', function () { update_data_F("1") });
  1825. var DM_Ferment_2 = document.getElementById('DM_Ferment_2');
  1826. DM_Ferment_2.addEventListener('click', function () { update_data_F("2") });
  1827. var DM_Dry_1 = document.getElementById('DM_Dry_1');
  1828. DM_Dry_1.addEventListener('click', function () { update_data_D("1") });
  1829. var DM_BadBean_1 = document.getElementById('DM_BadBean_1');
  1830. DM_BadBean_1.addEventListener('click', function () { update_data_BB("1") });
  1831. var DM_OutputBean_1 = document.getElementById('DM_OutputBean_1');
  1832. DM_OutputBean_1.addEventListener('click', function () { update_data_OB("1") });
  1833. </script>
  1834. {% endblock %}