[Frontend][歷史資料] 訂閱 Loading 程序補上

This commit is contained in:
dev01 2022-12-02 16:25:57 +08:00
parent 796a217bcb
commit eba516ca98

View File

@ -198,6 +198,7 @@
if (index == 0) { if (index == 0) {
strHtml += `<button onClick="setValue(null, null, '${val.points}', this)" type="button" class="btn btn-dark waves-effect waves-themed">${val.full_name} ${val.points}</button>`; strHtml += `<button onClick="setValue(null, null, '${val.points}', this)" type="button" class="btn btn-dark waves-effect waves-themed">${val.full_name} ${val.points}</button>`;
pageAct.deviceItem = val.points; pageAct.deviceItem = val.points;
pageAct.devicePoiName = val.full_name + ' ' + val.points;
getData(); getData();
} else { } else {
strHtml += `<button onClick="setValue(null, null, '${val.points}', this)" type="button" class="btn btn-secondary waves-effect waves-themed">${val.full_name} ${val.points}</button>`; strHtml += `<button onClick="setValue(null, null, '${val.points}', this)" type="button" class="btn btn-secondary waves-effect waves-themed">${val.full_name} ${val.points}</button>`;
@ -231,7 +232,8 @@
t.fnClearTable(); t.fnClearTable();
if (res.data.length > 0) if (res.data.length > 0)
t.fnAddData(res.data); t.fnAddData(res.data);
} }
$(loadEle).Loading("close");
} }
function setValue(deviceNumber, deviceName, deviceItem, elem) { function setValue(deviceNumber, deviceName, deviceItem, elem) {
@ -242,7 +244,8 @@
pageAct.deviceName = deviceName; pageAct.deviceName = deviceName;
devPointsList(); devPointsList();
} }
else if (deviceItem != null && deviceItem != undefined) { else if (deviceItem != null && deviceItem != undefined) {
pageAct.devicePoiName = $(elem).text();
pageAct.deviceItem = deviceItem; pageAct.deviceItem = deviceItem;
getData(); getData();
} }
@ -330,7 +333,7 @@
function loadTable(data) { function loadTable(data) {
if (data) { if (data) {
$.each(data, function (i, v) { $.each(data, function (i, v) {
v.type = deviceName; v.type = pageAct.devicePoiName;
}); });
} }