map.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. /**
  2. * map.js
  3. */
  4. Ext.Loader.setConfig({
  5. enabled: true
  6. });
  7. Ext.Loader.setPath('Ext.ux', '../../res/extjs/examples/ux');
  8. Ext.require([
  9. 'Ext.grid.*',
  10. 'Ext.data.*',
  11. 'Ext.ux.RowExpander',
  12. 'Ext.selection.CheckboxModel'
  13. ]);
  14. var sm = Ext.create('Ext.selection.CheckboxModel');
  15. var myMask;
  16. var baseUrl = "";
  17. var theme = "";
  18. var mapStyle = "";
  19. var map;
  20. var mapzoom = 11;
  21. var company_cur = 0;
  22. var StatusStore = null,
  23. AlarmStore = null;
  24. var firstDraw = true;
  25. var storeTime = 60000;
  26. var centerLng = 121.475644;
  27. var currentLng = 121.475644;
  28. var centerLat = 31.1857;
  29. var currentLat = 31.1857;
  30. var rotation = 0;
  31. var alarm_show_window = null;
  32. var show_alarm_list;
  33. var show_list_cur = 0
  34. var V_LOGINNAME = '',
  35. V_PASSWORD = '';
  36. var listSync = true;
  37. var synctime = 0;
  38. var company_code = '';
  39. var start = 0;
  40. var end = 360;
  41. var targetZoom = 20;
  42. var maxHeight = 10000;
  43. var maxWidth = 10000;
  44. var SearchList = null;
  45. var markers = [];
  46. var current_company_code = "";
  47. var LabelShow = false;
  48. var MapShow = false;
  49. var last_move;
  50. var wsUri = "wss://iot.usky.cn:55120";
  51. var websocket = null;
  52. var win1_config = {
  53. 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>',
  54. titleColor: '#ffffff',
  55. titleIconColor: '#ffffff',
  56. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  57. backgroundColor: 'rgba(23,21,57,0.2)',
  58. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  59. border: '1px solid rgba(0,123,255,0.3)',
  60. borderRadius: '10px',
  61. position: 'absolute',
  62. width: 320,
  63. height: 120,
  64. top: 100,
  65. left: 50,
  66. zIndex: 200,
  67. 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>'
  68. }
  69. var win2_config = {
  70. 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>',
  71. titleColor: '#ffffff',
  72. titleIconColor: '#ffffff',
  73. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  74. backgroundColor: 'rgba(23,21,57,0.2)',
  75. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  76. border: '1px solid rgba(0,123,255,0.3)',
  77. borderRadius: '10px',
  78. position: 'absolute',
  79. width: 320,
  80. height: 120,
  81. top: 260,
  82. left: 50,
  83. zIndex: 260,
  84. 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>'
  85. }
  86. var win3_config = {
  87. 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>',
  88. titleColor: '#ffffff',
  89. titleIconColor: '#ffffff',
  90. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  91. backgroundColor: 'rgba(23,21,57,0.2)',
  92. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  93. border: '1px solid rgba(0,123,255,0.3)',
  94. borderRadius: '10px',
  95. position: 'absolute',
  96. width: 320,
  97. height: 120,
  98. top: 420,
  99. left: 50,
  100. zIndex: 260,
  101. 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>'
  102. }
  103. var win4_config = {
  104. 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>',
  105. titleColor: '#ffffff',
  106. titleIconColor: '#ffffff',
  107. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  108. backgroundColor: 'rgba(23,21,57,0.2)',
  109. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  110. border: '1px solid rgba(0,123,255,0.3)',
  111. borderRadius: '10px',
  112. position: 'absolute',
  113. width: 320,
  114. height: 120,
  115. top: 580,
  116. left: 50,
  117. zIndex: 260,
  118. 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>'
  119. }
  120. var dev1_config = {
  121. 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>',
  122. titleColor: '#ffffff',
  123. titleIconColor: '#ffffff',
  124. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  125. backgroundColor: 'rgba(23,21,57,0.2)',
  126. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  127. border: '1px solid rgba(0,123,255,0.3)',
  128. borderRadius: '10px',
  129. position: 'absolute',
  130. width: 320,
  131. height: 100,
  132. top: 219,
  133. left: 50,
  134. zIndex: 200,
  135. floding: 'true',
  136. 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>'
  137. }
  138. var dev2_config = {
  139. 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>',
  140. titleColor: '#ffffff',
  141. titleIconColor: '#ffffff',
  142. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  143. backgroundColor: 'rgba(23,21,57,0.2)',
  144. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  145. border: '1px solid rgba(0,123,255,0.3)',
  146. borderRadius: '10px',
  147. position: 'absolute',
  148. width: 320,
  149. height: 100,
  150. top: 379,
  151. left: 50,
  152. zIndex: 200,
  153. floding: 'true',
  154. 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>'
  155. }
  156. var dev3_config = {
  157. 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>',
  158. titleColor: '#ffffff',
  159. titleIconColor: '#ffffff',
  160. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  161. backgroundColor: 'rgba(23,21,57,0.2)',
  162. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  163. border: '1px solid rgba(0,123,255,0.3)',
  164. borderRadius: '10px',
  165. position: 'absolute',
  166. width: 320,
  167. height: 100,
  168. top: 539,
  169. left: 50,
  170. zIndex: 200,
  171. floding: 'true',
  172. 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>'
  173. }
  174. var dev4_config = {
  175. 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>',
  176. titleColor: '#ffffff',
  177. titleIconColor: '#ffffff',
  178. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  179. backgroundColor: 'rgba(23,21,57,0.2)',
  180. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  181. border: '1px solid rgba(0,123,255,0.3)',
  182. borderRadius: '10px',
  183. position: 'absolute',
  184. width: 320,
  185. height: 100,
  186. top: 699,
  187. left: 50,
  188. zIndex: 200,
  189. floding: 'true',
  190. 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>'
  191. }
  192. var alarm_alert_config = {
  193. 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>',
  194. titleColor: '#ffffff',
  195. titleIconColor: '#ffffff',
  196. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  197. backgroundColor: 'rgba(23,21,57,0.2)',
  198. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  199. border: '1px solid #31e9ff',
  200. borderRadius: '10px',
  201. position: 'absolute',
  202. width: 320,
  203. height: 120,
  204. bottom: -100,
  205. right: 95,
  206. zIndex: 990,
  207. 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>'
  208. }
  209. var winypxy1_config = {
  210. 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>',
  211. titleColor: '#ffffff',
  212. titleIconColor: '#ffffff',
  213. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  214. backgroundColor: 'rgba(23,21,57,0.2)',
  215. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  216. border: '1px solid rgba(0,123,255,0.3)',
  217. borderRadius: '10px',
  218. position: 'absolute',
  219. width: 320,
  220. height: 120,
  221. top: 60,
  222. left: 50,
  223. zIndex: 200,
  224. 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>'
  225. }
  226. var devypxy1_config = {
  227. 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>',
  228. titleColor: '#ffffff',
  229. titleIconColor: '#ffffff',
  230. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  231. backgroundColor: 'rgba(23,21,57,0.2)',
  232. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  233. border: '1px solid rgba(0,123,255,0.3)',
  234. borderRadius: '10px',
  235. position: 'absolute',
  236. width: 320,
  237. height: 100,
  238. top: 179,
  239. left: 50,
  240. zIndex: 200,
  241. floding: 'true',
  242. 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>'
  243. }
  244. var winypxy2_config = {
  245. 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>',
  246. titleColor: '#ffffff',
  247. titleIconColor: '#ffffff',
  248. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  249. backgroundColor: 'rgba(23,21,57,0.2)',
  250. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  251. border: '1px solid rgba(0,123,255,0.3)',
  252. borderRadius: '10px',
  253. position: 'absolute',
  254. width: 320,
  255. height: 120,
  256. top: 220,
  257. left: 50,
  258. zIndex: 260,
  259. 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>'
  260. }
  261. var winypxy3_config = {
  262. 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>',
  263. titleColor: '#ffffff',
  264. titleIconColor: '#ffffff',
  265. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  266. backgroundColor: 'rgba(23,21,57,0.2)',
  267. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  268. border: '1px solid rgba(0,123,255,0.3)',
  269. borderRadius: '10px',
  270. position: 'absolute',
  271. width: 320,
  272. height: 120,
  273. top: 380,
  274. left: 50,
  275. zIndex: 260,
  276. 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>'
  277. }
  278. var winypxy4_config = {
  279. 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>',
  280. titleColor: '#ffffff',
  281. titleIconColor: '#ffffff',
  282. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  283. backgroundColor: 'rgba(23,21,57,0.2)',
  284. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  285. border: '1px solid rgba(0,123,255,0.3)',
  286. borderRadius: '10px',
  287. position: 'absolute',
  288. width: 320,
  289. height: 120,
  290. top: 540,
  291. left: 50,
  292. zIndex: 260,
  293. 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>'
  294. }
  295. var winypxy5_config = {
  296. 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>',
  297. titleColor: '#ffffff',
  298. titleIconColor: '#ffffff',
  299. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  300. backgroundColor: 'rgba(23,21,57,0.2)',
  301. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  302. border: '1px solid rgba(0,123,255,0.3)',
  303. borderRadius: '10px',
  304. position: 'absolute',
  305. width: 320,
  306. height: 120,
  307. top: 700,
  308. left: 50,
  309. zIndex: 260,
  310. 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>'
  311. }
  312. var devypxy2_config = {
  313. 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>',
  314. titleColor: '#ffffff',
  315. titleIconColor: '#ffffff',
  316. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  317. backgroundColor: 'rgba(23,21,57,0.2)',
  318. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  319. border: '1px solid rgba(0,123,255,0.3)',
  320. borderRadius: '10px',
  321. position: 'absolute',
  322. width: 320,
  323. height: 100,
  324. top: 339,
  325. left: 50,
  326. zIndex: 200,
  327. floding: 'true',
  328. 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>'
  329. }
  330. var devypxy3_config = {
  331. 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>',
  332. titleColor: '#ffffff',
  333. titleIconColor: '#ffffff',
  334. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  335. backgroundColor: 'rgba(23,21,57,0.2)',
  336. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  337. border: '1px solid rgba(0,123,255,0.3)',
  338. borderRadius: '10px',
  339. position: 'absolute',
  340. width: 320,
  341. height: 100,
  342. top: 499,
  343. left: 50,
  344. zIndex: 200,
  345. floding: 'true',
  346. 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>'
  347. }
  348. var devypxy4_config = {
  349. 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>',
  350. titleColor: '#ffffff',
  351. titleIconColor: '#ffffff',
  352. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  353. backgroundColor: 'rgba(23,21,57,0.2)',
  354. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  355. border: '1px solid rgba(0,123,255,0.3)',
  356. borderRadius: '10px',
  357. position: 'absolute',
  358. width: 320,
  359. height: 100,
  360. top: 659,
  361. left: 50,
  362. zIndex: 200,
  363. floding: 'true',
  364. 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>'
  365. }
  366. var devypxy5_config = {
  367. 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>',
  368. titleColor: '#ffffff',
  369. titleIconColor: '#ffffff',
  370. titleBackgroundColor: 'rgba(0,0,0,0.1)',
  371. backgroundColor: 'rgba(23,21,57,0.2)',
  372. backgroundImage: 'radial-gradient(circle, rgba(23,21,57,0.2), rgba(9,9,27,0.8))',
  373. border: '1px solid rgba(0,123,255,0.3)',
  374. borderRadius: '10px',
  375. position: 'absolute',
  376. width: 320,
  377. height: 100,
  378. top: 819,
  379. left: 50,
  380. zIndex: 200,
  381. floding: 'true',
  382. 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>'
  383. }
  384. var close_alert = function() {
  385. removeDIV("rt_alarm_alert");
  386. }
  387. var initWebSocket = function() {
  388. try {
  389. if (typeof MozWebSocket == 'function')
  390. WebSocket = MozWebSocket;
  391. if (websocket && websocket.readyState == 1)
  392. websocket.close();
  393. websocket = new WebSocket(wsUri);
  394. websocket.onopen = function(evt) {
  395. var json = {};
  396. json.agentid = $("#V_LOGINNAME").val();
  397. console.log("Connected.");
  398. (function() {})()
  399. websocket.send(JSON.stringify(json));
  400. };
  401. websocket.onclose = function(evt) {
  402. console.log("DisConnected.");
  403. (function() {})()
  404. initWebSocket();
  405. };
  406. websocket.onmessage = function(evt) {
  407. console.log("Received:", evt.data);
  408. var jData = eval('(' + evt.data + ')');
  409. if (jData.dwtype != undefined) {
  410. if (document.getElementById('rt_alarm_alert') != undefined)
  411. removeDIV('rt_alarm_alert');
  412. var alarm_alert = new UNote();
  413. alarm_alert.create("rt_alarm_alert", "container", alarm_alert_config);
  414. var Icon = document.createElement('img');
  415. Icon.width = '32';
  416. Icon.height = '32';
  417. Icon.src = "../../res/img/icons/alarm_tab_04.gif"
  418. if (jData.detype == 1) {
  419. Icon.src = "../../res/img/icons/alarm_tab_01.gif"
  420. } else if (jData.dwtype == 2) {
  421. Icon.src = "../../res/img/icons/alarm_tab_03.gif"
  422. } else if (jData.dwtype == 6) {
  423. Icon.src = "../../res/img/icons/alarm_tab_04.gif"
  424. } else if (jData.dwtype == 7) {
  425. Icon.src = "../../res/img/icons/alarm_tab_02.gif"
  426. } else if (jData.dwtype == 16) {
  427. Icon.src = "../../res/img/icons/alarm_tab_05.gif"
  428. }
  429. document.getElementById("rt_alarm_alert_icon").innerHTML = "";