From 3c8b17e39ec7a92401f17e4d0054c924712e6536 Mon Sep 17 00:00:00 2001 From: 81041 <81041@DESKTOP-025NVD9> Date: 星期二, 03 十二月 2019 13:47:54 +0800 Subject: [PATCH] Merge branch 'FBS9600' of http://whyclxw@118.89.139.230:10101/r/FBS9600App.git into FBS9600 --- platforms/android/app/src/main/assets/www/pages/main/main.js | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/platforms/android/app/src/main/assets/www/pages/main/main.js b/platforms/android/app/src/main/assets/www/pages/main/main.js index 3795647..67ed2bd 100644 --- a/platforms/android/app/src/main/assets/www/pages/main/main.js +++ b/platforms/android/app/src/main/assets/www/pages/main/main.js @@ -182,23 +182,54 @@ searchAlarmInfo: function searchAlarmInfo() { // 鏌ヨ瀹炴椂鍛婅淇℃伅 var self = this; - var page = this.warning.page; + var page = this.tbls.warning.page; // 鏋勯�犳煡璇㈡潯浠� var searchParams = { alm_cleared_type: 0, page: page }; // 鍒ゆ柇鏄惁涓烘墜鏈虹 - if (typeof Battalram_dataService == "undefined") { + if (typeof Battalram_dataService != "undefined") { Battalram_dataService.serchByCondition(JSON.stringify(searchParams)); } else { + this.setAlarmInfo({ + code: 1, + cmd_type: 0, + data: [{ + num: 1, + BattGroupName: '鐢垫睜缁�1', + MonNum: 1, + alm_start_time: '2019-12-3 00:00:00', + alm_id: 2, + page: { + PageAll: 40 + } + }] + }); // 寮�鍚鏃跺櫒 this.tbls.charge.timer.open(); } }, setAlarmInfo: function setAlarmInfo(res) { // 璁剧疆瀹炴椂鍛婅淇℃伅 + if (res.code == 1) { + // 璁剧疆鏁版嵁 + this.tbls.warning.data = res.data; + // 璁剧疆鍒嗛〉 + this.tbls.warning.page.PageAll = res.data[res.data.length - 1].page.PageAll; + } else { + // 璁剧疆鏁版嵁 + this.tbls.warning.data = []; + // 璁剧疆鍒嗛〉 + this.tbls.warning.page.PageAll = 0; + } console.log(res); + }, + // 璁剧疆褰撳墠椤� + warningCurrentChange: function warningCurrentChange(curr) { + this.tbls.warning.PageCurr = curr; + // 鏌ヨ鐢垫睜鍛婅淇℃伅 + this.startSearchAlarmInfo(); }, routerTo: function routerTo(path) { var routes = this.routes; @@ -229,6 +260,9 @@ // 鏌ヨ鍏呯數娴嬭瘯淇℃伅 this.startReadBattCharInfo(); + // 鏌ヨ鍛婅 + this.startSearchAlarmInfo(); + // 鍚庡彴瑙﹀彂浜嬩欢鏌ヨ鎵�鏈夌殑鐢垫睜缁勬斁鐢典俊鎭� window['DeviceServicereadBattDiscInfocalljs'] = function (res) { // 璁剧疆鐢垫睜淇℃伅 -- Gitblit v1.9.1