LiJun
2018-10-30 f86d079dcafc190e634f248d1dcc7007b7cf1028
屏蔽页面输出
2个文件已修改
62 ■■■■ 已修改文件
gx_tieta/WebRoot/Top.jsp 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/js/VoiceUtil.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/Top.jsp
@@ -620,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', '设备名称','设备状态', '在线电压(V)', '组端电压(V)', '组端电流(mA)','设备温度(℃)', '已测容量(AH)', '设备告警', '已测时间'];
@@ -689,34 +718,7 @@
        
        
        
        //查询最近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 createTblByModel(model) {
gx_tieta/WebRoot/js/VoiceUtil.js
@@ -28,7 +28,7 @@
    var to_speak = new SpeechSynthesisUtterance(txt);
    to_speak.voice = this.voice;    // 设定中文播报
    to_speak.rate = this.rate;
    console.info(to_speak);
    //console.info(to_speak);
    this.speak.speak(to_speak);
    
    var starttime = new Date();
@@ -37,7 +37,7 @@
        if(callback && typeof callback == 'function'){
            var endtime = new Date();
            var timelong = (endtime.getTime()-starttime.getTime())/1000;
            console.info(parseInt(_timeInterval)+"==="+parseInt(timelong));
            //console.info(parseInt(_timeInterval)+"==="+parseInt(timelong));
            if(timelong > this.timeInterval){                
                callback();
            }else{