diff --git a/TC1/http_server/web/index.html b/TC1/http_server/web/index.html index a536755..25c6da9 100644 --- a/TC1/http_server/web/index.html +++ b/TC1/http_server/web/index.html @@ -892,9 +892,9 @@ for (var i = 0; i < actions.length; i++) { @@ -903,8 +903,7 @@ for (var i = 0; i < actions.length; i++) { `; } document.getElementById("short_click_events_tb").innerHTML = tb_html; -// 刷新 MDL 元素 -componentHandler.upgradeDom(); + }); @@ -1242,9 +1241,9 @@ for (var i = 0; i < actions.length; i++) { @@ -1253,8 +1252,7 @@ for (var i = 0; i < actions.length; i++) { `; } document.getElementById("short_click_events_tb").innerHTML = tb_html; -// 刷新 MDL 元素 -componentHandler.upgradeDom(); + window.setTimeout(GetPowerRecord, 3000); }, power_idx.toString()); @@ -1332,19 +1330,18 @@ componentHandler.upgradeDom(); GetTimedTask(); }, cmd); } -function selectOperation(rowId, index, operations) { +function selectOperation(rowId, index, operationText) { +var witch = parseInt(rowId.split('-')[1]); if (index === -1) { document.getElementById(`${rowId}-input`).value = '未设置'; document.getElementById(`${rowId}-value`).value = -1; } else { -var witch = parseInt(rowId.split('-')[1]); - const selectedText = operations[index]; - document.getElementById(`${rowId}-input`).value = selectedText; + document.getElementById(`${rowId}-input`).value = operationText; document.getElementById(`${rowId}-value`).value = index; } -HttpDel("/shortClickEvent", function (re) { +HttpPost("/shortClickEvent", function (re) { ShowToast("已设置按钮事件"); - }, `${witch} index`); + }, `${witch} ${index}`); } function DelTimedTask(timestamp) {