[Frontend][歷史資料] 訂閱 Loading 程序補上
This commit is contained in:
		
							parent
							
								
									796a217bcb
								
							
						
					
					
						commit
						eba516ca98
					
				@ -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>`;
 | 
				
			||||||
@ -232,6 +233,7 @@
 | 
				
			|||||||
            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) {
 | 
				
			||||||
@ -243,6 +245,7 @@
 | 
				
			|||||||
            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;
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user