monthreport.js 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538
  1. /**
  2. *
  3. */
  4. var baseUrl = '';
  5. var theme = '';
  6. var viewAlarmType,pieAlarmType,statusType;
  7. var filterwin;
  8. var FilterWin;
  9. var projectInfoJson;
  10. var instalDeviceInfoJson;
  11. var monitorPointInfoJson;
  12. var countTimeJson;
  13. var countReportJson;
  14. var alarmTotalJson;
  15. var fireDataJson ;
  16. var waterDataJson;
  17. var rtuDataJson;
  18. var efDataJson;
  19. var videoDataJson;
  20. var conclusionJson ;
  21. //获取json长度
  22. function getJsonLength(jsonData){
  23. var jsonLength = 0;
  24. for(var i in jsonData){
  25. jsonLength++;
  26. }
  27. return jsonLength;
  28. }
  29. function isEmpty(obj) {
  30. if (typeof obj === 'undefined' || obj == null || obj === '') {
  31. return true;
  32. } else {
  33. return false;
  34. }
  35. }
  36. Ext.onReady(function(){
  37. baseUrl = document.getElementById('basePath').value;
  38. theme = document.getElementById('theme').value;
  39. $("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
  40. $("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
  41. var queryJson = new Object();
  42. var time;
  43. var build_code;
  44. queryJson.V_LOGINNAME = $("#V_LOGINNAME").val();
  45. queryJson.V_PASSWORD = $("#V_PASSWORD").val();
  46. var draw_confirm = function(startData,endData,days,eventTime) {
  47. var hjresult11 = parseFloat(alarmTotalJson.hjtotalCount);
  48. var sjresult22 = parseFloat(alarmTotalJson.sjtotalCount);
  49. var rturesult33 = parseFloat(alarmTotalJson.rtutotalCount);
  50. var efresult44 = parseFloat(alarmTotalJson.eftotalCount);
  51. var videoresult55 = parseFloat(alarmTotalJson.videototalCount);
  52. var start_data = startData;
  53. var end_data = endData;
  54. var days = days;
  55. var project_date = eventTime;
  56. var woker_talk = document.getElementById('woker_talk');
  57. var div1 = document.createElement('div');
  58. div1.width = 580;
  59. div1.height = 841;
  60. div1.setAttribute('id', 'div1_label1');
  61. woker_talk.appendChild(div1);
  62. var title = document.createElement('h2');
  63. title.id = 'device_list_status_title';
  64. title.style.fontSize = '14px';
  65. title.style.textAlign = 'center';
  66. title.style.fontWeight = 'bold';
  67. title.innerHTML = companyName + '消防报警系统监测数据';
  68. div1.appendChild(title);
  69. var title1 = document.createElement('h2');
  70. title1.style.textAlign = 'center';
  71. title1.style.fontSize = '14px';
  72. title1.style.fontWeight = 'bold';
  73. title1.innerHTML = project_date + '月报表';
  74. div1.appendChild(title1);
  75. var title2 = document.createElement('h3');
  76. title2.style.textAlign = 'left';
  77. title2.style.fontSize = '14px';
  78. title2.style.fontWeight = 'bold';
  79. title2.innerHTML = '1 基本情况';
  80. div1.appendChild(title2);
  81. var title88 = document.createElement('h4');
  82. title88.style.textAlign = 'left';
  83. title88.style.fontSize = '14px';
  84. title88.style.fontWeight = 'bold';
  85. title88.innerHTML = '1.1 项目情况';
  86. div1.appendChild(title88);
  87. var sta = document.createElement('table');
  88. sta.style.marginTop = '10px';
  89. sta.width = '100%';
  90. sta.style.marginBottom = '20px';
  91. sta.style.borderRight = '1px solid #BEBEBE';
  92. sta.style.borderBottom = '1px solid #BEBEBE';
  93. div1.appendChild(sta);
  94. var tr = document.createElement('tr');
  95. sta.appendChild(tr);
  96. var td = document.createElement('td');
  97. td.width = '20%';
  98. td.style.borderLeft = '1px solid #BEBEBE';
  99. td.style.borderTop = '1px solid #BEBEBE';
  100. td.style.textAlign = 'center';
  101. td.innerHTML = '单位名称';
  102. td.style.fontSize = '14px';
  103. tr.appendChild(td);
  104. var td1 = document.createElement('td');
  105. td1.width = '80%';
  106. td1.colSpan = '5';
  107. td1.style.textAlign = 'center';
  108. td1.style.borderLeft = '1px solid #BEBEBE';
  109. td1.style.borderTop = '1px solid #BEBEBE';
  110. td1.innerHTML = companyName;
  111. td1.style.fontSize = '14px';
  112. tr.appendChild(td1);
  113. var tr1 = document.createElement('tr');
  114. sta.appendChild(tr1);
  115. var td2 = document.createElement('td');
  116. td2.width = '20%';
  117. td2.style.textAlign = 'center';
  118. td2.style.borderLeft = '1px solid #BEBEBE';
  119. td2.style.borderTop = '1px solid #BEBEBE';
  120. td2.innerHTML = '进场日期';
  121. td2.style.fontSize = '14px';
  122. tr1.appendChild(td2);
  123. var td3 = document.createElement('td');
  124. td3.width = '16%';
  125. td3.style.textAlign = 'center';
  126. td3.style.borderLeft = '1px solid #BEBEBE';
  127. td3.style.borderTop = '1px solid #BEBEBE';
  128. td3.innerHTML = approach_time;
  129. td3.style.fontSize = '14px';
  130. tr1.appendChild(td3);
  131. var td4 = document.createElement('td');
  132. td4.width = '16%';
  133. td4.style.textAlign = 'center';
  134. td4.innerHTML = '完工日期';
  135. td4.style.fontSize = '14px';
  136. td4.style.borderLeft = '1px solid #BEBEBE';
  137. td4.style.borderTop = '1px solid #BEBEBE';
  138. tr1.appendChild(td4);
  139. var td5 = document.createElement('td');
  140. td5.width = '16%';
  141. td5.style.textAlign = 'center';
  142. td5.innerHTML = complete_time;
  143. td5.style.fontSize = '14px';
  144. td5.style.borderLeft = '1px solid #BEBEBE';
  145. td5.style.borderTop = '1px solid #BEBEBE';
  146. tr1.appendChild(td5);
  147. var td6 = document.createElement('td');
  148. td6.width = '16%';
  149. td6.style.textAlign = 'center';
  150. td6.style.borderLeft = '1px solid #BEBEBE';
  151. td6.style.borderTop = '1px solid #BEBEBE';
  152. td6.innerHTML = '验收日期';
  153. td6.style.fontSize = '14px';
  154. tr1.appendChild(td6);
  155. var td7 = document.createElement('td');
  156. td7.width = '16%';
  157. td7.style.textAlign = 'center';
  158. td7.style.borderLeft = '1px solid #BEBEBE';
  159. td7.style.borderTop = '1px solid #BEBEBE';
  160. td7.innerHTML = check_time;
  161. td7.style.fontSize = '14px';
  162. tr1.appendChild(td7);
  163. var title3 = document.createElement('div');
  164. title3.style.textAlign = 'center';
  165. title3.style.fontSize = '14px';
  166. title3.style.marginBottom = '20px';
  167. title3.style.fontWeight = 'bold';
  168. title3.innerHTML = '表1 项目基本情况表';
  169. div1.appendChild(title3);
  170. var title4 = document.createElement('h4');
  171. title4.style.textAlign = 'left';
  172. title4.style.fontSize = '14px';
  173. title4.style.fontWeight = 'bold';
  174. title4.innerHTML = '1.2 安装设备情况';
  175. div1.appendChild(title4);
  176. var sta1 = document.createElement('table');
  177. sta1.style.marginTop = '10px';
  178. sta1.width = '100%';
  179. sta1.style.marginBottom = '20px';
  180. sta1.style.borderRight = '1px solid #BEBEBE';
  181. sta1.style.borderBottom = '1px solid #BEBEBE';
  182. div1.appendChild(sta1);
  183. var tr12 = document.createElement('tr');
  184. sta1.appendChild(tr12);
  185. var th = document.createElement('th');
  186. th.width = '10%';
  187. th.style.borderLeft = '1px solid #BEBEBE';
  188. th.style.borderTop = '1px solid #BEBEBE';
  189. th.style.textAlign = 'center';
  190. th.innerHTML = '序号';
  191. th.style.fontSize = '14px';
  192. tr12.appendChild(th);
  193. var th1 = document.createElement('th');
  194. th1.width = '25%';
  195. th1.style.textAlign = 'center';
  196. th1.innerHTML = '设备名称';
  197. th1.style.fontSize = '14px';
  198. th1.style.borderLeft = '1px solid #BEBEBE';
  199. th1.style.borderTop = '1px solid #BEBEBE';
  200. tr12.appendChild(th1);
  201. var th2 = document.createElement('th');
  202. th2.width = '25%';
  203. th2.style.textAlign = 'center';
  204. th2.innerHTML = '规格型号';
  205. th2.style.fontSize = '14px';
  206. th2.style.borderLeft = '1px solid #BEBEBE';
  207. th2.style.borderTop = '1px solid #BEBEBE';
  208. tr12.appendChild(th2);
  209. var th3 = document.createElement('th');
  210. th3.width = '10%';
  211. th3.style.textAlign = 'center';
  212. th3.innerHTML = '数量';
  213. th3.style.fontSize = '14px';
  214. th3.style.borderLeft = '1px solid #BEBEBE';
  215. th3.style.borderTop = '1px solid #BEBEBE';
  216. tr12.appendChild(th3);
  217. var th4 = document.createElement('th');
  218. th4.width = '30%';
  219. th4.style.textAlign = 'center';
  220. th4.innerHTML = '备注';
  221. th4.style.fontSize = '14px';
  222. th4.style.borderLeft = '1px solid #BEBEBE';
  223. th4.style.borderTop = '1px solid #BEBEBE';
  224. tr12.appendChild(th4);
  225. if (getJsonLength(instalDeviceInfoJson) > 1) {
  226. // if(getJsonLength(instalDeviceInfoJson)==1){
  227. // var tr13 = document.createElement('tr');
  228. // sta1.appendChild(tr13);
  229. // var td_details_num = document.createElement('td');
  230. // td_details_num.width='5%';
  231. // td_details_num.style.textAlign='center';
  232. // td_details_num.innerHTML=1;
  233. // td_details_num.style.fontSize='14px';
  234. // td_details_num.style.borderLeft ='1px solid #BEBEBE';
  235. // td_details_num.style.borderTop ='1px solid #BEBEBE';
  236. // tr13.appendChild(td_details_num);
  237. // var td_details_name= document.createElement('td');
  238. // td_details_name.width='25%';
  239. // td_details_name.style.textAlign='center';
  240. // td_details_name.innerHTML= instalDeviceInfoJson.device_name;
  241. // td_details_name.style.borderLeft ='1px solid #BEBEBE';
  242. // td_details_name.style.borderTop ='1px solid #BEBEBE';
  243. // td_details_name.style.fontSize='14px';
  244. // tr13.appendChild(td_details_name);
  245. // var td_details_specifications = document.createElement('td');
  246. // td_details_specifications.width='25%';
  247. // td_details_specifications.style.textAlign='center';
  248. // td_details_specifications.innerHTML=ConfirmStore1[0].specifications;
  249. // td_details_specifications.style.fontSize='14px';
  250. // td_details_specifications.style.borderLeft ='1px solid #BEBEBE';
  251. // td_details_specifications.style.borderTop ='1px solid #BEBEBE';
  252. // tr13.appendChild(td_details_specifications);
  253. // var td_details_device_num = document.createElement('td');
  254. // td_details_device_num.width='10%';
  255. // td_details_device_num.style.textAlign='center';
  256. // td_details_device_num.innerHTML=ConfirmStore1[0].device_num;
  257. // td_details_device_num.style.fontSize='14px';
  258. // td_details_device_num.style.borderLeft ='1px solid #BEBEBE';
  259. // td_details_device_num.style.borderTop ='1px solid #BEBEBE';
  260. // tr13.appendChild(td_details_device_num);
  261. // var td_details_data_info = document.createElement('td');
  262. // td_details_data_info.width='30%';
  263. // td_details_data_info.style.textAlign='center';
  264. // td_details_data_info.innerHTML=ConfirmStore1[0].data_info;
  265. // td_details_data_info.style.fontSize='14px';
  266. // td_details_data_info.style.borderLeft ='1px solid #BEBEBE';
  267. // td_details_data_info.style.borderTop ='1px solid #BEBEBE';
  268. // tr13.appendChild(td_details_data_info);
  269. // }else{
  270. for (var i = 1; i < getJsonLength(instalDeviceInfoJson); i++) {
  271. var a = instalDeviceInfoJson[i];
  272. var tr13 = document.createElement('tr');
  273. sta1.appendChild(tr13);
  274. var td_details_num = document.createElement('td');
  275. td_details_num.width = '10%';
  276. td_details_num.style.textAlign = 'center';
  277. td_details_num.innerHTML = i;
  278. td_details_num.style.fontSize = '14px';
  279. td_details_num.style.borderLeft = '1px solid #BEBEBE';
  280. td_details_num.style.borderTop = '1px solid #BEBEBE';
  281. tr13.appendChild(td_details_num);
  282. var td_details_name = document.createElement('td');
  283. td_details_name.width = '25%';
  284. td_details_name.style.textAlign = 'center';
  285. td_details_name.innerHTML = instalDeviceInfoJson[i].device_name;
  286. td_details_name.style.fontSize = '14px';
  287. td_details_name.style.borderLeft = '1px solid #BEBEBE';
  288. td_details_name.style.borderTop = '1px solid #BEBEBE';
  289. tr13.appendChild(td_details_name);
  290. var td_details_specifications = document.createElement('td');
  291. td_details_specifications.width = '25%';
  292. td_details_specifications.style.textAlign = 'center';
  293. td_details_specifications.innerHTML = instalDeviceInfoJson[i].specifications;
  294. td_details_specifications.style.fontSize = '14px';
  295. td_details_specifications.style.borderLeft = '1px solid #BEBEBE';
  296. td_details_specifications.style.borderTop = '1px solid #BEBEBE';
  297. tr13.appendChild(td_details_specifications);
  298. var td_details_device_num = document.createElement('td');
  299. td_details_device_num.width = '10%';
  300. td_details_device_num.style.textAlign = 'center';
  301. td_details_device_num.innerHTML = instalDeviceInfoJson[i].device_num;
  302. td_details_device_num.style.fontSize = '14px';
  303. td_details_device_num.style.borderLeft = '1px solid #BEBEBE';
  304. td_details_device_num.style.borderTop = '1px solid #BEBEBE';
  305. tr13.appendChild(td_details_device_num);
  306. var b = isEmpty(instalDeviceInfoJson[i].data_info);
  307. if (b) {
  308. data_info = "";
  309. }
  310. var td_details_data_info = document.createElement('td');
  311. td_details_data_info.width = '30%';
  312. td_details_data_info.style.textAlign = 'center';
  313. td_details_data_info.innerHTML = data_info;
  314. td_details_data_info.style.fontSize = '14px';
  315. td_details_data_info.style.borderLeft = '1px solid #BEBEBE';
  316. td_details_data_info.style.borderTop = '1px solid #BEBEBE';
  317. tr13.appendChild(td_details_data_info);
  318. }
  319. var tr_details_device_num1 = document.createElement('tr');
  320. sta1.appendChild(tr_details_device_num1);
  321. var td_details_device_num1 = document.createElement('td');
  322. // td_details_device_num1.width='30%';
  323. td_details_device_num1.style.textAlign = 'center';
  324. td_details_device_num1.colSpan = '2';
  325. td_details_device_num1.innerHTML = '合计';
  326. td_details_device_num1.style.fontSize = '14px';
  327. td_details_device_num1.style.borderLeft = '1px solid #BEBEBE';
  328. td_details_device_num1.style.borderTop = '1px solid #BEBEBE';
  329. tr_details_device_num1.appendChild(td_details_device_num1);
  330. var td_details_device_num2 = document.createElement('td');
  331. td_details_device_num2.width = '25%';
  332. td_details_device_num2.style.textAlign = 'center';
  333. td_details_device_num2.innerHTML = '';
  334. td_details_device_num2.style.fontSize = '14px';
  335. td_details_device_num2.style.borderLeft = '1px solid #BEBEBE';
  336. td_details_device_num2.style.borderTop = '1px solid #BEBEBE';
  337. tr_details_device_num1.appendChild(td_details_device_num2);
  338. var td_details_device_num3 = document.createElement('td');
  339. td_details_device_num3.width = '10%';
  340. td_details_device_num3.style.textAlign = 'center';
  341. td_details_device_num3.innerHTML = instalDeviceInfoJson.total;
  342. td_details_device_num3.style.fontSize = '14px';
  343. td_details_device_num3.style.borderLeft = '1px solid #BEBEBE';
  344. td_details_device_num3.style.borderTop = '1px solid #BEBEBE';
  345. tr_details_device_num1.appendChild(td_details_device_num3);
  346. var td_details_device_num4 = document.createElement('td');
  347. td_details_device_num4.width = '30%';
  348. td_details_device_num4.style.textAlign = 'center';
  349. td_details_device_num4.innerHTML = '';
  350. td_details_device_num4.style.fontSize = '14px';
  351. td_details_device_num4.style.borderLeft = '1px solid #BEBEBE';
  352. td_details_device_num4.style.borderTop = '1px solid #BEBEBE';
  353. tr_details_device_num1.appendChild(td_details_device_num4);
  354. //}
  355. }
  356. var title9 = document.createElement('div');
  357. title9.style.textAlign = 'center';
  358. title9.style.fontSize = '14px';
  359. title9.style.marginBottom = '20px';
  360. title9.style.fontWeight = 'bold';
  361. title9.innerHTML = '表2 项目安装设备清单';
  362. div1.appendChild(title9);
  363. var title10 = document.createElement('h4');
  364. title10.style.textAlign = 'left';
  365. title10.style.fontSize = '14px';
  366. title10.style.fontWeight = 'bold';
  367. title10.innerHTML = '1.3 监测点情况';
  368. div1.appendChild(title10);
  369. var sta2 = document.createElement('table');
  370. sta2.style.marginTop = '10px';
  371. sta2.width = '100%';
  372. sta2.style.marginBottom = '20px';
  373. sta2.style.borderRight = '1px solid #BEBEBE';
  374. sta2.style.borderBottom = '1px solid #BEBEBE';
  375. div1.appendChild(sta2);
  376. var tr14 = document.createElement('tr');
  377. sta2.appendChild(tr14);
  378. var th5 = document.createElement('th');
  379. th5.width = '10%';
  380. th5.style.textAlign = 'center';
  381. th5.innerHTML = '序号';
  382. th5.style.fontSize = '14px';
  383. th5.style.borderLeft = '1px solid #BEBEBE';
  384. th5.style.borderTop = '1px solid #BEBEBE';
  385. tr14.appendChild(th5);
  386. var th6 = document.createElement('th');
  387. th6.width = '25%';
  388. th6.style.textAlign = 'center';
  389. th6.innerHTML = '监控子系统';
  390. th6.style.fontSize = '14px';
  391. th6.style.borderLeft = '1px solid #BEBEBE';
  392. th6.style.borderTop = '1px solid #BEBEBE';
  393. tr14.appendChild(th6);
  394. var th7 = document.createElement('th');
  395. th7.width = '25%';
  396. th7.style.textAlign = 'center';
  397. th7.innerHTML = '监测点类型';
  398. th7.style.fontSize = '14px';
  399. th7.style.borderLeft = '1px solid #BEBEBE';
  400. th7.style.borderTop = '1px solid #BEBEBE';
  401. tr14.appendChild(th7);
  402. var th8 = document.createElement('th');
  403. th8.width = '10%';
  404. th8.style.textAlign = 'center';
  405. th8.innerHTML = '数量';
  406. th8.style.fontSize = '14px';
  407. th8.style.borderLeft = '1px solid #BEBEBE';
  408. th8.style.borderTop = '1px solid #BEBEBE';
  409. tr14.appendChild(th8);
  410. var th9 = document.createElement('th');
  411. th9.width = '30%';
  412. th9.style.textAlign = 'center';
  413. th9.innerHTML = '备注';
  414. th9.style.fontSize = '14px';
  415. th9.style.borderLeft = '1px solid #BEBEBE';
  416. th9.style.borderTop = '1px solid #BEBEBE';
  417. tr14.appendChild(th9);
  418. if (getJsonLength(monitorPointInfoJson) > 1) {
  419. // if(ConfirmStore2.length==1){
  420. // var tr13 = document.createElement('tr');
  421. // sta2.appendChild(tr13);
  422. // var td_details_num = document.createElement('td');
  423. // td_details_num.width='10%';
  424. // td_details_num.style.textAlign='center';
  425. // td_details_num.style.borderLeft ='1px solid #BEBEBE';
  426. // td_details_num.style.borderTop ='1px solid #BEBEBE';
  427. // td_details_num.innerHTML=1;
  428. // td_details_num.style.fontSize='14px';
  429. // tr13.appendChild(td_details_num);
  430. // var td_details_name= document.createElement('td');
  431. // td_details_name.width='25%';
  432. // td_details_name.style.textAlign='center';
  433. // td_details_name.innerHTML= ConfirmStore2[0].device_name;
  434. // td_details_name.style.borderLeft ='1px solid #BEBEBE';
  435. // td_details_name.style.borderTop ='1px solid #BEBEBE';
  436. // td_details_name.style.fontSize='14px';
  437. // tr13.appendChild(td_details_name);
  438. // var td_details_specifications = document.createElement('td');
  439. // td_details_specifications.width='25%';
  440. // td_details_specifications.style.textAlign='center';
  441. // td_details_specifications.innerHTML=ConfirmStore2[0].specifications;
  442. // td_details_specifications.style.fontSize='14px';
  443. // td_details_specifications.style.borderLeft ='1px solid #BEBEBE';
  444. // td_details_specifications.style.borderTop ='1px solid #BEBEBE';
  445. // tr13.appendChild(td_details_specifications);
  446. // var td_details_device_num = document.createElement('td');
  447. // td_details_device_num.width='10%';
  448. // td_details_device_num.style.textAlign='center';
  449. // td_details_device_num.innerHTML=ConfirmStore2[0].device_num;
  450. // td_details_device_num.style.fontSize='14px';
  451. // td_details_device_num.style.borderLeft ='1px solid #BEBEBE';
  452. // td_details_device_num.style.borderTop ='1px solid #BEBEBE';
  453. // tr13.appendChild(td_details_device_num);
  454. // var td_details_data_info = document.createElement('td');
  455. // td_details_data_info.width='30%';
  456. // td_details_data_info.style.textAlign='center';
  457. // td_details_data_info.innerHTML=ConfirmStore2[0].data_info;
  458. // td_details_data_info.style.fontSize='14px';
  459. // td_details_data_info.style.borderLeft ='1px solid #BEBEBE';
  460. // td_details_data_info.style.borderTop ='1px solid #BEBEBE';
  461. // tr13.appendChild(td_details_data_info);
  462. // }else{
  463. for (var i = 1; i < getJsonLength(monitorPointInfoJson); i++) {
  464. var b2 = isEmpty(monitorPointInfoJson[i].data_info);
  465. if (b2) {
  466. data_info = "";
  467. }
  468. var tr13 = document.createElement('tr');
  469. sta2.appendChild(tr13);
  470. var td_details_num = document.createElement('td');
  471. td_details_num.width = '10%';
  472. td_details_num.style.textAlign = 'center';
  473. td_details_num.innerHTML = i;
  474. td_details_num.style.fontSize = '14px';
  475. td_details_num.style.borderLeft = '1px solid #BEBEBE';
  476. td_details_num.style.borderTop = '1px solid #BEBEBE';
  477. tr13.appendChild(td_details_num);
  478. var td_details_name = document.createElement('td');
  479. td_details_name.width = '25%';
  480. td_details_name.style.textAlign = 'center';
  481. td_details_name.innerHTML = monitorPointInfoJson[i].monitor_son;
  482. td_details_name.style.fontSize = '14px';
  483. td_details_name.style.borderLeft = '1px solid #BEBEBE';
  484. td_details_name.style.borderTop = '1px solid #BEBEBE';
  485. tr13.appendChild(td_details_name);
  486. var td_details_specifications = document.createElement('td');
  487. td_details_specifications.width = '25%';
  488. td_details_specifications.style.textAlign = 'center';
  489. td_details_specifications.innerHTML = monitorPointInfoJson[i].monitor_type;
  490. td_details_specifications.style.fontSize = '14px';
  491. td_details_specifications.style.borderLeft = '1px solid #BEBEBE';
  492. td_details_specifications.style.borderTop = '1px solid #BEBEBE';
  493. tr13.appendChild(td_details_specifications);
  494. var td_details_device_num = document.createElement('td');
  495. td_details_device_num.width = '10%';
  496. td_details_device_num.style.textAlign = 'center';
  497. td_details_device_num.innerHTML = monitorPointInfoJson[i].monitor_sum;
  498. td_details_device_num.style.fontSize = '14px';
  499. td_details_device_num.style.borderLeft = '1px solid #BEBEBE';
  500. td_details_device_num.style.borderTop = '1px solid #BEBEBE';
  501. tr13.appendChild(td_details_device_num);
  502. var td_details_data_info = document.createElement('td');
  503. td_details_data_info.width = '30%';
  504. td_details_data_info.style.textAlign = 'center';
  505. td_details_data_info.innerHTML = data_info;
  506. td_details_data_info.style.fontSize = '14px';
  507. td_details_data_info.style.borderLeft = '1px solid #BEBEBE';
  508. td_details_data_info.style.borderTop = '1px solid #BEBEBE';
  509. tr13.appendChild(td_details_data_info);
  510. }
  511. var tr_details_device_num1 = document.createElement('tr');
  512. sta2.appendChild(tr_details_device_num1);
  513. var td_details_device_num1 = document.createElement('td');
  514. // td_details_device_num1.width='30%';
  515. td_details_device_num1.style.textAlign = 'center';
  516. td_details_device_num1.colSpan = '2';
  517. td_details_device_num1.innerHTML = '合计';
  518. td_details_device_num1.style.fontSize = '14px';
  519. td_details_device_num1.style.borderLeft = '1px solid #BEBEBE';
  520. td_details_device_num1.style.borderTop = '1px solid #BEBEBE';
  521. tr_details_device_num1.appendChild(td_details_device_num1);
  522. var td_details_device_num2 = document.createElement('td');
  523. td_details_device_num2.width = '25%';
  524. td_details_device_num2.style.textAlign = 'center';
  525. td_details_device_num2.innerHTML = '';
  526. td_details_device_num2.style.fontSize = '14px';
  527. td_details_device_num2.style.borderLeft = '1px solid #BEBEBE';
  528. td_details_device_num2.style.borderTop = '1px solid #BEBEBE';
  529. tr_details_device_num1.appendChild(td_details_device_num2);
  530. var td_details_device_num3 = document.createElement('td');
  531. td_details_device_num3.width = '10%';
  532. td_details_device_num3.style.textAlign = 'center';
  533. td_details_device_num3.innerHTML = monitorPointInfoJson.total;
  534. td_details_device_num3.style.fontSize = '14px';
  535. td_details_device_num3.style.borderLeft = '1px solid #BEBEBE';
  536. td_details_device_num3.style.borderTop = '1px solid #BEBEBE';
  537. tr_details_device_num1.appendChild(td_details_device_num3);
  538. var td_details_device_num4 = document.createElement('td');
  539. td_details_device_num4.width = '30%';
  540. td_details_device_num4.style.textAlign = 'center';
  541. td_details_device_num4.innerHTML = '';
  542. td_details_device_num4.style.fontSize = '14px';
  543. td_details_device_num4.style.borderLeft = '1px solid #BEBEBE';
  544. td_details_device_num4.style.borderTop = '1px solid #BEBEBE';
  545. tr_details_device_num1.appendChild(td_details_device_num4);
  546. // }
  547. }
  548. var title11 = document.createElement('div');
  549. title11.style.textAlign = 'center';
  550. title11.style.fontSize = '14px';
  551. title11.style.marginBottom = '20px';
  552. title11.style.fontWeight = 'bold';
  553. title11.innerHTML = '表3 项目监测点清单';
  554. div1.appendChild(title11);
  555. var div2 = document.createElement('div');
  556. div2.width = 580;
  557. div2.height = 841;
  558. div2.setAttribute('id', 'div2_label1');
  559. woker_talk.appendChild(div2);
  560. var title12 = document.createElement('h3');
  561. title12.style.textAlign = 'left';
  562. title12.style.fontSize = '14px';
  563. title12.style.fontWeight = 'bold';
  564. title12.innerHTML = '2 阶段数据统计情况';
  565. div2.appendChild(title12);
  566. var title13 = document.createElement('h4');
  567. title13.style.textAlign = 'left';
  568. title13.style.fontSize = '14px';
  569. title13.style.fontWeight = 'bold';
  570. title13.innerHTML = '2.1 统计时段';
  571. div2.appendChild(title13);
  572. var title14 = document.createElement('div');
  573. title14.style.border = '1px solid #BEBEBE';
  574. title14.width = '100%';
  575. title14.style.background = '#AAAAAA';
  576. title14.style.minHeight = '60px';
  577. title14.style.paddingLeft = '36px';
  578. title14.style.marginBottom = '20px';
  579. div2.appendChild(title14);
  580. var title14_p1 = document.createElement('p');
  581. title14_p1.innerHTML = '统计起始日期:' + countTimeJson.startData;
  582. title14_p1.style.fontSize = '14px';
  583. title14.appendChild(title14_p1);
  584. var title14_p2 = document.createElement('p');
  585. title14_p2.innerHTML = '统计截止日期:' + countTimeJson.endData;
  586. title14_p2.style.fontSize = '14px';
  587. title14.appendChild(title14_p2);
  588. var title14_p3 = document.createElement('p');
  589. title14_p3.innerHTML = '统计时段时长:' + countTimeJson.days;
  590. title14_p3.style.fontSize = '14px';
  591. title14.appendChild(title14_p3);
  592. var title15 = document.createElement('h4');
  593. title15.style.textAlign = 'left';
  594. title15.style.fontSize = '14px';
  595. title15.style.fontWeight = 'bold';
  596. title15.innerHTML = '2.2 统计报表';
  597. div2.appendChild(title15);
  598. var sta3 = document.createElement('table');
  599. sta3.style.marginTop = '10px';
  600. sta3.width = '100%';
  601. sta3.style.marginBottom = '20px';
  602. sta3.style.borderRight = '1px solid #BEBEBE';
  603. sta3.style.borderBottom = '1px solid #BEBEBE';
  604. div2.appendChild(sta3);
  605. var tr20 = document.createElement('tr');
  606. sta3.appendChild(tr20);
  607. var th20 = document.createElement('th');
  608. th20.width = '10%';
  609. th20.style.textAlign = 'center';
  610. th20.innerHTML = '序号';
  611. th20.style.fontSize = '14px';
  612. th20.style.borderLeft = '1px solid #BEBEBE';
  613. th20.style.borderTop = '1px solid #BEBEBE';
  614. tr20.appendChild(th20);
  615. var th21 = document.createElement('th');
  616. th21.width = '15%';
  617. th21.style.textAlign = 'center';
  618. th21.innerHTML = '报告分类';
  619. th21.style.fontSize = '14px';
  620. th21.style.borderLeft = '1px solid #BEBEBE';
  621. th21.style.borderTop = '1px solid #BEBEBE';
  622. tr20.appendChild(th21);
  623. var th22 = document.createElement('th');
  624. th22.width = '15%';
  625. th22.style.textAlign = 'center';
  626. th22.innerHTML = '报告属性';
  627. th22.style.fontSize = '14px';
  628. th22.style.borderLeft = '1px solid #BEBEBE';
  629. th22.style.borderTop = '1px solid #BEBEBE';
  630. tr20.appendChild(th22);
  631. var th23 = document.createElement('th');
  632. th23.width = '15%';
  633. th23.style.textAlign = 'center';
  634. th23.innerHTML = '报告总数';
  635. th23.style.fontSize = '14px';
  636. th23.style.borderLeft = '1px solid #BEBEBE';
  637. th23.style.borderTop = '1px solid #BEBEBE';
  638. tr20.appendChild(th23);
  639. var th24 = document.createElement('th');
  640. th24.width = '10%';
  641. th24.style.textAlign = 'center';
  642. th24.innerHTML = '已处理';
  643. th24.style.fontSize = '14px';
  644. th24.style.borderLeft = '1px solid #BEBEBE';
  645. th24.style.borderTop = '1px solid #BEBEBE';
  646. tr20.appendChild(th24);
  647. var th25 = document.createElement('th');
  648. th25.width = '10%';
  649. th25.style.textAlign = 'center';
  650. th25.innerHTML = '未处理';
  651. th25.style.fontSize = '14px';
  652. th25.style.borderLeft = '1px solid #BEBEBE';
  653. th25.style.borderTop = '1px solid #BEBEBE';
  654. tr20.appendChild(th25);
  655. var th26 = document.createElement('th');
  656. th26.width = '10%';
  657. th26.style.textAlign = 'center';
  658. th26.innerHTML = '处置率';
  659. th26.style.fontSize = '14px';
  660. th26.style.borderLeft = '1px solid #BEBEBE';
  661. th26.style.borderTop = '1px solid #BEBEBE';
  662. tr20.appendChild(th26);
  663. var th27 = document.createElement('th');
  664. th27.width = '15%';
  665. th27.style.textAlign = 'center';
  666. th27.innerHTML = '备注';
  667. th27.style.fontSize = '14px';
  668. th27.style.borderLeft = '1px solid #BEBEBE';
  669. th27.style.borderTop = '1px solid #BEBEBE';
  670. tr20.appendChild(th27);
  671. //if(!isEmpty(countReportJson[1])){
  672. var tr21 = document.createElement('tr');
  673. sta3.appendChild(tr21);
  674. var td20 = document.createElement('td');
  675. td20.width = '10%';
  676. td20.style.textAlign = 'center';
  677. td20.innerHTML = 1;
  678. td20.style.fontSize = '14px';
  679. td20.style.borderLeft = '1px solid #BEBEBE';
  680. td20.style.borderTop = '1px solid #BEBEBE';
  681. tr21.appendChild(td20);
  682. var td21 = document.createElement('td');
  683. td21.width = '15%';
  684. td21.style.textAlign = 'center';
  685. td21.innerHTML = '火灾监测';
  686. td21.rowSpan = '2';
  687. td21.style.fontSize = '14px';
  688. td21.style.borderLeft = '1px solid #BEBEBE';
  689. td21.style.borderTop = '1px solid #BEBEBE';
  690. tr21.appendChild(td21);
  691. var td22 = document.createElement('td');
  692. td22.width = '15%';
  693. td22.style.textAlign = 'center';
  694. td22.innerHTML = '报警';
  695. td22.style.fontSize = '14px';
  696. td22.style.borderLeft = '1px solid #BEBEBE';
  697. td22.style.borderTop = '1px solid #BEBEBE';
  698. tr21.appendChild(td22);
  699. var td23 = document.createElement('td');
  700. td23.width = '15%';
  701. td23.style.textAlign = 'center';
  702. var hjtotal;
  703. if (!isEmpty(countReportJson[1])){
  704. hjtotal=countReportJson[1].alarm.hjtotal;
  705. }else {
  706. hjtotal=0;
  707. }
  708. td23.innerHTML = hjtotal;
  709. td23.style.fontSize = '14px';
  710. td23.style.borderLeft = '1px solid #BEBEBE';
  711. td23.style.borderTop = '1px solid #BEBEBE';
  712. tr21.appendChild(td23);
  713. var td24 = document.createElement('td');
  714. td24.width = '10%';
  715. td24.style.textAlign = 'center';
  716. var hjcltotal;
  717. if (isEmpty(countReportJson[1] )){
  718. hjcltotal=0;
  719. }else {
  720. hjcltotal= countReportJson[1].alarm.hjcltotal;
  721. }
  722. td24.innerHTML = hjcltotal;
  723. td24.style.fontSize = '14px';
  724. td24.style.borderLeft = '1px solid #BEBEBE';
  725. td24.style.borderTop = '1px solid #BEBEBE';
  726. tr21.appendChild(td24);
  727. var td25 = document.createElement('td');
  728. td25.width = '10%';
  729. td25.style.textAlign = 'center';
  730. var hjwcltotal;
  731. if (isEmpty(countReportJson[1] )){
  732. hjwcltotal=0;
  733. }else {
  734. hjwcltotal= countReportJson[1].alarm.hjwcltotal;
  735. }
  736. td25.innerHTML = hjwcltotal;
  737. td25.style.fontSize = '14px';
  738. td25.style.borderLeft = '1px solid #BEBEBE';
  739. td25.style.borderTop = '1px solid #BEBEBE';
  740. tr21.appendChild(td25);
  741. var td26 = document.createElement('td');
  742. td26.width = '10%';
  743. td26.style.textAlign = 'center';
  744. var hjbaifenbi;
  745. if (isEmpty( countReportJson[1] )){
  746. hjbaifenbi=0;
  747. }else {
  748. hjbaifenbi= countReportJson[1].alarm.hjbaifenbi;
  749. }
  750. td26.innerHTML = hjbaifenbi + '%';
  751. td26.style.fontSize = '14px';
  752. td26.style.borderLeft = '1px solid #BEBEBE';
  753. td26.style.borderTop = '1px solid #BEBEBE';
  754. tr21.appendChild(td26);
  755. var td27 = document.createElement('td');
  756. td27.width = '15%';
  757. td27.style.textAlign = 'center';
  758. td27.innerHTML = '';
  759. td27.style.fontSize = '14px';
  760. td27.style.borderLeft = '1px solid #BEBEBE';
  761. td27.style.borderTop = '1px solid #BEBEBE';
  762. tr21.appendChild(td27);
  763. var tr22 = document.createElement('tr');
  764. sta3.appendChild(tr22);
  765. var td28 = document.createElement('td');
  766. td28.width = '10%';
  767. td28.style.textAlign = 'center';
  768. td28.innerHTML = 2;
  769. td28.style.fontSize = '14px';
  770. td28.style.borderLeft = '1px solid #BEBEBE';
  771. td28.style.borderTop = '1px solid #BEBEBE';
  772. tr22.appendChild(td28);
  773. var td29 = document.createElement('td');
  774. td29.width = '15%';
  775. td29.style.textAlign = 'center';
  776. td29.innerHTML = '设备离线';
  777. td29.style.fontSize = '14px';
  778. td29.style.borderLeft = '1px solid #BEBEBE';
  779. td29.style.borderTop = '1px solid #BEBEBE';
  780. tr22.appendChild(td29);
  781. var td30 = document.createElement('td');
  782. td30.width = '15%';
  783. td30.style.textAlign = 'center';
  784. var hjlxtotal;
  785. if (isEmpty( countReportJson[1] )){
  786. hjlxtotal=0;
  787. }else{
  788. hjlxtotal= countReportJson[1].offline.hjlxtotal;
  789. }
  790. td30.innerHTML = hjlxtotal;
  791. td30.style.fontSize = '14px';
  792. td30.style.borderLeft = '1px solid #BEBEBE';
  793. td30.style.borderTop = '1px solid #BEBEBE';
  794. tr22.appendChild(td30);
  795. var td31 = document.createElement('td');
  796. td31.width = '10%';
  797. td31.style.textAlign = 'center';
  798. var hjlxcltotal;
  799. if (isEmpty( countReportJson[1] )){
  800. hjlxcltotal=0;
  801. }else{
  802. hjlxcltotal= countReportJson[1].offline.hjlxcltotal;
  803. }
  804. td31.innerHTML = hjlxcltotal;
  805. td31.style.fontSize = '14px';
  806. td31.style.borderLeft = '1px solid #BEBEBE';
  807. td31.style.borderTop = '1px solid #BEBEBE';
  808. tr22.appendChild(td31);
  809. var td32 = document.createElement('td');
  810. td32.width = '10%';
  811. td32.style.textAlign = 'center';
  812. var hjlxwcltotal;
  813. if (isEmpty( countReportJson[1] )){
  814. hjlxwcltotal=0;
  815. }else {
  816. hjlxwcltotal= countReportJson[1].offline.hjlxwcltotal;
  817. }
  818. td32.innerHTML = hjlxwcltotal;
  819. td32.style.fontSize = '14px';
  820. td32.style.borderLeft = '1px solid #BEBEBE';
  821. td32.style.borderTop = '1px solid #BEBEBE';
  822. tr22.appendChild(td32);
  823. var td33 = document.createElement('td');
  824. td33.width = '10%';
  825. td33.style.textAlign = 'center';
  826. var hjlxbaifenbi;
  827. if (isEmpty( countReportJson[1] )){
  828. hjlxbaifenbi=0;
  829. }else{
  830. hjlxbaifenbi= countReportJson[1].offline.hjlxbaifenbi;
  831. }
  832. td33.innerHTML = hjlxbaifenbi + '%';
  833. td33.style.fontSize = '14px';
  834. td33.style.borderLeft = '1px solid #BEBEBE';
  835. td33.style.borderTop = '1px solid #BEBEBE';
  836. tr22.appendChild(td33);
  837. var td34 = document.createElement('td');
  838. td34.width = '15%';
  839. td34.style.textAlign = 'center';
  840. td34.innerHTML = '';
  841. td34.style.fontSize = '14px';
  842. td34.style.borderLeft = '1px solid #BEBEBE';
  843. td34.style.borderTop = '1px solid #BEBEBE';
  844. tr22.appendChild(td34);
  845. // }
  846. // if(!isEmpty(countReportJson[3])){
  847. var tr23 = document.createElement('tr');
  848. sta3.appendChild(tr23);
  849. var td35 = document.createElement('td');
  850. td35.width = '10%';
  851. td35.style.textAlign = 'center';
  852. td35.innerHTML = 3;
  853. td35.style.fontSize = '14px';
  854. td35.style.borderLeft = '1px solid #BEBEBE';
  855. td35.style.borderTop = '1px solid #BEBEBE';
  856. tr23.appendChild(td35);
  857. var td36 = document.createElement('td');
  858. td36.width = '15%';
  859. td36.style.textAlign = 'center';
  860. td36.innerHTML = '消防水系统监测';
  861. td36.rowSpan = '2';
  862. td36.style.fontSize = '14px';
  863. td36.style.borderLeft = '1px solid #BEBEBE';
  864. td36.style.borderTop = '1px solid #BEBEBE';
  865. tr23.appendChild(td36);
  866. var td37 = document.createElement('td');
  867. td37.width = '15%';
  868. td37.style.textAlign = 'center';
  869. td37.innerHTML = '报警';
  870. td37.style.fontSize = '14px';
  871. td37.style.borderLeft = '1px solid #BEBEBE';
  872. td37.style.borderTop = '1px solid #BEBEBE';
  873. tr23.appendChild(td37);
  874. var td38 = document.createElement('td');
  875. td38.width = '15%';
  876. td38.style.textAlign = 'center';
  877. var sjtotal;
  878. if (isEmpty( countReportJson[3] )){
  879. sjtotal=0;
  880. }else{
  881. sjtotal= countReportJson[3].alarm.sjtotal;
  882. }
  883. td38.innerHTML = sjtotal;
  884. td38.style.fontSize = '14px';
  885. td38.style.borderLeft = '1px solid #BEBEBE';
  886. td38.style.borderTop = '1px solid #BEBEBE';
  887. tr23.appendChild(td38);
  888. var td39 = document.createElement('td');
  889. td39.width = '10%';
  890. td39.style.textAlign = 'center';
  891. var sjcltotal;
  892. if (isEmpty( countReportJson[3] )){
  893. sjcltotal=0;
  894. }else {
  895. sjcltotal= countReportJson[3].alarm.sjcltotal;
  896. }
  897. td39.innerHTML = sjcltotal;
  898. td39.style.fontSize = '14px';
  899. td39.style.borderLeft = '1px solid #BEBEBE';
  900. td39.style.borderTop = '1px solid #BEBEBE';
  901. tr23.appendChild(td39);
  902. var td40 = document.createElement('td');
  903. td40.width = '10%';
  904. td40.style.textAlign = 'center';
  905. var sjwcltotal;
  906. if (isEmpty( countReportJson[3] )){
  907. sjwcltotal=0;
  908. }else{
  909. sjwcltotal= countReportJson[3].alarm.sjwcltotal;
  910. }
  911. td40.innerHTML = sjwcltotal;
  912. td40.style.fontSize = '14px';
  913. td40.style.borderLeft = '1px solid #BEBEBE';
  914. td40.style.borderTop = '1px solid #BEBEBE';
  915. tr23.appendChild(td40);
  916. var td41 = document.createElement('td');
  917. td41.width = '10%';
  918. td41.style.textAlign = 'center';
  919. var sjbaifenbi;
  920. if (isEmpty( countReportJson[3] )){
  921. sjbaifenbi=0;
  922. }else {
  923. sjbaifenbi= countReportJson[3].alarm.sjbaifenbi;
  924. }
  925. td41.innerHTML = sjbaifenbi + '%';
  926. td41.style.fontSize = '14px';
  927. td41.style.borderLeft = '1px solid #BEBEBE';
  928. td41.style.borderTop = '1px solid #BEBEBE';
  929. tr23.appendChild(td41);
  930. var td42 = document.createElement('td');
  931. td42.width = '15%';
  932. td42.style.textAlign = 'center';
  933. td42.innerHTML = '';
  934. td42.style.fontSize = '14px';
  935. td42.style.borderLeft = '1px solid #BEBEBE';
  936. td42.style.borderTop = '1px solid #BEBEBE';
  937. tr23.appendChild(td42);
  938. var tr24 = document.createElement('tr');
  939. sta3.appendChild(tr24);
  940. var td43 = document.createElement('td');
  941. td43.width = '10%';
  942. td43.style.textAlign = 'center';
  943. td43.innerHTML = 4;
  944. td43.style.fontSize = '14px';
  945. td43.style.borderLeft = '1px solid #BEBEBE';
  946. td43.style.borderTop = '1px solid #BEBEBE';
  947. tr24.appendChild(td43);
  948. var td44 = document.createElement('td');
  949. td44.width = '15%';
  950. td44.style.textAlign = 'center';
  951. td44.innerHTML = '设备离线';
  952. td44.style.fontSize = '14px';
  953. td44.style.borderLeft = '1px solid #BEBEBE';
  954. td44.style.borderTop = '1px solid #BEBEBE';
  955. tr24.appendChild(td44);
  956. var td45 = document.createElement('td');
  957. td45.width = '15%';
  958. td45.style.textAlign = 'center';
  959. var sjlxtotal;
  960. if (isEmpty( countReportJson[3] )){
  961. sjlxtotal=0;
  962. }else {
  963. sjlxtotal= countReportJson[3].offline.sjlxtotal;
  964. }
  965. td45.innerHTML = sjlxtotal;
  966. td45.style.fontSize = '14px';
  967. td45.style.borderLeft = '1px solid #BEBEBE';
  968. td45.style.borderTop = '1px solid #BEBEBE';
  969. tr24.appendChild(td45);
  970. var td46 = document.createElement('td');
  971. td46.width = '10%';
  972. td46.style.textAlign = 'center';
  973. var sjlxcltotal;
  974. if (isEmpty( countReportJson[3] )){
  975. sjlxcltotal=0;
  976. }else{
  977. sjlxcltotal= countReportJson[3].offline.sjlxcltotal;
  978. }
  979. td46.innerHTML = sjlxcltotal;
  980. td46.style.fontSize = '14px';
  981. td46.style.borderLeft = '1px solid #BEBEBE';
  982. td46.style.borderTop = '1px solid #BEBEBE';
  983. tr24.appendChild(td46);
  984. var td47 = document.createElement('td');
  985. td47.width = '10%';
  986. td47.style.textAlign = 'center';
  987. var sjlxwcltotal;
  988. if (isEmpty( countReportJson[3] )){
  989. sjlxwcltotal=0;
  990. }else {
  991. sjlxwcltotal= countReportJson[3].offline.sjlxwcltotal;
  992. }
  993. td47.innerHTML = sjlxwcltotal;
  994. td47.style.fontSize = '14px';
  995. td47.style.borderLeft = '1px solid #BEBEBE';
  996. td47.style.borderTop = '1px solid #BEBEBE';
  997. tr24.appendChild(td47);
  998. var td48 = document.createElement('td');
  999. td48.width = '10%';
  1000. td48.style.textAlign = 'center';
  1001. var sjlxbaifenbi;
  1002. if (isEmpty( countReportJson[3] )){
  1003. sjlxbaifenbi=0;
  1004. }else {
  1005. sjlxbaifenbi= countReportJson[3].offline.sjlxbaifenbi;
  1006. }
  1007. td48.innerHTML = sjlxbaifenbi + '%';
  1008. td48.style.fontSize = '14px';
  1009. td48.style.borderLeft = '1px solid #BEBEBE';
  1010. td48.style.borderTop = '1px solid #BEBEBE';
  1011. tr24.appendChild(td48);
  1012. var td49 = document.createElement('td');
  1013. td49.width = '15%';
  1014. td49.style.textAlign = 'center';
  1015. td49.innerHTML = '';
  1016. td49.style.fontSize = '14px';
  1017. td49.style.borderLeft = '1px solid #BEBEBE';
  1018. td49.style.borderTop = '1px solid #BEBEBE';
  1019. tr24.appendChild(td49);
  1020. // }
  1021. // if(!isEmpty(countReportJson[4])){
  1022. var tr25 = document.createElement('tr');
  1023. sta3.appendChild(tr25);
  1024. var td50 = document.createElement('td');
  1025. td50.width = '10%';
  1026. td50.style.textAlign = 'center';
  1027. td50.innerHTML = 5;
  1028. td50.style.fontSize = '14px';
  1029. td50.style.borderLeft = '1px solid #BEBEBE';
  1030. td50.style.borderTop = '1px solid #BEBEBE';
  1031. tr25.appendChild(td50);
  1032. var td51 = document.createElement('td');
  1033. td51.width = '15%';
  1034. td51.style.textAlign = 'center';
  1035. td51.innerHTML = 'RTU监测';
  1036. td51.rowSpan = '2';
  1037. td51.style.fontSize = '14px';
  1038. td51.style.borderLeft = '1px solid #BEBEBE';
  1039. td51.style.borderTop = '1px solid #BEBEBE';
  1040. tr25.appendChild(td51);
  1041. var td52 = document.createElement('td');
  1042. td52.width = '15%';
  1043. td52.style.textAlign = 'center';
  1044. td52.innerHTML = '报警';
  1045. td52.style.fontSize = '14px';
  1046. td52.style.borderLeft = '1px solid #BEBEBE';
  1047. td52.style.borderTop = '1px solid #BEBEBE';
  1048. tr25.appendChild(td52);
  1049. var td53 = document.createElement('td');
  1050. td53.width = '15%';
  1051. td53.style.textAlign = 'center';
  1052. var rtutotal;
  1053. if (isEmpty( countReportJson[4] )){
  1054. rtutotal=0;
  1055. }else {
  1056. rtutotal= countReportJson[4].alarm.rtutotal;
  1057. }
  1058. td53.innerHTML = rtutotal;
  1059. td53.style.fontSize = '14px';
  1060. td53.style.borderLeft = '1px solid #BEBEBE';
  1061. td53.style.borderTop = '1px solid #BEBEBE';
  1062. tr25.appendChild(td53);
  1063. var td54 = document.createElement('td');
  1064. td54.width = '10%';
  1065. td54.style.textAlign = 'center';
  1066. var rtucltotal;
  1067. if (isEmpty( countReportJson[4] )){
  1068. rtucltotal=0;
  1069. }else{
  1070. rtucltotal= countReportJson[4].alarm.rtucltotal;
  1071. }
  1072. td54.innerHTML = rtucltotal;
  1073. td54.style.fontSize = '14px';
  1074. td54.style.borderLeft = '1px solid #BEBEBE';
  1075. td54.style.borderTop = '1px solid #BEBEBE';
  1076. tr25.appendChild(td54);
  1077. var td55 = document.createElement('td');
  1078. td55.width = '10%';
  1079. td55.style.textAlign = 'center';
  1080. var rtuwcltotal;
  1081. if (isEmpty( countReportJson[4] )){
  1082. rtuwcltotal=0;
  1083. }else{
  1084. rtuwcltotal= countReportJson[4].alarm.rtuwcltotal;
  1085. }
  1086. td55.innerHTML = rtuwcltotal;
  1087. td55.style.fontSize = '14px';
  1088. td55.style.borderLeft = '1px solid #BEBEBE';
  1089. td55.style.borderTop = '1px solid #BEBEBE';
  1090. tr25.appendChild(td55);
  1091. var td56 = document.createElement('td');
  1092. td56.width = '10%';
  1093. td56.style.textAlign = 'center';
  1094. var rtubaifenbi;
  1095. if (isEmpty( countReportJson[4] )){
  1096. rtubaifenbi=0;
  1097. }else{
  1098. rtubaifenbi= countReportJson[4].alarm.rtubaifenbi;
  1099. }
  1100. td56.innerHTML = rtubaifenbi + '%';
  1101. td56.style.fontSize = '14px';
  1102. td56.style.borderLeft = '1px solid #BEBEBE';
  1103. td56.style.borderTop = '1px solid #BEBEBE';
  1104. tr25.appendChild(td56);
  1105. var td57 = document.createElement('td');
  1106. td57.width = '15%';
  1107. td57.style.textAlign = 'center';
  1108. td57.innerHTML = '';
  1109. td57.style.fontSize = '14px';
  1110. td57.style.borderLeft = '1px solid #BEBEBE';
  1111. td57.style.borderTop = '1px solid #BEBEBE';
  1112. tr25.appendChild(td57);
  1113. var tr26 = document.createElement('tr');
  1114. sta3.appendChild(tr26);
  1115. var td58 = document.createElement('td');
  1116. td58.width = '10%';
  1117. td58.style.textAlign = 'center';
  1118. td58.innerHTML = 6;
  1119. td58.style.fontSize = '14px';
  1120. td58.style.borderLeft = '1px solid #BEBEBE';
  1121. td58.style.borderTop = '1px solid #BEBEBE';
  1122. tr26.appendChild(td58);
  1123. var td59 = document.createElement('td');
  1124. td59.width = '15%';
  1125. td59.style.textAlign = 'center';
  1126. td59.innerHTML = '设备离线';
  1127. td59.style.fontSize = '14px';
  1128. td59.style.borderLeft = '1px solid #BEBEBE';
  1129. td59.style.borderTop = '1px solid #BEBEBE';
  1130. tr26.appendChild(td59);
  1131. var td60 = document.createElement('td');
  1132. td60.width = '15%';
  1133. td60.style.textAlign = 'center';
  1134. var rtulxtotal;
  1135. if (isEmpty( countReportJson[4] )){
  1136. rtulxtotal=0;
  1137. }else {
  1138. rtulxtotal=countReportJson[4].offline.rtulxtotal;
  1139. }
  1140. td60.innerHTML = rtulxtotal;
  1141. td60.style.fontSize = '14px';
  1142. td60.style.borderLeft = '1px solid #BEBEBE';
  1143. td60.style.borderTop = '1px solid #BEBEBE';
  1144. tr26.appendChild(td60);
  1145. var td61 = document.createElement('td');
  1146. td61.width = '10%';
  1147. td61.style.textAlign = 'center';
  1148. var rtulxcltotal;
  1149. if (isEmpty( countReportJson[4] )){
  1150. rtulxcltotal=0;
  1151. }else {
  1152. rtulxcltotal= countReportJson[4].offline.rtulxcltotal;
  1153. }
  1154. td61.innerHTML = rtulxcltotal;
  1155. td61.style.fontSize = '14px';
  1156. td61.style.borderLeft = '1px solid #BEBEBE';
  1157. td61.style.borderTop = '1px solid #BEBEBE';
  1158. tr26.appendChild(td61);
  1159. var td62 = document.createElement('td');
  1160. td62.width = '10%';
  1161. td62.style.textAlign = 'center';
  1162. var rtulxwcltotal;
  1163. if (isEmpty( countReportJson[4] )){
  1164. rtulxwcltotal=0;
  1165. }else{
  1166. rtulxwcltotal= countReportJson[4].offline.rtulxwcltotal;
  1167. }
  1168. td62.innerHTML = rtulxwcltotal;
  1169. td62.style.fontSize = '14px';
  1170. td62.style.borderLeft = '1px solid #BEBEBE';
  1171. td62.style.borderTop = '1px solid #BEBEBE';
  1172. tr26.appendChild(td62);
  1173. var td63 = document.createElement('td');
  1174. td63.width = '10%';
  1175. td63.style.textAlign = 'center';
  1176. var rtulxbaifenbi;
  1177. if (isEmpty( countReportJson[4] )){
  1178. rtulxbaifenbi=0;
  1179. }else {
  1180. rtulxbaifenbi= countReportJson[4].offline.rtulxbaifenbi;
  1181. }
  1182. td63.innerHTML = rtulxbaifenbi + '%';
  1183. td63.style.fontSize = '14px';
  1184. td63.style.borderLeft = '1px solid #BEBEBE';
  1185. td63.style.borderTop = '1px solid #BEBEBE';
  1186. tr26.appendChild(td63);
  1187. var td64 = document.createElement('td');
  1188. td64.width = '15%';
  1189. td64.style.textAlign = 'center';
  1190. td64.innerHTML = '';
  1191. td64.style.fontSize = '14px';
  1192. td64.style.borderLeft = '1px solid #BEBEBE';
  1193. td64.style.borderTop = '1px solid #BEBEBE';
  1194. tr26.appendChild(td64);
  1195. // }
  1196. //todo 需要修改的
  1197. if(!isEmpty(countReportJson[2])){
  1198. var tr27 = document.createElement('tr');
  1199. sta3.appendChild(tr27);
  1200. var td65 = document.createElement('td');
  1201. td65.width='10%';
  1202. td65.style.textAlign='center';
  1203. td65.innerHTML=7;
  1204. td65.style.fontSize='14px';
  1205. td65.style.borderLeft ='1px solid #BEBEBE';
  1206. td65.style.borderTop ='1px solid #BEBEBE';
  1207. tr27.appendChild(td65);
  1208. var td66 = document.createElement('td');
  1209. td66.width='15%';
  1210. td66.style.textAlign='center';
  1211. td66.innerHTML='电气火灾监测';
  1212. td66.rowSpan='2';
  1213. td66.style.fontSize='14px';
  1214. td66.style.borderLeft ='1px solid #BEBEBE';
  1215. td66.style.borderTop ='1px solid #BEBEBE';
  1216. tr27.appendChild(td66);
  1217. var td67 = document.createElement('td');
  1218. td67.width='15%';
  1219. td67.style.textAlign='center';
  1220. td67.innerHTML='报警';
  1221. td67.style.fontSize='14px';
  1222. td67.style.borderLeft ='1px solid #BEBEBE';
  1223. td67.style.borderTop ='1px solid #BEBEBE';
  1224. tr27.appendChild(td67);
  1225. var td68 = document.createElement('td');
  1226. td68.width='15%';
  1227. td68.style.textAlign='center';
  1228. td68.innerHTML=countReportJson[2].alarm.eftotal;
  1229. td68.style.fontSize='14px';
  1230. td68.style.borderLeft ='1px solid #BEBEBE';
  1231. td68.style.borderTop ='1px solid #BEBEBE';
  1232. tr27.appendChild(td68);
  1233. var td69 = document.createElement('td');
  1234. td69.width='10%';
  1235. td69.style.textAlign='center';
  1236. td69.innerHTML=countReportJson[2].alarm.efcltotal;
  1237. td69.style.fontSize='14px';
  1238. td69.style.borderLeft ='1px solid #BEBEBE';
  1239. td69.style.borderTop ='1px solid #BEBEBE';
  1240. tr27.appendChild(td69);
  1241. var td70 = document.createElement('td');
  1242. td70.width='10%';
  1243. td70.style.textAlign='center';
  1244. td70.innerHTML=countReportJson[2].alarm.efwcltotal;
  1245. td70.style.fontSize='14px';
  1246. td70.style.borderLeft ='1px solid #BEBEBE';
  1247. td70.style.borderTop ='1px solid #BEBEBE';
  1248. tr27.appendChild(td70);
  1249. var td71 = document.createElement('td');
  1250. td71.width='10%';
  1251. td71.style.textAlign='center';
  1252. td71.innerHTML=countReportJson[2].alarm.efbaifenbi+'%';
  1253. td71.style.fontSize='14px';
  1254. td71.style.borderLeft ='1px solid #BEBEBE';
  1255. td71.style.borderTop ='1px solid #BEBEBE';
  1256. tr27.appendChild(td71);
  1257. var td72 = document.createElement('td');
  1258. td72.width='15%';
  1259. td72.style.textAlign='center';
  1260. td72.innerHTML='';
  1261. td72.style.fontSize='14px';
  1262. td72.style.borderLeft ='1px solid #BEBEBE';
  1263. td72.style.borderTop ='1px solid #BEBEBE';
  1264. tr27.appendChild(td72);
  1265. var tr28 = document.createElement('tr');
  1266. sta3.appendChild(tr28);
  1267. var td73 = document.createElement('td');
  1268. td73.width='10%';
  1269. td73.style.textAlign='center';
  1270. td73.innerHTML=8;
  1271. td73.style.fontSize='14px';
  1272. td73.style.borderLeft ='1px solid #BEBEBE';
  1273. td73.style.borderTop ='1px solid #BEBEBE';
  1274. tr28.appendChild(td73);
  1275. var td74 = document.createElement('td');
  1276. td74.width='15%';
  1277. td74.style.textAlign='center';
  1278. td74.innerHTML='设备离线';
  1279. td74.style.fontSize='14px';
  1280. td74.style.borderLeft ='1px solid #BEBEBE';
  1281. td74.style.borderTop ='1px solid #BEBEBE';
  1282. tr28.appendChild(td74);
  1283. var td75 = document.createElement('td');
  1284. td75.width='15%';
  1285. td75.style.textAlign='center';
  1286. td75.innerHTML=countReportJson[2].offline.eflxtotal;
  1287. td75.style.fontSize='14px';
  1288. td75.style.borderLeft ='1px solid #BEBEBE';
  1289. td75.style.borderTop ='1px solid #BEBEBE';
  1290. tr28.appendChild(td75);
  1291. var td76 = document.createElement('td');
  1292. td76.width='10%';
  1293. td76.style.textAlign='center';
  1294. td76.innerHTML=countReportJson[2].offline.eflxcltotal;
  1295. td76.style.fontSize='14px';
  1296. td76.style.borderLeft ='1px solid #BEBEBE';
  1297. td76.style.borderTop ='1px solid #BEBEBE';
  1298. tr28.appendChild(td76);
  1299. var td77 = document.createElement('td');
  1300. td77.width='10%';
  1301. td77.style.textAlign='center';
  1302. td77.innerHTML=countReportJson[2].offline.eflxwcltotal;
  1303. td77.style.fontSize='14px';
  1304. td77.style.borderLeft ='1px solid #BEBEBE';
  1305. td77.style.borderTop ='1px solid #BEBEBE';
  1306. tr28.appendChild(td77);
  1307. var td78 = document.createElement('td');
  1308. td78.width='10%';
  1309. td78.style.textAlign='center';
  1310. td78.innerHTML=countReportJson[2].offline.eflxbaifenbi+"%";
  1311. td78.style.fontSize='14px';
  1312. td78.style.borderLeft ='1px solid #BEBEBE';
  1313. td78.style.borderTop ='1px solid #BEBEBE';
  1314. tr28.appendChild(td78);
  1315. var td79= document.createElement('td');
  1316. td79.width='15%';
  1317. td79.style.textAlign='center';
  1318. td79.innerHTML='';
  1319. td79.style.fontSize='14px';
  1320. td79.style.borderLeft ='1px solid #BEBEBE';
  1321. td79.style.borderTop ='1px solid #BEBEBE';
  1322. tr28.appendChild(td79);
  1323. }
  1324. //todo 需要修改的
  1325. if(!isEmpty(countReportJson[5])){
  1326. var tr29 = document.createElement('tr');
  1327. sta3.appendChild(tr29);
  1328. var td80 = document.createElement('td');
  1329. td80.width='10%';
  1330. td80.style.textAlign='center';
  1331. //todo 需要修改的
  1332. if(!isEmpty(countReportJson[2])){
  1333. td80.innerHTML=9;
  1334. }else{
  1335. td80.innerHTML=7;
  1336. }
  1337. td80.style.fontSize='14px';
  1338. td80.style.borderLeft ='1px solid #BEBEBE';
  1339. td80.style.borderTop ='1px solid #BEBEBE';
  1340. tr29.appendChild(td80);
  1341. var td81 = document.createElement('td');
  1342. td81.width='15%';
  1343. td81.style.textAlign='center';
  1344. td81.innerHTML='视频监测';
  1345. // td81.rowSpan='2';
  1346. td81.style.fontSize='14px';
  1347. td81.style.borderLeft ='1px solid #BEBEBE';
  1348. td81.style.borderTop ='1px solid #BEBEBE';
  1349. tr29.appendChild(td81);
  1350. var td82 = document.createElement('td');
  1351. td82.width='15%';
  1352. td82.style.textAlign='center';
  1353. td82.innerHTML='报警';
  1354. td82.style.fontSize='14px';
  1355. td82.style.borderLeft ='1px solid #BEBEBE';
  1356. td82.style.borderTop ='1px solid #BEBEBE';
  1357. tr29.appendChild(td82);
  1358. var td83 = document.createElement('td');
  1359. td83.width='15%';
  1360. td83.style.textAlign='center';
  1361. td83.innerHTML=countReportJson[5].alarm.videototal;
  1362. td83.style.fontSize='14px';
  1363. td83.style.borderLeft ='1px solid #BEBEBE';
  1364. td83.style.borderTop ='1px solid #BEBEBE';
  1365. tr29.appendChild(td83);
  1366. var td84 = document.createElement('td');
  1367. td84.width='10%';
  1368. td84.style.textAlign='center';
  1369. td84.innerHTML=countReportJson[5].alarm.videocltotal;
  1370. td84.style.fontSize='14px';
  1371. td84.style.borderLeft ='1px solid #BEBEBE';
  1372. td84.style.borderTop ='1px solid #BEBEBE';
  1373. tr29.appendChild(td84);
  1374. var td85 = document.createElement('td');
  1375. td85.width='10%';
  1376. td85.style.textAlign='center';
  1377. td85.innerHTML=countReportJson[5].alarm.videowcltotal;
  1378. td85.style.fontSize='14px';
  1379. td85.style.borderLeft ='1px solid #BEBEBE';
  1380. td85.style.borderTop ='1px solid #BEBEBE';
  1381. tr29.appendChild(td85);
  1382. var td86 = document.createElement('td');
  1383. td86.width='10%';
  1384. td86.style.textAlign='center';
  1385. td86.innerHTML=countReportJson[5].alarm.videobaifenbi+'%';
  1386. td86.style.fontSize='14px';
  1387. td86.style.borderLeft ='1px solid #BEBEBE';
  1388. td86.style.borderTop ='1px solid #BEBEBE';
  1389. tr29.appendChild(td86);
  1390. var td87 = document.createElement('td');
  1391. td87.width='15%';
  1392. td87.style.textAlign='center';
  1393. td87.innerHTML='';
  1394. td87.style.fontSize='14px';
  1395. td87.style.borderLeft ='1px solid #BEBEBE';
  1396. td87.style.borderTop ='1px solid #BEBEBE';
  1397. tr29.appendChild(td87);
  1398. }
  1399. var title17 = document.createElement('div');
  1400. title17.style.textAlign='center';
  1401. title17.style.fontSize='14px';
  1402. title17.style.marginBottom='20px';
  1403. title17.style.fontWeight='bold';
  1404. title17.innerHTML='表4 项目阶段数据统计表';
  1405. div2.appendChild(title17);
  1406. var title18 = document.createElement('h3');
  1407. title18.style.textAlign='left';
  1408. title18.style.fontSize='14px';
  1409. title18.style.fontWeight='bold';
  1410. title18.innerHTML='3 阶段数据分析';
  1411. woker_talk.appendChild(title18);
  1412. var title18_highcharts = document.createElement('div');
  1413. // title20_highcharts.width='200!important';
  1414. // title20_highcharts.height='200!important';
  1415. title18_highcharts.style.marginTop='20px';
  1416. title18_highcharts.style.marginBottom='20px';
  1417. // if (hjresult11!=0 && sjresult22!=0 && rturesult33!=0 && efresult44!=0 && videoresult55!=0){
  1418. //
  1419. // title18_highcharts.setAttribute('id','container3');
  1420. // //title18.innerHTML='本月无报警';
  1421. // }
  1422. title18_highcharts.setAttribute('id','container3');
  1423. title18_highcharts.style.textAlign='center';
  1424. woker_talk.appendChild(title18_highcharts);
  1425. var title19 = document.createElement('h4');
  1426. title19.style.textAlign='left';
  1427. title19.style.fontSize='14px';
  1428. title19.style.fontWeight='bold';
  1429. title19.innerHTML='3.1 火灾监测数据分析';
  1430. woker_talk.appendChild(title19);
  1431. var title20_highcharts = document.createElement('div');
  1432. // title20_highcharts.width='200!important';
  1433. // title20_highcharts.height='200!important';
  1434. title20_highcharts.style.marginTop='20px';
  1435. title20_highcharts.style.marginBottom='20px';
  1436. title20_highcharts.setAttribute('id','container');
  1437. title20_highcharts.style.textAlign='center';
  1438. woker_talk.appendChild(title20_highcharts);
  1439. var title20 = document.createElement('div');
  1440. // title20.setAttribute('class','title20_label1');
  1441. title20.style.border='1px solid #BEBEBE';
  1442. title20.width='100%';
  1443. title20.style.background='#AAAAAA';
  1444. // title20.style.minHeight='80px';
  1445. title20.style.textIndent='2em';
  1446. title20.style.marginBottom='20px';
  1447. woker_talk.appendChild(title20);
  1448. var title20_p1 = document.createElement('p');
  1449. //火警数据信息
  1450. title20_p1.innerHTML=fireDataJson.data;
  1451. // title20_p1.setAttribute('class','title14_label1_p1');
  1452. title20_p1.style.paddingLeft='36px';
  1453. title20_p1.style.paddingRight='36px';
  1454. title20_p1.style.marginBottom='20px';
  1455. title20_p1.style.marginTop='20px';
  1456. title20_p1.style.lineHeight='150%';
  1457. title20_p1.style.fontSize='14px';
  1458. title20.appendChild(title20_p1);
  1459. var title21 = document.createElement('h4');
  1460. title21.style.textAlign='left';
  1461. title21.style.fontSize='14px';
  1462. title21.style.fontWeight='bold';
  1463. title21.innerHTML='3.2 消防水系统监测数据分析';
  1464. woker_talk.appendChild(title21);
  1465. var title21_highcharts = document.createElement('div');
  1466. // title20_highcharts.width='200!important';
  1467. // title20_highcharts.height='200!important';
  1468. title21_highcharts.style.marginTop='20px';
  1469. title21_highcharts.style.marginBottom='46px';
  1470. title21_highcharts.setAttribute('id','container1');
  1471. title21_highcharts.style.textAlign='center';
  1472. woker_talk.appendChild(title21_highcharts);
  1473. var title22 = document.createElement('div');
  1474. // title22.setAttribute('class','title20_label1');
  1475. title22.style.border='1px solid #BEBEBE';
  1476. title22.width='100%';
  1477. title22.style.background='#AAAAAA';
  1478. // title22.style.minHeight='80px';
  1479. title22.style.textIndent='2em';
  1480. title22.style.marginBottom='20px';
  1481. woker_talk.appendChild(title22);
  1482. var title22_p1 = document.createElement('p');
  1483. //水警分析数据信息
  1484. title22_p1.innerHTML=waterDataJson.data;
  1485. // title22_p1.setAttribute('class','title14_label1_p1');
  1486. title22_p1.style.fontSize='14px';
  1487. title22_p1.style.paddingLeft='36px';
  1488. title22_p1.style.paddingRight='36px';
  1489. title22_p1.style.marginBottom='20px';
  1490. title22_p1.style.marginTop='20px';
  1491. title22_p1.style.lineHeight='150%';
  1492. title22.appendChild(title22_p1);
  1493. var title23 = document.createElement('h4');
  1494. title23.style.textAlign='left';
  1495. title23.style.fontSize='14px';
  1496. title23.style.fontWeight='bold';
  1497. title23.innerHTML='3.3 RTU监测数据分析';
  1498. woker_talk.appendChild(title23);
  1499. var title23_highcharts = document.createElement('div');
  1500. // title23_highcharts.style.width='300px';
  1501. // title23_highcharts.style.height='300px';
  1502. title23_highcharts.style.marginTop='20px';
  1503. title23_highcharts.style.marginBottom='20px';
  1504. title23_highcharts.setAttribute('id','container2');
  1505. title23_highcharts.style.textAlign='center';
  1506. woker_talk.appendChild(title23_highcharts);
  1507. var title24 = document.createElement('div');
  1508. title24.style.border='1px solid #BEBEBE';
  1509. title24.width='100%';
  1510. title24.style.background='#AAAAAA';
  1511. // title22.style.minHeight='80px';
  1512. title24.style.textIndent='2em';
  1513. title24.style.marginBottom='20px';
  1514. woker_talk.appendChild(title24);
  1515. var title24_p1 = document.createElement('p');
  1516. //分析信息
  1517. title24_p1.innerHTML=rtuDataJson.data;
  1518. // title24_p1.setAttribute('class','title14_label1_p1');
  1519. title24_p1.style.fontSize='14px';
  1520. title24_p1.style.paddingLeft='36px';
  1521. title24_p1.style.paddingRight='36px';
  1522. title24_p1.style.marginBottom='20px';
  1523. title24_p1.style.marginTop='20px';
  1524. title24_p1.style.lineHeight='150%';
  1525. title24.appendChild(title24_p1);
  1526. // if(ConfirmStore4[0].dweftotalCount>0){
  1527. var title30 = document.createElement('h4');
  1528. title30.style.textAlign='left';
  1529. title30.style.fontSize='14px';
  1530. title30.style.fontWeight='bold';
  1531. title30.innerHTML='3.4 电气火灾监测数据分析';
  1532. woker_talk.appendChild(title30);
  1533. var title30_highcharts = document.createElement('div');
  1534. // title23_highcharts.style.width='300px';
  1535. // title23_highcharts.style.height='300px';
  1536. title30_highcharts.style.marginTop='20px';
  1537. title30_highcharts.style.marginBottom='20px';
  1538. title30_highcharts.setAttribute('id','container4');
  1539. title30_highcharts.style.textAlign='center';
  1540. woker_talk.appendChild(title30_highcharts);
  1541. var title31 = document.createElement('div');
  1542. title31.style.border='1px solid #BEBEBE';
  1543. title31.width='100%';
  1544. title31.style.background='#AAAAAA';
  1545. // title22.style.minHeight='80px';
  1546. title31.style.textIndent='2em';
  1547. title31.style.marginBottom='20px';
  1548. woker_talk.appendChild(title31);
  1549. var title31_p1 = document.createElement('p');
  1550. title31_p1.innerHTML=efDataJson.data;
  1551. // title24_p1.setAttribute('class','title14_label1_p1');
  1552. title31_p1.style.fontSize='14px';
  1553. title31_p1.style.paddingLeft='36px';
  1554. title31_p1.style.paddingRight='36px';
  1555. title31_p1.style.marginBottom='20px';
  1556. title31_p1.style.marginTop='20px';
  1557. title31_p1.style.lineHeight='150%';
  1558. title31.appendChild(title31_p1);
  1559. // }
  1560. // if(ConfirmStore4[0].dwvideototalCount>0){
  1561. var title32 = document.createElement('h4');
  1562. title32.style.textAlign='left';
  1563. title32.style.fontSize='14px';
  1564. title32.style.fontWeight='bold';
  1565. // if(ConfirmStore4[0].dweftotalCount>0){
  1566. title32.innerHTML='3.5 视频监测数据分析';
  1567. // }else{
  1568. // title32.innerHTML='3.4 视频监测数据分析';
  1569. // }
  1570. woker_talk.appendChild(title32);
  1571. var title32_highcharts = document.createElement('div');
  1572. // title23_highcharts.style.width='300px';
  1573. // title23_highcharts.style.height='300px';
  1574. title32_highcharts.style.marginTop='20px';
  1575. title32_highcharts.style.marginBottom='20px';
  1576. title32_highcharts.setAttribute('id','container5');
  1577. title32_highcharts.style.textAlign='center';
  1578. woker_talk.appendChild(title32_highcharts);
  1579. var title33 = document.createElement('div');
  1580. title33.style.border='1px solid #BEBEBE';
  1581. title33.width='100%';
  1582. title33.style.background='#AAAAAA';
  1583. // title22.style.minHeight='80px';
  1584. title33.style.textIndent='2em';
  1585. title33.style.marginBottom='20px';
  1586. woker_talk.appendChild(title33);
  1587. var title33_p1 = document.createElement('p');
  1588. title33_p1.innerHTML=videoDataJson.data;
  1589. // title24_p1.setAttribute('class','title14_label1_p1');
  1590. title33_p1.style.fontSize='14px';
  1591. title33_p1.style.paddingLeft='36px';
  1592. title33_p1.style.paddingRight='36px';
  1593. title33_p1.style.marginBottom='20px';
  1594. title33_p1.style.marginTop='20px';
  1595. title33_p1.style.lineHeight='150%';
  1596. title33.appendChild(title33_p1);
  1597. // }
  1598. var title25 = document.createElement('h3');
  1599. title25.style.textAlign='left';
  1600. title25.style.fontSize='14px';
  1601. title25.style.fontWeight='bold';
  1602. title25.innerHTML='4 分析结论';
  1603. woker_talk.appendChild(title25);
  1604. var title26 = document.createElement('h4');
  1605. title26.style.textAlign='left';
  1606. title26.style.fontSize='14px';
  1607. title26.style.fontWeight='bold';
  1608. title26.innerHTML='4.1 存在问题或需要改进事项';
  1609. woker_talk.appendChild(title26);
  1610. var title27 = document.createElement('ol');
  1611. // title27.setAttribute('class','title27_label1');
  1612. // title27.style.textAlign='center';
  1613. title27.style.border='1px solid #BEBEBE';
  1614. title27.width='100%';
  1615. title27.style.textAlign='left';
  1616. title27.style.background='#AAAAAA';
  1617. title27.style.minHeight='20px';
  1618. title27.style.paddingLeft='36px';
  1619. title27.style.marginBottom='20px';
  1620. woker_talk.appendChild(title27);
  1621. var pro= conclusionJson.propose;
  1622. var b3 = isEmpty(pro[1]);
  1623. if(!b3){
  1624. if(!isEmpty(pro[1].data1)){
  1625. var title27_p1 = document.createElement('li');
  1626. title27_p1.innerHTML=pro[1].data1;
  1627. // title27_p1.setAttribute('class','title14_label1_p1');
  1628. title27_p1.style.fontSize='14px';
  1629. title27.appendChild(title27_p1);
  1630. }
  1631. if(!isEmpty(pro[1].data2)){
  1632. var title27_p3 = document.createElement('li');
  1633. title27_p3.innerHTML=pro[1].data2;
  1634. title27_p3.style.fontSize='14px';
  1635. title27.appendChild(title27_p3);
  1636. }
  1637. }
  1638. var b4 = isEmpty(pro[2]);
  1639. if(!b4){
  1640. if(!isEmpty(pro[2].data1)){
  1641. var title27_p2 = document.createElement('li');
  1642. title27_p2.innerHTML=pro[2].data1;
  1643. title27_p2.style.fontSize='14px';
  1644. title27.appendChild(title27_p2);
  1645. }
  1646. if(!isEmpty(pro[2].data2)){
  1647. var title27_p4 = document.createElement('li');
  1648. title27_p4.innerHTML=pro[2].data2;
  1649. title27_p4.style.fontSize='14px';
  1650. title27.appendChild(title27_p4);
  1651. }
  1652. }
  1653. var b5 = isEmpty(pro[3]);
  1654. if(!b5){
  1655. if(!isEmpty(pro[3].data1)){
  1656. var title27_p5 = document.createElement('li');
  1657. title27_p5.innerHTML=pro[3].data1;
  1658. title27_p5.style.fontSize='14px';
  1659. title27.appendChild(title27_p5);
  1660. }
  1661. if(!isEmpty(pro[3].data2)){
  1662. var title27_p6 = document.createElement('li');
  1663. title27_p6.innerHTML=pro[3].data2;
  1664. title27_p6.style.fontSize='14px';
  1665. title27.appendChild(title27_p6);
  1666. }
  1667. }
  1668. var b6 = isEmpty(pro[4]);
  1669. if(!b6){
  1670. if(!isEmpty(pro[4].data1)){
  1671. var title27_p10 = document.createElement('li');
  1672. title27_p10.innerHTML=pro[4].data1;
  1673. title27_p10.style.fontSize='14px';
  1674. title27.appendChild(title27_p10);
  1675. }
  1676. if(!isEmpty(pro[4].data2)){
  1677. var title27_p8 = document.createElement('li');
  1678. title27_p8.innerHTML=!isEmpty(pro[4].data2);
  1679. title27_p8.style.fontSize='14px';
  1680. title27.appendChild(title27_p8);
  1681. }
  1682. }
  1683. var b7 = isEmpty(pro[5]);
  1684. if(!b7){
  1685. if(!isEmpty(pro[5].data1)){
  1686. var title27_p9 = document.createElement('li');
  1687. title27_p9.innerHTML=pro[5].data1;
  1688. title27_p9.style.fontSize='14px';
  1689. title27.appendChild(title27_p9);
  1690. }
  1691. }
  1692. if(!isEmpty(pro[9])){
  1693. var title27_li7 = document.createElement('li');
  1694. title27_li7.innerHTML=pro[9];
  1695. title27_li7.style.fontSize='14px';
  1696. title27.appendChild(title27_li7);
  1697. }
  1698. var title28 = document.createElement('h4');
  1699. title28.style.textAlign='left';
  1700. title28.style.fontSize='14px';
  1701. title28.style.fontWeight='bold';
  1702. title28.innerHTML='4.2 其他事宜';
  1703. woker_talk.appendChild(title28);
  1704. var title29_ol1 = document.createElement('ol');
  1705. title29_ol1.style.border='1px solid #BEBEBE';
  1706. title29_ol1.width='100%';
  1707. title29_ol1.style.textAlign='left';
  1708. title29_ol1.style.background='#AAAAAA';
  1709. title29_ol1.style.minHeight='20px';
  1710. title29_ol1.style.paddingLeft='36px';
  1711. title29_ol1.style.marginBottom='20px';
  1712. woker_talk.appendChild(title29_ol1);
  1713. var other= conclusionJson.other;
  1714. var o1 = isEmpty(other[1]);
  1715. if(!isEmpty(other[1])){
  1716. if(!isEmpty(other[1].data1)){
  1717. var title29_li6 = document.createElement('li');
  1718. title29_li6.innerHTML=other[1].data1;
  1719. title29_li6.style.fontSize='14px';
  1720. title29_ol1.appendChild(title29_li6);
  1721. }
  1722. if(!isEmpty(other[1].data2)){
  1723. var title29_li1 = document.createElement('li');
  1724. title29_li1.innerHTML=other[1].data2;
  1725. title29_li1.style.fontSize='14px';
  1726. title29_ol1.appendChild(title29_li1);
  1727. }
  1728. }
  1729. if(!isEmpty(other[2])){
  1730. if(!isEmpty(other[2].data1)){
  1731. var title29_li2 = document.createElement('li');
  1732. title29_li2.innerHTML=other[2].data1;
  1733. title29_li2.style.fontSize='14px';
  1734. title29_ol1.appendChild(title29_li2);
  1735. }
  1736. if(!isEmpty(other[2].data2)){
  1737. var title29_li3 = document.createElement('li');
  1738. title29_li3.innerHTML=other[2].data2;
  1739. title29_li3.style.fontSize='14px';
  1740. title29_ol1.appendChild(title29_li3);
  1741. }
  1742. }
  1743. if(!isEmpty(other[3])){
  1744. if(!isEmpty(other[3].data1)){
  1745. var title29_li4 = document.createElement('li');
  1746. title29_li4.innerHTML=other[3].data1;
  1747. title29_li4.style.fontSize='14px';
  1748. title29_ol1.appendChild(title29_li4);
  1749. }
  1750. if(!isEmpty(other[3].data2)){
  1751. var title29_li5 = document.createElement('li');
  1752. title29_li5.innerHTML=other[3].data2;
  1753. title29_li5.style.fontSize='14px';
  1754. title29_ol1.appendChild(title29_li5);
  1755. }
  1756. }
  1757. if(!isEmpty(other[4])){
  1758. if(!isEmpty(other[4].data2)){
  1759. var title29_li8 = document.createElement('li');
  1760. title29_li8.innerHTML=other[4].data2;
  1761. title29_li8.style.fontSize='14px';
  1762. title29_ol1.appendChild(title29_li8);
  1763. }
  1764. if(!isEmpty(other[4].data1)){
  1765. var title29_li9 = document.createElement('li');
  1766. title29_li9.innerHTML=other[4].data1;
  1767. title29_li9.style.fontSize='14px';
  1768. title29_ol1.appendChild(title29_li9);
  1769. }
  1770. }
  1771. if(!isEmpty(other[5])){
  1772. if(other[5].data1){
  1773. var title29_li10 = document.createElement('li');
  1774. title29_li10.innerHTML=other[5].data1;
  1775. title29_li10.style.fontSize='14px';
  1776. title29_ol1.appendChild(title29_li10);
  1777. }
  1778. }
  1779. if(!isEmpty(other[9])){
  1780. var title29_li7 = document.createElement('li');
  1781. title29_li7.innerHTML=other[9];
  1782. title29_li7.style.fontSize='14px';
  1783. title29_ol1.appendChild(title29_li7);
  1784. }
  1785. }
  1786. var funDownload = function (content, filename) {
  1787. var eleLink = document.createElement('a');
  1788. eleLink.download = filename;
  1789. eleLink.style.display = 'none';
  1790. // 字符内容转变成blob地址
  1791. var blob = new Blob([content]);
  1792. eleLink.href = URL.createObjectURL(blob);
  1793. // 触发点击
  1794. document.body.appendChild(eleLink);
  1795. eleLink.click();
  1796. // 然后移除
  1797. document.body.removeChild(eleLink);
  1798. }
  1799. var highcharts = function () {
  1800. var clhjbaifenbi = parseFloat(fireDataJson.process_rate);
  1801. $('#container').highcharts({
  1802. chart: {
  1803. plotBackgroundColor: null,
  1804. plotBorderWidth: null,
  1805. plotShadow: false,
  1806. type: 'pie'
  1807. },
  1808. credits: {
  1809. enabled: false
  1810. },
  1811. exporting: { enabled:false },
  1812. title: {
  1813. text: '火灾告警处理情况饼图'
  1814. },
  1815. tooltip: {
  1816. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  1817. },
  1818. plotOptions: {
  1819. pie: {
  1820. allowPointSelect: true,
  1821. cursor: 'pointer',
  1822. dataLabels: {
  1823. enabled: true,
  1824. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  1825. style: {
  1826. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  1827. }
  1828. },
  1829. showInLegend: true
  1830. }
  1831. },
  1832. series: [{
  1833. name: '百分比',
  1834. colorByPoint: true,
  1835. data: [{
  1836. name: '处理率',
  1837. y: clhjbaifenbi,
  1838. sliced: true,
  1839. selected: true
  1840. }, {
  1841. name: '未处理',
  1842. y: 100-clhjbaifenbi
  1843. }]
  1844. }]
  1845. });
  1846. }
  1847. var highcharts1 = function () {
  1848. var clsjbaifenbi = parseFloat(waterDataJson.process_rate);
  1849. $('#container1').highcharts({
  1850. chart: {
  1851. plotBackgroundColor: null,
  1852. plotBorderWidth: null,
  1853. plotShadow: false,
  1854. type: 'pie'
  1855. },
  1856. credits: {
  1857. enabled: false
  1858. },
  1859. exporting: { enabled:false },
  1860. title: {
  1861. text: '水系统告警处理情况饼图'
  1862. },
  1863. tooltip: {
  1864. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  1865. },
  1866. plotOptions: {
  1867. pie: {
  1868. allowPointSelect: true,
  1869. cursor: 'pointer',
  1870. dataLabels: {
  1871. enabled: true,
  1872. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  1873. style: {
  1874. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  1875. }
  1876. },
  1877. showInLegend: true
  1878. }
  1879. },
  1880. series: [{
  1881. name: '百分比',
  1882. colorByPoint: true,
  1883. data: [{
  1884. name: '处理率',
  1885. y: clsjbaifenbi,
  1886. sliced: true,
  1887. selected: true
  1888. },{
  1889. name: '未处理',
  1890. y: 100-clsjbaifenbi
  1891. }]
  1892. }]
  1893. });
  1894. }
  1895. var highcharts2 = function () {
  1896. var clrtubaifenbi = parseFloat(rtuDataJson.process_rate);
  1897. $('#container2').highcharts({
  1898. chart: {
  1899. plotBackgroundColor: null,
  1900. plotBorderWidth: null,
  1901. plotShadow: false,
  1902. type: 'pie'
  1903. },
  1904. credits: {
  1905. enabled: false
  1906. },
  1907. exporting: { enabled:false },
  1908. title: {
  1909. text: 'RTU系统告警处理情况饼图'
  1910. },
  1911. tooltip: {
  1912. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  1913. },
  1914. plotOptions: {
  1915. pie: {
  1916. allowPointSelect: true,
  1917. cursor: 'pointer',
  1918. dataLabels: {
  1919. enabled: true,
  1920. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  1921. style: {
  1922. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  1923. }
  1924. },
  1925. showInLegend: true
  1926. }
  1927. },
  1928. series: [{
  1929. name: '百分比',
  1930. colorByPoint: true,
  1931. data: [{
  1932. name: '处理率',
  1933. y: clrtubaifenbi,
  1934. sliced: true,
  1935. selected: true
  1936. },{
  1937. name: '未处理',
  1938. y: 100-clrtubaifenbi
  1939. }]
  1940. }]
  1941. });
  1942. }
  1943. var highcharts3 = function () {
  1944. var hjresult1 = parseFloat(alarmTotalJson.hjtotalCount);
  1945. var sjresult2 = parseFloat(alarmTotalJson.sjtotalCount);
  1946. var rturesult3 = parseFloat(alarmTotalJson.rtutotalCount);
  1947. var efresult4 = parseFloat(alarmTotalJson.eftotalCount);
  1948. var videoresult5 = parseFloat(alarmTotalJson.videototalCount);
  1949. // if (hjresult1==0 && sjresult2==0 && rturesult3==0 && efresult4==0 && videoresult5==0){
  1950. //
  1951. // title20_p1.innerHTML='本月无报警';
  1952. // }
  1953. $('#container3').highcharts({
  1954. chart: {
  1955. plotBackgroundColor: null,
  1956. plotBorderWidth: null,
  1957. plotShadow: false,
  1958. type: 'pie'
  1959. },
  1960. credits: {
  1961. enabled: false
  1962. },
  1963. exporting: { enabled:false },
  1964. title: {
  1965. text: '各类告警总数情况饼图'
  1966. },
  1967. tooltip: {
  1968. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  1969. },
  1970. plotOptions: {
  1971. pie: {
  1972. allowPointSelect: true,
  1973. cursor: 'pointer',
  1974. dataLabels: {
  1975. enabled: true,
  1976. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  1977. style: {
  1978. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  1979. }
  1980. },
  1981. showInLegend: true
  1982. }
  1983. },
  1984. series: [{
  1985. name: '百分比',
  1986. colorByPoint: true,
  1987. data: [{
  1988. name: '火系统告警',
  1989. y: hjresult1,
  1990. sliced: true,
  1991. selected: true
  1992. },{
  1993. name: '水系统告警',
  1994. y: sjresult2
  1995. },{
  1996. name: 'RTU系统告警',
  1997. y: rturesult3
  1998. },{
  1999. name: '电气火灾系统告警',
  2000. y: efresult4
  2001. },{
  2002. name: '视频系统告警',
  2003. y: videoresult5
  2004. }]
  2005. }]
  2006. });
  2007. }
  2008. var highcharts4 = function () {
  2009. var clefbaifenbi = parseFloat(efDataJson.process_rate);
  2010. $('#container4').highcharts({
  2011. chart: {
  2012. plotBackgroundColor: null,
  2013. plotBorderWidth: null,
  2014. plotShadow: false,
  2015. type: 'pie'
  2016. },
  2017. credits: {
  2018. enabled: false
  2019. },
  2020. exporting: { enabled:false },
  2021. title: {
  2022. text: '电气火灾系统告警处理情况饼图'
  2023. },
  2024. tooltip: {
  2025. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  2026. },
  2027. plotOptions: {
  2028. pie: {
  2029. allowPointSelect: true,
  2030. cursor: 'pointer',
  2031. dataLabels: {
  2032. enabled: true,
  2033. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  2034. style: {
  2035. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  2036. }
  2037. },
  2038. showInLegend: true
  2039. }
  2040. },
  2041. series: [{
  2042. name: '百分比',
  2043. colorByPoint: true,
  2044. data: [{
  2045. name: '处理率',
  2046. y: clefbaifenbi,
  2047. sliced: true,
  2048. selected: true
  2049. },{
  2050. name: '未处理',
  2051. y: 100-clefbaifenbi
  2052. }]
  2053. }]
  2054. });
  2055. }
  2056. var highcharts5 = function () {
  2057. var clvideobaifenbi = parseFloat(videoDataJson.process_rate);
  2058. $('#container5').highcharts({
  2059. chart: {
  2060. plotBackgroundColor: null,
  2061. plotBorderWidth: null,
  2062. plotShadow: false,
  2063. type: 'pie'
  2064. },
  2065. credits: {
  2066. enabled: false
  2067. },
  2068. exporting: { enabled:false },
  2069. title: {
  2070. text: '视频系统告警处理情况饼图'
  2071. },
  2072. tooltip: {
  2073. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  2074. },
  2075. plotOptions: {
  2076. pie: {
  2077. allowPointSelect: true,
  2078. cursor: 'pointer',
  2079. dataLabels: {
  2080. enabled: true,
  2081. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  2082. style: {
  2083. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  2084. }
  2085. },
  2086. showInLegend: true
  2087. }
  2088. },
  2089. series: [{
  2090. name: '百分比',
  2091. colorByPoint: true,
  2092. data: [{
  2093. name: '处理率',
  2094. y: clvideobaifenbi,
  2095. sliced: true,
  2096. selected: true
  2097. },{
  2098. name: '未处理',
  2099. y: 100-clvideobaifenbi
  2100. }]
  2101. }]
  2102. });
  2103. }
  2104. // var daochu = function(){
  2105. // var woker_talk = document.getElementById('woker_talk');
  2106. // var eleTextarea = document.querySelector('#woker_talk');
  2107. // var aa = '<!DOCTYPE html>'+
  2108. // '<html xmlns:v="urn:schemas-microsoft-com:vml"xmlns:o="urn:schemas-microsoft-com:office:office"xmlns:w="urn:schemas-microsoft-com:office:word"xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"xmlns="http://www.w3.org/TR/REC-html40">'+
  2109. // '<head>'+
  2110. // '<!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val="Cambria Math"/><m:brkBin m:val="before"/><m:brkBinSub m:val="--"/><m:smallFrac m:val="off"/><m:dispDef/><m:lMargin m:val="0"/> <m:rMargin m:val="0"/><m:defJc m:val="centerGroup"/><m:wrapIndent m:val="1440"/><m:intLim m:val="subSup"/><m:naryLim m:val="undOvr"/></m:mathPr></w:WordDocument></xml><![endif]-->'+
  2111. // '<meta charset="UTF-8">'+
  2112. // '<meta name="viewport" content="width=device-width, initial-scale=1.0">'+
  2113. // '<meta http-equiv="X-UA-Compatible" content="ie=edge">'+
  2114. // '<title>Document</title>'+
  2115. // '</head>'+
  2116. // '<body>'+
  2117. // eleTextarea.outerHTML+'</body></html>'
  2118. // funDownload(aa, 'project.html');
  2119. // }
  2120. var daochu = function(){
  2121. var woker_talk = document.getElementById('woker_talk');
  2122. var eleTextarea = document.querySelector('#woker_talk');
  2123. html2canvas(woker_talk, {
  2124. height: $("#woker_talk").outerHeight(),
  2125. onrendered:function(canvas) {
  2126. var contentWidth = canvas.width;
  2127. var contentHeight = canvas.height;
  2128. //一页pdf显示html页面生成的canvas高度;
  2129. var pageHeight = contentWidth / 592.28 * 841.89;
  2130. //未生成pdf的html页面高度
  2131. var leftHeight = contentHeight;
  2132. //页面偏移
  2133. var position = 0;
  2134. //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
  2135. var imgWidth = 555.28;
  2136. var imgHeight = 555.28/contentWidth * contentHeight;
  2137. var pageData = canvas.toDataURL('image/jpeg', 1.0);
  2138. var pdf = new jsPDF('', 'pt', 'a4');
  2139. //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
  2140. //当内容未超过pdf一页显示的范围,无需分页
  2141. if (leftHeight < pageHeight) {
  2142. pdf.addImage(pageData, 'JPEG', 20, 0, imgWidth, imgHeight );
  2143. } else {
  2144. while(leftHeight > 0) {
  2145. pdf.addImage(pageData, 'JPEG', 20, position, imgWidth, imgHeight)
  2146. leftHeight -= pageHeight;
  2147. position -= 841.89;
  2148. //避免添加空白页
  2149. if(leftHeight > 0) {
  2150. pdf.addPage();
  2151. }
  2152. }
  2153. }
  2154. pdf.save('content.pdf');
  2155. }
  2156. })
  2157. }
  2158. var print_detail = function (){
  2159. var div1_label1 = document.getElementById('woker_talk').innerHTML;
  2160. var div2_label1 = document.getElementById('div2_label1').innerHTML;
  2161. var hkey_key;
  2162. var hkey_root = 'HKEY_CURRENT_USER';
  2163. var hkey_path = '\\Software\\Micorsoft\\Internet Explorer\\PageSetup\\';
  2164. var print_win = window.open('打印窗口','_blank');
  2165. var div = document.createElement('div');
  2166. div.setAttribute('width', '100%');
  2167. div.setAttribute('height', '100%');
  2168. var div_print = document.createElement('div');
  2169. div_print.setAttribute('style', 'width:595px;height:842px;padding:20px;margin:0px auto 0px auto');
  2170. div_print.innerHTML=div1_label1;
  2171. div.appendChild(div_print);
  2172. // var div_print1 = document.createElement('div');
  2173. // div_print1.setAttribute('style', 'width:595px;height:842px;padding:20px;margin:0px auto 0px auto');
  2174. // div_print1.innerHTML=div2_label1;
  2175. // div.appendChild(div_print1);
  2176. print_win.document.write(div.innerHTML);
  2177. print_win.document.close();
  2178. try{
  2179. var RegWsh = new ActiveXObject('WScript.Shell');
  2180. hkey_key='header';
  2181. RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,'');
  2182. hkey_key='footer';
  2183. RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,'');
  2184. }catch(e){}
  2185. print_win.print();
  2186. print_win.close();
  2187. }
  2188. //var show_detail_data = function(start_data,end_data,build_code,project_date){
  2189. var show_detail_data = function(build_code,project_date){
  2190. var start_data = start_data;
  2191. var end_data = end_data;
  2192. var build_code = build_code;
  2193. var project_date = project_date;
  2194. Ext.create('Ext.window.Window', {
  2195. id:'project_data_win',
  2196. title: '<div id="detail_win_title">工作月报</div>',
  2197. height: 841,
  2198. width: 650,
  2199. maximizable: true,
  2200. layout: 'fit',
  2201. modal:true,
  2202. buttons:[
  2203. {
  2204. text:'导出',
  2205. handler : function () {
  2206. print_detail();
  2207. }
  2208. },{
  2209. text:'关闭',
  2210. handler : function() {
  2211. Ext.getCmp('project_data_win').destroy();
  2212. location.href=baseUrl+'view/index.jsp?&theme='+theme+'&companyCode='+build_code;
  2213. }
  2214. }
  2215. ],
  2216. closeAction:'destroy',
  2217. html:'<div style="overflow-y:auto;height:800px;width:640px;"><div id="woker_talk"></div></div>'
  2218. }).show();
  2219. var query = new Object();
  2220. query.V_LOGINNAME = $("#V_LOGINNAME").val();
  2221. query.V_PASSWORD = $("#V_PASSWORD").val();
  2222. query.start_data = start_data;
  2223. //query.end_data = end_data;
  2224. query.month = project_date;
  2225. query.build_code = build_code;
  2226. Ext.MessageBox.wait('Loading', '查询中…');
  2227. $.ajax({
  2228. type:'POST',
  2229. url: baseUrl+"iot/company/view/getMonthReport",
  2230. data: {
  2231. queryJson : Ext.JSON.encode(query)
  2232. },
  2233. success: function(result){
  2234. var json = eval('(' + result + ')');
  2235. // ConfirmStore = json.create_time;
  2236. companyName=json.company_name;
  2237. eventTime=json.event_time;
  2238. project_info=json.project_info;
  2239. projectInfoJson = eval('(' + project_info + ')');
  2240. approach_time=projectInfoJson.approach_time;
  2241. complete_time=projectInfoJson.complete_time;
  2242. check_time=projectInfoJson.check_time;
  2243. instal_device_info=json.instal_device_info;
  2244. // var instalDeviceInfoJson = eval('(' + instal_device_info + ')');
  2245. instalDeviceInfoJson = JSON.parse(instal_device_info);
  2246. monitor_point_info=json.monitor_point_info;
  2247. monitorPointInfoJson = eval('(' + monitor_point_info + ')');
  2248. count_time=json.count_time;
  2249. countTimeJson = eval('(' + count_time + ')');
  2250. count_report=json.count_report;
  2251. countReportJson = eval('(' + count_report + ')');
  2252. alarm_total=json.alarm_total;
  2253. alarmTotalJson = eval('(' + alarm_total + ')');
  2254. fire_data=json.fire_data;
  2255. fireDataJson = eval('(' + fire_data + ')');
  2256. water_data=json.water_data;
  2257. waterDataJson = eval('(' + water_data + ')');
  2258. rtu_data=json.rtu_data;
  2259. rtuDataJson = eval('(' + rtu_data + ')');
  2260. ef_data=json.ef_data;
  2261. efDataJson = eval('(' + ef_data + ')');
  2262. video_data=json.video_data;
  2263. videoDataJson = eval('(' + video_data + ')');
  2264. conclusion=json.conclusion;
  2265. conclusionJson = eval('(' + conclusion + ')');
  2266. Ext.MessageBox.hide();
  2267. draw_confirm(countTimeJson.startData,countTimeJson.endData,countTimeJson.days,eventTime);
  2268. highcharts();
  2269. highcharts1();
  2270. highcharts2();
  2271. highcharts3();
  2272. highcharts4();
  2273. highcharts5();
  2274. }
  2275. });
  2276. }
  2277. Ext.define('CompanyComboStore1',{
  2278. extend:'Ext.data.Model',
  2279. fields: [
  2280. {name:'owner_name', type:'string'},
  2281. {name:'owner_id',type:'string'}
  2282. ]
  2283. });
  2284. CompanyStory = Ext.create('Ext.data.Store',{
  2285. model: 'CompanyComboStore1',
  2286. proxy: {
  2287. type: 'ajax',
  2288. actionMethods: {
  2289. create : 'POST',
  2290. read : 'POST', // by default GET
  2291. update : 'POST',
  2292. destroy: 'POST'
  2293. },
  2294. url: baseUrl+'iot/company/view/getNameList',
  2295. reader: {
  2296. type: 'json',
  2297. root: 'RESULT',
  2298. totalProperty: 'totalCount'
  2299. },
  2300. extraParams:{
  2301. queryJson:Ext.JSON.encode(queryJson)
  2302. }
  2303. }
  2304. });
  2305. Ext.define('CompanyComboStore2',{
  2306. extend:'Ext.data.Model',
  2307. fields: [
  2308. {name:'id', type:'string'},
  2309. {name:'event_time',type:'string'}
  2310. ]
  2311. });
  2312. CompanyStory2 = Ext.create('Ext.data.Store',{
  2313. model: 'CompanyComboStore2',
  2314. proxy: {
  2315. type: 'ajax',
  2316. actionMethods: {
  2317. create : 'POST',
  2318. read : 'POST', // by default GET
  2319. update : 'POST',
  2320. destroy: 'POST'
  2321. },
  2322. url: baseUrl+'iot/company/view/getTimeList',
  2323. reader: {
  2324. type: 'json',
  2325. root: 'TIMELIST',
  2326. },
  2327. extraParams:{
  2328. build_code: 0
  2329. }
  2330. },
  2331. });
  2332. FilterWin = Ext.create('Ext.form.Panel', {
  2333. id: 'PatrolPlanFilterForm',
  2334. labelWidth: 55,
  2335. defaultType: 'textfield',
  2336. bodyPadding: 15,
  2337. items: [ {
  2338. xtype:'combobox',
  2339. fieldLabel:'建筑物名称',
  2340. id: 'companyCode',
  2341. name:'companyCode',
  2342. itemId:'abc',
  2343. displayField : 'owner_name',
  2344. valueField : 'owner_id',
  2345. allowBlank:false,
  2346. blankText:"不能为空",
  2347. editable : false,
  2348. anchor:'100%',
  2349. store:CompanyStory,
  2350. listeners: { //监听事件
  2351. // select: function () {
  2352. select: function (combo, form, store) {
  2353. CompanyStory2.removeAll(); //将员工的store里边的内容清空
  2354. // items.itemId('aaa').setValue('');
  2355. var form = combo.up();//获取街道下拉框的上层组件
  2356. var townCombo = form.down("#abc");//通过townId加载城镇下拉框组件
  2357. var store = combo.getStore();//获取该下拉框的store
  2358. var proxy = store.getProxy();//准备加载数据
  2359. if (townCombo.value) {//如果城镇下拉框已经选定
  2360. //加载街道的store中城镇名称与城镇下拉框值相等的数据项
  2361. Ext.getCmp('b_month').enable();
  2362. } else {
  2363. Ext.getCmp('b_month').disable();
  2364. }
  2365. },
  2366. change: function (combo) {
  2367. var form = combo.up();//获取街道下拉框的上层组件
  2368. var townCombo = form.down("#mmm");
  2369. townCombo.setValue('');
  2370. }
  2371. }
  2372. }
  2373. ,{
  2374. xtype:'combobox',
  2375. fieldLabel:'查询月份',
  2376. id: 'b_month',
  2377. name:'b_month',
  2378. itemId:'mmm',
  2379. emptyText: '请先选择建筑物名称...',
  2380. displayField : 'event_time',
  2381. valueField : 'event_time',
  2382. allowBlank:false,
  2383. blankText:"不能为空",
  2384. editable : false,
  2385. anchor:'100%',
  2386. store:CompanyStory2,
  2387. listeners: { //监听事件
  2388. // select: function () {
  2389. expand: function (combo, form, store) {
  2390. var form = combo.up();//获取街道下拉框的上层组件
  2391. var townCombo = form.down("#abc");//通过townId加载城镇下拉框组件
  2392. var store = combo.getStore();//获取该下拉框的store
  2393. var proxy = store.getProxy();//准备加载数据
  2394. Ext.getCmp('b_month').disable();
  2395. if (townCombo.value) {//如果城镇下拉框已经选定
  2396. Ext.getCmp('b_month').enable();
  2397. build_code = Ext.getCmp('companyCode').getValue();
  2398. CompanyStory2.getProxy().extraParams.build_code = build_code;
  2399. CompanyStory2.load();
  2400. }
  2401. },
  2402. // beforeload: function () {
  2403. // Ext.getCmp('month').disable();
  2404. // },
  2405. // click: function () {
  2406. // CompanyStory2.load();
  2407. // }
  2408. }
  2409. }
  2410. ,
  2411. {
  2412. id:'ff_queryJson',
  2413. name:'queryJson',
  2414. hidden:true
  2415. }],
  2416. buttons: [{
  2417. text: '下一步',
  2418. iconCls:'ok_btn',
  2419. handler: function() {
  2420. var form = this.up('form').getForm();
  2421. if (form.isValid()) {
  2422. //var start_date=Ext.util.Format.date(Ext.getCmp('start_date').getValue(), 'Y-m-d');
  2423. // var end_date=Ext.util.Format.date(Ext.getCmp('end_date').getValue(), 'Y-m-d');
  2424. var project_date=Ext.getCmp('b_month').getValue();
  2425. build_code = Ext.getCmp('companyCode').getValue();
  2426. // show_detail_data(start_date,end_date,build_code,project_date);
  2427. show_detail_data(build_code,project_date);
  2428. this.up('window').hide();
  2429. }
  2430. }
  2431. },{
  2432. text: '关闭',
  2433. iconCls: 'cancel_btn',
  2434. handler: function() {
  2435. this.up('window').hide();
  2436. location.href=baseUrl+'view/index.jsp?&theme='+theme+'&companyCode='+Ext.getCmp('companyCode').getValue();
  2437. }
  2438. }]
  2439. });
  2440. var filterwin = function() {
  2441. Ext.create('Ext.window.Window',{
  2442. title: '工作月报',
  2443. height: 300,
  2444. width: 350,
  2445. layout: 'fit',
  2446. items: FilterWin,
  2447. closeAction: 'hide'
  2448. }).show();
  2449. }();
  2450. });