From 6ca818de1f93c61ddfa92a3ce285280304c50927 Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期三, 31 十月 2018 10:19:43 +0800 Subject: [PATCH] 电池信息配置 --- gx_tieta/WebRoot/Top.jsp | 41 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 40 insertions(+), 1 deletions(-) diff --git a/gx_tieta/WebRoot/Top.jsp b/gx_tieta/WebRoot/Top.jsp index fad10b8..22a3b2e 100644 --- a/gx_tieta/WebRoot/Top.jsp +++ b/gx_tieta/WebRoot/Top.jsp @@ -193,9 +193,12 @@ <script src="js/dev.js"></script> <script src="js/createTab.js"></script> <script type="text/javascript" src="js/scrollBar.js"></script> + <script type="text/javascript" src="js/VoiceUtil.js"></script> <script type="text/javascript"> $(document).ready(function(){ - setUserName(); + setUserName(); //璁剧疆鐢ㄦ埛鍚嶇О + + searchRecentlyAlarm(); //鏌ヨ鏈�杩�30绉掔殑璁惧鍜岀數姹犲憡璀� var lanuage=$('#top_cont .international .inter_action').attr('value'); $('#top_cont .international a').click(function() { @@ -328,6 +331,9 @@ } }); } + + + $(function(){ $.ajax({ @@ -614,6 +620,35 @@ }); } + //鏌ヨ鏈�杩�30鍐呯殑璁惧鍜岀數姹犲憡璀﹀苟鎾姤璇煶 + function searchRecentlyAlarm(){ + $.ajax({ + type: "post", + url: "Battalarm_dataAction!serchIn30", + async:true, + dataType:'json', + data:null, + success: function(data){ + //console.info(data); + var model = eval("("+data.result+")"); + //console.info(model); + if(model.code == 1){ + var alarm_str = ""; + for(var i=0;i<model.data.length;i++){ + var obj = model.data[i]; + alarm_str += obj.note+";"; + } + voice.play(alarm_str,searchRecentlyAlarm); + }else{ + setTimeout(searchRecentlyAlarm, 5000); + } + }, + error:function() { + setTimeout(searchRecentlyAlarm, 5000); + } + }); + } + // 鏍稿娴嬭瘯妯″潡 $(function() { var arrTh = ['鏈烘埧鍚嶇О', '璁惧ID', '璁惧鍚嶇О','璁惧鐘舵��', '鍦ㄧ嚎鐢靛帇锛圴锛�', '缁勭鐢靛帇锛圴锛�', '缁勭鐢垫祦锛坢A锛�','璁惧娓╁害锛堚剝锛�', '宸叉祴瀹归噺锛圓H锛�', '璁惧鍛婅', '宸叉祴鏃堕棿']; @@ -681,6 +716,10 @@ }); } + + + + // 鏍规嵁鏁版嵁鐢熸垚琛ㄦ牸 function createTblByModel(model) { //console.log(model); -- Gitblit v1.9.1