| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737 | /** * map.js */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 sm = Ext.create('Ext.selection.CheckboxModel');var myMask;var baseUrl = "";var theme = "";var mapStyle = "";var map;var mapzoom = 11;var company_cur = 0;var StatusStore = null,    AlarmStore = null;var firstDraw = true;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 = 0var 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 wsUri = "wss://iot.usky.cn:55120";var websocket = null;var win1_config = {    title: '<table border=0><tr><td style="width:100px;overflow:hidden">火灾监控</td><td id="win1-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-12" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-11"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 100,    left: 50,    zIndex: 200,    bodyText: '<div id="win1" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_1" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_fireAlarm()"></td></tr><tr><td id="data_label_11" class="data_bar_total_label" style="width:80px;" onclick="show_all_fireAlarm()">报告总数</td><td id="data_number_11" class="data_bar_total_number" style="width:100px;" onclick="show_all_fireAlarm()"></td></tr><tr><td id="data_label_12" class="data_bar_alarm_label" onclick="show_all_fireAlarm()">待处理</td><td id="data_number_12" class="data_bar_alarm_number" onclick="show_all_fireAlarm()"></td></tr></table></div>'}var win2_config = {    title: '<table border=0><tr><td style="width:100px;overflow:hidden">电气火灾监控</td><td id="win2-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-22" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-21"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 260,    left: 50,    zIndex: 260,    bodyText: '<div id="win2" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_2" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_efireAlarm()"></td></tr><tr><td id="data_label_21" class="data_bar_total_label" style="width:80px;" onclick="show_all_efireAlarm()">报告总数</td><td id="data_number_21" class="data_bar_total_number" style="width:100px;" onclick="show_all_efireAlarm()"></td></tr><tr><td id="data_label_22" class="data_bar_alarm_label" onclick="show_all_efireAlarm()">待处理</td><td id="data_number_22" class="data_bar_alarm_number" onclick="show_all_efireAlarm()"></td></tr></table></div>'}var win3_config = {    title: '<table border=0><tr><td style="width:100px;overflow:hidden">水系统监控</td><td id="win3-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-32" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-31"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 420,    left: 50,    zIndex: 260,    bodyText: '<div id="win3" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_3" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_waterAlarm()"></td></tr><tr><td id="data_label_31" class="data_bar_total_label" style="width:80px;" onclick="show_all_waterAlarm()">报告总数</td><td id="data_number_31" class="data_bar_total_number" style="width:100px;" onclick="show_all_waterAlarm()"></td></tr><tr><td id="data_label_32" class="data_bar_alarm_label" onclick="show_all_waterAlarm()">待处理</td><td id="data_number_32" class="data_bar_alarm_number" onclick="show_all_waterAlarm()"></td></tr></table></div>'}var win4_config = {    title: '<table border=0><tr><td style="width:100px;overflow:hidden">RTU监控</td><td id="win4-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-42" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-41"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 580,    left: 50,    zIndex: 260,    bodyText: '<div id="win4" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_4" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_rtuAlarm()"></td></tr><tr><td id="data_label_41" class="data_bar_total_label" style="width:80px;" onclick="show_all_rtuAlarm()">报告总数</td><td id="data_number_41" class="data_bar_total_number" style="width:100px;" onclick="show_all_rtuAlarm()"></td></tr><tr><td id="data_label_42" class="data_bar_alarm_label" onclick="show_all_rtuAlarm()">待处理</td><td id="data_number_42" class="data_bar_alarm_number" onclick="show_all_rtuAlarm()"></td></tr></table></div>'}var dev1_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">火灾监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev1_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev1-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev1-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 219,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev1" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px"><tr><td>已处理:</td><td id="device_count_num_12" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_13" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_14" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_fireDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_14" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var dev2_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">电气火灾监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev2_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev2-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev2-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 379,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev2" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px"><tr><td>已处理:</td><td id="device_count_num_22" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_23" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_24" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_efireDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_24" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var dev3_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">水系统监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev3_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev3-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev3-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 539,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev3" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px"><tr><td>已处理:</td><td id="device_count_num_32" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_33" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_34" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_waterDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_34" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var dev4_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">RTU监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev4_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev4-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev4-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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 rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 699,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev4" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px;"><tr><td>已处理:</td><td id="device_count_num_42" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_43" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_44" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_rtuDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_44" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var alarm_alert_config = {    title: '<table border=0 style="width:320px;"><tr><td id="rt_alarm_alert_icon" style="width:24px;height:24px;"></td><td><span id="rt_alarm_alert_title" style="text-align:right;margin-left:10px;font-widght:bold;color:#31e9ff;overflow:hidden;"></span></td><td style="width:32px;color:#ffffff;cursor:pointer;text-align:left;" onclick="close_alert()"><div style="width:16px;height:16px;background-image:url(../../res/img/common/close-tmp.gif)"></div></td></tr></table>',    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: '<div><table border="0" style="border:0px solid #31e9ff;margin:5px;font-size:9px;color:#ffffff"><tr><td colspan=2 style="height:20px;"><div id="alarm_time" style="margin-top:3px;"></div><div id="alarm_company" style="margin-top:3px;"></div><div id="alarm_device" style="margin-top:3px;"></div></td></tr></table></div>'}var winypxy1_config = {    title: '<table border=0><tr><td style="width:100px;overflow:hidden">智能烟感监控</td><td id="win1-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-12" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-11"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 60,    left: 50,    zIndex: 200,    bodyText: '<div id="win1" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_1" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_fireAlarm()"></td></tr><tr><td id="data_label_11" class="data_bar_total_label" style="width:80px;" onclick="show_all_fireAlarm()">报告总数</td><td id="data_number_11" class="data_bar_total_number" style="width:100px;" onclick="show_all_fireAlarm()"></td></tr><tr><td id="data_label_12" class="data_bar_alarm_label" onclick="show_all_fireAlarm()">待处理</td><td id="data_number_12" class="data_bar_alarm_number" onclick="show_all_fireAlarm()"></td></tr></table></div>'}var devypxy1_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">智能烟感监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev1_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev1-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev1-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 179,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev1" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px"><tr><td>已处理:</td><td id="device_count_num_12" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_13" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_14" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_fireDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_14" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var winypxy2_config = {    title: '<table border=0><tr><td style="width:100px;overflow:hidden">电气火灾监控</td><td id="win2-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-22" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-21"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 220,    left: 50,    zIndex: 260,    bodyText: '<div id="win2" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_2" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_efireAlarm()"></td></tr><tr><td id="data_label_21" class="data_bar_total_label" style="width:80px;" onclick="show_all_efireAlarm()">报告总数</td><td id="data_number_21" class="data_bar_total_number" style="width:100px;" onclick="show_all_efireAlarm()"></td></tr><tr><td id="data_label_22" class="data_bar_alarm_label" onclick="show_all_efireAlarm()">待处理</td><td id="data_number_22" class="data_bar_alarm_number" onclick="show_all_efireAlarm()"></td></tr></table></div>'}var winypxy3_config = {    title: '<table border=0><tr><td style="width:100px;overflow:hidden">智能水表监控</td><td id="win3-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-32" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-31"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 380,    left: 50,    zIndex: 260,    bodyText: '<div id="win3" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_3" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_waterAlarm()"></td></tr><tr><td id="data_label_31" class="data_bar_total_label" style="width:80px;" onclick="show_all_waterAlarm()">报告总数</td><td id="data_number_31" class="data_bar_total_number" style="width:100px;" onclick="show_all_waterAlarm()"></td></tr><tr><td id="data_label_32" class="data_bar_alarm_label" onclick="show_all_waterAlarm()">待处理</td><td id="data_number_32" class="data_bar_alarm_number" onclick="show_all_waterAlarm()"></td></tr></table></div>'}var winypxy4_config = {    title: '<table border=0><tr><td style="width:140px;overflow:hidden">智能消火栓监控</td><td id="win4-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-42" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-41"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 540,    left: 50,    zIndex: 260,    bodyText: '<div id="win4" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_4" rowspan=3 style="width:110px; height:110px; margin-top:-10px;" onclick="show_all_waterAlarm()"></td></tr><tr><td id="data_label_41" class="data_bar_total_label" style="width:80px;" onclick="show_all_waterAlarm()">报告总数</td><td id="data_number_41" class="data_bar_total_number" style="width:100px;" onclick="show_all_waterAlarm()"></td></tr><tr><td id="data_label_42" class="data_bar_alarm_label" onclick="show_all_waterAlarm()">待处理</td><td id="data_number_42" class="data_bar_alarm_number" onclick="show_all_waterAlarm()"></td></tr></table></div>'}var winypxy5_config = {    title: '<table border=0><tr><td style="width:140px;overflow:hidden">智能井盖监控</td><td id="win5-title-hiden" style="display:none;font-size:9px;font-weight:normal;margin-top:3px;"><span style="width:40px;text-align:right;overflow:hidden;">总数:</span><span id="title-label-52" style="color:#31e9ff;display:inline-block;width:50px;text-align:left;"></span><span style="display:inline-block;width:50px;text-align:right;">处置率:</span><span id="title-label-51"></span></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 120,    top: 700,    left: 50,    zIndex: 260,    bodyText: '<div id="win5" style="margin-top:-20px;"><table border="0" style="border:0px solid #000;"><tr><td colspan=2 style="height:20px;"></td><td id="data_pie_5" rowspan=3 style="width:110px; height:110px; margin-top:-10px;"></td></tr><tr><td id="data_label_51" class="data_bar_total_label" style="width:80px;">报告总数</td><td id="data_number_51" class="data_bar_total_number" style="width:100px;"></td></tr><tr><td id="data_label_52" class="data_bar_alarm_label">待处理</td><td id="data_number_52" class="data_bar_alarm_number"></td></tr></table></div>'}var devypxy2_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">电气火灾监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev2_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev2-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev2-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 339,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev2" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px"><tr><td>已处理:</td><td id="device_count_num_22" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_23" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_24" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_efireDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_24" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var devypxy3_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">智能水表监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev3_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev3-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev3-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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  rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 499,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev3" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px"><tr><td>已处理:</td><td id="device_count_num_32" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_33" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_34" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_waterDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_34" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var devypxy4_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">智能消火栓监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev4_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev4-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev4-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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 rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 659,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev4" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px;"><tr><td>已处理:</td><td id="device_count_num_42" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_43" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_44" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;" onclick="show_all_waterDevice()"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_44" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var devypxy5_config = {    title: '<table><tr><td style="width:145px;overflow:hidden;font-weight:bold;">智能井盖监控设备</td><td><table border=0 style="font-weight:normal;font-size:9px;margin-top:3px;"><tr><td><div style="width:45px;text-align:right;">设备数:</div></td><td><div id="dev5_count" style="color:#31e9ff;width:30px;"></div></td><td><div id="dev5-title-hiden" style="display:none;font-size:9px;text-align:right;">待处理:</div></td><td><div id="dev5-label-hidden" style="display:none;"></div></td></tr></table></td></tr></table>',    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 rgba(0,123,255,0.3)',    borderRadius: '10px',    position: 'absolute',    width: 320,    height: 100,    top: 819,    left: 50,    zIndex: 200,    floding: 'true',    bodyText: '<div id="dev5" style="font-size:9px;font-weight:normal;"><table border="0" style="border:0px solid #000;width:300px;"><tr><td>已处理:</td><td id="device_count_num_52" class="device_confirm_num1"></td><td>待处理:</td><td id="device_count_num_53" class="device_confirm_num2"></td><td>处置率:</td><td id="device_count_num_54" class="device_confirm_num3"></td></tr><tr><td colspan=6 style="height:28px;"><div style="border:0px solid #000;border-radius:3px;width:300px;height:6px;background-color:rgba(255,255,255,0.1);"><div id="device_confirm_54" style="border:0px solid #00a7d1;margin:0px;padding:0px;border-radius:3px;height:6px;width:300px;background-color:#00a7d1"></div></div></td></tr></table></div>'}var close_alert = function() {    removeDIV("rt_alarm_alert");}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();        };        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 Icon = document.createElement('img');                Icon.width = '32';                Icon.height = '32';                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 = "";                document.getElementById("rt_alarm_alert_icon").appendChild(Icon);                document.getElementById("rt_alarm_alert_title").innerHTML = jData.evtname;                document.getElementById("alarm_time").innerHTML = jData.time;                document.getElementById("alarm_company").innerHTML = jData.company;                document.getElementById("alarm_device").innerHTML = jData.devicename;                alarm_alert.show();                $("#rt_alarm_alert").animate({                    bottom: '0px'                });            }        };        websocket.onerror = function(evt) {            console.log("Error:", evt.data);            (function() {})()        };    } catch (exception) {        console.log("Exception:", exception);        (function() {})()    }}var toDecimal = function(x) {    var f = parseFloat(x);    if (isNaN(f)) {        return;    }    f = Math.round(x * 100) / 100;    return f;}var bigger_mouseover = function() {    $("#map_btn_bigger").removeClass('map_btn_bigger_off');    $("#map_btn_bigger").addClass('map_btn_bigger_on');}var bigger_mouseout = function() {    $("#map_btn_bigger").removeClass('map_btn_bigger_on');    $("#map_btn_bigger").addClass('map_btn_bigger_off');}var bigger_click = function() {    map.zoomIn();}var smaller_mouseover = function() {    $("#map_btn_smaller").removeClass('map_btn_smaller_off');    $("#map_btn_smaller").addClass('map_btn_smaller_on');}var smaller_mouseout = function() {    $("#map_btn_smaller").removeClass('map_btn_smaller_on');    $("#map_btn_smaller").addClass('map_btn_smaller_off');}var smaller_click = function() {    map.zoomOut();}var shower_mouseover = function() {    if (!LabelShow) {        $("#map_btn_showlaebl").removeClass('map_btn_showlaebl_off');        $("#map_btn_showlaebl").addClass('map_btn_showlaebl_on');    }}var shower_mouseout = function() {    if (!LabelShow) {        $("#map_btn_showlaebl").removeClass('map_btn_showlaebl_on');        $("#map_btn_showlaebl").addClass('map_btn_showlaebl_off');    }}var shower_click = function() {    LabelShow = !LabelShow;    if (LabelShow) {        $("#map_btn_showlaebl").removeClass('map_btn_showlaebl_on');        $("#map_btn_showlaebl").addClass('map_btn_hidelabel');        $(".info").removeClass('hiden');        $(".info").addClass('shown');    } else {        $("#map_btn_showlaebl").removeClass('map_btn_hidelabel');        $("#map_btn_showlaebl").addClass('map_btn_showlaebl_on');        $(".info").removeClass('shown');        $(".info").addClass('hiden');    }}var left_mouseover = function() {    $("#map_btn_left").removeClass('map_btn_left_off');    $("#map_btn_left").addClass('map_btn_left_on');}var left_mouseout = function() {    $("#map_btn_left").removeClass('map_btn_left_on');    $("#map_btn_left").addClass('map_btn_left_off');}var left_click = function() {    rotation = map.getRotation();    rotation -= 5;    if (rotation < 0)        rotation = 360 + rotation;    map.setRotation(rotation);    draw_all();}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 right_click = function() {    rotation = map.getRotation();    rotation += 5;    if (rotation > 360)        rotation = rotation - 360;    map.setRotation(rotation);    draw_all();}var higher_mouseover = function() {    $("#map_btn_high").removeClass('map_btn_high_off');    $("#map_btn_high").addClass('map_btn_high_on');}var higher_mouseout = function() {    $("#map_btn_high").removeClass('map_btn_high_on');    $("#map_btn_high").addClass('map_btn_high_off');}var higher_click = function() {    var pitch = map.getPitch();    pitch -= 5;    if (pitch < 0)        pitch = 0;    map.setPitch(pitch);}var lower_mouseover = function() {    $("#map_btn_low").removeClass('map_btn_low_off');    $("#map_btn_low").addClass('map_btn_low_on');}var lower_mouseout = function() {    $("#map_btn_low").removeClass('map_btn_low_on');    $("#map_btn_low").addClass('map_btn_low_off');}var lower_click = function() {    var pitch = map.getPitch();    pitch += 5;    if (pitch > 83)        pitch = 83;    map.setPitch(pitch);}var clear_search = function() {    SearchList = null    show_list_cur = 0;    $("#fp_backbtn").css("display", "none");    firstDraw = true;    if ($("#search_company").val().length > 0) {        $("#search_company").val('');        $("#company_code").val('');        $("#saerch_company_list").html('');    }    if ((!LabelShow) && (StatusStore.length > 0)) {        for (var i = 0; i < StatusStore.length; i++) {            $("#label_" + StatusStore[i].company_code).css('display', 'none');        }    }}var update_companyList = function() {    $("#saerch_company_list").html('');    SearchList = null    show_list_cur = 0;    if ($("#search_company").val().length > 0) {        var query = new Object();        query.V_LOGINNAME = V_LOGINNAME;        query.V_PASSWORD = V_PASSWORD;        query.V_COMPANY_NAME = $("#search_company").val();        $.ajax({            type: 'POST',            url: baseUrl + "/iot/company/getList",            data: {                queryJson: Ext.JSON.encode(query),                sort: "[{property:'V_COMPANY_NAME',direction:'ASC'}]"            },            success: function(result) {                var json = eval('(' + result + ')');                if (json.action == 'getCompanyList') {                    var list = json.RESULT;                    if (list.length > 0) {                        SearchList = list;                        var saerch_company_list = document.getElementById('saerch_company_list');                        var table = document.createElement('table');                        table.border = '0';                        table.style.width = '300px';                        table.style.border = '0px solid #000';                        saerch_company_list.appendChild(table);                        for (var i = 0; i < list.length; i++) {                            var tr = document.createElement('tr');                            tr.style.border = '0px solid #000';                            table.appendChild(tr);                            var td = document.createElement('td');                            td.id = 'company_code_list_' + list[i].V_COMPANY_CODE;                            td.company_code = list[i].V_COMPANY_CODE;                            td.style.border = '1px solid rgba(255,255,255,0.0)';                            td.style.background = 'rgba(255,255,255,0.3)';                            td.style.fontSize = '14px';                            td.style.cursor = "pointer";                            td.innerHTML = list[i].V_COMPANY_NAME;                            tr.appendChild(td);                            $("#company_code_list_" + list[i].V_COMPANY_CODE).mouseover(function() {                                $(this).css({ "border": "1px solid rgba(64,85,98,0.7)", "background": "rgba(64,85,98,0.7)", "color": "#ffff00", "cursor": "pointer", "font-size": "14px" });                                $("#label_" + this.company_code).css('display', 'block');                                show_list_cur = i + 1;                            });                            $("#company_code_list_" + list[i].V_COMPANY_CODE).mouseout(function() {                                $(this).css({ "border": "1px solid rgba(255,255,255,0.0)", "background": "rgba(255,255,255,0.3)", "color": "#ffffff", "cursor": "pointer", "font-size": "14px" });                                if (!LabelShow)                                    $("#label_" + this.company_code).css('display', 'none');                            });                            $("#company_code_list_" + list[i].V_COMPANY_CODE).click(function(e) {                                showBuilding(this.company_code);                            });                        }                    }                }            }        });    }}var key_fun = function(event) {    var x = (navigator.appname == "Netscape") ? event.which : window.event.keyCode;    if (x == 38) {        if (SearchList != null) {            if ((show_list_cur > 0) && (show_list_cur <= SearchList.length)) {                show_list_cur--;                for (var i = 0; i < SearchList.length; i++) {                    $("#company_code_list_" + SearchList[i].V_COMPANY_CODE).css({ "border": "1px solid rgba(255,255,255,0.0)", "background": "rgba(255,255,255,0.3)", "color": "#ffffff", "cursor": "pointer", "font-size": "14px" });                    var div = document.getElementById("label_" + SearchList[i].V_COMPANY_CODE);                    if (!LabelShow) {                        if (div != undefined)                            div.style.display = 'none';                    }                    if (i == (show_list_cur - 1)) {                        $("#company_code_list_" + SearchList[i].V_COMPANY_CODE).css({ "border": "1px solid rgba(64,85,98,0.7)", "background": "rgba(64,85,98,0.7)", "color": "#ffff00", "cursor": "pointer", "font-size": "14px" });                        if (div != undefined)                            div.style.display = 'block';                    }                }            }        }    } else if (x == 40) {        if (SearchList != null) {            if ((show_list_cur >= 0) && (show_list_cur < SearchList.length)) {                show_list_cur++;                for (var i = 0; i < SearchList.length; i++) {                    $("#company_code_list_" + SearchList[i].V_COMPANY_CODE).css({ "border": "1px solid rgba(255,255,255,0.0)", "background": "rgba(255,255,255,0.3)", "color": "#ffffff", "cursor": "pointer", "font-size": "14px" });                    var div = document.getElementById("label_" + SearchList[i].V_COMPANY_CODE);                    if (!LabelShow) {                        if (div != undefined)                            div.style.display = 'none';                    }                    if (i == (show_list_cur - 1)) {                        $("#company_code_list_" + SearchList[i].V_COMPANY_CODE).css({ "border": "1px solid rgba(64,85,98,0.7)", "background": "rgba(64,85,98,0.7)", "color": "#ffff00", "cursor": "pointer", "font-size": "14px" });                        if (div != undefined)                            div.style.display = 'block';                    }                }            }        }    } else if (x == 13) {        if (SearchList != null) {            if ((show_list_cur >= 0) && (show_list_cur <= SearchList.length)) {                showBuilding(SearchList[show_list_cur - 1].V_COMPANY_CODE);            }        }    } else if (x == 27) {        clear_search();    }}var chk_lat = function(lat) {    if (lat < 30)        return false;    if (lat > 32)        return false;    return true;}var chk_lng = function(lng) {    if (lng < 110)        return false;    if (lng > 135)        return false;    return true;}var showBuilding = function(company_code) {    if ((StatusStore != null) && (StatusStore.length > 0)) {        for (var i = 0; i < StatusStore.length; i++) {            if (StatusStore[i].company_code == company_code) {                map.setCenter(new AMap.LngLat(StatusStore[i].lng, StatusStore[i].lat, true));                map.setPitch(83);                map.setZoom(18);                $("#data_number_11").html(StatusStore[i].d1a);                $("#data_number_12").html(StatusStore[i].d1a - StatusStore[i].d1ac);                $("#data_number_21").html(StatusStore[i].d7a);                $("#data_number_22").html(StatusStore[i].d7a - StatusStore[i].d7ac);                $("#data_number_31").html(StatusStore[i].d2a);                $("#data_number_32").html(StatusStore[i].d2a - StatusStore[i].d2ac);                if (V_LOGINNAME == 'ypxy') {                    var query = new Object();                    query.V_LOGINNAME = V_LOGINNAME;                    query.V_PASSWORD = V_PASSWORD;                    query.dwtype = '2';                    query.COMMSTATUS = 'NO';                    if ((company_code != null) && (company_code != 'null') && (company_code.length > 0))                        query.company_code = company_code;                    $.ajax({                        type: 'POST',                        url: baseUrl + "iot/alarm/view/getConfirmStatusByDays",                        data: {                            queryJson: Ext.JSON.encode(query)                        },                        success: function(result) {                            var json = eval('(' + result + ')');                            if (json.action == 'getConfirmStatusByDays') {                                if (json.check == 'true') {                                    ConfirmStore = json.RESULT;                                    if (json.company_name != null)                                        companyName = json.company_name;                                    else                                        companyName = null;                                    for (var i = 0; i < ConfirmStore.length; i++) {                                        if (ConfirmStore[i].id == 'water_alarm') {                                            $("#data_number_41").html(ConfirmStore[i].count);                                            $("#data_number_42").html(ConfirmStore[i].count - ConfirmStore[i].sum);                                            draw_pie('data_pie_4', ConfirmStore[i].count, ConfirmStore[i].sum);                                            //							        		$("#device_count_num_41").html(StatusStore[i].d6);                                            $("#device_count_num_42").html(ConfirmStore[i].count);                                            $("#device_count_num_43").html(ConfirmStore[i].count - ConfirmStore[i].sum);                                            if (ConfirmStore[i].count == 0)                                                $("#device_count_num_44").html('100%');                                            else                                                $("#device_count_num_44").html(toDecimal(ConfirmStore[i].sum * 100 / ConfirmStore[i].count) + '%');                                            if (ConfirmStore[i].count != 0)                                                $("#device_confirm_44").css('width', (280 * ConfirmStore[i].sum / ConfirmStore[i].count) + 'px');                                            else                                                $("#device_confirm_44").css('width', '280px');                                            $("#data_number_51").html(0);                                            $("#data_number_52").html(0);                                            draw_pie('data_pie_5', 0, 0);                                            $("#device_count_num_52").html(0);                                            $("#device_count_num_53").html(0);                                            $("#device_count_num_54").html('100%');                                            $("#device_confirm_54").css('width', '280px');                                        }                                    }                                } else {                                    Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function() {                                        window.parent.document.location = baseUrl;                                    });                                }                            }                        }                    });                } else {                    $("#data_number_41").html(StatusStore[i].d6a);                    $("#data_number_42").html(StatusStore[i].d6a - StatusStore[i].d6ac);                    draw_pie('data_pie_4', StatusStore[i].d6a, StatusStore[i].d6ac);                    $("#device_count_num_41").html(StatusStore[i].d6);                    $("#device_count_num_42").html(StatusStore[i].d6oc);                    $("#device_count_num_43").html(StatusStore[i].d6o - StatusStore[i].d6oc);                    if (StatusStore[i].d6o == 0)                        $("#device_count_num_44").html('100%');                    else                        $("#device_count_num_44").html(toDecimal(StatusStore[i].d6oc * 100 / StatusStore[i].d6o) + '%');                    if (StatusStore[i].d6o != 0)                        $("#device_confirm_44").css('width', (280 * StatusStore[i].d6oc / StatusStore[i].d6o) + 'px');                    else                        $("#device_confirm_44").css('width', '280px');                }                draw_pie('data_pie_1', StatusStore[i].d1a, StatusStore[i].d1ac);                draw_pie('data_pie_2', StatusStore[i].d7a, StatusStore[i].d7ac);                draw_pie('data_pie_3', StatusStore[i].d2a, StatusStore[i].d2ac);                $("#device_count_num_11").html(StatusStore[i].d1);                $("#device_count_num_12").html(StatusStore[i].d1oc);                $("#device_count_num_13").html(StatusStore[i].d1o - StatusStore[i].d1oc);                if (StatusStore[i].d1o == 0)                    $("#device_count_num_14").html('100%');                else                    $("#device_count_num_14").html(toDecimal(StatusStore[i].d1oc * 100 / StatusStore[i].d1o) + '%');                $("#device_count_num_21").html(StatusStore[i].d7);                $("#device_count_num_22").html(StatusStore[i].d7oc);                $("#device_count_num_23").html(StatusStore[i].d7o - StatusStore[i].d7oc);                if (StatusStore[i].d7o == 0)                    $("#device_count_num_24").html('100%');                else                    $("#device_count_num_24").html(toDecimal(StatusStore[i].d7oc * 100 / StatusStore[i].d7o) + '%');                $("#device_count_num_31").html(StatusStore[i].d2);                $("#device_count_num_32").html(StatusStore[i].d2oc);                $("#device_count_num_33").html(StatusStore[i].d2o - StatusStore[i].d2oc);                if (StatusStore[i].d2o == 0)                    $("#device_count_num_34").html('100%');                else                    $("#device_count_num_34").html(toDecimal(StatusStore[i].d2oc * 100 / StatusStore[i].d2o) + '%');                if (StatusStore[i].d1o != 0) {                    $("#device_confirm_14").css('width', (280 * StatusStore[i].d1oc / StatusStore[i].d1o) + 'px');                } else                    $("#device_confirm_14").css('width', '280px');                if (StatusStore[i].d7o != 0)                    $("#device_confirm_24").css('width', (280 * StatusStore[i].d7oc / StatusStore[i].d7o) + 'px');                else                    $("#device_confirm_24").css('width', '280px');                if (StatusStore[i].d2o != 0)                    $("#device_confirm_34").css('width', (280 * StatusStore[i].d2oc / StatusStore[i].d2o) + 'px');                else                    $("#device_confirm_34").css('width', '280px');                $("#label_" + company_code).css('display', 'block');                break;            }        }    }}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 parent = document.getElementById('container');    if (detail_info != undefined) {        parent.removeChild(detail_info);        current_company_code = "";        for (var i = 0; i < StatusStore.length; i++) {            var obj = StatusStore[i];            d1 += obj.d1;            d1o += obj.d1o;            d1a += obj.d1a;            d1oc += obj.d1oc;            d1ac += obj.d1ac;            d2 += obj.d2;            d2o += obj.d2o;            d2a += obj.d2a;            d2oc += obj.d2oc;            d2ac += obj.d2ac;            d6 += obj.d6;            d6o += obj.d6o;            d6a += obj.d6a;            d6oc += obj.d6oc;            d6ac += obj.d6ac;            d7 += obj.d7;            d7o += obj.d7o;            d7a += obj.d7a;            d7oc += obj.d7oc;            d7ac += obj.d7ac;        }        $("#data_number_11").html(d1a);        $("#data_number_12").html(d1a - d1ac);        $("#data_number_21").html(d7a);        $("#data_number_22").html(d7a - d7ac);        $("#data_number_31").html(d2a);        $("#data_number_32").html(d2a - d2ac);        if (V_LOGINNAME == 'ypxy') {            var query = new Object();            query.V_LOGINNAME = V_LOGINNAME;            query.V_PASSWORD = V_PASSWORD;            query.dwtype = '2';            query.COMMSTATUS = 'NO';            if ((company_code != null) && (company_code != 'null') && (company_code.length > 0))                query.company_code = company_code;            $.ajax({                type: 'POST',                url: baseUrl + "iot/alarm/view/getConfirmStatusByDays",                data: {                    queryJson: Ext.JSON.encode(query)                },                success: function(result) {                    var json = eval('(' + result + ')');                    if (json.action == 'getConfirmStatusByDays') {                        if (json.check == 'true') {                            ConfirmStore = json.RESULT;                            if (json.company_name != null)                                companyName = json.company_name;                            else                                companyName = null;                            for (var i = 0; i < ConfirmStore.length; i++) {                                if (ConfirmStore[i].id == 'water_alarm') {                                    $("#data_number_41").html(ConfirmStore[i].count);                                    $("#data_number_42").html(ConfirmStore[i].count - ConfirmStore[i].sum);                                    draw_pie('data_pie_4', ConfirmStore[i].count, ConfirmStore[i].sum);                                    //					        		$("#device_count_num_41").html(StatusStore[i].d6);                                    $("#device_count_num_42").html(ConfirmStore[i].count);                                    $("#device_count_num_43").html(ConfirmStore[i].count - ConfirmStore[i].sum);                                    if (ConfirmStore[i].count == 0)                                        $("#device_count_num_44").html('100%');                                    else                                        $("#device_count_num_44").html(toDecimal(ConfirmStore[i].sum * 100 / ConfirmStore[i].count) + '%');                                    if (ConfirmStore[i].count != 0)                                        $("#device_confirm_44").css('width', (280 * ConfirmStore[i].sum / ConfirmStore[i].count) + 'px');                                    else                                        $("#device_confirm_44").css('width', '280px');                                    $("#data_number_51").html(0);                                    $("#data_number_52").html(0);                                    draw_pie('data_pie_5', 0, 0);                                    $("#device_count_num_52").html(0);                                    $("#device_count_num_53").html(0);                                    $("#device_count_num_54").html('100%');                                    $("#device_confirm_54").css('width', '280px');                                }                            }                        } else {                            Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function() {                                window.parent.document.location = baseUrl;                            });                        }                    }                }            });        } else {            $("#data_number_41").html(d6a);            $("#data_number_42").html(d6a - d6ac);            draw_pie('data_pie_4', d6a, d6ac);            $("#device_count_num_41").html(d6);            $("#device_count_num_42").html(d6oc);            $("#device_count_num_43").html(d6o - d6oc);            if (d6o == 0)                $("#device_count_num_44").html('100%');            else                $("#device_count_num_44").html(toDecimal(d6oc * 100 / d6o) + '%');            if (d6o != 0)                $("#device_confirm_44").css('width', (280 * d6oc / d6o) + 'px');            else                $("#device_confirm_44").css('width', '280px');        }        draw_pie('data_pie_1', d1a, d1ac);        draw_pie('data_pie_2', d7a, d7ac);        draw_pie('data_pie_3', d2a, d2ac);        $("#device_count_num_11").html(d1);        $("#device_count_num_12").html(d1oc);        $("#device_count_num_13").html(d1o - d1oc);        if (d1o == 0)            $("#device_count_num_14").html('100%');        else            $("#device_count_num_14").html(toDecimal(d1oc * 100 / d1o) + '%');        $("#device_count_num_21").html(d7);        $("#device_count_num_22").html(d7oc);        $("#device_count_num_23").html(d7o - d7oc);        if (d7o == 0)            $("#device_count_num_24").html('100%');        else            $("#device_count_num_24").html(toDecimal(d7oc * 100 / d7o) + '%');        $("#device_count_num_31").html(d2);        $("#device_count_num_32").html(d2oc);        $("#device_count_num_33").html(d2o - d2oc);        if (d2o == 0)            $("#device_count_num_34").html('100%');        else            $("#device_count_num_34").html(toDecimal(d2oc * 100 / d2o) + '%');        if (d1o != 0) {            $("#device_confirm_14").css('width', (280 * d1oc / d1o) + 'px');        } else            $("#device_confirm_14").css('width', '280px');        if (d7o != 0)            $("#device_confirm_24").css('width', (280 * d7oc / d7o) + 'px');        else            $("#device_confirm_24").css('width', '280px');        if (d2o != 0)            $("#device_confirm_34").css('width', (280 * d2oc / d2o) + 'px');        else            $("#device_confirm_34").css('width', '280px');        $(".alarm_tab_area").remove();        if ((AlarmStore != null) && (AlarmStore.length > 0)) {            var parent = document.getElementById('container');            AlarmStore.sort(alarmSortByTime);            var area = document.createElement('div');            area.id = 'alarm_tab_area';            area.setAttribute('class', 'alarm_tab_area');            parent.appendChild(area);            for (var i = 0; i < AlarmStore.length; i++) {                if (i >= 6)                    break;                var tab = document.createElement('div');                tab.id = 'alarm_tab_' + (i + 1);                tab.setAttribute('class', 'alarm_tab');                tab.setAttribute('onclick', (AlarmStore[i].dwtype == 1) ? 'show_all_fireAlarm()' :                    (AlarmStore[i].dwtype == 2) ? 'show_all_waterAlarm()' :                    (AlarmStore[i].dwtype == 5) ? 'show_all_waterAlarm()' :                    (AlarmStore[i].dwtype == 6) ? 'show_all_rtuAlarm()' :                    (AlarmStore[i].dwtype == 7) ? 'show_all_efireAlarm()' : '#');                tab.style.top = (120 * i) + 'px';                if (($(document).innerHeight() - 205) > (120 * (i + 1)))                    $('#alarm_tab_area').css('height', ($(document).innerHeight() - 205) + 'px');                else                    $('#alarm_tab_area').css('height', ($(document).innerHeight() - 205) + 'px');                area.appendChild(tab);                var title = document.createElement('div');                title.id = 'alarm_tab_title_' + (i + 1);                title.setAttribute('class', 'alarm_tab_title');                title.innerHTML = (AlarmStore[i].dwtype == 1) ? '火警监测报告' :                    (AlarmStore[i].dwtype == 2) ? '水系统监测报告' :                    (AlarmStore[i].dwtype == 5) ? '水系统监测报告' :                    (AlarmStore[i].dwtype == 6) ? 'RTU监测报告' :                    (AlarmStore[i].dwtype == 7) ? '电气火灾监测报告' : '其他报告';                tab.appendChild(title);                var time_label = document.createElement('div');                time_label.id = 'alarm_tab_time_' + (i + 1);                time_label.setAttribute('class', 'alarm_tab_time');                time_label.innerHTML = AlarmStore[i].time;                tab.appendChild(time_label);                var data = document.createElement('div');                data.id = "alarm_tab_data_" + (i + 1);                data.setAttribute('class', 'alarm_tab_data');                data.innerHTML = AlarmStore[i].company_name + ' ' + AlarmStore[i].data;                tab.appendChild(data);                var icon = document.createElement('img');                icon.setAttribute('class', 'alarm_tab_icon');                icon.height = '66';                icon.width = '66';                icon.src = baseUrl + 'res/img/icons/' + ((AlarmStore[i].dwtype == 1) ? 'alarm_tab_01.gif' :                    (AlarmStore[i].dwtype == 2) ? 'alarm_tab_03.gif' :                    (AlarmStore[i].dwtype == 5) ? 'alarm_tab_03.gif' :                    (AlarmStore[i].dwtype == 6) ? 'alarm_tab_04.gif' :                    (AlarmStore[i].dwtype == 7) ? 'alarm_tab_02.gif' : 'alarm_tab_04.gif');                //				var icon = document.createElement('div');                //				icon.id = "alarm_tab_icon_"+(i+1);                //				icon.setAttribute('class',(AlarmStore[i].dwtype==1)?'alarm_tab_icon alarm_icon_01':                //					(AlarmStore[i].dwtype==2)?'alarm_tab_icon alarm_icon_03':                //						(AlarmStore[i].dwtype==5)?'alarm_tab_icon alarm_icon_03':                //							(AlarmStore[i].dwtype==6)?'alarm_tab_icon alarm_icon_04':                //								(AlarmStore[i].dwtype==7)?'alarm_tab_icon alarm_icon_02':'alarm_tab_icon alarm_icon_04');                tab.appendChild(icon);            }        }    }}var showInfo = function(e) {    var pixel = e.pixel;    var company_code = e.target.getExtData().company_code;    var detail_info;    var parent = document.getElementById('container')    for (var i = 0; i < StatusStore.length; i++) {        if (StatusStore[i].company_code == company_code) {            if (current_company_code == company_code)                return;            clear_detail_info();            current_company_code = company_code;            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://aiot.usky.cn:8443/YtIoT/cgi-bin/WebAction2.cgi';            $.ajax({                type: 'POST',                url: qurl,                data: qdata,                success: function(result) {                    var json = eval('(' + result + ')');                    if (json.action == 'getAlarmList') {                        $(".alarm_tab_area").remove();                        if ((json.ALARM == undefined) || (json.ALARM.length == 0))                            return;                        var parent = document.getElementById('container');                        json.ALARM.sort(alarmSortByTime);                        var area = document.createElement('div');                        area.id = 'alarm_tab_area';                        area.setAttribute('class', 'alarm_tab_area');                        parent.appendChild(area);                        for (var i = 0; i < json.ALARM.length; i++) {                            if (i >= 6)                                break;                            var tab = document.createElement('div');                            tab.id = 'alarm_tab_' + (i + 1);                            tab.setAttribute('class', 'alarm_tab');                            tab.setAttribute('onclick', (json.ALARM[i].dwtype == 1) ? 'show_all_fireAlarm()' :                                (AlarmStore[i].dwtype == 2) ? 'show_all_waterAlarm()' :                                (AlarmStore[i].dwtype == 5) ? 'show_all_waterAlarm()' :                                (AlarmStore[i].dwtype == 6) ? 'show_all_rtuAlarm()' :                                (AlarmStore[i].dwtype == 7) ? 'show_all_efireAlarm()' : '#');                            tab.style.top = (120 * i) + 'px';                            if (($(document).innerHeight() - 205) > (120 * (i + 1)))                                $('#alarm_tab_area').css('height', ($(document).innerHeight() - 205) + 'px');                            else                                $('#alarm_tab_area').css('height', ($(document).innerHeight() - 205) + 'px');                            area.appendChild(tab);                            var title = document.createElement('div');                            title.id = 'alarm_tab_title_' + (i + 1);                            title.setAttribute('class', 'alarm_tab_title');                            title.innerHTML = (json.ALARM[i].dwtype == 1) ? '火警监测报告' :                                (json.ALARM[i].dwtype == 2) ? '水系统监测报告' :                                (json.ALARM[i].dwtype == 5) ? '水系统监测报告' :                                (json.ALARM[i].dwtype == 6) ? 'RTU监测报告' :                                (json.ALARM[i].dwtype == 7) ? '电气火灾监测报告' : '其他报告';                            tab.appendChild(title);                            var time_label = document.createElement('div');                            time_label.id = 'alarm_tab_time_' + (i + 1);                            time_label.setAttribute('class', 'alarm_tab_time');                            time_label.innerHTML = json.ALARM[i].time;                            tab.appendChild(time_label);                            var data = document.createElement('div');                            data.id = "alarm_tab_data_" + (i + 1);                            data.setAttribute('class', 'alarm_tab_data');                            data.innerHTML = json.ALARM[i].company_name + ' ' + json.ALARM[i].data;                            tab.appendChild(data);                            var icon = document.createElement('img');                            icon.setAttribute('class', 'alarm_tab_icon');                            icon.height = '66';                            icon.width = '66';                            icon.src = baseUrl + 'res/img/icons/' + ((json.ALARM[i].dwtype == 1) ? 'alarm_tab_01.gif' :                                (json.ALARM[i].dwtype == 2) ? 'alarm_tab_03.gif' :                                (json.ALARM[i].dwtype == 5) ? 'alarm_tab_03.gif' :                                (json.ALARM[i].dwtype == 6) ? 'alarm_tab_04.gif' :                                (json.ALARM[i].dwtype == 7) ? 'alarm_tab_02.gif' : 'alarm_tab_04.gif');                            tab.appendChild(icon);                        }                    }                }            });            detail_info = document.createElement('div');            detail_info.id = 'detail_info';            detail_info.style.position = 'absolute';            detail_info.style.top = (pixel.getY() - 270) + 'px';            detail_info.style.left = (pixel.getX() - 101) + 'px';            detail_info.style.width = '203px';            detail_info.style.height = '270px';            detail_info.style.backgroundImage = 'url(../../res/img/icons/detail_info.png)';            detail_info.style.zIndex = '500';            detail_info.onmouseleave = clear_detail_info;            parent.appendChild(detail_info);            var info_title = document.createElement('div');            info_title.id = 'info_title';            info_title.setAttribute('class', 'info_title');            info_title.innerHTML = '<div style="display:inline-block;vertical-align:middle;align-self:center;">' + StatusStore[i].company_name + '</div>';            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);            //			var info_btn1 = document.createElement('div');            //			info_btn1.id = 'info_btn1';            //			info_btn1.setAttribute('class','info_btn');            //			info_btn1.innerHTML='历史数据';            //			info_btn1.company_code=company_code;            //			info_btn1.onclick=function(e){            //				var event = e;            //				location.href = baseUrl+'view/frontpage/company.jsp?company_code='+event.currentTarget.company_code;            //			}            //			detail_info.appendChild(info_btn1);            $("#data_number_11").html(StatusStore[i].d1a);            $("#data_number_12").html(StatusStore[i].d1a - StatusStore[i].d1ac);            $("#data_number_21").html(StatusStore[i].d7a);            $("#data_number_22").html(StatusStore[i].d7a - StatusStore[i].d7ac);            $("#data_number_31").html(StatusStore[i].d2a);            $("#data_number_32").html(StatusStore[i].d2a - StatusStore[i].d2ac);            if (V_LOGINNAME == 'ypxy') {                var query = new Object();                query.V_LOGINNAME = V_LOGINNAME;                query.V_PASSWORD = V_PASSWORD;                query.dwtype = '2';                query.COMMSTATUS = 'NO';                if ((company_code != null) && (company_code != 'null') && (company_code.length > 0))                    query.company_code = company_code;                $.ajax({                    type: 'POST',                    url: baseUrl + "iot/alarm/view/getConfirmStatusByDays",                    data: {                        queryJson: Ext.JSON.encode(query)                    },                    success: function(result) {                        var json = eval('(' + result + ')');                        if (json.action == 'getConfirmStatusByDays') {                            if (json.check == 'true') {                                ConfirmStore = json.RESULT;                                if (json.company_name != null)                                    companyName = json.company_name;                                else                                    companyName = null;                                for (var i = 0; i < ConfirmStore.length; i++) {                                    if (ConfirmStore[i].id == 'water_alarm') {                                        $("#data_number_41").html(ConfirmStore[i].count);                                        $("#data_number_42").html(ConfirmStore[i].count - ConfirmStore[i].sum);                                        draw_pie('data_pie_4', ConfirmStore[i].count, ConfirmStore[i].sum);                                        $("#dev4_count").html(3);                                        $("#device_count_num_42").html(ConfirmStore[i].sum);                                        $("#dev4-label-hidden").html(ConfirmStore[i].count - ConfirmStore[i].sum);                                        $("#device_count_num_43").html(ConfirmStore[i].count - ConfirmStore[i].sum);                                        if (ConfirmStore[i].count == 0)                                            $("#device_count_num_44").html('100%');                                        else                                            $("#device_count_num_44").html(toDecimal(ConfirmStore[i].sum * 100 / ConfirmStore[i].count) + '%');                                        if (ConfirmStore[i].count != 0)                                            $("#device_confirm_44").css('width', (300 * ConfirmStore[i].sum / ConfirmStore[i].count) + 'px');                                        else                                            $("#device_confirm_44").css('width', '300px');                                        $("#data_number_51").html(0);                                        $("#data_number_52").html(0);                                        draw_pie('data_pie_5', 0, 0);                                        $("#dev5_count").html(3);                                        $("#device_count_num_52").html(0);                                        $("#dev5-label-hidden").html(0);                                        $("#device_count_num_53").html(0);                                        $("#device_count_num_54").html('100%');                                        $("#device_confirm_54").css('width', '300px');                                    }                                }                            } else {                                Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function() {                                    window.parent.document.location = baseUrl;                                });                            }                        }                    }                });            } else {                $("#data_number_41").html(StatusStore[i].d6a);                $("#data_number_42").html(StatusStore[i].d6a - StatusStore[i].d6ac);                draw_pie('data_pie_4', StatusStore[i].d6a, StatusStore[i].d6ac);                $("#dev4_count").html(StatusStore[i].d6);                $("#device_count_num_42").html(StatusStore[i].d6oc);                $("#dev4-label-hidden").html(StatusStore[i].d6o - StatusStore[i].d6oc);                $("#device_count_num_43").html(StatusStore[i].d6o - StatusStore[i].d6oc);                if (StatusStore[i].d6o == 0)                    $("#device_count_num_44").html('100%');                else                    $("#device_count_num_44").html(toDecimal(StatusStore[i].d6oc * 100 / StatusStore[i].d6o) + '%');                if (StatusStore[i].d6o != 0)                    $("#device_confirm_44").css('width', (300 * StatusStore[i].d6oc / StatusStore[i].d6o) + 'px');                else                    $("#device_confirm_44").css('width', '300px');            }            draw_pie('data_pie_1', StatusStore[i].d1a, StatusStore[i].d1ac);            draw_pie('data_pie_2', StatusStore[i].d7a, StatusStore[i].d7ac);            draw_pie('data_pie_3', StatusStore[i].d2a, StatusStore[i].d2ac);            $("#dev1_count").html(StatusStore[i].d1);            $("#device_count_num_12").html(StatusStore[i].d1oc);            $("#dev1-label-hidden").html(StatusStore[i].d1o - StatusStore[i].d1oc);            $("#device_count_num_13").html(StatusStore[i].d1o - StatusStore[i].d1oc);            if (StatusStore[i].d1o == 0)                $("#device_count_num_14").html('100%');            else                $("#device_count_num_14").html(toDecimal(StatusStore[i].d1oc * 100 / StatusStore[i].d1o) + '%');            $("#dev2_count").html(StatusStore[i].d7);            $("#device_count_num_22").html(StatusStore[i].d7oc);            $("#dev2-label-hidden").html(StatusStore[i].d7o - StatusStore[i].d7oc);            $("#device_count_num_23").html(StatusStore[i].d7o - StatusStore[i].d7oc);            if (StatusStore[i].d7o == 0)                $("#device_count_num_24").html('100%');            else                $("#device_count_num_24").html(toDecimal(StatusStore[i].d7oc * 100 / StatusStore[i].d7o) + '%');            $("#dev3_count").html(StatusStore[i].d2);            $("#device_count_num_32").html(StatusStore[i].d2oc);            $("#dev3-label-hidden").html(StatusStore[i].d2o - StatusStore[i].d2oc);            $("#device_count_num_33").html(StatusStore[i].d2o - StatusStore[i].d2oc);            if (StatusStore[i].d2o == 0)                $("#device_count_num_34").html('100%');            else                $("#device_count_num_34").html(toDecimal(StatusStore[i].d2oc * 100 / StatusStore[i].d2o) + '%');            if (StatusStore[i].d1o != 0) {                $("#device_confirm_14").css('width', (300 * StatusStore[i].d1oc / StatusStore[i].d1o) + 'px');            } else                $("#device_confirm_14").css('width', '300px');            if (StatusStore[i].d7o != 0)                $("#device_confirm_24").css('width', (300 * StatusStore[i].d7oc / StatusStore[i].d7o) + 'px');            else                $("#device_confirm_24").css('width', '300px');            if (StatusStore[i].d2o != 0)                $("#device_confirm_34").css('width', (300 * StatusStore[i].d2oc / StatusStore[i].d2o) + 'px');            else                $("#device_confirm_34").css('width', '300px');            $(".alarm_tab_area").remove();            //			if((AlarmStore!=null)&&(AlarmStore.length>0)){            //				var parent = document.getElementById('container');            //				AlarmStore.sort(alarmSortByTime);            //				var area = document.createElement('div');            //				area.id= 'alarm_tab_area';            //				area.setAttribute('class','alarm_tab_area');            //				parent.appendChild(area);            //				for(var i=0;i<AlarmStore.length;i++){            //					if(i>=6)            //						break;            //					var tab = document.createElement('div');            //					tab.id = 'alarm_tab_'+(i+1);            //					tab.setAttribute('class','alarm_tab');            //					tab.setAttribute('onclick',(AlarmStore[i].dwtype==1)?'show_all_fireAlarm()':            //						(AlarmStore[i].dwtype==2)?'show_all_waterAlarm()':            //							(AlarmStore[i].dwtype==5)?'show_all_waterAlarm()':            //								(AlarmStore[i].dwtype==6)?'show_all_rtuAlarm()':            //									(AlarmStore[i].dwtype==7)?'show_all_efireAlarm()':'#');            //					tab.style.top=(120*i)+'px';            //					if(($(document).innerHeight()-205)>(120*(i+1)))            //						$('#alarm_tab_area').css('height',($(document).innerHeight()-205)+'px');            //					else            //						$('#alarm_tab_area').css('height',($(document).innerHeight()-205)+'px');            //					area.appendChild(tab);            //					var title = document.createElement('div');            //					title.id = 'alarm_tab_title_'+(i+1);            //					title.setAttribute('class','alarm_tab_title');            //					title.innerHTML=(AlarmStore[i].dwtype==1)?'火警监测报告':            //						(AlarmStore[i].dwtype==2)?'水系统监测报告':            //							(AlarmStore[i].dwtype==5)?'水系统监测报告':            //								(AlarmStore[i].dwtype==6)?'RTU监测报告':            //									(AlarmStore[i].dwtype==7)?'电气火灾监测报告':'其他报告';            //					tab.appendChild(title);            //					var time_label = document.createElement('div');            //					time_label.id = 'alarm_tab_time_'+(i+1);            //					time_label.setAttribute('class','alarm_tab_time');            //					time_label.innerHTML=AlarmStore[i].time;            //					tab.appendChild(time_label);            //					var data = document.createElement('div');            //					data.id = "alarm_tab_data_"+(i+1);            //					data.setAttribute('class','alarm_tab_data');            //					data.innerHTML=AlarmStore[i].company_name+' '+AlarmStore[i].data;            //					tab.appendChild(data);            //					var icon = document.createElement('img');            //					icon.setAttribute('class','alarm_tab_icon');            //					icon.height = '66';            //					icon.width = '66';            //					icon.src = baseUrl+'res/img/icons/'+((AlarmStore[i].dwtype==1)?'alarm_tab_01.gif'            //							:(AlarmStore[i].dwtype==2)?'alarm_tab_03.gif'            //									:(AlarmStore[i].dwtype==5)?'alarm_tab_03.gif'            //											:(AlarmStore[i].dwtype==6)?'alarm_tab_04.gif'            //													:(AlarmStore[i].dwtype==7)?'alarm_tab_02.gif':'alarm_tab_04.gif')+'?t='+(new Date());            //					tab.appendChild(icon);            //				}            //			}            break;        }    }}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 alarmSortByTime = function(a, b) {    var time_a = Date.parse(a.time);    var time_b = Date.parse(b.time);    return time_b - time_a;}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 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; i < StatusStore.length; i++) {            var obj = StatusStore[i];            var iconurl = baseUrl + 'res/img/icons/building.png';            if ((obj.d0a != obj.d0ac) ||                (obj.d0o != obj.d0oc) ||                (obj.d1a != obj.d1ac) ||                (obj.d1o != obj.d1oc) ||                (obj.d2a != obj.d2ac) ||                (obj.d2o != obj.d2oc) ||                (obj.d6a != obj.d6ac) ||                (obj.d6o != obj.d6oc) ||                (obj.d7a != obj.d7ac) ||                (obj.d7o != obj.d7oc))                iconurl = baseUrl + 'res/img/icons/building_alarm.png';            d1 += obj.d1;            d1o += obj.d1o;            d1a += obj.d1a;            d1oc += obj.d1oc;            d1ac += obj.d1ac;            d2 += obj.d2;            d2o += obj.d2o;            d2a += obj.d2a;            d2oc += obj.d2oc;            d2ac += obj.d2ac;            d6 += obj.d6;            d6o += obj.d6o;            d6a += obj.d6a;            d6oc += obj.d6oc;            d6ac += obj.d6ac;            d7 += obj.d7;            d7o += obj.d7o;            d7a += obj.d7a;            d7oc += obj.d7oc;            d7ac += obj.d7ac;            if ((obj.lat > 30) && (obj.lat < 33) && (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: "<div id='label_" + obj.company_code + "' class='info " + (LabelShow ? 'shown' : 'hiden') + "'>" + obj.company_name + "</div>",                        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:14            ////	                minClusterSize:3            ////		                renderClusterMarker:_renderClusterMarker            //	            });               //		});        }        if ((latngCount > 0) && (firstDraw)) {            map.setCenter(new AMap.LngLat(totalLng / latngCount, totalLat / latngCount, true));            map.setFitView();            firstDraw = false;        }        $("#data_number_11").html(d1a);        $("#data_number_12").html(d1a - d1ac);        $("#data_number_21").html(d7a);        $("#data_number_22").html(d7a - d7ac);        $("#data_number_31").html(d2a);        $("#data_number_32").html(d2a - d2ac);        $("#data_number_31").html(d2a);        $("#data_number_32").html(d2a - d2ac);        draw_pie('data_pie_1', d1a, d1ac);        draw_pie('data_pie_2', d7a, d7ac);        draw_pie('data_pie_3', d2a, d2ac);        if (V_LOGINNAME == 'ypxy') {            var query = new Object();            query.V_LOGINNAME = V_LOGINNAME;            query.V_PASSWORD = V_PASSWORD;            query.dwtype = '2';            query.COMMSTATUS = 'NO';            if ((company_code != null) && (company_code != 'null') && (company_code.length > 0))                query.company_code = company_code;            $.ajax({                type: 'POST',                url: baseUrl + "iot/alarm/view/getConfirmStatusByDays",                data: {                    queryJson: Ext.JSON.encode(query)                },                success: function(result) {                    var json = eval('(' + result + ')');                    if (json.action == 'getConfirmStatusByDays') {                        if (json.check == 'true') {                            ConfirmStore = json.RESULT;                            if (json.company_name != null)                                companyName = json.company_name;                            else
 |