|
@@ -132,7 +132,7 @@
|
|
|
</head>
|
|
|
|
|
|
<body style="font-size: 18px;">
|
|
|
- <div id="wrapper" style="height: 1400px;">
|
|
|
+ <div id="wrapper" style="height: 1500px;">
|
|
|
<div id="coffee_header">
|
|
|
<!-- 匯入共同使用的 header.html 內容 -->
|
|
|
{% include 'header.html' %}
|
|
@@ -930,7 +930,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 積木程式 start -->
|
|
|
- <div id="box"style="position: absolute; top: 770px;">
|
|
|
+ <div id="box" style="position: absolute; top: 740px;">
|
|
|
<div id="newcondition_1" class="newcondition_css">
|
|
|
<!-- 總 條件 -->
|
|
|
<div id="condition1">
|
|
@@ -1328,6 +1328,12 @@
|
|
|
</div>
|
|
|
<!-- 積木程式 finish -->
|
|
|
|
|
|
+ <div style="position: absolute; top: 1200px;">
|
|
|
+ Value : <span id="show_Value"></span><br>
|
|
|
+ MySQL : <span id="show_MySQLcommand"></span><br>
|
|
|
+ MQTT : <span id="show_MQTTcommand"></span>
|
|
|
+ </div>
|
|
|
+
|
|
|
<script>
|
|
|
var relay_data = ''; // 積木程式 制動器選項
|
|
|
var sensor_data = ''; // 積木程式 感測器選項
|
|
@@ -1757,6 +1763,7 @@
|
|
|
"{'cond_com':['" + cond_com_list.join("', '") + "']}"
|
|
|
)
|
|
|
console.log("cond_item: [" + cond_item + "]")
|
|
|
+ document.getElementById('show_Value').innerText = "cond_item: [" + cond_item + "]";
|
|
|
}
|
|
|
// ===== 0324 測試 OK 勿刪 ===================================================
|
|
|
TT['mainLength'] = Z
|
|
@@ -1772,17 +1779,19 @@
|
|
|
'current_timestamp(), "' + set_value.join('", "') + '")';
|
|
|
|
|
|
var sql_data = { "sql":SQL_insert };
|
|
|
+ document.getElementById('show_MySQLcommand').innerText = SQL_insert;
|
|
|
console.log("sql_data: ", sql_data)
|
|
|
- // $.get('/sql_get', sql_data, function (res) {
|
|
|
- // alert("OK")
|
|
|
- // }, 'json');
|
|
|
+ $.get('/sql_get', sql_data, function (res) {
|
|
|
+ alert("OK")
|
|
|
+ }, 'json');
|
|
|
}
|
|
|
|
|
|
function MQTTtest() {
|
|
|
test();
|
|
|
// ===== 0324 測試 OK 勿刪 ===================================================
|
|
|
$.get('/dry_block_format', TT, function (res) {
|
|
|
- alert("MQTT OK")
|
|
|
+ // alert("MQTT OK")
|
|
|
+ document.getElementById('show_MQTTcommand').innerText = JSON.stringify(res.response);
|
|
|
}, 'json');
|
|
|
// ===== 0324 測試 OK 勿刪 ===================================================
|
|
|
}
|