/** * map.js */ Ext.Loader.setConfig({ enabled: true }); Ext.Loader.setPath('Ext.ux', 'http://10.108.34.2:80/fire/res/extjs/examples/ux'); Ext.require([ 'Ext.grid.*', 'Ext.data.*', 'Ext.ux.RowExpander', 'Ext.selection.CheckboxModel' ]); var sm = Ext.create('Ext.selection.CheckboxModel'); var myMask; var baseUrl = ""; var basePath = ""; var theme = ""; var mapStyle = ""; var map; var map1; var mapzoom = 11; var company_cur = 0; var StatusStore=null,AlarmStore=null; var firstDraw = true; var weatherDown_mode_div = null; var storeTime = 60000; var centerLng = 121.475644; var currentLng = 121.475644; var centerLat = 31.1857; var currentLat = 31.1857; var rotation = 0; var alarm_show_window=null; var show_alarm_list; var show_list_cur=0 var V_LOGINNAME='',V_PASSWORD=''; var listSync=true; var synctime = 0; var company_code = ''; var start=0; var end = 360; var targetZoom = 20; var maxHeight = 10000; var maxWidth = 10000; var SearchList = null; var markers = []; var current_company_code=""; var LabelShow = false; var MapShow = false; var last_move; var filterwin; var mouseon; var mouseoff; var menu_click; var real_time_alarm; var menuidx = 'm1'; var menuidx1 = 'm1'; var menuidx2 = 'm1'; var myStore1 = null; var wsUri = "wss://iot.usky.cn:55120"; var sm1 = Ext.create('Ext.selection.CheckboxModel'); var websocket = null; Ext.define('CheckRecord3',{ extend: 'Ext.data.Model', fields: [ { name:'id', type:'int'}, { name:'orderIdx', type:'int'}, { name:'device_code', type:'string' }, { name:'company_code', type:'string' }, { name:'company_name', type:'string' }, { name:'fullname', type:'string' }, { name:'time', type:'string' }, { name:'name', type:'string' }, { name:'status', type:'string' }, { name:'data', type:'string' }, { name:'data2', type:'string' }, { name:'data4', type:'string' }, { name:'clzt', type:'string' }, { name:'clr_name', type:'string' }, { name:'clsj', type:'string' }, { name:'clnr', type:'string'}, { name:'clwb', type:'string'} ] }); var alarm_alert_config={ title:'
', titleColor:'#ffffff', titleIconColor:'#ffffff', titleBackgroundColor:'rgba(0,0,0,0.1)', backgroundColor: 'rgba(23,21,57,0.2)', backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))', border: '1px solid #31e9ff', borderRadius:'10px', position:'absolute', width:320, height:120, bottom:-100, right:95, zIndex:990, bodyText:'
' } var close_alert = function(){ removeDIV("rt_alarm_alert"); } var markerSortByRotation = function(a,b){ if((rotation<=45)||(rotation>=315)) return b.lat-a.lat; else if((rotation>45)&&(rotation<=135)) return a.lng - b.lng; else if((rotation>135)&&(rotation<=270)) return a.lat-b.lat; else return b.lng-a.lng; } var bigger_click = function(){ map.zoomIn( ); } var smaller_click = function(){ map.zoomOut( ); } var right_mouseover = function(){ $("#map_btn_right").removeClass('map_btn_right_off'); $("#map_btn_right").addClass('map_btn_right_on'); } var right_mouseout = function(){ $("#map_btn_right").removeClass('map_btn_right_on'); $("#map_btn_right").addClass('map_btn_right_off'); } var alarmSortByTime = function(a,b){ var time_a = Date.parse(a.time); var time_b = Date.parse(b.time); return time_b-time_a; } var clear_detail_info = function(){ var d0=0, d0o=0, d0oc=0, d0a=0, d0ac=0; var d1=0, d1o=0, d1oc=0, d1a=0, d1ac=0; var d2=0, d2o=0, d2oc=0, d2a=0, d2ac=0; var d6=0, d6o=0, d6oc=0, d6a=0, d6ac=0; var d7=0, d7o=0, d7oc=0, d7a=0, d7ac=0; var detail_info = document.getElementById('detail_info'); var real_time_alarm_div = document.getElementById('real_time_alarm_div'); var parent = document.getElementById('container'); if(detail_info!=undefined){ parent.removeChild(detail_info); current_company_code=""; }else if(real_time_alarm_div!=undefined){ parent.removeChild(real_time_alarm_div); } } var draw_pie = function(id, total, num){ var mColor= '#34abf5'; var percent = 100; if(total>0) percent = Number(((num*100)/total).toString().match(/^\d+(?:\.\d{0,2})?/)); if(percent<60) mColor = '#f66167'; else if(percent<80) mColor = '#DDDF0D'; if(id=='data_pie_1'){ $("#title-label-11").css({ color:mColor }).html(percent+'%'); $("#title-label-12").html(total); }else if(id=='data_pie_2'){ $("#title-label-21").css({ color:mColor }).html(percent+'%'); $("#title-label-22").html(total); }else if(id=='data_pie_3'){ $("#title-label-31").css({ color:mColor }).html(percent+'%'); $("#title-label-32").html(total); }else if(id=='data_pie_4'){ $("#title-label-41").css({ color:mColor }).html(percent+'%'); $("#title-label-42").html(total); } Highcharts.getOptions().colors = Highcharts.map(['#f66167','#34abf5', '#DDDF0D'], function (color) { return { radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 }, stops: [ [0, color], [1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken ] }; }); Highcharts.chart(id,{ chart: { type: 'pie', backgroundColor: 'rgba(0,0,0,0)', height:'100%', options3d: { enabled: true, alpha: 45, beta: 0 } }, title: { text: '处置率:'+percent+'%', floating:true, y:85, style:{fontSize:'12px',color:'#ffffff'} }, exporting: { enabled: false }, credits: { enabled: false }, tooltip: { // enabled: false pointFormat: '{point.percentage:.2f}%' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', depth: 15, dataLabels: { enabled: false, format: '{point.name}' } } }, series: [{ type: 'pie', name: '处置率', startAngle:90, data: [{ name:'待处理', y:100-percent, sliced: true, selected: true }, ['已处理', percent] ] }] }); } var showBuilding = function(company_code){ if((StatusStore!=null)&&(StatusStore.length>0)){ for(var i=0;i'; detail_info.appendChild(info_title); var info_body0 = document.createElement('div'); info_body0.id = 'info_body0'; info_body0.setAttribute('class','info_body0'); info_body0.innerHTML='地址:'+StatusStore[i].address; detail_info.appendChild(info_body0); var info_body1 = document.createElement('div'); info_body1.id = 'info_body1'; info_body1.setAttribute('class','info_body1'); info_body1.innerHTML='联系人:'+StatusStore[i].username; detail_info.appendChild(info_body1); var info_body2 = document.createElement('div'); info_body2.id = 'info_body2'; info_body2.setAttribute('class','info_body2'); info_body2.innerHTML='联系电话:'+StatusStore[i].phone; detail_info.appendChild(info_body2); var info_btn = document.createElement('div'); info_btn.id = 'info_btn'; info_btn.setAttribute('class','info_btn'); info_btn.innerHTML='查看详情'; info_btn.company_code=company_code; info_btn.onclick=function(e){ var event = e; location.href = baseUrl+'view/frontpage/company.jsp?company_code='+event.currentTarget.company_code; } detail_info.appendChild(info_btn); break; } } } var draw_all = function(){ if(company_cur>0) return; var d0=0, d0o=0, d0oc=0, d0a=0, d0ac=0; var d1=0, d1o=0, d1oc=0, d1a=0, d1ac=0; var d2=0, d2o=0, d2oc=0, d2a=0, d2ac=0; var d6=0, d6o=0, d6oc=0, d6a=0, d6ac=0; var d7=0, d7o=0, d7oc=0, d7a=0, d7ac=0; var totalLat=0, totalLng=0, latngCount=0; // map.clearMap(); clear_detail_info(); markers = []; var zoom = map.getZoom(); var iconWidth = 28; var iconHeight = 28; if((StatusStore!=null)&&(StatusStore.length>0)){ rotation = map.getRotation(); StatusStore.sort(markerSortByRotation); for(var i=0;i30)&&(obj.lat<40)&&(obj.lng>120)&&(obj.lng<125)){ totalLng += obj.lng; totalLat += obj.lat; latngCount++; var marker= new AMap.Marker({ icon:new AMap.Icon({ size:new AMap.Size(iconWidth,iconHeight), image:iconurl, imageSize:new AMap.Size(iconWidth,iconHeight) }), position: new AMap.LngLat(obj.lng,obj.lat), extData:{ icontype:'company', company_code:obj.company_code }, offset: new AMap.Pixel(-(iconWidth/2), -(iconHeight/2)), draggable:false, raiseOnDrag:false, autoRotation:false, label:{ offset: new AMap.Pixel(-iconWidth-5,-(iconHeight/2)-10), content:"
"+obj.company_name+"
", direction: 'right' } }); AMap.event.addListener(marker,'click',showBuilding,this); AMap.event.addListener(marker,'mouseover',showInfo,this); if(!MapShow){ marker.setMap(map); markers.push(marker); } } } var sts = [{ url: baseUrl+'res/img/icons/icon_juhe_grade1.png', size: new AMap.Size(40, 40), offset: new AMap.Pixel(-16, -16) }, { url: baseUrl+'res/img/icons/icon_juhe_grade2.png', size: new AMap.Size(40, 40), offset: new AMap.Pixel(-16, -16) }, { url: baseUrl+'res/img/icons/icon_juhe_grade3.png', size: new AMap.Size(40, 40), offset: new AMap.Pixel(-18, -18) }]; if(!MapShow){ MapShow=true; // map.plugin(["AMap.MarkerClusterer"],function(){ // cluster = new AMap.MarkerClusterer(map, markers, { // styles: sts, // gridSize:80, // maxZoom:18 //// minClusterSize:3 //// renderClusterMarker:_renderClusterMarker // }); // }); } if((latngCount>0)&&(firstDraw)){ map.setCenter(new AMap.LngLat(totalLng/latngCount,totalLat/latngCount,true)); map.setFitView(); firstDraw = false; } showOperat(); } } var real_time_alarm = function(obj){ obj.title = obj.innerHTML; } var alarm_sound = function(){ var audio = document.createElement('audio'); audio.src="../../8773.wav"; audio.autoplay="autoplay"; document.getElementById("title_right_02").appendChild(audio); } var initWebSocket = function() { try{ if(typeof MozWebSocket == 'function') WebSocket =MozWebSocket; if( websocket && websocket.readyState == 1) websocket.close(); websocket = new WebSocket(wsUri); websocket.onopen = function(evt){ var json = {}; json.agentid = $("#V_LOGINNAME").val(); console.log("Connected."); (function(){})() websocket.send(JSON.stringify(json)); }; websocket.onclose = function(evt){ console.log("DisConnected."); (function(){})() initWebSocket(); }; var i =0; websocket.onmessage = function(evt){ console.log("Received:",evt.data); var jData = eval('(' + evt.data + ')'); if(jData.dwtype!=undefined){ if(document.getElementById('rt_alarm_alert')!=undefined) removeDIV('rt_alarm_alert'); // var alarm_alert= new UNote(); // alarm_alert.create("rt_alarm_alert","container",alarm_alert_config); var Li = document.createElement('li'); Li.setAttribute('class','alarm_tab03'); Li.style.top=(52*i)+'px'; document.getElementById("title_right_02_ul").appendChild(Li); var Icon = document.createElement('img'); Icon.width='32'; Icon.height='32'; Icon.style.verticalAlign='middle'; Icon.src="../../res/img/icons/alarm_tab_04.gif" if(jData.detype==1){ Icon.src="../../res/img/icons/alarm_tab_01.gif" }else if(jData.dwtype==2){ Icon.src="../../res/img/icons/alarm_tab_03.gif" }else if(jData.dwtype==6){ Icon.src="../../res/img/icons/alarm_tab_04.gif" }else if(jData.dwtype==7){ Icon.src="../../res/img/icons/alarm_tab_02.gif" }else if(jData.dwtype==16){ Icon.src="../../res/img/icons/alarm_tab_05.gif" } // document.getElementById("rt_alarm_alert_icon").innerHTML=""; Li.appendChild(Icon); var span1 = document.createElement('span'); span1.innerHTML=jData.evtname+'\n'+jData.time+'\n'+jData.company+'\n'+jData.devicename; span1.setAttribute('onmouseover',"real_time_alarm(this)"); span1.setAttribute('class','alarm_tab03_span'); Li.appendChild(span1); i++; var title_right_02 = document.getElementById('title_right_02'); title_right_02.scrollTop = title_right_02.scrollHeight; alarm_sound(); } }; websocket.onerror = function(evt){ console.log("Error:",evt.data); (function(){})() }; }catch(exception){ console.log("Exception:",exception); (function(){})() } } var getCurrentData = function(){ if(((new Date()).getTime()-synctime)0) query.company_code = $("#company_code").val(); var qdata = JSON.stringify(query); var qurl = 'https://fire.usky.cn:8443/YtIoT/cgi-bin/WebAction.cgi'; // if((baseUrl.indexOf('localhost')>=0)||(baseUrl.indexOf('127.0.0.1')>=0)) qurl = 'https://fire.usky.cn:8443/YtIoT/cgi-bin/WebAction.cgi'; $.ajax({ type:'POST', url: qurl, data: qdata, success: function(result){ if((result==undefined)||(result.length==0)){ Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function(){ window.parent.document.location=baseUrl; }); }else{ var json = eval('(' + result + ')'); if(json.check=='false'){ Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function(){ window.parent.document.location=baseUrl; }); } if(json.action=='getFrontpageQuery'){ if(json.check=='true'){ if(json.LIST!=undefined) StatusStore = json.LIST; if(json.ALARM!=undefined) AlarmStore = json.ALARM; draw_all(); } } } myMask.hide(); } }); setTimeout(getCurrentData,storeTime); } var chk_company_cur = function(idx){ var nrow=0; while(1){ idx++; if(idx>=StatusStore.length) idx = 0; var obj = StatusStore[idx]; if((obj.lat>30)&&(obj.lat<40)&&(obj.lng>120)&&(obj.lng<125)) return idx; nrow++; if(nrow>=StatusStore.length) return -1; } } var show_cur_comany = function(){ var current_t = Date.parse(new Date()); if((current_t-last_move)>30000){ last_move = current_t; if((StatusStore!=null)&&(StatusStore.length>0)){ company_cur = chk_company_cur(company_cur); if(company_cur>=0){ var obj = StatusStore[company_cur]; showBuilding(obj.company_code); LabelShow = false; shower_click(); } } } setTimeout(show_cur_comany,5000); } var evaluate_container_method = function(type){ var myColor = ['#A8CFFF', '#00FFAE', '#A8CFFF', '#A8CFFF']; var myData = null; var myDataInfo = null; if(type==1){ myData = ['巡检人员数量', '今日任务', '超时任务', '今日完成']; myDataInfo = [xjrysl, jrrw, csrw, jrwcrw]; }else if(type==2){ myData = ['维保人员数量', '今日任务', '超时任务', '今日完成']; myDataInfo = [xjrysl, jrrw, csrw, jrwcrw]; }else if(type==3){ myData = ['报修人员数量', '今日任务', '超时任务', '今日完成']; myDataInfo = [ConfirmStore[0].zrs, ConfirmStore[0].jrsj, ConfirmStore[0].cssj, ConfirmStore[0].jrjj]; } echarts.init(document.getElementById('evaluate_container')).setOption({ grid: { left: '5%', right: '5%', bottom: '5%', top: '10%', containLabel: true }, tooltip: { trigger: 'axis', axisPointer: { type: 'none' }, formatter: function(params) { return params[0].name + '
' + // "" + // params[0].seriesName + ' : ' + Number((params[0].value.toFixed(4) / 1).toFixed(2)).toLocaleString() + '
' } }, // backgroundColor: 'rgb(20,28,52)', xAxis: { show: false, type: 'value' }, yAxis: [{ type: 'category', inverse: true, axisLabel: { show: true, textStyle: { color: '#fff' }, }, splitLine: { show: false }, axisTick: { show: false }, axisLine: { show: false }, data: myData }, { type: 'category', inverse: true, axisTick: 'none', axisLine: 'none', show: true, axisLabel: { textStyle: { color: '#ffffff', fontSize: '12' }, formatter: function(value) { if (value >= 10000) { } else { return value.toLocaleString(); } }, }, data: myDataInfo }], series: [ { // name: '金额', type: 'bar', zlevel: 1, itemStyle: { normal: { barBorderRadius: [ 0, 10, 10, 0], // color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ // offset: 0, // color: 'rgb(57,89,255,1)' // }, { // offset: 1, // color: 'rgb(46,200,207,1)' // }]), color: function(params) { var num = myColor.length; return myColor[params.dataIndex % num] }, }, }, barWidth: 14, data: myDataInfo }, { // name: '背景', type: 'bar', barWidth: 14, barGap: '-100%', data: [1000, 1000, 1000, 1000], itemStyle: { normal: { color: 'rgba(14,69,81,0.5)', barBorderRadius: 0, } }, }, ] }); } var get_evaluation_data = function(type){ var evaluation_url = null; if(type==1){ evaluation_url = baseUrl+"iot/spotoperationrecord/getList2"; }else if(type==2){ evaluation_url = baseUrl+"iot/spotoperationrecord/getList3"; }else if(type==3){ evaluation_url = baseUrl+"iot/xjeventprocessing/getList"; } var query = new Object(); query.V_LOGINNAME = V_LOGINNAME; // query.V_PASSWORD = V_PASSWORD; if((company_code!=null)&&(company_code!='null')&&(company_code.length>0)) query.company_code = company_code; $.ajax({ type:'POST', url: evaluation_url, data: { queryJson : Ext.JSON.encode(query) }, success: function(result){ var json = eval('(' + result + ')'); if(type==1||type==2){ xjrysl = json.xjrysl; jrwcrw = json.jrwcrw; csrw = json.csrw; jrrw = json.jrrw; evaluate_container_method(type); }else if(type==3){ ConfirmStore = json.RESULT; evaluate_container_method(type); } } }); } /** * * @param dateNow :Date类 * @param intervalDays :间隔天数 * @param bolPastTime :Boolean,判断在参数date之前,还是之后, */ function getDateRange(dateNow,intervalDays,bolPastTime){ let oneDayTime = 24 * 60 * 60 * 1000; let list = []; let lastDay; if(bolPastTime == true){ for(var i=0;i<=intervalDays;i++){ lastDay = new Date(dateNow.getTime() - i * oneDayTime); list.push(this.formateDate(lastDay)); } }else{ lastDay = new Date(dateNow.getTime() + intervalDays * oneDayTime); list.push(this.formateDate(dateNow)); list.push(this.formateDate(lastDay)); } return list; } function formateDate(time){ let year = time.getFullYear() let month = time.getMonth() + 1 let day = time.getDate() if (month < 10) { month = '0' + month } if (day < 10) { day = '0' + day } return year + '-' + month + '-' + day + '' } var get_alarm_data = function(type){ var date = new Date(); var list = this.getDateRange(date,6,true) var yData; var yData1; if(type==1){ yData = [3,5,7,82,25,14,23]; yData1 = [2,1,3,50,25,13,20]; }else if(type==2){ yData = [140,87,7,82,175,135,47]; yData1 = [125,64,3,50,25,124,20]; }else if(type==3){ yData = [114,74,28,57,146,135,69]; yData1 = [98,64,14,50,58,124,58]; }else if(type==4){ yData = [4,241,189,341,182,652,193]; yData1 = [1,64,14,50,58,124,58]; }else if(type==5){ yData = [742,180,658,41,852,12,29]; yData1 = [268,78,541,12,156,8,15]; } Highcharts.getOptions().colors = Highcharts.map(['#f66167', '#34abf5'], function (color) { return { linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 }, stops: [ [0, color], [1, Highcharts.Color(color).setOpacity(0).get('rgb')] // darken ] }; }); Highcharts.chart('alarm_container',{ chart:{ type:'area', // zoomType: 'x', backgroundColor: 'rgba(0,0,0,0)' }, color:['#2995E6', '#00FFD8'], title:{ text:null, // text:'水系统监控告警处理情况跟踪', float:true, style:{fontSize:'14px',color:'#2995E6',fontWeight:'bold'} }, legend:{ enabled:false, floating:true, x:410, y:-210, itemStyle:{fontSize:'12px',color:'#00FFD8',fontWeight:'bold'} }, // colors:['#f66167', '#34abf5'], exporting: { enabled: false }, credits: { enabled: false }, xAxis:{ categories:list, tickmarkPlacement:'on', gridLineWidth:0, labels:{ enabled:false, style:{fontSize:'10px',color:'#2995E6',fontWeight:'bold'} }, title:{ enabled:false } }, yAxis:{ title:{ enabled:false, text:'次', style:{fontSize:'10px',color:'#2995E6',fontWeight:'bold'} }, gridLineWidth:1, gridLineColor:'rgba(0,0,0,0.2)', labels:{ // enabled:false, formatter:this.value, style:{fontSize:'10px',color:'#2995E6',fontWeight:'bold'} } }, plotOptions:{ area:{ enabled:false, stackiung:'normal', // fillOpacity:0.1, // lineColor:'#666666', // lineWidth:1, marker:{ lineWidth:0, enabled:false, radius:0 // lineColor:'#666666' } } }, series:[ { name:'告警次数', data:yData, lineColor:'rgba(41,149,230,1)', fillColor: { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [ [0, 'rgba(41,149,230,0.5)'], [1, 'rgba(41,149,230,0.1)'] ] } },{ name:'处理次数', data:yData1, lineColor:'rgba(0,255,216,1)', fillColor: { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [ [0, 'rgba(0,255,216,0.5)'], [1, 'rgba(0,255,216,0.1)'] ] }, } ] }); } var right_echart1_method = function(type){ let value = 0; if(type==1){ value = hjresult; }else{ value = sonresult; } let angle = 0; //角度,用来做简单的动画效果的 echarts.init(document.getElementById('right_echart1')).setOption({ title: { text: '{a|' + value + '}{c|}', x: 'center', y: 'center', textStyle: { rich: { a: { fontSize: 16, color: '#29EEF3' }, c: { fontSize: 14, color: '#ffffff', // padding: [5,0] } } } }, legend: { type: "plain", orient: "vertical", right: 0, top: "10%", align: "auto", data: [{ name: '火灾', icon: "circle" }, { name: 'rtu', icon: "circle" }, { name: '水系统', icon: "circle" }, { name: '电气火灾', icon: "circle" }], textStyle: { color: "white", fontSize: 16, padding: [10, 1, 10, 0] }, selectedMode: false }, series: [ { name: '离线设备占比', type: 'pie', radius: ['58%', '45%'], silent: true, clockwise: true, startAngle: 90, z: 0, zlevel: 0, label: { normal: { position: "center", } }, data: [{ value: value, name: "", itemStyle: { normal: { color: { // 完成的圆环的颜色 colorStops: [{ offset: 1, color: 'rgba(19,235,249,1)' // 0% 处的颜色 }, { offset: 0, color: 'rgba(19,235,249,0.05)' // 100% 处的颜色 }] }, } } }, { value: 100 - value, name: "", label: { normal: { show: false } }, itemStyle: { normal: { color: "rgba(11, 27, 36, .7)" } } } ] }, { name: "", type: "gauge", radius: "58%", center: ['50%', '50%'], startAngle: 0, endAngle: 359.9, splitNumber: 32, hoverAnimation: true, axisTick: { show: false }, splitLine: { length: 17, lineStyle: { width: 5, color: "rgba(13, 22, 41, .7)" } }, axisLabel: { show: false }, pointer: { show: false }, axisLine: { lineStyle: { opacity: 0 } }, detail: { show: false }, data: [{ value: 0, name: "" }] }, ] }); } var show_page = function(){ var mid = "div_down_bg"; var mid1 = "div_right_bg_tab"; var mid2 = "div_down_alarm_bg"; if(menuidx=='m1'){ mid += '1'; }else if(menuidx=='m2'){ mid += '2'; }else if(menuidx=='m3'){ mid += '3'; } if(menuidx1=='m1'){ mid1 += '1'; }else if(menuidx1=='m2'){ mid1 += '2'; }else if(menuidx1=='m3'){ mid1 += '3'; }else if(menuidx1=='m4'){ mid1 += '4'; }else if(menuidx1=='m5'){ mid1 += '5'; }else if(menuidx1=='m6'){ mid1 += '6'; }else if(menuidx1=='m7'){ mid1 += '7'; } if(menuidx2=='m1'){ mid2 += '1'; }else if(menuidx2=='m2'){ mid2 += '2'; }else if(menuidx2=='m3'){ mid2 += '3'; }else if(menuidx2=='m4'){ mid2 += '4'; }else if(menuidx2=='m5'){ mid2 += '5'; } for(var i=1;i<4;i++){ var id = "div_down_bg"+i; $("#"+id).removeClass(id+'_on'); $("#"+id).addClass(id); } for(var i=1;i<8;i++){ var id = "div_right_bg_tab"+i; $("#"+id).removeClass(id+'_on'); $("#"+id).addClass(id); } for(var i=1;i<6;i++){ var id = "div_down_alarm_bg"+i; $("#"+id).removeClass(id+'_on'); $("#"+id).addClass(id); } $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); $("#"+mid1).removeClass(mid1); $("#"+mid1).addClass(mid1+'_on'); $("#"+mid2).removeClass(mid2); $("#"+mid2).addClass(mid2+'_on'); } var get_offline_data = function(type){ var query = new Object(); query.V_LOGINNAME = V_LOGINNAME; query.V_PASSWORD = V_PASSWORD; query.dwtype = type; if((company_code!=null)&&(company_code!='null')&&(company_code.length>0)) query.company_code = company_code; $.ajax({ type:'POST', url: baseUrl+"iot/alarm/view/getHjOfflineList", data: { queryJson : Ext.JSON.encode(query) }, success: function(result){ var json = eval('(' + result + ')'); if(json.action=='getHjOfflineList'){ hjtotalCount = json.hjtotalCount; hjresult = json.hjresult; sontotalCount = json.sontotalCount; sonresult = json.sonresult; if(type==1){ document.getElementById('div_right_bg2_tab3_div').innerHTML=hjtotalCount; document.getElementById('div_right_bg2_tab2_div').innerHTML=hjtotalCount; }else{ document.getElementById('div_right_bg2_tab3_div').innerHTML=sontotalCount; document.getElementById('div_right_bg2_tab2_div').innerHTML=sontotalCount; } right_echart1_method(type); } } }); } mouseon = function(obj){ var id = obj.id; $("#"+id).removeClass(id); $("#"+id).addClass(id+'_on'); } mouseoff = function(obj){ if((obj.id).indexOf("div_down_bg") != -1){ var mid = "div_down_bg"; for(var i=1;i<4;i++){ var id = "div_down_bg"+i; $("#"+id).removeClass(id+'_on'); $("#"+id).addClass(id); } if(menuidx=='m1'){ mid += '1'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx=='m2'){ mid += '2'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx=='m3'){ mid += '3'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } }else if((obj.id).indexOf("div_right_bg") != -1){ var mid = "div_right_bg_tab"; for(var i=1;i<8;i++){ var id = "div_right_bg_tab"+i; $("#"+id).removeClass(id+'_on'); $("#"+id).addClass(id); } if(menuidx1=='m1'){ mid += '1'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx1=='m2'){ mid += '2'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx1=='m3'){ mid += '3'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx1=='m4'){ mid += '4'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx1=='m5'){ mid += '5'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx1=='m6'){ mid += '6'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx1=='m7'){ mid += '7'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } }else if((obj.id).indexOf("div_down_alarm") != -1){ var mid = "div_down_alarm_bg"; for(var i=1;i<6;i++){ var id = "div_down_alarm_bg"+i; $("#"+id).removeClass(id+'_on'); $("#"+id).addClass(id); } if(menuidx2=='m1'){ mid += '1'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx2=='m2'){ mid += '2'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx2=='m3'){ mid += '3'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx2=='m4'){ mid += '4'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } else if(menuidx2=='m5'){ mid += '5'; $("#"+mid).removeClass(mid); $("#"+mid).addClass(mid+'_on'); } } } menu_click = function(obj){ var id = obj.id; if(id=='div_down_bg1'){ menuidx = 'm1'; get_evaluation_data(1); } else if(id=='div_down_bg2'){ menuidx = 'm2'; get_evaluation_data(2); } else if(id=='div_down_bg3'){ menuidx = 'm3'; get_evaluation_data(3); } else if(id=='div_right_bg_tab1'){ menuidx1 = 'm1'; get_offline_data(1); } else if(id=='div_right_bg_tab2'){ menuidx1 = 'm2'; get_offline_data(6); } else if(id=='div_right_bg_tab3'){ menuidx1 = 'm3'; get_offline_data(2); } else if(id=='div_right_bg_tab4'){ menuidx1 = 'm4'; get_offline_data(7); } else if(id=='div_right_bg_tab5'){ menuidx1 = 'm5'; get_offline_data(16); } else if(id=='div_right_bg_tab6'){ menuidx1 = 'm6'; get_offline_data(128); } else if(id=='div_right_bg_tab7'){ menuidx1 = 'm7'; get_offline_data(17); } else if(id=='div_down_alarm_bg1'){ menuidx2 = 'm1'; get_alarm_data(1); } else if(id=='div_down_alarm_bg2'){ menuidx2 = 'm2'; get_alarm_data(2); } else if(id=='div_down_alarm_bg3'){ menuidx2 = 'm3'; get_alarm_data(3); } else if(id=='div_down_alarm_bg4'){ menuidx2 = 'm4'; get_alarm_data(4); } else if(id=='div_down_alarm_bg5'){ menuidx2 = 'm5'; get_alarm_data(5); } } var timer_start = function(){ var start_count = (start_count+1); if(start_count>10){ menu_shown = false; hide_menu(); setTimeout("timer_start()", 1000); return; } $("#weatherDown_mode_div").html((new Date()).Format("yyyy-MM-dd hh:mm:ss")); setTimeout("timer_start()", 1000); } var get_weather_data_div = function(){ var weatherDown_mode = document.getElementById('weatherDown_mode'); weatherDown_mode_div = document.getElementById('weatherDown_mode_div1'); if(weatherDown_mode_div){ document.getElementById('weatherDown_mode_div2').innerHTML= lives[0].weather+lives[0].temperature+'℃'+' '+lives[0].winddirection+lives[0].windpower+'级'; }else{ var weatherDown_mode_div = document.createElement('span'); weatherDown_mode_div.id= 'weatherDown_mode_div'; weatherDown_mode_div.setAttribute('class','div_down_alarm weatherDown_mode_div'); weatherDown_mode.appendChild(weatherDown_mode_div); var weatherDown_mode_div1 = document.createElement('img'); weatherDown_mode_div1.id= 'weatherDown_mode_div1'; weatherDown_mode_div1.setAttribute('class','div_down_alarm weatherDown_mode_div1'); weatherDown_mode_div1.src='../../res/img/03index/e-time_icon.png'; weatherDown_mode.appendChild(weatherDown_mode_div1); var weatherDown_mode_div2 = document.createElement('span'); weatherDown_mode_div2.id= 'weatherDown_mode_div2'; weatherDown_mode_div2.setAttribute('class','div_down_alarm weatherDown_mode_div'); weatherDown_mode_div2.innerHTML= lives[0].weather+lives[0].temperature+'℃'+' '+lives[0].winddirection+lives[0].windpower+'级'; weatherDown_mode.appendChild(weatherDown_mode_div2); } } var get_weather_data = function(){ $.ajax({ type:'GET', url: "https://restapi.amap.com/v3/weather/weatherInfo?key=eb1ae4db1ab6cbb4ff967a4f4005eab0&city=310000", success: function(result){ console.log(result); // var json = eval('(' + result + ')'); lives = result.lives; get_weather_data_div(); // weatherDown_mode.innerHTML=lives[0].weather; } }); } var show_all_fireAlarm = function(){ if($("#V_LOGINNAME").val()=='guest') return; parent.window.keep_menu(); if($("#company_code").val()!=undefined) location.href = baseUrl + 'view/fireAlarm/subFireAlarm.jsp?theme='+theme+'&company_code='+($("#company_code").val()); else location.href = baseUrl + 'view/fireAlarm/subFireAlarm.jsp?theme='+theme; } var show_all_waterAlarm = function(){ if($("#V_LOGINNAME").val()=='guest') return; parent.window.keep_menu(); if($("#company_code").val()!=undefined) location.href = baseUrl + 'view/waterAlarm/subWaterAlarm.jsp?theme='+theme+'&company_code='+($("#company_code").val()); else location.href = baseUrl + 'view/waterAlarm/subWaterAlarm.jsp?theme='+theme; } var show_all_rtuAlarm = function(){ if($("#V_LOGINNAME").val()=='guest') return; parent.window.keep_menu(); if($("#company_code").val()!=undefined) location.href = baseUrl + 'view/rtuAlarm/subRtuAlarm.jsp?theme='+theme+'&company_code='+($("#company_code").val()); else location.href = baseUrl + 'view/rtuAlarm/subRtuAlarm.jsp?theme='+theme; } var show_all_efireAlarm = function () { if($("#V_LOGINNAME").val()=='guest') return; parent.window.keep_menu(); if($("#company_code").val()!=undefined) location.href = baseUrl + 'view/efireAlarm/subeFireAlarm.jsp?theme='+theme+'&company_code='+($("#company_code").val()); else location.href = baseUrl + 'view/efireAlarm/subeFireAlarm.jsp?theme='+theme; } var showOperat = function(){ menuidx = 'm1'; menuidx1 = 'm1'; menuidx2 = 'm1'; var d0=0, d0o=0, d0oc=0, d0a=0, d0ac=0; var d1=0, d1o=0, d1oc=0, d1a=0, d1ac=0; var d2=0, d2o=0, d2oc=0, d2a=0, d2ac=0; var d6=0, d6o=0, d6oc=0, d6a=0, d6ac=0; var d7=0, d7o=0, d7oc=0, d7a=0, d7ac=0; var parent = document.getElementById('container'); var lineLeft_mode = document.getElementById('lineLeft_mode'); var container1 = document.getElementById('container1'); var lineDown_mode = document.getElementById('lineDown_mode'); var lineRight_mode = document.getElementById('lineRight_mode'); var title_down_03 = document.getElementById('title_down_03'); var qobj = new Object(); qobj.V_LOGINNAME = $("#V_LOGINNAME").val(); qobj.V_PASSWORD = $("#V_PASSWORD").val(); qobj.V_COMPANYID = company_code; qobj.I_COMMAND = 4; var qdata = "queryJson="+JSON.stringify(qobj); // var qurl = 'https://47.103.74.123:8080/YtIoT/cgi-bin/WebAction2.cgi'; var qurl = 'https://fire.usky.cn:8443/YtIoT/cgi-bin/WebAction.cgi'; for(var i=0;i{series.name}
待处理:{point.y}', // positioner: function (labelWidth) { // return { // x: 280 - labelWidth / 2, // y: 60 // }; // } // }, // pane: { // startAngle: 0, // endAngle: 360, // background: [{ // Track for Move // outerRadius: '112%', // innerRadius: '88%', // backgroundColor: 'rgba(0,0,0,0)', // //Highcharts.Color(Highcharts.getOptions().colors[1]).setOpacity(0.3).get(), // borderWidth: 0 // }] // }, // yAxis: { // min: 0, // max: 100, // lineWidth: 0, // tickPositions: [] // }, // plotOptions: { // solidgauge: { // borderWidth: '12px', // dataLabels: { // enabled: false // }, // linecap: 'round', // stickyTracking: false // } // }, // series: [{ // name: '报告总数:1,256', // // borderColor: Highcharts.getOptions().colors[1], // borderColor:Highcharts.getOptions().colors[1], // data: [{ // color: 'yellow', // // color:'yellow', // radius: '100%', // innerRadius: '100%', // y: 80 // }] // }] // }); // Highcharts.getOptions().colors = Highcharts.map(colors, function (color) { // return { // linearGradient: { x1: 1, x2: 0, y1: 0, y2: 0 }, // stops: [ // [0, 'rgba(6,183,245,1)'], // [1, 'rgba(6,183,245,0.05)'] // ] // }; // }); // Highcharts.chart('container2', { // chart: { // type: 'solidgauge', // marginTop: 50, // backgroundColor: 'rgba(0,0,0,0)' // }, // credits: { // enabled:false // }, // exporting: { // enabled:false // }, // title: { // text:null // }, // tooltip: { //// enabled : false, // borderWidth: 0, // backgroundColor: 'rgba(5,24,36,0.7)', // shadow: false, // style: { // fontSize: '12px' // }, // pointFormat: '{series.name}
待处理:{point.y}', // positioner: function (labelWidth) { // return { // x: 280 - labelWidth / 2, // y: 60 // }; // } // }, // pane: { // startAngle: 0, // endAngle: 360, // background: [{ // Track for Move // outerRadius: '112%', // innerRadius: '88%', // backgroundColor: 'rgba(0,0,0,0)', // //Highcharts.Color(Highcharts.getOptions().colors[1]).setOpacity(0.3).get(), // borderWidth: 0 // }] // }, // yAxis: { // min: 0, // max: 100, // lineWidth: 0, // tickPositions: [] // }, // plotOptions: { // solidgauge: { // borderWidth: '12px', // dataLabels: { // enabled: false // }, // linecap: 'round', // stickyTracking: false // } // }, // series: [{ // name: '报告总数:1,256', // // borderColor: Highcharts.getOptions().colors[1], // borderColor:Highcharts.getOptions().colors[1], // data: [{ // color: 'yellow', // // color:'yellow', // radius: '100%', // innerRadius: '100%', // y: 80 // }] // }] // }); // Highcharts.getOptions().colors = Highcharts.map(colors, function (color) { // return { // linearGradient: { x1: 1, x2: 0, y1: 0, y2: 0 }, // stops: [ // [0, 'rgba(255,174,0,1)'], // [1, 'rgba(255,174,0,0.05)'] // ] // }; // }); // Highcharts.chart('container3', { // chart: { // type: 'solidgauge', // marginTop: 50, // backgroundColor: 'rgba(0,0,0,0)' // }, // credits: { // enabled:false // }, // exporting: { // enabled:false // }, // title: { // text:null // }, // tooltip: { //// enabled : false, // borderWidth: 0, // backgroundColor: 'rgba(5,24,36,0.7)', // shadow: false, // style: { // fontSize: '12px' // }, // pointFormat: '{series.name}
待处理:{point.y}', // positioner: function (labelWidth) { // return { // x: 280 - labelWidth / 2, // y: 60 // }; // } // }, // pane: { // startAngle: 0, // endAngle: 360, // background: [{ // Track for Move // outerRadius: '112%', // innerRadius: '88%', // backgroundColor: 'rgba(0,0,0,0)', // //Highcharts.Color(Highcharts.getOptions().colors[1]).setOpacity(0.3).get(), // borderWidth: 0 // }] // }, // yAxis: { // min: 0, // max: 100, // lineWidth: 0, // tickPositions: [] // }, // plotOptions: { // solidgauge: { // borderWidth: '12px', // dataLabels: { // enabled: false // }, // linecap: 'round', // stickyTracking: false // } // }, // series: [{ // name: '报告总数:1,256', // // borderColor: Highcharts.getOptions().colors[1], // borderColor:Highcharts.getOptions().colors[1], // data: [{ // color: 'yellow', // // color:'yellow', // radius: '100%', // innerRadius: '100%', // y: 80 // }] // }] // }); // // Highcharts.getOptions().colors = Highcharts.map(colors, function (color) { // return { // linearGradient: { x1: 1, x2: 0, y1: 0, y2: 0 }, // stops: [ // [0, 'rgba(195,38,21,1)'], // [1, 'rgba(195,38,21,0.05)'] // ] // }; // }); // Highcharts.chart('container4', { // chart: { // type: 'solidgauge', // marginTop: 50, // backgroundColor: 'rgba(0,0,0,0)' // }, // credits: { // enabled:false // }, // exporting: { // enabled:false // }, // title: { // text:null // }, // tooltip: { //// enabled : false, // borderWidth: 0, // backgroundColor: 'rgba(5,24,36,0.7)', // shadow: false, // style: { // fontSize: '12px' // }, // pointFormat: '{series.name}
待处理:{point.y}', // positioner: function (labelWidth) { // return { // x: 280 - labelWidth / 2, // y: 60 // }; // } // }, // pane: { // startAngle: 0, // endAngle: 360, // background: [{ // Track for Move // outerRadius: '112%', // innerRadius: '88%', // backgroundColor: 'rgba(0,0,0,0)', // //Highcharts.Color(Highcharts.getOptions().colors[1]).setOpacity(0.3).get(), // borderWidth: 0 // }] // }, // yAxis: { // min: 0, // max: 100, // lineWidth: 0, // tickPositions: [] // }, // plotOptions: { // solidgauge: { // borderWidth: '12px', // dataLabels: { // enabled: false // }, // linecap: 'round', // stickyTracking: false // } // }, // series: [{ // name: '报告总数:1,256', // // borderColor: Highcharts.getOptions().colors[1], // borderColor:Highcharts.getOptions().colors[1], // data: [{ // color: 'yellow', // // color:'yellow', // radius: '100%', // innerRadius: '100%', // y: 80 // }] // }] // }); map1 = new AMap.Map('div_down_bg4', { mapStyle: mapStyle, //样式URL viewMode: '3D', turboMode: false, resizeEnable: true, zoom: mapzoom, center: [121.475644, 31.1857], features:['bg', 'road', 'building'], pitch: 45, forceVector: true }); // xData = ["Mo", "Tu", "We","Th","Fr","Sa","Su"]; // yData = [333, 1230, 425,178,258,674,941]; // echarts.init(document.getElementById('right_echart2')).setOption({ //// backgroundColor: '#061326', // "grid": { // "top": "25%", // "left": "-5%", // "bottom": "5%", // "right": "5%", // "containLabel": true // }, // tooltip:{ // show:true // }, // animation: false, // "xAxis": [{ // "type": "category", // "data": xData, // "axisTick": { // "alignWithLabel": true // }, // "nameTextStyle": { // "color": "#82b0ec" // }, // "axisLine": { // show: false, // "lineStyle": { // "color": "#82b0ec" // } // }, // "axisLabel": { // "textStyle": { // "color": "#fff" // }, // margin: 30 // } // }], // "yAxis": [{ // show: false, // "type": "value", // "axisLabel": { // "textStyle": { // "color": "#fff" // }, // }, // "splitLine": { // "lineStyle": { // "color": "#0c2c5a" // } // }, // "axisLine": { // "show": false // } // }], // "series": [{ // "name": "", // type: 'pictorialBar', // symbolSize: [10, 4], // symbolOffset: [0, -6], // symbolPosition: 'end', // z: 12, // // "barWidth": "0", // "label": { // "normal": { // "show": true, // "position": "top", // // "formatter": "{c}%" // fontSize: 12, // fontWeight: 'bold', // color: '#34DCFF' // } // }, // color: "#2DB1EF", // data: yData // }, // { // name: '', // type: 'pictorialBar', // symbolSize: [40, 10], // symbolOffset: [0, 7], // // "barWidth": "20", // z: 12, // "color": "#2DB1EF", // "data": yData // }, // { // name: '', // type: 'pictorialBar', // symbolSize: [15, 8], // symbolOffset: [0, 12], // z: 10, // itemStyle: { // normal: { // color: 'transparent', // borderColor: '#2EA9E5', // borderType: 'solid', // borderWidth: 1 // } // }, // data: yData // }, // { // name: '', // type: 'pictorialBar', // symbolSize: [20, 10], // symbolOffset: [0, 18], // z: 10, // itemStyle: { // normal: { // color: 'transparent', // borderColor: '#19465D', // borderType: 'solid', // borderWidth: 2 // } // }, // data: yData // }, // { // type: 'bar', // //silent: true, // "barWidth": "20", // barGap: '10%', // Make series be overlap // barCateGoryGap: '10%', // itemStyle: { // normal: { // color: new echarts.graphic.LinearGradient(0, 0, 0, 0.3, [{ // offset: 0, // color: "rgba(15,182,196,1)" // }, // { // offset: 1, // color: "rgba(26,216,232,1)" // } // ]), // opacity: .8 // }, // }, // data: yData // } // ] // }); Highcharts.chart('div_right_bg2_tab4', { chart: { type: 'solidgauge', backgroundColor: 'rgba(0,0,0,0)' }, credits: { enabled:false }, exporting: { enabled:false }, title: { text:null }, tooltip: { enabled:false, borderWidth: 0, backgroundColor: 'none', shadow: false, style: { fontSize: '12px' }, pointFormat: '{series.name}
{point.y}%', positioner: function (labelWidth) { return { x: 80 - labelWidth / 2, y: 60 }; } }, pane: { startAngle: 0, endAngle: 360, background: [{ // Track for Move outerRadius: '112%', innerRadius: '88%', backgroundColor: 'rgba(0,0,0,0)', //Highcharts.Color(Highcharts.getOptions().colors[1]).setOpacity(0.3).get(), borderWidth: 0 }] }, yAxis: { min: 0, max: 100, lineWidth: 0, tickPositions: [] }, plotOptions: { solidgauge: { borderWidth: '2px', dataLabels: { enabled: false }, linecap: 'round', stickyTracking: false } }, series: [{ // name: 'Move', // borderColor: Highcharts.getOptions().colors[1], borderColor:'#147E94', data: [{ color: 'yellow', // color:'yellow', radius: '100%', innerRadius: '100%', y: 80 }] }] }); Highcharts.chart('div_right_bg2_tab5', { chart: { type: 'solidgauge', backgroundColor: 'rgba(0,0,0,0)' }, credits: { enabled:false }, exporting: { enabled:false }, title: { text:null }, tooltip: { enabled:false, borderWidth: 0, backgroundColor: 'none', shadow: false, style: { fontSize: '12px' }, pointFormat: '{series.name}
{point.y}%', positioner: function (labelWidth) { return { x: 80 - labelWidth / 2, y: 60 }; } }, pane: { startAngle: 0, endAngle: 360, background: [{ // Track for Move outerRadius: '112%', innerRadius: '88%', backgroundColor: 'rgba(0,0,0,0)', //Highcharts.Color(Highcharts.getOptions().colors[1]).setOpacity(0.3).get(), borderWidth: 0 }] }, yAxis: { min: 0, max: 100, lineWidth: 0, tickPositions: [] }, plotOptions: { solidgauge: { borderWidth: '2px', dataLabels: { enabled: false }, linecap: 'round', stickyTracking: false } }, series: [{ // name: 'Move', // borderColor: Highcharts.getOptions().colors[1], borderColor:'#95B3CA', data: [{ color: 'yellow', // color:'yellow', radius: '100%', innerRadius: '100%', y: 80 }] }] }); } var body_resize = function() { $("#mask_l").css('height',$(window).innerHeight()+'px'); $("#mask_r").css('height',$(window).innerHeight()+'px'); $("#mask_b").css('top',($(window).innerHeight()-100)+'px'); $("#mask_b").css('width',$(window).innerWidth()+'px'); $("#mask_t").css('width',$(window).innerWidth()+'px'); $("#map_header").css('left',($(window).innerWidth()-740)/2+'px'); $("#map_header").css('height','82px'); $("#container").css('width',$(window).innerWidth()+'px'); $("#container").css('height',$(window).innerHeight()+'px'); var area_height = $(window).innerHeight()-129; $("#data_bar_area").css('height',area_height+'px'); $("#title_right_02").css('height',($(window).innerHeight()-680)+'px'); draw_all(); timer_start(); } Ext.onReady(function(){ var queryJson = new Object(); queryJson.V_LOGINNAME = $("#V_LOGINNAME").val(); queryJson.V_PASSWORD = $("#V_PASSWORD").val(); queryJson.company_code = $("#company_code").val(); filterwin = function(spot_id){ var query = new Object(); query.dwtype = 'YTWP'; query.company_code = spot_id.currentTarget.company_code; query.V_LOGINNAME = $("#V_LOGINNAME").val(); query.V_PASSWORD = $("#V_PASSWORD").val(); var jsonstr = Ext.JSON.encode(query); myStore1.getProxy().extraParams = { queryJson : jsonstr }; myStore1.reload(); Ext.create('Ext.window.Window', { title: '今日告警', height: 300, width: 500, modal: true, layout:'border', items: MaintenanceCheckPanel1, buttons:[ { text:'关闭', handler : function() { this.up('window').hide(); } } ], closeAction: 'hide' }).show(); } parent.window.hiding_menu(); maxHeight = document.documentElement.clientHeight; maxWidth = document.documentElement.clientWidth; if(($("#V_LOGINNAME").val().length==0)||($("#V_LOGINNAME").val()=='null')||($("#V_LOGINNAME").val()==null)) $("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME')); else sessionStorage.setItem('V_LOGINNAME',$("#V_LOGINNAME").val()); if(($("#V_PASSWORD").val().length==0)||($("#V_PASSWORD").val()=='null')||($("#V_PASSWORD").val()==null)) $("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD')); else sessionStorage.setItem('V_PASSWORD',$("#V_PASSWORD").val()); baseUrl = $("#basePath").val(); basePath = $("#baseUrl").val(); theme = $("#theme").val(); V_LOGINNAME = $("#V_LOGINNAME").val(); V_PASSWORD = $("#V_PASSWORD").val(); viewAlarmType = $("#viewAlarmType").val(); pieAlarmType = $("#pieAlarmType").val(); statusType = $("#statusType").val(); company_code = $("#company_code").val(); mapStyle = (theme=='default')?'normal':(theme=='gray')?'amap://styles/light':'amap://styles/659dc6c4753dc6e87c65c8a874c02133'; $("#alarm_wrapper_table").css('left',(($(document).innerWidth()-800)/2)+'px'); if((theme=='access')||(theme=='')) $('#alarm_wrapper').addClass('shadow_black'); else $('#alarm_wrapper').addClass('shadow_white'); last_move = Date.parse(new Date()); company_cur = -1; myMask = new Ext.LoadMask(Ext.getBody(), { msg: '查询中,请稍后!', cls:'toplevel', removeMask: true //完成后移除 }); map = new AMap.Map('container', { mapStyle: mapStyle, //样式URL viewMode: '3D', turboMode: false, resizeEnable: true, zoom: mapzoom, center: [121.475644, 31.1857], features:['bg', 'road', 'building'], pitch: 45, forceVector: true }); map.on('movestart',function(e){ clear_detail_info(); }); map.on('mousemove',function(e){ if(company_cur<0) return; last_move = Date.parse(new Date()); company_cur=-1; firstDraw = true; map.setPitch(45); draw_all(); LabelShow = true; shower_click(); shower_mouseout(); }); map.on('complete',function(e){ getCurrentData(); }); $("#search_company").on('input',function(){ update_companyList(); }); myMask.show(); window.onresize=function(){ body_resize(); // showPingfen('0'); // showOperat(); }; body_resize(); initWebSocket(); // showPingfen('0'); // showOperat(); });