123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Aisky-coffee</title>
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- 新 Bootstrap4 核心 CSS 文件 -->
- <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
- <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
- <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
- <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
- <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
- <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
- <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
- <!--可用來建立使用者小圖示-->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <style>
- body {
- margin:0;
- }
- .navbar-dark .navbar-nav .nav-link {
- color: white;
- cursor: pointer;
- text-decoration:none;
- width: 110px;
- height: 46px;
- }
- .nav-top {
- line-height:40px;
- background-color: #C4C4C4;
- }
- .website_title{
- font-family: Roboto;
- font-style: normal;
- font-weight: normal;
- font-size: 30px;
- color: #000000;
- }
- .navbar-nav > li{
- float: none;
- display: inline-block;
- width: 100px;
- margin: 0 auto;
- text-align: center;
- }
- .navbar-nav > li a{
- font-size: 20px;
- }
- .main-page {
- margin-top: 200px;
- }
- .page-title {
- font-family: Roboto;
- font-style: normal;
- font-weight: bold;
- font-size: 36px;
- }
- .flex {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: center;
- }
- .set-link {
- display: inline-block;
- width: 350px;
- height: 100px;
- line-height: 100px;
- background: #008CBA;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- color: #FFFFFF;
- border-radius: 10px;
- font-size: 36px;
- }
- .cmn-toggle {
- position: absolute;
- margin-left: 0px;
- visibility: hidden;
- }
- .cmn-toggle + label {
- display: block;
- position: relative;
- cursor: pointer;
- outline: none;
- user-select: none;
- }
- input.cmn-toggle-round-flat + label {
- padding: 2px;
- width: 60px;
- height: 30px;
- background-color: #C0C0C0;
- border-radius: 60px;
- transition: background 0.4s;
- }
- input.cmn-toggle-round-flat + label:before,
- input.cmn-toggle-round-flat + label:after {
- display: block;
- position: absolute;
- content: "";
- }
- input.cmn-toggle-round-flat + label:before {
- top: 2px;
- left: 2px;
- bottom: 2px;
- right: 2px;
- background-color: #fff;
- border-radius: 60px;
- transition: background 0.4s;
- }
- input.cmn-toggle-round-flat + label:after {
- top: 4px;
- left: 4px;
- bottom: 4px;
- width: 24px;
- background-color: #dddddd;
- border-radius: 52px;
- transition: margin 0.4s, background 0.4s;
- }
- input.cmn-toggle-round-flat:checked + label {
- background-color: #C0C0C0;
- }
- input.cmn-toggle-round-flat:checked + label:after {
- margin-left: 27px;
- background-color: #008CBA;
- }
- @media(max-width:373px){
- .card {
- margin-right: 0px;
- }
- .set-link {
- width: 250px;
- }
- }
- @media(max-width:577px){
- }
- @media(min-width:576px){
- }
- @media(min-width:768px){
- .navbar-nav > li {
- margin-left: 0px;
- }
- .navbar-nav .li-block {
- display:none;
- }
- }
- @media(min-width:991px){
- .navbar-nav > li {
- margin-left: 20px;
- }
- .navbar-nav .li-block {
- display:none;
- }
- }
- @media(min-width:1200px){
- .navbar-nav > li {
- margin-left: 50px;
- }
- .navbar-nav .li-block {
- display: inline-block;
- width: 100px;
- }
- }
- @media(min-width:1400px){
- .navbar-nav .li-block {
- display: inline-block;
- width: 200px;
- }
- }
- @media(min-width:1689px) {
- .navbar-nav > li {
- margin-left: 50px;
- }
- .navbar-nav .li-block {
- display: inline-block;
- width: 500px;
- }
- }
- </style>
- <script>
- //relay抓取狀態函數
- function Relay(){
- $.get('/relay','',function(res){
- //console.log(res.relay);
- if(res.relay == '1'){
- $("#relay-status").text('加熱中!(每10秒更新一次)');
- }else{
- $("#relay-status").text('斷電中!');
- };
- },'json');
- };
- //脫皮機抓取狀態函數
- function Peeling(){
- $.get('/peeling','',function(res){
- //console.log(res.peeling);
- $("#peeling-status").text(res.peeling + ' rpm(每1分鐘更新一次)');
- },'json');
- };
- //控制蝴蝶閥函數
- function ButterflyValve(){
- //<!--setInterval(Relay,10000);-->
- var status = "off";
- var check = $("input[name=butterfly-valve-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-02").prop('checked', false);
- if(!confirm("你確定要開啟蝴蝶閥嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-02").prop('checked', true);
- if(!confirm("你確定要關閉蝴蝶閥嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"butterfly-valve", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-02").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-02").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //控制抽水馬達函數
- function PumpingMotor(){
- var status = "off";
- var check = $("input[name=pumping-motor-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-05").prop('checked', false);
- if(!confirm("你確定要開啟抽水馬達嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-05").prop('checked', true);
- if(!confirm("你確定要關閉抽水馬達嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"pump", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-05").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-05").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //控制真空吸料機函數
- function SuctionMachine(){
- var status = "off";
- var check = $("input[name=suction-machine-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-08").prop('checked', false);
- if(!confirm("你確定要開啟真空吸料機嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-08").prop('checked', true);
- if(!confirm("你確定要關閉真空吸料機嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"suction-machine", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-08").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-08").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //控制真空吸料機閥門函數
- function SuctionMachineValve(){
- var status = "off";
- var check = $("input[name=suction-machine-valve-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-11").prop('checked', false);
- if(!confirm("你確定要開啟真空吸料機閥門嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-11").prop('checked', true);
- if(!confirm("你確定要關閉真空吸料機閥門嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"suction-machine-valve", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-11").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-11").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //控制脫皮機馬達函數
- function PeelingMachine(){
- var peeling_data = $("input[name=peeling-data]").val();
- if(peeling_data == ''){
- $("#cmn-toggle-14").prop('checked', false);
- alert("請先輸入要運轉的值!");
- return false;
- }else if(Number(peeling_data) < -50 || Number(peeling_data) > 50 || !Number(peeling_data)){
- $("#cmn-toggle-14").prop('checked', false);
- alert("您輸入的值已超過範圍,請重新輸入!");
- return false;
- };
- var value = "off";
- var check = $("input[name=peeling-machine-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- value = "on";
- $("#cmn-toggle-14").prop('checked', false);
- if(!confirm("你確定要開啟脫皮機馬達,運轉速度為" + peeling_data + "rpm嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-14").prop('checked', true);
- if(!confirm("你確定要關閉脫皮機馬達嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"peeling-machine", "value":value, "volume":peeling_data};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-14").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- var timer = setInterval(Peeling,60000);
- }else if(res == 'off'){
- $("#cmn-toggle-14").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- clearInterval(timer);
- $("#peeling-status").text('');
- }else{
- alert(res);
- };
- }, 'text')
- };
- //改變脫皮機rpm函數
- function ChangePeeling(){
- var peeling_data = $("input[name=peeling-data]").val();
- if(!confirm("你確定要更改轉速為" + peeling_data + "嗎?")){
- return false;
- };
- var data = {"tank-number":"1", "command":"peeling-machine", "value":"on", "volume":peeling_data};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- alert('更改成功');
- }else{
- alert(res);
- };
- }, 'text');
- };
- //控制攪拌函數
- function Stir(){
- var stir_data = $("input[name=stir-data]").val();
- if(stir_data == ''){
- $("#cmn-toggle-17").prop('checked', false);
- alert("請先輸入要運轉的數值!");
- return false;
- }else if(Number(stir_data) < 0 || Number(stir_data) > 50){
- $("#cmn-toggle-17").prop('checked', false);
- alert("您輸入的值已超過範圍,請重新輸入!");
- return false;
- };
- var value = 'off';
- var check = $("input[name=stir-on]:checked");
- if(check.length > 0){
- value = 'on';
- $("#cmn-toggle-17").prop('checked', false);
- if(!confirm("你確定要開啟攪拌機馬達,運轉速度為" + stir_data + "rpm嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-17").prop('checked', true);
- if(!confirm("你確定要關閉攪拌機馬達嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":'stir', "value":value, "volume":stir_data}
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-17").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-17").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //改變攪拌機rpm函數
- function ChangeStir(){
- var stir_data = $("input[name=stir-data]").val();
- if(!confirm("你確定要更改轉速為" + stir_data + "嗎?")){
- return false;
- };
- var data = {"tank-number":"1", "command":"stir", "value":"on", "volume":stir_data};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- alert('更改成功');
- }else{
- alert(res);
- };
- }, 'text');
- };
- //恆溫控制函數
- function TemSubmit(){
- var tem_data = $("input[name=tem-data]").val();
- if(tem_data == ''){
- alert('請先填入要恆溫的數值!');
- return false;
- }else{
- if(!confirm('你填入的溫度為' + tem_data + '度,確定送出?')){
- return false;
- };
- };
- var data = {"command":"temp","value":tem_data};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- alert('送出成功!');
- setInterval(Relay,10000);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //Valve1函數
- function Valve1(){
- var status = "off";
- var check = $("input[name=valve1-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-20").prop('checked', false);
- if(!confirm("你確定要開啟Valve1嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-20").prop('checked', true);
- if(!confirm("你確定要關閉Valve1嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"valve1", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-20").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-20").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //Valve2函數
- function Valve2(){
- var status = "off";
- var check = $("input[name=valve2-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-23").prop('checked', false);
- if(!confirm("你確定要開啟Valve2嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-23").prop('checked', true);
- if(!confirm("你確定要關閉Valve2嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"valve2", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-23").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-23").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //Pump1函數
- function Pump1(){
- var status = "off";
- var check = $("input[name=pump1-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-26").prop('checked', false);
- if(!confirm("你確定要開啟Pump1嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-26").prop('checked', true);
- if(!confirm("你確定要關閉Pump1嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"pump1", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-26").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-26").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //Pump2函數
- function Pump2(){
- var status = "off";
- var check = $("input[name=pump2-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-29").prop('checked', false);
- if(!confirm("你確定要開啟Pump2嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-29").prop('checked', true);
- if(!confirm("你確定要關閉Pump2嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"pump2", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-29").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-29").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //Pump3函數
- function Pump3(){
- var status = "off";
- var check = $("input[name=pump3-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-32").prop('checked', false);
- if(!confirm("你確定要開啟Pump3嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-32").prop('checked', true);
- if(!confirm("你確定要關閉Pump3嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"pump3", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-32").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-32").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //鼓風機函數
- function Blower(){
- var status = "off";
- var check = $("input[name=blower-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-35").prop('checked', false);
- if(!confirm("你確定要開啟鼓風機嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-35").prop('checked', true);
- if(!confirm("你確定要關閉鼓風機嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"blower", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-35").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-35").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //電熱管1函數
- function Heater1(){
- var status = "off";
- var check = $("input[name=heater1-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-38").prop('checked', false);
- if(!confirm("你確定要開啟電熱管1嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-38").prop('checked', true);
- if(!confirm("你確定要關閉電熱管1嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"heater1", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-38").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-38").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- //電熱管2函數
- function Heater2(){
- var status = "off";
- var check = $("input[name=heater2-on]:checked");
- //大於0代表有被選中
- if(check.length > 0){
- status = "on";
- $("#cmn-toggle-41").prop('checked', false);
- if(!confirm("你確定要開啟電熱管2嗎?")){
- return false;
- };
- }else{
- $("#cmn-toggle-41").prop('checked', true);
- if(!confirm("你確定要關閉電熱管2嗎?")){
- return false;
- };
- };
- var data = {"tank-number":"1", "command":"heater2", "value":status};
- $.post('/mqtt/{{params.tid}}', data, function(res){
- if(res == 'on'){
- $("#cmn-toggle-41").prop('checked', true);
- setTimeout("alert('開啟成功!')", 500);
- }else if(res == 'off'){
- $("#cmn-toggle-41").prop('checked', false);
- setTimeout("alert('關閉成功!')", 500);
- }else{
- alert(res);
- };
- }, 'text')
- };
- </script>
- </head>
- <body>
- <nav class="fixed-top">
- <nav class="navbar navbar-expand-md nav-top justify-content-center">
- <div>
- <span class="website_title">發酵槽{{params.tid}}</span>
- </div>
- </nav>
- <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="collapsibleNavbar">
- <ul class="navbar-nav">
- <li class="nav-item">
- <a class="nav-link" href="/">首頁</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">關於我們</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">資訊</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">聯絡方法</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/cargo_list">咖啡貨櫃</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/video">影像串流</a>
- </li>
- <li class="li-block"></li>
- <li class="nav-item">
- <a class="nav-link" href="#"><i class="fa fa-user-o"></i> {{params.username}}</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/logout">Logout</a>
- </li>
- </ul>
- </div>
- </nav>
- </nav>
- <div class="main-page">
- <div class="text-center">
- <h1 style="margin-bottom:50px;">制動器狀態</h1>
- </div>
- <form method="" action="">
- <div class="container-fluid row">
- <div class="col-2"></div>
- <!--<div class="col-4">-->
- <div class="col-md-4 col-sm-12">
- <table border="1px solid black" style="font-size:20px;">
- <tr>
- <td style="color:red;">Valve</td>
- <td>
- <span style="color:#C0C0C0;">off</span>
- <span style="color:#008CBA;">on</span>
- </td>
- </tr>
- <tr>
- <td>1.蝴蝶閥</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-01" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-01"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-02" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="butterfly-valve-on" value="ON" onclick="ButterflyValve()">
- <label for="cmn-toggle-02"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-03" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-03" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>2.抽水馬達</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-04" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-04"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-05" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="pumping-motor-on" value="ON" onclick="PumpingMotor()">
- <label for="cmn-toggle-05"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-06" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-06" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>3.真空吸料機</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-07" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-07"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-08" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="suction-machine-on" value="ON" onclick="SuctionMachine()">
- <label for="cmn-toggle-08"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-09" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-09" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>4.真空吸料機閥門</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-10" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-10"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-11" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="suction-machine-valve-on" value="ON" onclick="SuctionMachineValve()">
- <label for="cmn-toggle-11"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-12" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-12" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>5.Valve1</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-19" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-19"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-20" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="valve1-on" value="ON" onclick="Valve1()">
- <label for="cmn-toggle-20"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-21" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-21" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>6.Valve2</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-22" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-22"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-23" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="valve2-on" value="ON" onclick="Valve2()">
- <label for="cmn-toggle-23"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-24" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-24" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>7.Pump1</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-25" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-25"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-26" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="pump1-on" value="ON" onclick="Pump1()">
- <label for="cmn-toggle-26"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-27" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-27" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>8.Pump2</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-28" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-28"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-29" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="pump2-on" value="ON" onclick="Pump2()">
- <label for="cmn-toggle-29"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-30" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-30" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>9.Pump3</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-31" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-31"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-32" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="pump3-on" value="ON" onclick="Pump3()">
- <label for="cmn-toggle-32"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-33" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-33" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <!--<div>-->
- <!--<!–<div class="switch_div">–>-->
- <!--<!–<span>蝴蝶閥</span>–>-->
- <!--<!–<div class="switch">–>-->
- <!--<!–<input id="cmn-toggle-01" class="cmn-toggle cmn-toggle-round" type="checkbox">–>-->
- <!--<!–<label for="cmn-toggle-01"></label>–>-->
- <!--<!–</div>–>-->
- <!--<!–<div class="switch text-center">–>-->
- <!--<!–<input id="cmn-toggle-02" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="butterfly-valve-on" value="ON" onclick="ButterflyValve()">–>-->
- <!--<!–<label for="cmn-toggle-02"></label>–>-->
- <!--<!–</div>–>-->
- <!--<!–<div class="switch">–>-->
- <!--<!–<input id="cmn-toggle-03" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">–>-->
- <!--<!–<label for="cmn-toggle-03" data-on="Yes" data-off="No"></label>–>-->
- <!--<!–</div>–>-->
- <!--<!–</div>–>-->
- <!--</div>-->
- <!--<div>-->
- <!--攪拌機馬達:-->
- <!--<input name="" type="text" placeholder="請輸入你要運轉的趴數(1~100)" style="width:225px;"> %-->
- <!--<input name="" type="button" value="送出">-->
- <!--</div>-->
- <div class="col-md-4 col-sm-12">
- <table border="1px solid black" style="width:500px;height:300px;font-size:20px;">
- <tr>
- <td>10.鼓風機</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-34" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-34"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-35" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="blower-on" value="ON" onclick="Blower()">
- <label for="cmn-toggle-35"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-36" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-36" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>11.電熱管1</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-37" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-37"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-38" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="heater1-on" value="ON" onclick="Heater1()">
- <label for="cmn-toggle-38"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-39" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-39" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>12.電熱管2</td>
- <td>
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-40" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-40"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-41" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="heater2-on" value="ON" onclick="Heater2()">
- <label for="cmn-toggle-41"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-42" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-42" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>10.脫皮機馬達</td>
- <td>
- <input name="peeling-data" type="text" placeholder="請輸入你要運轉的rpm(-50~50)" style="width:280px;"> rpm
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-13" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-13"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-14" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="peeling-machine-on" value="ON" onclick="PeelingMachine()">
- <label for="cmn-toggle-14"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-15" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-15" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- 狀態:
- <span id="peeling-status" style="color:red;"></span>
- <br>
- <input type="button" value="送出(需改變rpm值時請點擊)" name="change-peeling" onclick="ChangePeeling()">
- </td>
- </tr>
- <tr>
- <td>11.攪拌機馬達:</td>
- <td>
- <input name="stir-data" type="text" placeholder="請輸入你要運轉的rpm(0~50)" style="width:280px;"> rpm
- <div class="switch_div">
- <div class="switch">
- <input id="cmn-toggle-16" class="cmn-toggle cmn-toggle-round" type="checkbox">
- <label for="cmn-toggle-16"></label>
- </div>
- <div class="switch text-center">
- <input id="cmn-toggle-17" class="cmn-toggle cmn-toggle-round-flat" type="checkbox" name="stir-on" value="ON" onclick="Stir()">
- <label for="cmn-toggle-17"></label>
- </div>
- <div class="switch">
- <input id="cmn-toggle-18" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
- <label for="cmn-toggle-18" data-on="Yes" data-off="No"></label>
- </div>
- </div>
- <input type="button" value="送出(需改變rpm值時請點擊)" name="change-stir" onclick="ChangeStir()">
- <!--<input name="stir-on" type="button" value="開啟" onclick="Stir('on')">-->
- <!--<input name="stir-off" type="button" value="關閉" onclick="Stir('off')">-->
- </td>
- </tr>
- <tr>
- <td>12.恆溫的目標溫度:</td>
- <td>
- <input name="tem-data" type="text" placeholder="請輸入你要設定的目標溫度" style="width:280px;"> ℃
- <input name="tem-submit" type="button" value="送出" onclick="TemSubmit()">
- Relay狀態:
- <span id="relay-status" style="color:red;"></span>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </form>
- </div>
- </body>
- </html>
|