| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121 | 
							- /**
 
-  * 
 
-  */
 
- Ext.Loader.setConfig({
 
-     enabled: true
 
- });
 
- Ext.Loader.setPath('Ext.ux', '../../res/extjs/examples/ux');
 
- Ext.require([
 
-     'Ext.grid.*',
 
-     'Ext.data.*',
 
-     'Ext.ux.RowExpander',
 
-     'Ext.selection.CheckboxModel'
 
- ]);
 
- var myStore=null;
 
- var StatusStore;
 
- var baseUrl;
 
- var company_code;
 
- var theme;
 
- var ConfirmStore
 
- var pieWidth;
 
- var showAlarm=null;
 
- var pieMask;
 
- var V_LOGINNAME='',V_PASSWORD='';
 
- var myMask;
 
- var sm = Ext.create('Ext.selection.CheckboxModel');
 
- Ext.define('VWaterOption',{
 
- 	extend: 'Ext.data.Model',
 
- 	fields: [
 
- 		{ name:"id", type:'int' },
 
- 		{ name:'company_code',	type:'string' },
 
- 		{ name:'company_name',	type:'string' },
 
- 		{ name:'fulladdress', type:'string' },
 
- 		{ name:'rtmp', type:'string' },
 
- 		{ name:'xmlx', type:'string' },
 
- 		{ name:'list_count', type:'int' }
 
- 	]
 
- });
 
- Ext.define('CompanyComboStore',{
 
- 	extend:'Ext.data.Model',
 
- 	fields: [
 
- 		{name:'owner_name',  type:'string'},
 
- 		{name:'owner_id',type:'string'}
 
- 	]
 
- });
 
- var drawDevices = function(){
 
- //	alert('get device info');
 
- 	if(StatusStore.length>0){
 
-         var current_device_id='';
 
-         var device_count=0;
 
-         var fire_device_count=0;
 
-         var water_device_count=0;
 
-         var rtu_device_count=0;
 
-         var other_device_count=0;
 
-         var fire_device_out=0;
 
-         var water_device_out=0;
 
-         var rtu_device_out=0;
 
-         var other_device_out=0;
 
-         var fire_device_alarm=0;
 
-         var water_device_alarm=0;
 
-         var rtu_device_alarm=0;
 
-         var other_device_alarm=0;
 
-         var fire_device_normal=0;
 
-         var water_device_normal=0;
 
-         var rtu_device_normal=0;
 
-         var other_device_normal=0;
 
-         var total_normal=0;
 
-         var mark_array = new Array();
 
-         for(var i=0;i<StatusStore.length;i++){
 
-             if((StatusStore[i].point_list!=null)
 
-                 &&(StatusStore[i].point_list!=undefined)
 
-                 &&(StatusStore[i].point_list.length>0)){
 
-                 for(var j=0;j<StatusStore[i].point_list.length;j++){
 
-                     if(StatusStore[i].point_list[j].device_id!=current_device_id){
 
-                         current_device_id=StatusStore[i].point_list[j].device_id;
 
-                         device_count++;
 
-                         if((StatusStore[i].point_list[j].dwtype=='1')
 
-                             ||(StatusStore[i].point_list[j].dwtype==1))
 
-                             fire_device_count++;
 
-                         else if((StatusStore[i].point_list[j].dwtype=='2')
 
-                             ||(StatusStore[i].point_list[j].dwtype==2))
 
-                             water_device_count++;
 
-                         else if((StatusStore[i].point_list[j].dwtype=='3')
 
-                             ||(StatusStore[i].point_list[j].dwtype==3))
 
-                             other_device_count++;
 
-                         else if((StatusStore[i].point_list[j].dwtype=='4')
 
-                             ||(StatusStore[i].point_list[j].dwtype==4))
 
-                             water_device_count++;
 
-                         else if((StatusStore[i].point_list[j].dwtype=='5')
 
-                             ||(StatusStore[i].point_list[j].dwtype==5))
 
-                             water_device_count++;
 
-                         else if((StatusStore[i].point_list[j].dwtype=='6')
 
-                             ||(StatusStore[i].point_list[j].dwtype==6))
 
-                             rtu_device_count++;
 
-                         else
 
-                             other_device_count++;
 
-                     }
 
-                     if((StatusStore[i].point_list[j].point_code=='0')
 
-                         ||(StatusStore[i].point_list[j].point_code==0)){
 
-                         if((StatusStore[i].point_list[j].point_data!='0')
 
-                             &&(StatusStore[i].point_list[j].point_data!=0)){
 
-                             if((StatusStore[i].point_list[j].dwtype=='1')
 
-                                 ||(StatusStore[i].point_list[j].dwtype==1))
 
-                                 fire_device_alarm++;
 
-                             else if((StatusStore[i].point_list[j].dwtype=='2')
 
-                                 ||(StatusStore[i].point_list[j].dwtype==2)){
 
-                                 if((StatusStore[i].point_list[j].point_data=='4')
 
-                                     ||(StatusStore[i].point_list[j].point_data==4))
 
-                                     water_device_out++;
 
-                                 else
 
-                                     water_device_alarm++;
 
-                             }
 
-                             else if((StatusStore[i].point_list[j].dwtype=='3')
 
-                                 ||(StatusStore[i].point_list[j].dwtype==3))
 
-                                 other_device_out++;
 
-                             else if((StatusStore[i].point_list[j].dwtype=='4')
 
-                                 ||(StatusStore[i].point_list[j].dwtype==4))
 
-                                 if((StatusStore[i].point_list[j].point_data=='4')
 
-                                     ||(StatusStore[i].point_list[j].point_data==4))
 
-                                     water_device_out++;
 
-                                 else
 
-                                     water_device_alarm++;
 
-                             else if((StatusStore[i].point_list[j].dwtype=='5')
 
-                                 ||(StatusStore[i].point_list[j].dwtype==5))
 
-                                 if((StatusStore[i].point_list[j].point_data=='4')
 
-                                     ||(StatusStore[i].point_list[j].point_data==4))
 
-                                     water_device_out++;
 
-                                 else
 
-                                     water_device_alarm++;
 
-                             else if((StatusStore[i].point_list[j].dwtype=='6')
 
-                                 ||(StatusStore[i].point_list[j].dwtype==6))
 
-                                 rtu_device_out++;
 
-                             else
 
-                                 other_device_out++;
 
-                         }
 
-                     }
 
-                 }
 
-             }
 
-         }
 
-         fire_device_normal = fire_device_count-fire_device_out-fire_device_alarm;
 
-         water_device_normal = water_device_count-water_device_out-water_device_alarm;
 
-         rtu_device_normal = rtu_device_count-rtu_device_out-rtu_device_alarm;
 
-         other_device_normal = other_device_count-other_device_out-other_device_alarm;
 
-         total_normal = fire_device_normal+water_device_normal+rtu_device_normal+other_device_normal;
 
-         var themecolor = ((theme=='')||(theme=='access'))?'#ffffff':'#000000';
 
-         draw_cycle_icon('waterPie1','设备在线<br/> <br/>监控总数:<span style="color:#DDDF0D;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_count+'</span><br/>在线总数:<span style="color:#34abf5;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+(water_device_count-water_device_out)+'</span><br/>离线线总数:<span style="color:#DF5353;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_out+'<br/>在线率:',water_device_count,(water_device_count-water_device_out),themecolor);
 
-         draw_cycle_icon('waterPie2','状态正常<br/> <br/>在线总数:<span style="color:#DDDF0D;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+(water_device_count-water_device_out)+'</span><br/>正常总数:<span style="color:#34abf5;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_normal+'</span><br/>告警总数:<span style="color:#DF5353;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_alarm+'<br/>正常率:',(water_device_count-water_device_out),water_device_normal,themecolor);
 
- 	}
 
- }
 
- var draw_confirm = function(){
 
- 	var themecolor = ((theme=='')||(theme=='access'))?'#ffffff':'#000000';
 
- 	for(var i=0;i<ConfirmStore.length;i++){
 
- 		if(ConfirmStore[i].id=='water_alarm'){
 
- 			draw_cycle_icon('waterPie3','告警处理情况<br/>告警总数:<span style="color:#DDDF0D;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+ConfirmStore[i].count+'</span><br/>已处理:<span style="color:#34abf5;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+ConfirmStore[i].sum+'</span><br/>未处理:<span style="color:#DF5353;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+(ConfirmStore[i].count-ConfirmStore[i].sum)+'</span><br/>处理率:',ConfirmStore[i].count,ConfirmStore[i].sum,themecolor);
 
- 			Highcharts.chart('waterArea',{
 
- 				chart:{
 
- 					type:'area',
 
- 					backgroundColor: 'rgba(0,0,0,0)'
 
- 				},
 
- 				title:{
 
- 					text:'近期告警发生及处理情况汇总',
 
- 					style:{fontSize:'14px',color:themecolor,fontWeight:'bold'}
 
- 				},
 
- 				legend:{
 
- 					floating:true,
 
- 					itemStyle:{fontSize:'12px',color:themecolor,fontWeight:'bold'},
 
- 					x:300,
 
- 					y:(115-pieWidth)
 
- 				},
 
- 				colors:['#f66167', '#34abf5'],
 
-                 exporting: {   
 
-                     enabled: false
 
-                 },
 
-                 credits: {
 
-                     enabled: false
 
-                 },
 
- 				xAxis:{
 
- 					categories:ConfirmStore[i].day_list,
 
- 					tickmarkPlacement:'on',
 
- 					lineColor:'#666666',
 
- 					tickColor:'#666666',
 
- 					labels:{
 
- 						enabled:false,
 
- 						style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- 					},
 
- 					title:{
 
- 						enabled:false
 
- 					}
 
- 				},
 
- 				yAxis:{
 
- 					title:{
 
- 						text:'次',
 
- 						style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- 					},
 
- 					lineColor:'#666666',
 
- 					tickColor:'#666666',
 
- 					labels:{
 
- 						formatter:this.value,
 
- 						style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- 					}
 
- 				},
 
- 				plotOptions:{
 
- 					area:{
 
- 						stackiung:'normal',
 
- 						lineColor:'#666666',
 
- 						lineWidth:1,
 
- 						marker:{
 
- 							lineWidth:1,
 
- 							lineColor:'#666666'
 
- 						}
 
- 					}
 
- 				},
 
- 				series:[
 
- 					{
 
- 						name:'告警次数',
 
- 						data:ConfirmStore[i].count_list
 
- 					},{
 
- 						name:'处理次数',
 
- 						data:ConfirmStore[i].sum_list
 
- 					}
 
- 				]
 
- 			});
 
- 		}
 
- 	}
 
- }
 
- var draw_cycle_icon = function(icon_id,name, total, num, themecolor){
 
-     var mColor= '#34abf5';//[ '#DDDF0D','#f66167', '#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';
 
-     $("#"+icon_id+"Title").html('<br/><br/>'+name+percent+'%');
 
-     
 
-     Highcharts.chart(icon_id,{
 
-                 chart: {
 
-                     type: 'solidgauge',
 
-                     height: '85%',
 
-                     backgroundColor: 'rgba(0,0,0,0)',
 
-                     reflow:true,
 
-                     marginTop:0
 
-                 },
 
-                 title:{
 
-                     text:percent+'%',
 
-                     floating:true,
 
-                     y:pieWidth/3,
 
-                     style:{fontSize:'14px',color:themecolor,fontWeight:'bold'}
 
-                 },
 
-                 exporting: {   
 
-                     enabled: false
 
-                 },
 
-                 credits: {
 
-                     enabled: false
 
-                 },
 
-                 tooltip: {
 
-                     enabled: false
 
-                 },
 
-                 pane: {
 
-                     startAngle: -90,
 
-                     endAngle: 180,
 
-                     background: [{ 
 
-                         outerRadius: '90%',
 
-                         innerRadius: '60%',
 
-                         backgroundColor: 'rgba(0,0,0,0)',
 
-                         borderWidth: 0
 
-                     }]
 
-                 },
 
-                 yAxis: {
 
-                     min: 0,
 
-                     max: 100,
 
-                     lineWidth: 0,
 
-                     tickPositions: []
 
-                 },
 
-                 plotOptions: {
 
-                     solidgauge: {
 
-                         dataLabels: {
 
-                             enabled: false
 
-                         },
 
-                         stickyTracking: false,
 
-                         rounded: true,
 
-                         warp: false
 
-                     }
 
-                 },
 
-                 series:[{
 
-                     name:'',
 
-                     data:[{
 
-                     	color: Highcharts.Color(mColor)
 
-                         .setOpacity(0.2)
 
-                         .get(),
 
-                         radius: '90%',
 
-                         innerRadius: '60%',
 
-                         y: 100
 
-                     },{
 
-                         color: Highcharts.Color(mColor)
 
-                         .setOpacity(0.6)
 
-                         .get(),
 
-                         radius: '90%',
 
-                         innerRadius: '60%',
 
-                         y: percent
 
-                     }]
 
-                 }]
 
-             });
 
-     if((theme=='access')||(theme=='')){
 
-     	$('#'+icon_id).addClass('shadow_black');
 
-     }else{
 
-     	$('#'+icon_id).addClass('shadow_white');
 
-     }
 
- }
 
- var draw_confirm = function(){
 
- 	var list = ConfirmStore[0].point_list;
 
- 	var ncount = ConfirmStore[0].list_count;
 
- 	$("#WaterPiePanel_title_string").html(ConfirmStore[0].company_name+'.水系统监控设备通信信号强弱情况');
 
- 	var table = document.createElement("table");
 
- 	table.width="100%";
 
- 	table.border='0';
 
- 	table.style='border:0px solid #000;height:100%;';
 
- 	$("#waterArea").html('');
 
- 	document.getElementById("waterArea").appendChild(table);
 
- 	
 
- 	for(var i=0;i<ncount;i++){
 
- 		var tr = document.createElement("tr");
 
- 		tr.height=pieWidth;
 
- 		tr.border='0';
 
- 		tr.style='border:0px solid #000;height:'+(pieWidth*3)/4+'px;'
 
- 		table.appendChild(tr);
 
- 		var td2 = document.createElement('td');
 
- 		td2.height=pieWidth;
 
- 		td2.id='area_'+(i+1);
 
- 		td2.border='0';
 
- 		td2.style='border:0px solid #000;height:'+(pieWidth*3)/4+'px;margin:30px auto 30px auto;';
 
- 		tr.appendChild(td2);
 
- 	}
 
- 	for(var i=0;i<ncount;i++){
 
- 		var point_list = list[i];
 
- 		var themecolor = ((theme=='')||(theme=='access'))?'#ffffff':'#000000';
 
- 		var mColor= '#34abf5';//[ '#DDDF0D','#f66167', '#34abf5']
 
- 		if(point_list.point_data.length==0)
 
- 			point_list.point_data='0';
 
- 	    if(point_list.point_data<3)
 
- 	        mColor = '#f66167';
 
- 	    else if(point_list.point_data<4)
 
- 	        mColor = '#DDDF0D';
 
- //	    Highcharts.getOptions().colors = Highcharts.map([mColor], function (color) {
 
- //	    	return {
 
- //	    		radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
 
- //	    		stops: [
 
- //	    			[0, color],
 
- //	    			[1, Highcharts.Color(color).setOpacity(0).get('rgb')] // darken
 
- //	    		]
 
- //	    	};
 
- //	    });
 
- 		Highcharts.chart('area_'+(i+1),{
 
- 			chart:{
 
- 				type:'area',
 
- 				zoomType: 'x',
 
- 				backgroundColor: 'rgba(0,0,0,0)'
 
- 			},
 
- 			colors:[mColor,mColor,mColor],
 
- 			title:{
 
- 				text:point_list.name+'.通信信号强弱数据跟踪',
 
- 				style:{fontSize:'14px',color:themecolor,fontWeight:'bold'}
 
- 			},
 
- 			legend:{
 
- 				enabled:false,
 
- 				itemStyle:{fontSize:'12px',color:themecolor,fontWeight:'bold'}
 
- 			},
 
- 			colors:[mColor],
 
-             exporting: {   
 
-                 enabled: false
 
-             },
 
-             credits: {
 
-                 enabled: false
 
-             },
 
- 			xAxis:{
 
- 				categories:ConfirmStore[i].day_list,
 
- 				tickmarkPlacement:'on',
 
- 				lineColor:'#666666',
 
- 				tickColor:'#666666',
 
- 				labels:{
 
- 					enabled:false,
 
- 					style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- 				},
 
- 				title:{
 
- 					enabled:false
 
- 				}
 
- 			},
 
- 			yAxis:{
 
- 				max:5,
 
- 				min:0,
 
- 				title:{
 
- 					text:'%',
 
- 					style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- 				},
 
- 				lineColor:'#666666',
 
- 				tickColor:'#666666',
 
- 				labels:{
 
- 					formatter: this.value,
 
- 					style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- 				}
 
- 			},
 
- 			plotOptions:{
 
- 				fillColor: {
 
- 					linearGradient: {
 
- 						x1: 0,
 
- 						y1: 0,
 
- 						x2: 0,
 
- 						y2: 1
 
- 					},
 
- 					stops: [
 
- 						[0, Highcharts.getOptions().colors[0]],
 
- 						[1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
 
- 					]
 
- 				},
 
- 				area:{
 
- 					stackiung:'normal',
 
- 					lineWidth:0,
 
- 					marker:{
 
- 						lineWidth:0,
 
- 						enabled:false,
 
- 						radius:0
 
- 					}
 
- 				}
 
- 			},
 
- 			series:[
 
- 				{
 
- 					name:'信号强弱',
 
- 					data:point_list.data_list
 
- 				}
 
- 			]
 
- 		});
 
- 	}
 
- }
 
- var show_datapie = function(record){
 
- 	if(myStore==null)
 
- 		return;
 
- 	var themecolor = ((theme=='')||(theme=='access'))?'#ffffff':'#000000';
 
- 	var nrow = myStore.getCount();
 
- 	var company_code = record.get('company_code');
 
- 	for(var i=0;i<nrow;i++){
 
- 		if(myStore.getAt(i).get('company_code')==company_code){
 
- 			var list = myStore.getAt(i).raw.point_list;
 
- 			$("#WaterPiePanel_title_string").html(myStore.getAt(i).get('company_name')+'.水系统监控设备电池电量情况');
 
- 			var div_root = document.getElementById("waterArea");
 
- 			div_root.innerHTML = '';
 
- 			for(var j=0;j<list.length;j++){
 
- 				var v = list[j].point_data==''?0:(list[j].point_data>5?5:list[j].point_data);
 
- 				var myColor = ((v<3)?'#f66167':((v<4)?'#DDDF0D':'#34abf5'));
 
- 				var div = document.createElement('div');
 
- 				div.id = 'WaterPiePanel_'+list[j].device_id;
 
- 				div.style.overflow='hidden';
 
- 				div.style.padding='5px';
 
- 				div.style.margin='20px';
 
- 				div.style.width='150px';
 
- 				div.style.height='250px';
 
- 				div.style.border='2px solid rgba(255,255,255,0.0)';
 
- 				div.style.background = 'rgba(255,255,255,0.0)';
 
- 				div.style.color = '#ffffff';
 
- 				div.style.cursor = 'pointer';
 
- 				div.style.float = 'left';
 
- 				div.device_id = list[j].device_id;
 
- 				div.company_code = company_code;
 
- 				div_root.appendChild(div);
 
- 				$("#WaterPiePanel_"+list[j].device_id).mouseover(function(){
 
- 					$(this).css({
 
- 						'overflow':'hidden',
 
- 						'padding':'5px',
 
- 						'margin':'20px',
 
- 						'width':'150px',
 
- 						'height':'250px',
 
- 						'cursor':'pointer',
 
- 						'float':'left',
 
- 						'color':'#ffff00',
 
- 						'border':'2px solid rgba(255,255,255,0.3)',
 
- 						'background':'rgba(0,0,0,0.3)'
 
- 					});
 
- 				});
 
- 				$("#WaterPiePanel_"+list[j].device_id).mouseout(function(){
 
- 					$(this).css({
 
- 						'overflow':'hidden',
 
- 						'padding':'5px',
 
- 						'margin':'20px',
 
- 						'width':'150px',
 
- 						'height':'250px',
 
- 						'cursor':'pointer',
 
- 						'float':'left',
 
- 						'color':'#ffffff',
 
- 						'border':'2px solid rgba(255,255,255,0.0)',
 
- 						'background':'rgba(255,255,255,0.0)'
 
- 					});
 
- 				});
 
- 				$("#WaterPiePanel_"+list[j].device_id).click(function(e){
 
- 					var id = e.currentTarget.device_id;
 
- 					var cid = e.currentTarget.company_code;
 
- 					myMask.show();
 
- 					var query = new Object();
 
- 					// query.V_LOGINNAME = V_LOGINNAME;
 
- 					// query.V_PASSWORD = V_PASSWORD;
 
- 					query.company_code = cid;
 
- 					query.device_id = id;
 
- 					query.dwtype = '2';
 
- 					query.point_code = '3';
 
- 					$.ajax({
 
- 				        type:'POST',
 
- 				        url: baseUrl+"iot/data/view/getSyncDataVListByCompany",
 
- 				        data: {
 
- 				        	queryJson : Ext.JSON.encode(query)
 
- 				    	 },
 
- 				        success: function(result){
 
- 				            var json = eval('(' + result + ')');
 
- 				            if(json.action=='getSyncDataVListByCompany'){
 
- 				            	if(json.check=='true'){
 
- 					                ConfirmStore = json.RESULT;
 
- 					                draw_confirm();
 
- 				            	}else{
 
- 				            		Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function(){
 
- 				            			window.parent.frames.return_login();
 
- 				            		});
 
- 				            	}
 
- 				            }
 
- 				            myMask.hide();
 
- 				        }
 
- 				    });
 
- 				});
 
- 				var title = document.createElement('div');
 
- 				title.style.margin = '0px';
 
- 				title.style.padding = '0px';
 
- 				title.style.width = '150px';
 
- 				title.style.height = '50px';
 
- 				title.style.fontSize = '14px';
 
- 				title.style.fontWeight = 'bold';
 
- 				title.innerHTML = list[j].name;
 
- 				div.appendChild(title);
 
- 				var text = document.createElement('div');
 
- 				text.style.margin = '0px';
 
- 				text.style.padding = '0px';
 
- 				text.style.width = '150px';
 
- 				text.style.height = '80px';
 
- 				text.style.fontSize = '10px';
 
- 				text.style.fontWeight = 'normal';
 
- 				var str = '<b>信号强弱:</b><span style="color:'+myColor+';">'+v+'</span><br/><b>采集时间:</b><br/>'+list[j].data_time;
 
- 				text.innerHTML = str
 
- 				div.appendChild(text);
 
- 				var pie = document.createElement('div');
 
- 				pie.style.margin = '0px';
 
- 				pie.style.padding = '0px';
 
- 				pie.style.width = '120px';
 
- 				pie.style.height = '100px';
 
- 				var pieId = 'WaterDevicePie_'+list[j].device_id;
 
- 				pie.id = pieId;
 
- 				div.appendChild(pie);
 
- 				Highcharts.getOptions().colors = Highcharts.map([ '#000000',myColor, myColor], 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(pieId,{
 
- 	                chart: {
 
- 	                    type: 'solidgauge',
 
- 	                    height: '85%',
 
- 	                    backgroundColor: 'rgba(0,0,0,0)',
 
- 	                    reflow:true,
 
- 	                    marginTop:0
 
- 	                },
 
- 	                title:{
 
- 	                    text:v+'%',
 
- 	                    floating:true,
 
- 	                    y:(pieWidth*2/5),
 
- 	                    style:{fontSize:'21px',color:themecolor,fontWeight:'bold'}
 
- 	                },
 
- 	                exporting: {   
 
- 	                    enabled: false
 
- 	                },
 
- 	                credits: {
 
- 	                    enabled: false
 
- 	                },
 
- 	                tooltip: {
 
- 	                    enabled: false
 
- 	                },
 
- 	                pane: {
 
- 	                    startAngle: -90,
 
- 	                    endAngle: 270,
 
- 	                    background: [{ 
 
- 	                        outerRadius: '90%',
 
- 	                        innerRadius: '60%',
 
- 	                        backgroundColor: 'rgba(0,0,0,0)',
 
- 	                        borderWidth: 0
 
- 	                    }]
 
- 	                },
 
- 	                yAxis: {
 
- 	                    min: 0,
 
- 	                    max: 5,
 
- 	                    lineWidth: 0,
 
- 	                    tickPositions: []
 
- 	                },
 
- 	                plotOptions: {
 
- 	                    solidgauge: {
 
- 	                        dataLabels: {
 
- 	                            enabled: false
 
- 	                        },
 
- 	                        linecap: 'square',
 
- 	                        stickyTracking: false,
 
- 	                        rounded: false,
 
- 	                        warp: false
 
- 	                    }
 
- 	                },
 
- 	                series:[{
 
- 	                    name:'',
 
- 	                    data:[{
 
- 	                    	color: Highcharts.Color(myColor)
 
- 	                        .setOpacity(0.2)
 
- 	                        .get(),
 
- 	                        radius: '110%',
 
- 	                        innerRadius: '80%',
 
- 	                        y: 100
 
- 	                    },{
 
- 	                    	color: (Highcharts.theme && Highcharts.theme.contrastTextColor) ,
 
- 	                        radius: '110%',
 
- 	                        innerRadius: '80%',
 
- 	                        y: v*20
 
- 	                    },{
 
- 	                    	color: (Highcharts.theme && Highcharts.theme.contrastTextColor) ,
 
- 	                        radius: '60%',
 
- 	                        innerRadius: '0%',
 
- 	                        y: 100
 
- 	                    }]
 
- 	                }]
 
- 	            });
 
- //				Highcharts.chart(pieId,{
 
- //					chart:{
 
- //						type:'bar',
 
- //						backgroundColor: 'rgba(0,0,0,0)'
 
- //					},
 
- //					title:{
 
- //						text:null
 
- //					},
 
- //		            exporting: {   
 
- //		                enabled: false
 
- //		            },
 
- //		            credits: {
 
- //		                enabled: false
 
- //		            },
 
- //		            legend:{
 
- //		            	enabled: false
 
- //		            },
 
- //		            tooltip:{
 
- //		            	enabled:false
 
- //		            },
 
- //					xAxis:{
 
- //						categories:['电量'],
 
- //						labels:{
 
- //							enabled:false
 
- //						},
 
- //						gridLineWidth:0,
 
- //						lineWidth:0,
 
- //						tickWidth:0
 
- //					},
 
- //					yAxis:{
 
- //						min: 0,
 
- //						max: 100,
 
- //						title:{
 
- //							text:null
 
- //						},
 
- //						labels:{
 
- //							enabled:false
 
- //						},
 
- //						gridLineWidth:0,
 
- //						lineWidth:0,
 
- //						stackLabels:{
 
- //							enabled:false
 
- //						},
 
- //						tickWidth:0
 
- //					},
 
- //					legend:{
 
- //						reversed:true,
 
- //						enabled:false
 
- //					},
 
- //					plotOptions:{
 
- //						series:{
 
- //							stacking:'normal'
 
- //						}
 
- //					},
 
- //					series:[{
 
- //						name:'剩余电量',
 
- ////						visible:false,
 
- //						data:[v]
 
- //					}]
 
- //				});
 
- 			}
 
- 			break;
 
- 		}
 
- 	}
 
- 	pieMask.hide();
 
- }
 
- var getCurrentData = function(){
 
- 	var div = Ext.getCmp('VWaterOptionListPanel');
 
- 	var model = div.getSelectionModel();
 
- 	var record = model.getSelection()[0];
 
- 	show_datapie(record);
 
- }
 
- Ext.onReady(function(){  
 
- 	baseUrl = document.getElementById('basePath').value;
 
- 	theme = document.getElementById('theme').value;
 
- 	company_code = document.getElementById('company_code').value;
 
- 	$("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
 
- 	$("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
 
- 	V_LOGINNAME = $("#V_LOGINNAME").val();
 
-     V_PASSWORD = $("#V_PASSWORD").val();
 
- 	var currentWidth = document.documentElement.clientWidth;
 
- 	pieWidth = currentWidth/7;
 
- 	var chkIcon = '<img src="'+baseUrl+'res/img/common/check.gif"/>'
 
- 	var unchkIcon = '<img src="'+baseUrl+'res/img/common/uncheck.gif"/>'
 
- 	var countPerPage = 20;
 
- 	var maxHeight = 10000;
 
- 	
 
- 	var chkBoolean = function(flag) {
 
- 		if(flag)
 
- 			return chkIcon;
 
- 		return unchkIcon;
 
- 	}
 
- 	var queryJson = new Object();
 
- 	queryJson.V_LOGINNAME = V_LOGINNAME;
 
- 	// queryJson.V_PASSWORD =  V_PASSWORD;
 
- 	queryJson.dwtype = '2';
 
- 	queryJson.point_code = '3'
 
- 	if((company_code!=null)&&(company_code!='null')&&(company_code.length>0))
 
- 		queryJson.company_code = company_code;
 
- 	myStore = Ext.create('Ext.data.Store', {
 
- 	    model: 'VWaterOption',
 
- 	    pageSize: countPerPage, 
 
- 	    proxy: {
 
- 	        type: 'ajax',
 
- 	        actionMethods: {
 
-                 create : 'POST',
 
-                 read   : 'POST', // by default GET
 
-                 update : 'POST',
 
-                 destroy: 'POST'
 
- 	        },
 
- 	        url: baseUrl+'iot/data/view/getSyncStatusVListByCompany',
 
- 	        reader: {
 
- 	            type: 'json',
 
- 	            root: 'RESULT',
 
- 	            totalProperty: 'totalCount'
 
- 	        },
 
- 	        extraParams:{
 
- 	        	queryJson:Ext.JSON.encode(queryJson)
 
- 	        }
 
- 	    },
 
- 	    sorters:[{
 
- 	    	property:'time',
 
- 	    	direction:'DESC'
 
- 	    }],
 
- 	    remoteSort: true
 
- 	});
 
- 	var CompanyStory = Ext.create('Ext.data.Store',{
 
- 		model: 'CompanyComboStore',
 
- 	    proxy: {
 
- 	        type: 'ajax',
 
- 	        actionMethods: {
 
-                 create : 'POST',
 
-                 read   : 'POST', // by default GET
 
-                 update : 'POST',
 
-                 destroy: 'POST'
 
- 	        },
 
- 	        url: baseUrl+'iot/company/view/getNameList',
 
- 	        reader: {
 
- 	            type: 'json',
 
- 	            root: 'RESULT',
 
- 	            totalProperty: 'totalCount'
 
- 	        },
 
- 	        extraParams:{
 
- 	        	queryJson:Ext.JSON.encode(queryJson)
 
- 	        }
 
- 	    }
 
- 	});
 
- 	var ClztStory = Ext.create('Ext.data.Store',{
 
- 		fields:['abbr','name'],
 
- 		data:[
 
- 			{'abbr':0,'name':'未处理'},
 
- 			{'abbr':1,'name':'已处理'}
 
- 		]
 
- 	});
 
- 	var FilterForm = Ext.create('Ext.form.Panel', {
 
- 		id: 'VWaterOptionFilterForm',
 
- 		labelWidth: 55,
 
- 		defaultType: 'textfield',
 
- 		bodyPadding: 15,
 
- 		items: [{
 
- 			xtype:'combo',
 
- 			fieldLabel:'单位名称',
 
- 			id: 'ff_company_code',
 
- 			name:'ff_company_code',
 
- 			displayField : 'owner_name',  
 
- 	        valueField : 'owner_id',
 
- 	        editable : false,
 
- 	        width:330,
 
- 	        store:CompanyStory
 
- 		},{
 
- 			xtype:'combo',
 
- 			fieldLabel:'处理状态',
 
- 			id: 'ff_clzt',
 
- 			name: 'ff_clzt',
 
- 			displayField : 'name',  
 
- 	        valueField : 'abbr',
 
- 	        editable : false,
 
- 	        width:330,
 
- 	        store:ClztStory
 
- 		}],
 
- 		buttons: [{
 
- 	        text: '筛选',
 
- 	        iconCls:'ok_btn',
 
- 		    handler: function() {
 
- 		        var form = this.up('form').getForm();
 
- 		        if (form.isValid()) {
 
- 		        	var query = new Object();
 
- //		        	var tmp = Ext.getCmp('ff_company_code');
 
- 		        	query.dwtype = '2';
 
- 		        	query.point_code = '2'
 
- 		        	if(Ext.getCmp('ff_company_code').getValue().length>0){
 
- 		        		query.company_code = Ext.getCmp('ff_company_code').getValue();
 
- 		        		$("#company_code").val(query.company_code);
 
- 		        		company_code = query.company_code;
 
- 		        		$("#WaterPiePanel_title_string").html(Ext.getCmp('ff_company_code').getRawValue( )+'.火警系统监控告警处理情况');
 
- 		        	}else{
 
- 		        		$("#company_code").val('');
 
- 		        		$("#WaterPiePanel_title_string").html('火警系统监控告警处理情况');
 
- 		        		company_code = null;
 
- 		        	}
 
- 	        		query.clzt = Ext.getCmp('ff_clzt').getValue()==null?"":Ext.getCmp('ff_clzt').getValue();
 
- 	        		// query.V_LOGINNAME = V_LOGINNAME;
 
- 	        		// query.V_PASSWORD =  V_PASSWORD;
 
- 	        		query.COMMSTATUS = 'NO';
 
- 		        	var jsonstr = Ext.JSON.encode(query);
 
- 		        	myStore.getProxy().extraParams = {
 
- 		        		queryJson : jsonstr
 
- 		        	};
 
- 		        	Ext.getCmp('VWaterOptionListPageToolbar').moveFirst();
 
- 		        	Ext.getCmp('ff_company_code').setValue('');
 
- 		        	Ext.getCmp('ff_clzt').setValue('');
 
- 		        	Ext.getCmp('VWaterOptionFilterWin').hide();
 
- 		        	getCurrentData();
 
- 		        }
 
- 		    }
 
- 		},{
 
- 			text: '关闭',
 
- 			iconCls: 'cancel_btn',
 
- 			handler: function() {
 
- 				Ext.getCmp('VWaterOptionFilterWin').hide();
 
- 			}
 
- 		}]
 
- 	});
 
- 	var filterwin = function() {
 
- 		Ext.create('Ext.window.Window',{
 
- 			id: 'VWaterOptionFilterWin',
 
- 			title: '水系统报告筛选',
 
- 			height: 210,
 
- 			width: 400,
 
- 			layout: 'fit',
 
- 			items: FilterForm,
 
- 			closable:false,
 
- 			modal:true,
 
- 			closeAction: 'hide'
 
- 		}).show();
 
- 		CompanyStory.reload();
 
- 	}
 
- 	var radiogroup = new Ext.create('Ext.form.RadioGroup',{
 
- 		fieldLabel:'误报',
 
- 		id:'uf_r_clwb',
 
- 		width:300,
 
- 		items:[{
 
- 			name:'uf_r_clwb',
 
- 			inputValue:'1',
 
- 			boxLabel:'是'
 
- 		},{
 
- 			name:'uf_r_clwb',
 
- 			inputValue:'0',
 
- 			boxLabel:'否',
 
- 			checked:true
 
- 		}]
 
- 	});
 
- 	var radiogroup2 = new Ext.create('Ext.form.RadioGroup',{
 
- 		fieldLabel:'处理范围',
 
- 		id:'uf_r_clfw',
 
- 		width:300,
 
- 		items:[{
 
- 			name:'uf_r_clfw',
 
- 			inputValue:'1',
 
- 			boxLabel:'批量'
 
- 		},{
 
- 			name:'uf_r_clfw',
 
- 			inputValue:'0',
 
- 			boxLabel:'单一',
 
- 			checked:true
 
- 		}]
 
- 	});
 
- 	var clear_modify_form = function(){
 
- 		Ext.getCmp('uf_company_name').setValue('');
 
- 		Ext.getCmp('uf_name').setValue('');
 
- 		Ext.getCmp('uf_device_code').setValue('');
 
- 		Ext.getCmp('uf_id').setValue('');
 
- 		Ext.getCmp('uf_status').setValue('');
 
- 		Ext.getCmp('uf_fullname').setValue('');
 
- 		Ext.getCmp('uf_clwb').setValue('');
 
- 		Ext.getCmp('uf_clr').setValue('');
 
- 		Ext.getCmp('uf_clsj').setValue('');
 
- 		Ext.getCmp('uf_clnr').setValue('');
 
- 	}
 
- 	var fireInfoForm = Ext.create('Ext.form.Panel', {
 
- 		id: 'waterInfoForm',
 
- 		labelWidth: 55,
 
- 		url: baseUrl+'iot/alarm/view/updateSj',
 
- 		defaultType: 'textfield',
 
- 		bodyPadding: 15,
 
- 		items: [{
 
- 			fieldLabel:'单位名称',
 
- 			id: 'uf_company_name',
 
- 			name: 'uf_company_name',
 
- 	        anchor:'90%'
 
- 		},{
 
- 			fieldLabel:'监控设备',
 
- 			id:'uf_name',
 
- 			name:'uf_name',
 
- 			anchor:'100%'
 
- 		},{
 
- 			fieldLabel:'设备编号',
 
- 			id:'uf_device_code',
 
- 			name:'uf_device_code',
 
- 			hidden: true
 
- 		},{
 
- 			fieldLabel:'记录编号',
 
- 			id:'uf_id',
 
- 			name:'uf_id',
 
- 			hidden: true
 
- 		},{
 
- 			fieldLabel:'设备编号',
 
- 			id:'uf_status',
 
- 			name:'uf_status',
 
- 			hidden: true
 
- 		},{
 
- 			fieldLabel:'报告信息',
 
- 			id: 'uf_fullname',
 
- 			name:'uf_fullname',
 
- 			xtype: 'textareafield',
 
- 			maxLength: 250,
 
- 			cols:4,
 
- 			anchor:'100%'
 
- 		},{
 
- 			fieldLabel:'误报',
 
- 			id: 'uf_clwb',
 
- 			name:'uf_clwb',
 
- 			maxLength: 200,
 
- 			anchor:'65%'
 
- 		},radiogroup,radiogroup2,{
 
- 			fieldLabel:'处理人',
 
- 			id: 'uf_clr',
 
- 			name:'uf_clr',
 
- 			maxLength: 120,
 
- 			anchor:'65%'
 
- 		},{
 
- 			fieldLabel:'处理时间',
 
- 			id: 'uf_clsj',
 
- 			name:'uf_clsj',
 
- 			maxLength: 200,
 
- 			anchor:'80%'
 
- 		},{
 
- 			fieldLabel:'处理内容',
 
- 			id: 'uf_clnr',
 
- 			name:'uf_clnr',
 
- 			xtype: 'textareafield',
 
- 			maxLength: 250,
 
- 			cols:4,
 
- 			anchor:'100%'
 
- 		},{
 
- 			id:'fm_queryJson',
 
- 			name:'queryJson',
 
- 			hidden:true
 
- 		}],
 
- 		buttons: [{
 
- 	        text: '处理',
 
- 	        id:'confirmBtn',
 
- 	        iconCls:'ok_btn',
 
- 		    handler: function() {
 
- 		    	var form = this.up('form').getForm();
 
- 		        if (form.isValid()) {
 
- 		        	var queryJson = new Object();
 
- 		        	// queryJson.V_LOGINNAME = V_LOGINNAME;
 
- 		        	// queryJson.V_PASSWORD = V_PASSWORD;
 
- 		        	queryJson.id = Ext.getCmp('uf_id').getValue();
 
- 		        	queryJson.status = Ext.getCmp('uf_status').getValue();
 
- 		        	queryJson.name = Ext.getCmp('uf_name').getValue();
 
- 		        	queryJson.device_code = Ext.getCmp('uf_device_code').getValue();
 
- 		        	queryJson.confirmAll = Ext.getCmp('uf_r_clfw').getChecked()[0].boxLabel=='单一'?'0':'1';
 
- 		        	queryJson.clwb = Ext.getCmp('uf_r_clwb').getChecked()[0].boxLabel=='否'?'0':'1';
 
- 		        	queryJson.clnr = Ext.getCmp('uf_clnr').getValue();
 
- 		        	var jsonstr = Ext.JSON.encode(queryJson);
 
- 		        	Ext.getCmp('fm_queryJson').setValue(jsonstr);
 
- 		            form.submit({
 
- 		            	method:'post',
 
- 		                success: function(form, action) {
 
- 		                   Ext.Msg.alert('操作成功', '已确认'+action.result.activerow+'条记录', function(btn,txt){
 
- 		                	   clear_modify_form();
 
- 		                	   myStore.reload();
 
- 		                	   getCurrentData();
 
- 		                   });
 
- 		                },
 
- 		                failure: function(form, action) {
 
- 		                   Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
 
- 		                	   clear_modify_form();
 
- 		                	   myStore.reload();
 
- 		                	   getCurrentData();
 
- 		                   });
 
- 		                }
 
- 		            });
 
- 		            this.up('window').close();
 
- 		        }
 
- 		    }
 
- 		},{
 
- 			text: '关闭',
 
- 			iconCls: 'cancel_btn',
 
- 			handler: function() {
 
- 				this.up('window').close();
 
- 			}
 
- 		}]
 
- 	});
 
- 	var vWaterInfoWin = Ext.create('Ext.window.Window',{
 
- 		id:'VWaterInfoWin',
 
- 		title:'详细信息: <span id="VInfoWin_Title"></span>',
 
- 		width:400,
 
- 		layout:'fit',
 
- 		closable:false,
 
- 		modal:true,
 
- 		closeAction:'hide',
 
- 		items:fireInfoForm
 
- 	});
 
- 	var showFireInfoWin = function(record){
 
- 		vWaterInfoWin.show();
 
- 		$("#VInfoWin_Title").html(record.get('data'));
 
- 		Ext.getCmp('uf_company_name').setValue(record.get('company_name'));
 
- 		Ext.getCmp('uf_name').setValue(record.get('name'));
 
- 		Ext.getCmp('uf_device_code').setValue(record.get('device_code'));
 
- 		Ext.getCmp('uf_fullname').setValue(record.get('fullname'));
 
- 		Ext.getCmp('uf_clr').setValue(record.get('clr_name'));
 
- 		Ext.getCmp('uf_clsj').setValue(record.get('clsj'));
 
- 		Ext.getCmp('uf_clnr').setValue(record.get('clnr'));
 
- 		Ext.getCmp('uf_id').setValue(record.get('id'));
 
- 		Ext.getCmp('uf_clwb').setValue(record.get('clwb')=='1'?'误报':'告警');
 
- 		Ext.getCmp('uf_status').setValue(record.get('status'));
 
- 		if(record.get('clzt')=='已处理'){
 
- 			Ext.getCmp('uf_clwb').setVisible(true);
 
- 			Ext.getCmp('uf_r_clwb').setVisible(false);
 
- 			Ext.getCmp('uf_r_clfw').setVisible(false);
 
- 			Ext.getCmp('confirmBtn').setVisible(false);
 
- 			Ext.getCmp('uf_clr').setVisible(true);
 
- 			Ext.getCmp('uf_clsj').setVisible(true);
 
- 		}else{
 
- 			Ext.getCmp('uf_clwb').setVisible(false);
 
- 			Ext.getCmp('uf_r_clwb').setVisible(true);
 
- 			Ext.getCmp('uf_r_clfw').setVisible(true);
 
- 			Ext.getCmp('confirmBtn').setVisible(true);
 
- 			Ext.getCmp('uf_clr').setVisible(false);
 
- 			Ext.getCmp('uf_clsj').setVisible(false);
 
- 		}
 
- 	}
 
- 	var WaterOptionPanel = Ext.create('Ext.grid.Panel', {
 
- 	    title: '水系统监控单位列表',
 
- 	    titleCollapse:true,
 
- 	    id: 'VWaterOptionListPanel',
 
- 	    region:'north',
 
- 	    store: myStore,
 
- 	    height: (pieWidth*3/2),
 
- 	    columns: [
 
- 	    	{ header: '序号',  dataIndex: 'id',width:50, menuDisabled:true },
 
- 	        { header: '单位名称',  dataIndex: 'company_name',width:240, menuDisabled:true },
 
- 	        { header: '详细地址', dataIndex: 'fulladdress', width:640, menuDisabled:true },
 
- 	        { header: '单位类型',  dataIndex: 'xmlx', width:100, menuDisabled:true },
 
- 	        { header: '设备数量', dataIndex: 'list_count', width:80,  menuDisabled:true }
 
- 	    ],
 
- 	    columnLines: true,
 
- 	    width: '100%',
 
-         frame: true,  
 
-         border:false,  
 
-         iconCls: 'icon-grid',
 
-         listeners:{
 
-         	 'celldblclick' : function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts){ 
 
-         		 pieMask.show();
 
-         		 show_datapie(record);
 
-         	 }
 
-         }
 
- 	});
 
- 	var piebar = Ext.create('Ext.panel.Panel',{
 
- 		id:'WaterPiePanel',
 
- 		width:'100%',
 
- 		region:'center',
 
- 		layout:'border',
 
-     	height: maxHeight,
 
- 		title:'<span id="WaterPiePanel_title_string">水系统监控设备通信信号强弱情况</span>',
 
- 		defaults:{  
 
-             border:false
 
-         }, 
 
- 		items:[
 
- 			{
 
- 				region:'east',
 
- 				xtype:'panel',
 
- 				id:'waterArea',
 
- 				style:'overflow:auto',
 
- 				width:currentWidth
 
- 			}
 
- 		]
 
- 	});
 
- 	
 
- 	pieMask = new Ext.LoadMask(piebar,{msg:"Loading..."});
 
- 	myMask = new Ext.LoadMask(document.body,{msg:"Loading..."});
 
- 	new Ext.create('Ext.panel.Panel',{
 
- 		width:'100%',
 
- 		id: 'WaterAlarmPanel',
 
- 		layout:'border',
 
- 		items:[
 
- 			WaterOptionPanel,piebar
 
- 		],
 
- 	    renderTo: Ext.getBody()
 
- 	});
 
- 	pieMask.show();
 
- 	myStore.addListener('load',function(store,record,opts){
 
- 		pieMask.show();
 
- 		WaterOptionPanel.getSelectionModel().select(0,true);
 
- 		getCurrentData();
 
- 	});
 
- 	myStore.reload();
 
- 	maxHeight =  document.documentElement.clientHeight;
 
- 	Ext.getCmp('WaterAlarmPanel').setHeight(maxHeight);
 
- });
 
- ///**
 
- // * 
 
- // */
 
- //
 
- //Ext.Loader.setConfig({
 
- //    enabled: true
 
- //});
 
- //
 
- //Ext.Loader.setPath('Ext.ux', '../../res/extjs/examples/ux');
 
- //
 
- //Ext.require([
 
- //    'Ext.grid.*',
 
- //    'Ext.data.*',
 
- //    'Ext.ux.RowExpander',
 
- //    'Ext.selection.CheckboxModel'
 
- //]);
 
- //
 
- //var StatusStore;
 
- //var baseUrl;
 
- //var company_code;
 
- //var theme;
 
- //var ConfirmStore
 
- //var pieWidth;
 
- //var showAlarm=null;
 
- //var pieMask;
 
- //var V_LOGINNAME='',V_PASSWORD='';
 
- //
 
- //var sm = Ext.create('Ext.selection.CheckboxModel');
 
- //
 
- //Ext.define('VWaterOption',{
 
- //	extend: 'Ext.data.Model',
 
- //	fields: [
 
- //		{ name:"id", type:'int' },
 
- //		{ name:'company_code',	type:'string' },
 
- //		{ name:'company_name',	type:'string' },
 
- //		{ name:'fulladdress', type:'string' },
 
- //		{ name:'rtmp', type:'string' },
 
- //		{ name:'xmlx', type:'string' },
 
- //		{ name:'list_count', type:'int' }
 
- //	]
 
- //});
 
- //
 
- //Ext.define('CompanyComboStore',{
 
- //	extend:'Ext.data.Model',
 
- //	fields: [
 
- //		{name:'owner_name',  type:'string'},
 
- //		{name:'owner_id',type:'string'}
 
- //	]
 
- //});
 
- //
 
- //var drawDevices = function(){
 
- ////	alert('get device info');
 
- //	if(StatusStore.length>0){
 
- //        var current_device_id='';
 
- //        var device_count=0;
 
- //        var fire_device_count=0;
 
- //        var water_device_count=0;
 
- //        var rtu_device_count=0;
 
- //        var other_device_count=0;
 
- //        var fire_device_out=0;
 
- //        var water_device_out=0;
 
- //        var rtu_device_out=0;
 
- //        var other_device_out=0;
 
- //        var fire_device_alarm=0;
 
- //        var water_device_alarm=0;
 
- //        var rtu_device_alarm=0;
 
- //        var other_device_alarm=0;
 
- //        var fire_device_normal=0;
 
- //        var water_device_normal=0;
 
- //        var rtu_device_normal=0;
 
- //        var other_device_normal=0;
 
- //        var total_normal=0;
 
- //        var mark_array = new Array();
 
- //        for(var i=0;i<StatusStore.length;i++){
 
- //            if((StatusStore[i].point_list!=null)
 
- //                &&(StatusStore[i].point_list!=undefined)
 
- //                &&(StatusStore[i].point_list.length>0)){
 
- //                for(var j=0;j<StatusStore[i].point_list.length;j++){
 
- //                    if(StatusStore[i].point_list[j].device_id!=current_device_id){
 
- //                        current_device_id=StatusStore[i].point_list[j].device_id;
 
- //                        device_count++;
 
- //                        if((StatusStore[i].point_list[j].dwtype=='1')
 
- //                            ||(StatusStore[i].point_list[j].dwtype==1))
 
- //                            fire_device_count++;
 
- //                        else if((StatusStore[i].point_list[j].dwtype=='2')
 
- //                            ||(StatusStore[i].point_list[j].dwtype==2))
 
- //                            water_device_count++;
 
- //                        else if((StatusStore[i].point_list[j].dwtype=='3')
 
- //                            ||(StatusStore[i].point_list[j].dwtype==3))
 
- //                            other_device_count++;
 
- //                        else if((StatusStore[i].point_list[j].dwtype=='4')
 
- //                            ||(StatusStore[i].point_list[j].dwtype==4))
 
- //                            water_device_count++;
 
- //                        else if((StatusStore[i].point_list[j].dwtype=='5')
 
- //                            ||(StatusStore[i].point_list[j].dwtype==5))
 
- //                            water_device_count++;
 
- //                        else if((StatusStore[i].point_list[j].dwtype=='6')
 
- //                            ||(StatusStore[i].point_list[j].dwtype==6))
 
- //                            rtu_device_count++;
 
- //                        else
 
- //                            other_device_count++;
 
- //                    }
 
- //                    if((StatusStore[i].point_list[j].point_code=='0')
 
- //                        ||(StatusStore[i].point_list[j].point_code==0)){
 
- //                        if((StatusStore[i].point_list[j].point_data!='0')
 
- //                            &&(StatusStore[i].point_list[j].point_data!=0)){
 
- //                            if((StatusStore[i].point_list[j].dwtype=='1')
 
- //                                ||(StatusStore[i].point_list[j].dwtype==1))
 
- //                                fire_device_alarm++;
 
- //                            else if((StatusStore[i].point_list[j].dwtype=='2')
 
- //                                ||(StatusStore[i].point_list[j].dwtype==2)){
 
- //                                if((StatusStore[i].point_list[j].point_data=='4')
 
- //                                    ||(StatusStore[i].point_list[j].point_data==4))
 
- //                                    water_device_out++;
 
- //                                else
 
- //                                    water_device_alarm++;
 
- //                            }
 
- //                            else if((StatusStore[i].point_list[j].dwtype=='3')
 
- //                                ||(StatusStore[i].point_list[j].dwtype==3))
 
- //                                other_device_out++;
 
- //                            else if((StatusStore[i].point_list[j].dwtype=='4')
 
- //                                ||(StatusStore[i].point_list[j].dwtype==4))
 
- //                                if((StatusStore[i].point_list[j].point_data=='4')
 
- //                                    ||(StatusStore[i].point_list[j].point_data==4))
 
- //                                    water_device_out++;
 
- //                                else
 
- //                                    water_device_alarm++;
 
- //                            else if((StatusStore[i].point_list[j].dwtype=='5')
 
- //                                ||(StatusStore[i].point_list[j].dwtype==5))
 
- //                                if((StatusStore[i].point_list[j].point_data=='4')
 
- //                                    ||(StatusStore[i].point_list[j].point_data==4))
 
- //                                    water_device_out++;
 
- //                                else
 
- //                                    water_device_alarm++;
 
- //                            else if((StatusStore[i].point_list[j].dwtype=='6')
 
- //                                ||(StatusStore[i].point_list[j].dwtype==6))
 
- //                                rtu_device_out++;
 
- //                            else
 
- //                                other_device_out++;
 
- //                        }
 
- //                    }
 
- //                }
 
- //            }
 
- //        }
 
- //        fire_device_normal = fire_device_count-fire_device_out-fire_device_alarm;
 
- //        water_device_normal = water_device_count-water_device_out-water_device_alarm;
 
- //        rtu_device_normal = rtu_device_count-rtu_device_out-rtu_device_alarm;
 
- //        other_device_normal = other_device_count-other_device_out-other_device_alarm;
 
- //        total_normal = fire_device_normal+water_device_normal+rtu_device_normal+other_device_normal;
 
- //        var themecolor = ((theme=='')||(theme=='access'))?'#ffffff':'#000000';
 
- //        draw_cycle_icon('waterPie1','设备在线<br/> <br/>监控总数:<span style="color:#DDDF0D;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_count+'</span><br/>在线总数:<span style="color:#34abf5;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+(water_device_count-water_device_out)+'</span><br/>离线线总数:<span style="color:#DF5353;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_out+'<br/>在线率:',water_device_count,(water_device_count-water_device_out),themecolor);
 
- //        draw_cycle_icon('waterPie2','状态正常<br/> <br/>在线总数:<span style="color:#DDDF0D;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+(water_device_count-water_device_out)+'</span><br/>正常总数:<span style="color:#34abf5;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_normal+'</span><br/>告警总数:<span style="color:#DF5353;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+water_device_alarm+'<br/>正常率:',(water_device_count-water_device_out),water_device_normal,themecolor);
 
- //	}
 
- //}
 
- //
 
- //var draw_confirm = function(){
 
- //	var themecolor = ((theme=='')||(theme=='access'))?'#ffffff':'#000000';
 
- //	for(var i=0;i<ConfirmStore.length;i++){
 
- //		if(ConfirmStore[i].id=='water_alarm'){
 
- //			draw_cycle_icon('waterPie3','告警处理情况<br/>告警总数:<span style="color:#DDDF0D;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+ConfirmStore[i].count+'</span><br/>已处理:<span style="color:#34abf5;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+ConfirmStore[i].sum+'</span><br/>未处理:<span style="color:#DF5353;text-shadow: 1px 1px 2px #888, 0 0 0 #000">'+(ConfirmStore[i].count-ConfirmStore[i].sum)+'</span><br/>处理率:',ConfirmStore[i].count,ConfirmStore[i].sum,themecolor);
 
- //			Highcharts.chart('waterArea',{
 
- //				chart:{
 
- //					type:'area',
 
- //					backgroundColor: 'rgba(0,0,0,0)'
 
- //				},
 
- //				title:{
 
- //					text:'近期告警发生及处理情况汇总',
 
- //					style:{fontSize:'14px',color:themecolor,fontWeight:'bold'}
 
- //				},
 
- //				legend:{
 
- //					floating:true,
 
- //					itemStyle:{fontSize:'12px',color:themecolor,fontWeight:'bold'},
 
- //					x:300,
 
- //					y:(115-pieWidth)
 
- //				},
 
- //				colors:['#f66167', '#34abf5'],
 
- //                exporting: {   
 
- //                    enabled: false
 
- //                },
 
- //                credits: {
 
- //                    enabled: false
 
- //                },
 
- //				xAxis:{
 
- //					categories:ConfirmStore[i].day_list,
 
- //					tickmarkPlacement:'on',
 
- //					lineColor:'#666666',
 
- //					tickColor:'#666666',
 
- //					labels:{
 
- //						enabled:false,
 
- //						style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- //					},
 
- //					title:{
 
- //						enabled:false
 
- //					}
 
- //				},
 
- //				yAxis:{
 
- //					title:{
 
- //						text:'次',
 
- //						style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- //					},
 
- //					lineColor:'#666666',
 
- //					tickColor:'#666666',
 
- //					labels:{
 
- //						formatter:this.value,
 
- //						style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- //					}
 
- //				},
 
- //				plotOptions:{
 
- //					area:{
 
- //						stackiung:'normal',
 
- //						lineColor:'#666666',
 
- //						lineWidth:1,
 
- //						marker:{
 
- //							lineWidth:1,
 
- //							lineColor:'#666666'
 
- //						}
 
- //					}
 
- //				},
 
- //				series:[
 
- //					{
 
- //						name:'告警次数',
 
- //						data:ConfirmStore[i].count_list
 
- //					},{
 
- //						name:'处理次数',
 
- //						data:ConfirmStore[i].sum_list
 
- //					}
 
- //				]
 
- //			});
 
- //		}
 
- //	}
 
- //}
 
- //
 
- //var draw_cycle_icon = function(icon_id,name, total, num, themecolor){
 
- //    var mColor= '#34abf5';//[ '#DDDF0D','#f66167', '#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';
 
- //    $("#"+icon_id+"Title").html('<br/><br/>'+name+percent+'%');
 
- //    
 
- //    Highcharts.chart(icon_id,{
 
- //                chart: {
 
- //                    type: 'solidgauge',
 
- //                    height: '85%',
 
- //                    backgroundColor: 'rgba(0,0,0,0)',
 
- //                    reflow:true,
 
- //                    marginTop:0
 
- //                },
 
- //                title:{
 
- //                    text:percent+'%',
 
- //                    floating:true,
 
- //                    y:pieWidth/3,
 
- //                    style:{fontSize:'14px',color:themecolor,fontWeight:'bold'}
 
- //                },
 
- //                exporting: {   
 
- //                    enabled: false
 
- //                },
 
- //                credits: {
 
- //                    enabled: false
 
- //                },
 
- //                tooltip: {
 
- //                    enabled: false
 
- //                },
 
- //                pane: {
 
- //                    startAngle: -90,
 
- //                    endAngle: 180,
 
- //                    background: [{ 
 
- //                        outerRadius: '90%',
 
- //                        innerRadius: '60%',
 
- //                        backgroundColor: 'rgba(0,0,0,0)',
 
- //                        borderWidth: 0
 
- //                    }]
 
- //                },
 
- //                yAxis: {
 
- //                    min: 0,
 
- //                    max: 100,
 
- //                    lineWidth: 0,
 
- //                    tickPositions: []
 
- //                },
 
- //                plotOptions: {
 
- //                    solidgauge: {
 
- //                        dataLabels: {
 
- //                            enabled: false
 
- //                        },
 
- ////                        linecap: 'square',
 
- //                        stickyTracking: false,
 
- //                        rounded: true,
 
- //                        warp: false
 
- //                    }
 
- //                },
 
- //                series:[{
 
- //                    name:'',
 
- //                    data:[{
 
- //                    	color: Highcharts.Color(mColor)
 
- //                        .setOpacity(0.2)
 
- //                        .get(),
 
- //                        radius: '90%',
 
- //                        innerRadius: '60%',
 
- //                        y: 100
 
- //                    },{
 
- //                        color: Highcharts.Color(mColor)
 
- //                        .setOpacity(0.6)
 
- //                        .get(),
 
- //                        radius: '90%',
 
- //                        innerRadius: '60%',
 
- //                        y: percent
 
- //                    }]
 
- //                }]
 
- //            });
 
- //    if((theme=='access')||(theme=='')){
 
- //    	$('#'+icon_id).addClass('shadow_black');
 
- //    }else{
 
- //    	$('#'+icon_id).addClass('shadow_white');
 
- //    }
 
- //
 
- //}
 
- //
 
- //var draw_confirm = function(){
 
- //	var list = ConfirmStore[0].point_list;
 
- //	var ncount = ConfirmStore[0].list_count;
 
- ////	'<span id="WaterPiePanel_title_string">水系统监控设备电池电量情况</span>'
 
- //	$("#WaterPiePanel_title_string").html(ConfirmStore[0].company_name+'.水系统监控设备通信信号情况');
 
- //	var table = document.createElement("table");
 
- //	table.width="100%";
 
- //	table.border='0';
 
- //	table.style='border:0px solid #000;height:'+(pieWidth*ncount)+'px;';
 
- //	$("#waterArea").html('');
 
- //	document.getElementById("waterArea").appendChild(table);
 
- //	for(var i=0;i<ncount;i++){
 
- //		var tr = document.createElement("tr");
 
- //		tr.height=pieWidth;
 
- //		tr.border='0';
 
- //		tr.style='border:0px solid #000;height:'+(pieWidth*3)/4+'px;'
 
- //		table.appendChild(tr);
 
- //		var td = document.createElement('th');
 
- //		td.height=pieWidth;
 
- //		td.id='pie_title_'+(i+1);
 
- //		td.border='0';
 
- //		td.style='border:0px solid #000;height:'+(pieWidth*3)/4+'px;width:200px;padding:10px;'
 
- //		tr.appendChild(td);
 
- //		var td1 = document.createElement('td');
 
- //		td1.height=pieWidth;
 
- //		td1.id='pie_'+(i+1);
 
- //		td1.border='0';
 
- //		td1.style='border:0px solid #000;height:'+(pieWidth*3)/4+'px;width:'+pieWidth+'px;';
 
- //		tr.appendChild(td1);
 
- //		var td2 = document.createElement('td');
 
- //		td2.height=pieWidth;
 
- //		td2.id='area_'+(i+1);
 
- //		td2.border='0';
 
- //		td2.style='border:0px solid #000;height:'+(pieWidth*3)/4+'px;margin:30px auto 30px auto;';
 
- //		tr.appendChild(td2);
 
- //	}
 
- //	for(var i=0;i<ncount;i++){
 
- //		var point_list = list[i];
 
- //		var themecolor = ((theme=='')||(theme=='access'))?'#ffffff':'#000000';
 
- //		var mColor= '#34abf5';//[ '#DDDF0D','#f66167', '#34abf5']
 
- //		if(point_list.point_data.length==0)
 
- //			point_list.point_data='0';
 
- //	    if(point_list.point_data<3)
 
- //	        mColor = '#f66167';
 
- //	    else if(point_list.point_data<4)
 
- //	        mColor = '#DDDF0D';
 
- //		var txt = '<span style="font-weight:bold;">设备名称:</span><span>'+point_list.name+'</span>'
 
- //			+'<br/><span style="font-weight:bold;">最新数值:</span><span style="color:'+mColor+';">'+point_list.point_data+'</span>'
 
- //			+'<br/><span style="font-weight:bold;">采集时间:</span><span style="color:'+mColor+';">'+point_list.data_time+'</span>';
 
- //		$("#pie_title_"+(i+1)).html(txt);
 
- //		Highcharts.chart('pie_'+(i+1),{
 
- //            chart: {
 
- //                type: 'solidgauge',
 
- //                height: '85%',
 
- //                backgroundColor: 'rgba(0,0,0,0)',
 
- //                reflow:true,
 
- //                marginTop:0
 
- //            },
 
- //            title:{
 
- //                text:(point_list.point_data>5?5:point_list.point_data),
 
- //                floating:true,
 
- //                y:pieWidth*.35,
 
- //                style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- //            },
 
- //            exporting: {   
 
- //                enabled: false
 
- //            },
 
- //            credits: {
 
- //                enabled: false
 
- //            },
 
- //            tooltip: {
 
- //                enabled: false
 
- //            },
 
- //            pane: {
 
- //                startAngle: -90,
 
- //                endAngle: 180,
 
- //                background: [{ 
 
- //                    outerRadius: '70%',
 
- //                    innerRadius: '40%',
 
- //                    backgroundColor: 'rgba(0,0,0,0)',
 
- //                    borderWidth: 0
 
- //                }]
 
- //            },
 
- //            yAxis: {
 
- //                min: 0,
 
- //                max: 100,
 
- //                lineWidth: 0,
 
- //                tickPositions: []
 
- //            },
 
- //            plotOptions: {
 
- //                solidgauge: {
 
- //                    dataLabels: {
 
- //                        enabled: false
 
- //                    },
 
- //                    stickyTracking: false,
 
- //                    rounded: true,
 
- //                    warp: false
 
- //                }
 
- //            },
 
- //            series:[{
 
- //                name:'',
 
- //                data:[{
 
- //                	color: Highcharts.Color(mColor)
 
- //                    .setOpacity(0.2)
 
- //                    .get(),
 
- //                    radius: '70%',
 
- //                    innerRadius: '40%',
 
- //                    y: 100
 
- //                },{
 
- //                    color: Highcharts.Color(mColor)
 
- //                    .setOpacity(0.6)
 
- //                    .get(),
 
- //                    radius: '70%',
 
- //                    innerRadius: '40%',
 
- //                    y: (Number(point_list.point_data>5?5:point_list.point_data)/5)*100
 
- //                }]
 
- //            }]
 
- //        });
 
- //		Highcharts.chart('area_'+(i+1),{
 
- //			chart:{
 
- //				type:'line',
 
- //				backgroundColor: 'rgba(0,0,0,0)'
 
- //			},
 
- //			title:{
 
- ////				floating:true,
 
- //				text:point_list.name+'.通信信号数据跟踪',
 
- //				style:{fontSize:'14px',color:themecolor,fontWeight:'bold'}
 
- //			},
 
- //			legend:{
 
- ////				floating:true,
 
- //				enabled:false,
 
- //				itemStyle:{fontSize:'12px',color:themecolor,fontWeight:'bold'}
 
- //			},
 
- //			colors:[mColor],
 
- //            exporting: {   
 
- //                enabled: false
 
- //            },
 
- //            credits: {
 
- //                enabled: false
 
- //            },
 
- //			xAxis:{
 
- //				categories:point_list.time_list,
 
- //				tickmarkPlacement:'on',
 
- //				lineColor:'#666666',
 
- //				tickColor:'#666666',
 
- //				labels:{
 
- //					enabled:false,
 
- //					style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- //				},
 
- //				title:{
 
- //					enabled:false
 
- //				}
 
- //			},
 
- //			yAxis:{
 
- //				title:{
 
- //					text:'',
 
- //					style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- //				},
 
- //				lineColor:'#666666',
 
- //				tickColor:'#666666',
 
- //				labels:{
 
- //					formatter:this.value,
 
- //					style:{fontSize:'10px',color:themecolor,fontWeight:'bold'}
 
- //				}
 
- //			},
 
- //			plotOptions:{
 
- //				area:{
 
- //					stackiung:'normal',
 
- //					lineColor:'#666666',
 
- //					lineWidth:1,
 
- //					marker:{
 
- //						lineWidth:1,
 
- //						lineColor:'#666666'
 
- //					}
 
- //				}
 
- //			},
 
- //			series:[
 
- //				{
 
- //					name:'通信信号',
 
- //					data:point_list.data_list
 
- //				}
 
- //			]
 
- //		});
 
- //	}
 
- //}
 
- //
 
- //var show_datapie = function(record){
 
- //	var query = new Object();
 
- //	query.V_LOGINNAME = V_LOGINNAME;
 
- //	query.V_PASSWORD = V_PASSWORD;
 
- //	query.company_code = record.get('company_code');
 
- //	query.dwtype = '2';
 
- //	query.point_code = '3';
 
- //	$.ajax({
 
- //        type:'POST',
 
- //        url: baseUrl+"iot/data/view/getSyncDataVListByCompany",
 
- //        data: {
 
- //        	queryJson : Ext.JSON.encode(query)
 
- //    	 },
 
- //        success: function(result){
 
- //            var json = eval('(' + result + ')');
 
- //            if(json.action=='getSyncDataVListByCompany'){
 
- //            	if(json.check=='true'){
 
- //	                ConfirmStore = json.RESULT;
 
- //	                draw_confirm();
 
- //            	}else{
 
- //            		Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function(){
 
- //            			window.parent.frames.return_login();
 
- //            		});
 
- //            	}
 
- //            }
 
- //            pieMask.hide();
 
- //        }
 
- //    });
 
- //}
 
- //
 
- //var getCurrentData = function(){
 
- //	var div = Ext.getCmp('VWaterOptionListPanel');
 
- //	var model = div.getSelectionModel();
 
- //	var record = model.getSelection()[0];
 
- //	show_datapie(record);
 
- //}
 
- //
 
- //Ext.onReady(function(){  
 
- //	baseUrl = document.getElementById('basePath').value;
 
- //	theme = document.getElementById('theme').value;
 
- //	company_code = document.getElementById('company_code').value;
 
- //	V_LOGINNAME = $("#V_LOGINNAME").val();
 
- //    V_PASSWORD = $("#V_PASSWORD").val();
 
- //	var currentWidth = document.documentElement.clientWidth;
 
- //	pieWidth = currentWidth/7;
 
- //	var chkIcon = '<img src="'+baseUrl+'res/img/common/check.gif"/>'
 
- //	var unchkIcon = '<img src="'+baseUrl+'res/img/common/uncheck.gif"/>'
 
- //	var countPerPage = 20;
 
- //	var maxHeight = 10000;
 
- //	
 
- //	var chkBoolean = function(flag) {
 
- //		if(flag)
 
- //			return chkIcon;
 
- //		return unchkIcon;
 
- //	}
 
- //	var queryJson = new Object();
 
- //	queryJson.V_LOGINNAME = V_LOGINNAME;
 
- //	queryJson.V_PASSWORD =  V_PASSWORD;
 
- //	queryJson.dwtype = '2';
 
- //	queryJson.point_code = '3'
 
- //	var myStore = Ext.create('Ext.data.Store', {
 
- //	    model: 'VWaterOption',
 
- //	    pageSize: countPerPage, 
 
- //	    proxy: {
 
- //	        type: 'ajax',
 
- //	        actionMethods: {
 
- //                create : 'POST',
 
- //                read   : 'POST', // by default GET
 
- //                update : 'POST',
 
- //                destroy: 'POST'
 
- //	        },
 
- //	        url: baseUrl+'iot/data/view/getSyncStatusVListByCompany',
 
- //	        reader: {
 
- //	            type: 'json',
 
- //	            root: 'RESULT',
 
- //	            totalProperty: 'totalCount'
 
- //	        },
 
- //	        extraParams:{
 
- //	        	queryJson:Ext.JSON.encode(queryJson)
 
- //	        }
 
- //	    },
 
- //	    sorters:[{
 
- //	    	property:'time',
 
- //	    	direction:'DESC'
 
- //	    }],
 
- //	    remoteSort: true
 
- //	});
 
- //	var CompanyStory = Ext.create('Ext.data.Store',{
 
- //		model: 'CompanyComboStore',
 
- //	    proxy: {
 
- //	        type: 'ajax',
 
- //	        actionMethods: {
 
- //                create : 'POST',
 
- //                read   : 'POST', // by default GET
 
- //                update : 'POST',
 
- //                destroy: 'POST'
 
- //	        },
 
- //	        url: baseUrl+'iot/company/view/getNameList',
 
- //	        reader: {
 
- //	            type: 'json',
 
- //	            root: 'RESULT',
 
- //	            totalProperty: 'totalCount'
 
- //	        },
 
- //	        extraParams:{
 
- //	        	queryJson:Ext.JSON.encode(queryJson)
 
- //	        }
 
- //	    }
 
- //	});
 
- //	var ClztStory = Ext.create('Ext.data.Store',{
 
- //		fields:['abbr','name'],
 
- //		data:[
 
- //			{'abbr':0,'name':'未处理'},
 
- //			{'abbr':1,'name':'已处理'}
 
- //		]
 
- //	});
 
- //	var FilterForm = Ext.create('Ext.form.Panel', {
 
- //		id: 'VWaterOptionFilterForm',
 
- //		labelWidth: 55,
 
- //		defaultType: 'textfield',
 
- //		bodyPadding: 15,
 
- //		items: [{
 
- //			xtype:'combo',
 
- //			fieldLabel:'单位名称',
 
- //			id: 'ff_company_code',
 
- //			name:'ff_company_code',
 
- //			displayField : 'owner_name',  
 
- //	        valueField : 'owner_id',
 
- //	        editable : false,
 
- //	        width:330,
 
- //	        store:CompanyStory
 
- //		},{
 
- //			xtype:'combo',
 
- //			fieldLabel:'处理状态',
 
- //			id: 'ff_clzt',
 
- //			name: 'ff_clzt',
 
- //			displayField : 'name',  
 
- //	        valueField : 'abbr',
 
- //	        editable : false,
 
- //	        width:330,
 
- //	        store:ClztStory
 
- //		}],
 
- //		buttons: [{
 
- //	        text: '筛选',
 
- //	        iconCls:'ok_btn',
 
- //		    handler: function() {
 
- //		        var form = this.up('form').getForm();
 
- //		        if (form.isValid()) {
 
- //		        	var query = new Object();
 
- ////		        	var tmp = Ext.getCmp('ff_company_code');
 
- //		        	query.dwtype = '2';
 
- //		        	query.point_code = '2'
 
- //		        	if(Ext.getCmp('ff_company_code').getValue().length>0){
 
- //		        		query.company_code = Ext.getCmp('ff_company_code').getValue();
 
- //		        		$("#company_code").val(query.company_code);
 
- //		        		company_code = query.company_code;
 
- //		        		$("#WaterPiePanel_title_string").html(Ext.getCmp('ff_company_code').getRawValue( )+'.火警系统监控告警处理情况');
 
- //		        	}else{
 
- //		        		$("#company_code").val('');
 
- //		        		$("#WaterPiePanel_title_string").html('火警系统监控告警处理情况');
 
- //		        		company_code = null;
 
- //		        	}
 
- //	        		query.clzt = Ext.getCmp('ff_clzt').getValue()==null?"":Ext.getCmp('ff_clzt').getValue();
 
- //	        		query.V_LOGINNAME = V_LOGINNAME;
 
- //	        		query.V_PASSWORD =  V_PASSWORD;
 
- //	        		query.COMMSTATUS = 'NO';
 
- //		        	var jsonstr = Ext.JSON.encode(query);
 
- //		        	myStore.getProxy().extraParams = {
 
- //		        		queryJson : jsonstr
 
- //		        	};
 
- //		        	Ext.getCmp('VWaterOptionListPageToolbar').moveFirst();
 
- //		        	Ext.getCmp('ff_company_code').setValue('');
 
- //		        	Ext.getCmp('ff_clzt').setValue('');
 
- //		        	Ext.getCmp('VWaterOptionFilterWin').hide();
 
- //		        	getCurrentData();
 
- //		        }
 
- //		    }
 
- //		},{
 
- //			text: '关闭',
 
- //			iconCls: 'cancel_btn',
 
- //			handler: function() {
 
- //				Ext.getCmp('VWaterOptionFilterWin').hide();
 
- //			}
 
- //		}]
 
- //	});
 
- //	var filterwin = function() {
 
- //		Ext.create('Ext.window.Window',{
 
- //			id: 'VWaterOptionFilterWin',
 
- //			title: '水系统报告筛选',
 
- //			height: 210,
 
- //			width: 400,
 
- //			layout: 'fit',
 
- //			items: FilterForm,
 
- //			closable:false,
 
- //			modal:true,
 
- //			closeAction: 'hide'
 
- //		}).show();
 
- //		CompanyStory.reload();
 
- //	}
 
- //	var radiogroup = new Ext.create('Ext.form.RadioGroup',{
 
- //		fieldLabel:'误报',
 
- //		id:'uf_r_clwb',
 
- //		width:300,
 
- //		items:[{
 
- //			name:'uf_r_clwb',
 
- //			inputValue:'1',
 
- //			boxLabel:'是'
 
- //		},{
 
- //			name:'uf_r_clwb',
 
- //			inputValue:'0',
 
- //			boxLabel:'否',
 
- //			checked:true
 
- //		}]
 
- //	});
 
- //	var radiogroup2 = new Ext.create('Ext.form.RadioGroup',{
 
- //		fieldLabel:'处理范围',
 
- //		id:'uf_r_clfw',
 
- //		width:300,
 
- //		items:[{
 
- //			name:'uf_r_clfw',
 
- //			inputValue:'1',
 
- //			boxLabel:'批量'
 
- //		},{
 
- //			name:'uf_r_clfw',
 
- //			inputValue:'0',
 
- //			boxLabel:'单一',
 
- //			checked:true
 
- //		}]
 
- //	});
 
- //	var clear_modify_form = function(){
 
- //		Ext.getCmp('uf_company_name').setValue('');
 
- //		Ext.getCmp('uf_name').setValue('');
 
- //		Ext.getCmp('uf_device_code').setValue('');
 
- //		Ext.getCmp('uf_id').setValue('');
 
- //		Ext.getCmp('uf_status').setValue('');
 
- //		Ext.getCmp('uf_fullname').setValue('');
 
- //		Ext.getCmp('uf_clwb').setValue('');
 
- //		Ext.getCmp('uf_clr').setValue('');
 
- //		Ext.getCmp('uf_clsj').setValue('');
 
- //		Ext.getCmp('uf_clnr').setValue('');
 
- //	}
 
- //	var fireInfoForm = Ext.create('Ext.form.Panel', {
 
- //		id: 'waterInfoForm',
 
- //		labelWidth: 55,
 
- //		url: baseUrl+'iot/alarm/view/updateSj',
 
- //		defaultType: 'textfield',
 
- //		bodyPadding: 15,
 
- //		items: [{
 
- //			fieldLabel:'单位名称',
 
- //			id: 'uf_company_name',
 
- //			name: 'uf_company_name',
 
- //	        anchor:'90%'
 
- //		},{
 
- //			fieldLabel:'监控设备',
 
- //			id:'uf_name',
 
- //			name:'uf_name',
 
- //			anchor:'100%'
 
- //		},{
 
- //			fieldLabel:'设备编号',
 
- //			id:'uf_device_code',
 
- //			name:'uf_device_code',
 
- //			hidden: true
 
- //		},{
 
- //			fieldLabel:'记录编号',
 
- //			id:'uf_id',
 
- //			name:'uf_id',
 
- //			hidden: true
 
- //		},{
 
- //			fieldLabel:'设备编号',
 
- //			id:'uf_status',
 
- //			name:'uf_status',
 
- //			hidden: true
 
- //		},{
 
- //			fieldLabel:'报告信息',
 
- //			id: 'uf_fullname',
 
- //			name:'uf_fullname',
 
- //			xtype: 'textareafield',
 
- //			maxLength: 250,
 
- //			cols:4,
 
- //			anchor:'100%'
 
- //		},{
 
- //			fieldLabel:'误报',
 
- //			id: 'uf_clwb',
 
- //			name:'uf_clwb',
 
- //			maxLength: 200,
 
- //			anchor:'65%'
 
- //		},radiogroup,radiogroup2,{
 
- //			fieldLabel:'处理人',
 
- //			id: 'uf_clr',
 
- //			name:'uf_clr',
 
- //			maxLength: 120,
 
- //			anchor:'65%'
 
- //		},{
 
- //			fieldLabel:'处理时间',
 
- //			id: 'uf_clsj',
 
- //			name:'uf_clsj',
 
- //			maxLength: 200,
 
- //			anchor:'80%'
 
- //		},{
 
- //			fieldLabel:'处理内容',
 
- //			id: 'uf_clnr',
 
- //			name:'uf_clnr',
 
- //			xtype: 'textareafield',
 
- //			maxLength: 250,
 
- //			cols:4,
 
- //			anchor:'100%'
 
- //		},{
 
- //			id:'fm_queryJson',
 
- //			name:'queryJson',
 
- //			hidden:true
 
- //		}],
 
- //		buttons: [{
 
- //	        text: '处理',
 
- //	        id:'confirmBtn',
 
- //	        iconCls:'ok_btn',
 
- //		    handler: function() {
 
- //		    	var form = this.up('form').getForm();
 
- //		        if (form.isValid()) {
 
- //		        	var queryJson = new Object();
 
- //		        	queryJson.V_LOGINNAME = V_LOGINNAME;
 
- //		        	queryJson.V_PASSWORD = V_PASSWORD;
 
- //		        	queryJson.id = Ext.getCmp('uf_id').getValue();
 
- //		        	queryJson.status = Ext.getCmp('uf_status').getValue();
 
- //		        	queryJson.name = Ext.getCmp('uf_name').getValue();
 
- //		        	queryJson.device_code = Ext.getCmp('uf_device_code').getValue();
 
- //		        	queryJson.confirmAll = Ext.getCmp('uf_r_clfw').getChecked()[0].boxLabel=='单一'?'0':'1';
 
- //		        	queryJson.clwb = Ext.getCmp('uf_r_clwb').getChecked()[0].boxLabel=='否'?'0':'1';
 
- //		        	queryJson.clnr = Ext.getCmp('uf_clnr').getValue();
 
- //		        	var jsonstr = Ext.JSON.encode(queryJson);
 
- //		        	Ext.getCmp('fm_queryJson').setValue(jsonstr);
 
- //		            form.submit({
 
- //		            	method:'post',
 
- //		                success: function(form, action) {
 
- //		                   Ext.Msg.alert('操作成功', '已确认'+action.result.activerow+'条记录', function(btn,txt){
 
- //		                	   clear_modify_form();
 
- //		                	   myStore.reload();
 
- //		                	   getCurrentData();
 
- //		                   });
 
- //		                },
 
- //		                failure: function(form, action) {
 
- //		                   Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
 
- //		                	   clear_modify_form();
 
- //		                	   myStore.reload();
 
- //		                	   getCurrentData();
 
- //		                   });
 
- //		                }
 
- //		            });
 
- //		            this.up('window').close();
 
- //		        }
 
- //		    }
 
- //		},{
 
- //			text: '关闭',
 
- //			iconCls: 'cancel_btn',
 
- //			handler: function() {
 
- //				this.up('window').close();
 
- //			}
 
- //		}]
 
- //	});
 
- //	var vWaterInfoWin = Ext.create('Ext.window.Window',{
 
- //		id:'VWaterInfoWin',
 
- //		title:'详细信息: <span id="VInfoWin_Title"></span>',
 
- //		width:400,
 
- //		layout:'fit',
 
- //		closable:false,
 
- //		modal:true,
 
- //		closeAction:'hide',
 
- //		items:fireInfoForm
 
- //	});
 
- //	var showFireInfoWin = function(record){
 
- //		vWaterInfoWin.show();
 
- //		$("#VInfoWin_Title").html(record.get('data'));
 
- //		Ext.getCmp('uf_company_name').setValue(record.get('company_name'));
 
- //		Ext.getCmp('uf_name').setValue(record.get('name'));
 
- //		Ext.getCmp('uf_device_code').setValue(record.get('device_code'));
 
- //		Ext.getCmp('uf_fullname').setValue(record.get('fullname'));
 
- //		Ext.getCmp('uf_clr').setValue(record.get('clr_name'));
 
- //		Ext.getCmp('uf_clsj').setValue(record.get('clsj'));
 
- //		Ext.getCmp('uf_clnr').setValue(record.get('clnr'));
 
- //		Ext.getCmp('uf_id').setValue(record.get('id'));
 
- //		Ext.getCmp('uf_clwb').setValue(record.get('clwb')=='1'?'误报':'告警');
 
- //		Ext.getCmp('uf_status').setValue(record.get('status'));
 
- //		if(record.get('clzt')=='已处理'){
 
- //			Ext.getCmp('uf_clwb').setVisible(true);
 
- //			Ext.getCmp('uf_r_clwb').setVisible(false);
 
- //			Ext.getCmp('uf_r_clfw').setVisible(false);
 
- //			Ext.getCmp('confirmBtn').setVisible(false);
 
- //			Ext.getCmp('uf_clr').setVisible(true);
 
- //			Ext.getCmp('uf_clsj').setVisible(true);
 
- //		}else{
 
- //			Ext.getCmp('uf_clwb').setVisible(false);
 
- //			Ext.getCmp('uf_r_clwb').setVisible(true);
 
- //			Ext.getCmp('uf_r_clfw').setVisible(true);
 
- //			Ext.getCmp('confirmBtn').setVisible(true);
 
- //			Ext.getCmp('uf_clr').setVisible(false);
 
- //			Ext.getCmp('uf_clsj').setVisible(false);
 
- //		}
 
- //	}
 
- //	var WaterOptionPanel = Ext.create('Ext.grid.Panel', {
 
- //	    title: '水系统监控单位列表',
 
- //	    titleCollapse:true,
 
- //	    id: 'VWaterOptionListPanel',
 
- //	    region:'center',
 
- //	    store: myStore,
 
- //	    columns: [
 
- //	    	{ header: '序号',  dataIndex: 'id',width:50, menuDisabled:true },
 
- //	        { header: '单位名称',  dataIndex: 'company_name',width:240, menuDisabled:true },
 
- //	        { header: '详细地址', dataIndex: 'fulladdress', width:640, menuDisabled:true },
 
- //	        { header: '单位类型',  dataIndex: 'xmlx', width:100, menuDisabled:true },
 
- //	        { header: '设备数量', dataIndex: 'list_count', width:80,  menuDisabled:true }
 
- //	    ],
 
- //	    columnLines: true,
 
- //    	height: maxHeight,
 
- //	    width: '100%',
 
- //        frame: true,  
 
- //        border:false,  
 
- //        iconCls: 'icon-grid',
 
- //        listeners:{
 
- //        	 'celldblclick' : function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts){ 
 
- //        		 pieMask.show();
 
- //        		 show_datapie(record);
 
- //        	 }
 
- //        }
 
- //	});
 
- //	var piebar = Ext.create('Ext.panel.Panel',{
 
- //		id:'WaterPiePanel',
 
- //		width:'100%',
 
- //		height:pieWidth+50,
 
- //		region:'north',
 
- //		layout:'border',
 
- //		title:'<span id="WaterPiePanel_title_string">水系统监控设备通信信号情况</span>',
 
- //		defaults:{  
 
- //            border:false
 
- //        }, 
 
- //		items:[
 
- //			{
 
- //				region:'east',
 
- //				xtype:'panel',
 
- //				id:'waterArea',
 
- //				style:'overflow:auto',
 
- //				width:currentWidth
 
- //			}
 
- //		]
 
- //	});
 
- //	pieMask = new Ext.LoadMask(piebar,{msg:"Loading..."});
 
- //	new Ext.create('Ext.panel.Panel',{
 
- //		width:'100%',
 
- //		id: 'WaterAlarmPanel',
 
- //		layout:'border',
 
- //		items:[
 
- //			piebar,WaterOptionPanel
 
- //		],
 
- //	    renderTo: Ext.getBody()
 
- //	});
 
- //	pieMask.show();
 
- //	myStore.addListener('load',function(store,record,opts){
 
- //		pieMask.show();
 
- //		WaterOptionPanel.getSelectionModel().select(0,true);
 
- //		getCurrentData();
 
- //	});
 
- //	myStore.reload();
 
- //	maxHeight =  document.documentElement.clientHeight;
 
- //	Ext.getCmp('WaterAlarmPanel').setHeight(maxHeight);
 
- //
 
- //});
 
 
  |