patrolAnalysis.js 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400
  1. /**
  2. *
  3. */
  4. var baseUrl = '';
  5. var theme = '';
  6. var viewAlarmType,pieAlarmType,statusType;
  7. var filterwin;
  8. var FilterWin;
  9. var mouseon;
  10. var mouseoff;
  11. var menu_click;
  12. Ext.onReady(function(){
  13. baseUrl = document.getElementById('basePath').value;
  14. theme = document.getElementById('theme').value;
  15. $("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
  16. $("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
  17. var maxHeight = 10000;
  18. var queryJson = new Object();
  19. queryJson.V_LOGINNAME = $("#V_LOGINNAME").val();
  20. // queryJson.V_PASSWORD = $("#V_PASSWORD").val();
  21. var draw_confirm = function(start_data,end_data,project_date){
  22. var start_data = start_data;
  23. var end_data = end_data;
  24. var project_date = project_date;
  25. var woker_talk = document.getElementById('woker_talkxj');
  26. var div1 = document.createElement('div');
  27. div1.style.width=580;
  28. div1.style.height=600;
  29. div1.setAttribute('id','patrolAnalysis_div1_label1');
  30. woker_talk.appendChild(div1);
  31. var title = document.createElement('h2');
  32. title.id = 'device_list_status_title';
  33. title.style.fontSize='14px';
  34. title.style.textAlign='center';
  35. title.style.fontWeight='bold';
  36. title.innerHTML='数据统计分析';
  37. div1.appendChild(title);
  38. var title2 = document.createElement('h3');
  39. title2.style.textAlign='left';
  40. title2.style.fontSize='14px';
  41. title2.style.fontWeight='bold';
  42. title2.innerHTML='1 数据分析';
  43. div1.appendChild(title2);
  44. var title88 = document.createElement('h4');
  45. title88.style.textAlign='left';
  46. title88.style.fontSize='14px';
  47. title88.style.fontWeight='bold';
  48. title88.innerHTML='1.1 资源';
  49. div1.appendChild(title88);
  50. var title3 = document.createElement('div');
  51. title3.style.textAlign='left';
  52. title3.style.fontSize='14px';
  53. title3.style.marginTop='10px';
  54. title3.style.marginBottom='10px';
  55. title3.style.textIndent='2em';
  56. title3.style.fontWeight='bold';
  57. title3.innerHTML='人员:'+xjrysl+'个';
  58. div1.appendChild(title3);
  59. var title32 = document.createElement('div');
  60. title32.style.textAlign='left';
  61. title32.style.fontSize='14px';
  62. title32.style.marginBottom='10px';
  63. title32.style.textIndent='2em';
  64. title32.style.fontWeight='bold';
  65. title32.innerHTML='班组:'+xjbz+'个';
  66. div1.appendChild(title32);
  67. var title34 = document.createElement('div');
  68. title34.style.textAlign='left';
  69. title34.style.fontSize='14px';
  70. title34.style.marginBottom='10px';
  71. title34.style.textIndent='2em';
  72. title34.style.fontWeight='bold';
  73. title34.innerHTML='负责人:'+zrrnum+'个';
  74. div1.appendChild(title34);
  75. var title4 = document.createElement('h4');
  76. title4.style.textAlign='left';
  77. title4.style.fontSize='14px';
  78. title4.style.fontWeight='bold';
  79. title4.innerHTML='1.2 工作内容';
  80. div1.appendChild(title4);
  81. var title9 = document.createElement('div');
  82. title9.style.textAlign='left';
  83. title9.style.fontSize='14px';
  84. title9.style.marginTop='10px';
  85. title9.style.marginBottom='10px';
  86. title9.style.textIndent='2em';
  87. title9.style.fontWeight='bold';
  88. title9.innerHTML='任务总数:'+xjrwnum+'个';
  89. div1.appendChild(title9);
  90. var title91 = document.createElement('div');
  91. title91.style.textAlign='left';
  92. title91.style.fontSize='14px';
  93. title91.style.marginBottom='10px';
  94. title91.style.textIndent='2em';
  95. title91.style.fontWeight='bold';
  96. title91.innerHTML='点位:'+xjdwnum+'个';
  97. div1.appendChild(title91);
  98. var title32 = document.createElement('div');
  99. title32.style.textAlign='left';
  100. title32.style.fontSize='14px';
  101. title32.style.marginBottom='10px';
  102. title32.style.textIndent='2em';
  103. title32.style.fontWeight='bold';
  104. title32.innerHTML='点位应扫码次数:'+xjysmcsnum+'个';
  105. div1.appendChild(title32);
  106. var title34 = document.createElement('div');
  107. title34.style.textAlign='left';
  108. title34.style.fontSize='14px';
  109. title34.style.marginBottom='10px';
  110. title34.style.textIndent='2em';
  111. title34.style.fontWeight='bold';
  112. title34.innerHTML='报修次数:'+xjbxcsnum+'个';
  113. div1.appendChild(title34);
  114. var title10 = document.createElement('h4');
  115. title10.style.textAlign='left';
  116. title10.style.fontSize='14px';
  117. title10.style.fontWeight='bold';
  118. title10.innerHTML='1.3任务完成度';
  119. div1.appendChild(title10);
  120. var title21_highcharts = document.createElement('div');
  121. title21_highcharts.style.marginTop='20px';
  122. title21_highcharts.style.marginBottom='46px';
  123. title21_highcharts.setAttribute('id','container1');
  124. title21_highcharts.style.textAlign='center';
  125. div1.appendChild(title21_highcharts);
  126. var title11 = document.createElement('h4');
  127. title11.style.textAlign='left';
  128. title11.style.fontSize='14px';
  129. title11.style.fontWeight='bold';
  130. title11.innerHTML='1.4任务回单分析';
  131. div1.appendChild(title11);
  132. var title11_highcharts = document.createElement('div');
  133. title11_highcharts.style.marginTop='20px';
  134. title11_highcharts.style.marginBottom='46px';
  135. title11_highcharts.setAttribute('id','container2');
  136. title11_highcharts.style.textAlign='center';
  137. div1.appendChild(title11_highcharts);
  138. var div2 = document.createElement('div');
  139. div2.style.width=580;
  140. div2.style.height=600;
  141. div2.setAttribute('id','patrolAnalysis_div2_label1');
  142. woker_talk.appendChild(div2);
  143. var patrolh41 = document.createElement('h4');
  144. patrolh41.style.textAlign='left';
  145. patrolh41.style.fontSize='14px';
  146. patrolh41.style.fontWeight='bold';
  147. patrolh41.innerHTML='1.5出勤率分析';
  148. div2.appendChild(patrolh41);
  149. var patrolh41_highcharts = document.createElement('div');
  150. patrolh41_highcharts.style.marginTop='20px';
  151. patrolh41_highcharts.style.marginBottom='46px';
  152. patrolh41_highcharts.setAttribute('id','container3');
  153. patrolh41_highcharts.style.textAlign='center';
  154. div2.appendChild(patrolh41_highcharts);
  155. var sta2 = document.createElement('table');
  156. sta2.style.marginTop='10px';
  157. sta2.width='100%';
  158. sta2.style.marginBottom='20px';
  159. sta2.style.borderRight ='1px solid #BEBEBE';
  160. sta2.style.borderBottom ='1px solid #BEBEBE';
  161. div2.appendChild(sta2);
  162. var tr14 = document.createElement('tr');
  163. sta2.appendChild(tr14);
  164. var th5 = document.createElement('th');
  165. th5.width='20%';
  166. th5.style.textAlign='center';
  167. th5.innerHTML='班组';
  168. th5.style.fontSize='14px';
  169. th5.style.borderLeft ='1px solid #BEBEBE';
  170. th5.style.borderTop ='1px solid #BEBEBE';
  171. tr14.appendChild(th5);
  172. var th6 = document.createElement('th');
  173. th6.width='20%';
  174. th6.style.textAlign='center';
  175. th6.innerHTML='负责人';
  176. th6.style.fontSize='14px';
  177. th6.style.borderLeft ='1px solid #BEBEBE';
  178. th6.style.borderTop ='1px solid #BEBEBE';
  179. tr14.appendChild(th6);
  180. var th7 = document.createElement('th');
  181. th7.width='25%';
  182. th7.style.textAlign='center';
  183. th7.innerHTML='应扫码次数';
  184. th7.style.fontSize='14px';
  185. th7.style.borderLeft ='1px solid #BEBEBE';
  186. th7.style.borderTop ='1px solid #BEBEBE';
  187. tr14.appendChild(th7);
  188. var th8 = document.createElement('th');
  189. th8.width='35%';
  190. th8.style.textAlign='center';
  191. th8.innerHTML='已扫码次数';
  192. th8.style.fontSize='14px';
  193. th8.style.borderLeft ='1px solid #BEBEBE';
  194. th8.style.borderTop ='1px solid #BEBEBE';
  195. tr14.appendChild(th8);
  196. if(ConfirmStore15.length>0){
  197. if(ConfirmStore15.length==1){
  198. var tr13 = document.createElement('tr');
  199. sta2.appendChild(tr13);
  200. var td_details_num = document.createElement('td');
  201. td_details_num.width='20%';
  202. td_details_num.style.textAlign='center';
  203. td_details_num.style.borderLeft ='1px solid #BEBEBE';
  204. td_details_num.style.borderTop ='1px solid #BEBEBE';
  205. td_details_num.innerHTML=ConfirmStore15[0].bz_name;
  206. td_details_num.style.fontSize='14px';
  207. tr13.appendChild(td_details_num);
  208. var td_details_name= document.createElement('td');
  209. td_details_name.width='20%';
  210. td_details_name.style.textAlign='center';
  211. td_details_name.innerHTML= ConfirmStore15[0].rzr_name;
  212. td_details_name.style.borderLeft ='1px solid #BEBEBE';
  213. td_details_name.style.borderTop ='1px solid #BEBEBE';
  214. td_details_name.style.fontSize='14px';
  215. tr13.appendChild(td_details_name);
  216. var td_details_specifications = document.createElement('td');
  217. td_details_specifications.width='25%';
  218. td_details_specifications.style.textAlign='center';
  219. td_details_specifications.innerHTML=ConfirmStore15[0].ysm_num;
  220. td_details_specifications.style.fontSize='14px';
  221. td_details_specifications.style.borderLeft ='1px solid #BEBEBE';
  222. td_details_specifications.style.borderTop ='1px solid #BEBEBE';
  223. tr13.appendChild(td_details_specifications);
  224. var td_details_device_num = document.createElement('td');
  225. td_details_device_num.width='35%';
  226. td_details_device_num.style.textAlign='center';
  227. td_details_device_num.innerHTML=ConfirmStore15[0].ysm_num1;
  228. td_details_device_num.style.fontSize='14px';
  229. td_details_device_num.style.borderLeft ='1px solid #BEBEBE';
  230. td_details_device_num.style.borderTop ='1px solid #BEBEBE';
  231. tr13.appendChild(td_details_device_num);
  232. }else{
  233. for(var i=0;i<ConfirmStore15.length;i++){
  234. var tr13 = document.createElement('tr');
  235. sta2.appendChild(tr13);
  236. var td_details_num = document.createElement('td');
  237. td_details_num.width='20%';
  238. td_details_num.style.textAlign='center';
  239. td_details_num.innerHTML=ConfirmStore15[i].bz_name;
  240. td_details_num.style.fontSize='14px';
  241. td_details_num.style.borderLeft ='1px solid #BEBEBE';
  242. td_details_num.style.borderTop ='1px solid #BEBEBE';
  243. tr13.appendChild(td_details_num);
  244. var td_details_name= document.createElement('td');
  245. td_details_name.width='20%';
  246. td_details_name.style.textAlign='center';
  247. td_details_name.innerHTML= ConfirmStore15[i].rzr_name;
  248. td_details_name.style.fontSize='14px';
  249. td_details_name.style.borderLeft ='1px solid #BEBEBE';
  250. td_details_name.style.borderTop ='1px solid #BEBEBE';
  251. tr13.appendChild(td_details_name);
  252. var td_details_specifications = document.createElement('td');
  253. td_details_specifications.width='25%';
  254. td_details_specifications.style.textAlign='center';
  255. td_details_specifications.innerHTML=ConfirmStore15[i].ysm_num;
  256. td_details_specifications.style.fontSize='14px';
  257. td_details_specifications.style.borderLeft ='1px solid #BEBEBE';
  258. td_details_specifications.style.borderTop ='1px solid #BEBEBE';
  259. tr13.appendChild(td_details_specifications);
  260. var td_details_device_num = document.createElement('td');
  261. td_details_device_num.width='35%';
  262. td_details_device_num.style.textAlign='center';
  263. td_details_device_num.innerHTML=ConfirmStore15[i].ysm_num1;
  264. td_details_device_num.style.fontSize='14px';
  265. td_details_device_num.style.borderLeft ='1px solid #BEBEBE';
  266. td_details_device_num.style.borderTop ='1px solid #BEBEBE';
  267. tr13.appendChild(td_details_device_num);
  268. }
  269. var tr_banzu_saoma_num1 = document.createElement('tr');
  270. sta2.appendChild(tr_banzu_saoma_num1);
  271. var td_banzu_saoma_num1 = document.createElement('td');
  272. // td_details_device_num1.width='30%';
  273. td_banzu_saoma_num1.style.textAlign='center';
  274. td_banzu_saoma_num1.colSpan='2';
  275. td_banzu_saoma_num1.innerHTML='合计';
  276. td_banzu_saoma_num1.style.fontSize='14px';
  277. td_banzu_saoma_num1.style.borderLeft ='1px solid #BEBEBE';
  278. td_banzu_saoma_num1.style.borderTop ='1px solid #BEBEBE';
  279. tr_banzu_saoma_num1.appendChild(td_banzu_saoma_num1);
  280. var td_banzu_saoma_num2 = document.createElement('td');
  281. td_banzu_saoma_num2.width='25%';
  282. td_banzu_saoma_num2.style.textAlign='center';
  283. td_banzu_saoma_num2.innerHTML=heji1;
  284. td_banzu_saoma_num2.style.fontSize='14px';
  285. td_banzu_saoma_num2.style.borderLeft ='1px solid #BEBEBE';
  286. td_banzu_saoma_num2.style.borderTop ='1px solid #BEBEBE';
  287. tr_banzu_saoma_num1.appendChild(td_banzu_saoma_num2);
  288. var td_banzu_saoma_num3 = document.createElement('td');
  289. td_banzu_saoma_num3.width='35%';
  290. td_banzu_saoma_num3.style.textAlign='center';
  291. td_banzu_saoma_num3.innerHTML=heji2;
  292. td_banzu_saoma_num3.style.fontSize='14px';
  293. td_banzu_saoma_num3.style.borderLeft ='1px solid #BEBEBE';
  294. td_banzu_saoma_num3.style.borderTop ='1px solid #BEBEBE';
  295. tr_banzu_saoma_num1.appendChild(td_banzu_saoma_num3);
  296. }
  297. }
  298. var patrolh42 = document.createElement('h4');
  299. patrolh42.style.textAlign='left';
  300. patrolh42.style.fontSize='14px';
  301. patrolh42.style.fontWeight='bold';
  302. patrolh42.innerHTML='1.6点位扫码完成度';
  303. div2.appendChild(patrolh42);
  304. var sta3 = document.createElement('table');
  305. sta3.style.marginTop='10px';
  306. sta3.width='100%';
  307. sta3.style.marginBottom='20px';
  308. sta3.style.borderRight ='1px solid #BEBEBE';
  309. sta3.style.borderBottom ='1px solid #BEBEBE';
  310. div2.appendChild(sta3);
  311. var tr15 = document.createElement('tr');
  312. sta3.appendChild(tr15);
  313. var thlast = document.createElement('th');
  314. thlast.width='20%';
  315. thlast.style.textAlign='center';
  316. thlast.innerHTML='计划名称';
  317. thlast.style.fontSize='14px';
  318. thlast.style.borderLeft ='1px solid #BEBEBE';
  319. thlast.style.borderTop ='1px solid #BEBEBE';
  320. tr15.appendChild(thlast);
  321. var th9 = document.createElement('th');
  322. th9.width='20%';
  323. th9.style.textAlign='center';
  324. th9.innerHTML='点位名称';
  325. th9.style.fontSize='14px';
  326. th9.style.borderLeft ='1px solid #BEBEBE';
  327. th9.style.borderTop ='1px solid #BEBEBE';
  328. tr15.appendChild(th9);
  329. var th10 = document.createElement('th');
  330. th10.width='20%';
  331. th10.style.textAlign='center';
  332. th10.innerHTML='负责班组';
  333. th10.style.fontSize='14px';
  334. th10.style.borderLeft ='1px solid #BEBEBE';
  335. th10.style.borderTop ='1px solid #BEBEBE';
  336. tr15.appendChild(th10);
  337. var th11 = document.createElement('th');
  338. th11.width='10%';
  339. th11.style.textAlign='center';
  340. th11.innerHTML='负责人';
  341. th11.style.fontSize='14px';
  342. th11.style.borderLeft ='1px solid #BEBEBE';
  343. th11.style.borderTop ='1px solid #BEBEBE';
  344. tr15.appendChild(th11);
  345. var th12 = document.createElement('th');
  346. th12.width='10%';
  347. th12.style.textAlign='center';
  348. th12.innerHTML='应扫码次数';
  349. th12.style.fontSize='14px';
  350. th12.style.borderLeft ='1px solid #BEBEBE';
  351. th12.style.borderTop ='1px solid #BEBEBE';
  352. tr15.appendChild(th12);
  353. var th13 = document.createElement('th');
  354. th13.width='10%';
  355. th13.style.textAlign='center';
  356. th13.innerHTML='已扫码次数';
  357. th13.style.fontSize='14px';
  358. th13.style.borderLeft ='1px solid #BEBEBE';
  359. th13.style.borderTop ='1px solid #BEBEBE';
  360. tr15.appendChild(th13);
  361. var th14 = document.createElement('th');
  362. th14.width='10%';
  363. th14.style.textAlign='center';
  364. th14.innerHTML='完成度';
  365. th14.style.fontSize='14px';
  366. th14.style.borderLeft ='1px solid #BEBEBE';
  367. th14.style.borderTop ='1px solid #BEBEBE';
  368. tr15.appendChild(th14);
  369. if(ConfirmStore16.length>0){
  370. if(ConfirmStore16.length==1){
  371. var tr16 = document.createElement('tr');
  372. sta3.appendChild(tr16);
  373. var td_details_numlast = document.createElement('td');
  374. td_details_numlast.width='20%';
  375. td_details_numlast.style.textAlign='center';
  376. td_details_numlast.style.borderLeft ='1px solid #BEBEBE';
  377. td_details_numlast.style.borderTop ='1px solid #BEBEBE';
  378. td_details_numlast.innerHTML=ConfirmStore16[0].plan_name;
  379. td_details_numlast.style.fontSize='14px';
  380. tr16.appendChild(td_details_numlast);
  381. var td_details_num = document.createElement('td');
  382. td_details_num.width='20%';
  383. td_details_num.style.textAlign='center';
  384. td_details_num.style.borderLeft ='1px solid #BEBEBE';
  385. td_details_num.style.borderTop ='1px solid #BEBEBE';
  386. td_details_num.innerHTML=ConfirmStore16[0].dianwei_name;
  387. td_details_num.style.fontSize='14px';
  388. tr16.appendChild(td_details_num);
  389. var td_details_name= document.createElement('td');
  390. td_details_name.width='20%';
  391. td_details_name.style.textAlign='center';
  392. td_details_name.innerHTML= ConfirmStore16[0].banzu_name;
  393. td_details_name.style.borderLeft ='1px solid #BEBEBE';
  394. td_details_name.style.borderTop ='1px solid #BEBEBE';
  395. td_details_name.style.fontSize='14px';
  396. tr16.appendChild(td_details_name);
  397. var td_person= document.createElement('td');
  398. td_person.width='10%';
  399. td_person.style.textAlign='center';
  400. td_person.innerHTML= ConfirmStore16[0].renzeren_name;
  401. td_person.style.borderLeft ='1px solid #BEBEBE';
  402. td_person.style.borderTop ='1px solid #BEBEBE';
  403. td_person.style.fontSize='14px';
  404. tr16.appendChild(td_person);
  405. var td_details_specifications = document.createElement('td');
  406. td_details_specifications.width='10%';
  407. td_details_specifications.style.textAlign='center';
  408. td_details_specifications.innerHTML=ConfirmStore16[0].ywc_num1;
  409. td_details_specifications.style.fontSize='14px';
  410. td_details_specifications.style.borderLeft ='1px solid #BEBEBE';
  411. td_details_specifications.style.borderTop ='1px solid #BEBEBE';
  412. tr16.appendChild(td_details_specifications);
  413. var td_details_device_num = document.createElement('td');
  414. td_details_device_num.width='10%';
  415. td_details_device_num.style.textAlign='center';
  416. td_details_device_num.innerHTML=ConfirmStore16[0].ywc_num2;
  417. td_details_device_num.style.fontSize='14px';
  418. td_details_device_num.style.borderLeft ='1px solid #BEBEBE';
  419. td_details_device_num.style.borderTop ='1px solid #BEBEBE';
  420. tr16.appendChild(td_details_device_num);
  421. var td_wanchengdu= document.createElement('td');
  422. td_wanchengdu.width='10%';
  423. td_wanchengdu.style.textAlign='center';
  424. td_wanchengdu.innerHTML= ConfirmStore16[0].com_du+'%';
  425. td_wanchengdu.style.borderLeft ='1px solid #BEBEBE';
  426. td_wanchengdu.style.borderTop ='1px solid #BEBEBE';
  427. td_wanchengdu.style.fontSize='14px';
  428. tr16.appendChild(td_wanchengdu);
  429. }else{
  430. for(var i=0;i<ConfirmStore16.length;i++){
  431. var tr16 = document.createElement('tr');
  432. sta3.appendChild(tr16);
  433. var td_details_numlast = document.createElement('td');
  434. td_details_numlast.width='20%';
  435. td_details_numlast.style.textAlign='center';
  436. td_details_numlast.style.borderLeft ='1px solid #BEBEBE';
  437. td_details_numlast.style.borderTop ='1px solid #BEBEBE';
  438. td_details_numlast.innerHTML=ConfirmStore16[i].plan_name;
  439. td_details_numlast.style.fontSize='14px';
  440. tr16.appendChild(td_details_numlast);
  441. var td_details_num = document.createElement('td');
  442. td_details_num.width='20%';
  443. td_details_num.style.textAlign='center';
  444. td_details_num.style.borderLeft ='1px solid #BEBEBE';
  445. td_details_num.style.borderTop ='1px solid #BEBEBE';
  446. td_details_num.innerHTML=ConfirmStore16[i].dianwei_name;
  447. td_details_num.style.fontSize='14px';
  448. tr16.appendChild(td_details_num);
  449. var td_details_name= document.createElement('td');
  450. td_details_name.width='20%';
  451. td_details_name.style.textAlign='center';
  452. td_details_name.innerHTML= ConfirmStore16[i].banzu_name;
  453. td_details_name.style.borderLeft ='1px solid #BEBEBE';
  454. td_details_name.style.borderTop ='1px solid #BEBEBE';
  455. td_details_name.style.fontSize='14px';
  456. tr16.appendChild(td_details_name);
  457. var td_person= document.createElement('td');
  458. td_person.width='10%';
  459. td_person.style.textAlign='center';
  460. td_person.innerHTML= ConfirmStore16[i].renzeren_name;
  461. td_person.style.borderLeft ='1px solid #BEBEBE';
  462. td_person.style.borderTop ='1px solid #BEBEBE';
  463. td_person.style.fontSize='14px';
  464. tr16.appendChild(td_person);
  465. var td_details_specifications = document.createElement('td');
  466. td_details_specifications.width='10%';
  467. td_details_specifications.style.textAlign='center';
  468. td_details_specifications.innerHTML=ConfirmStore16[i].ywc_num1;
  469. td_details_specifications.style.fontSize='14px';
  470. td_details_specifications.style.borderLeft ='1px solid #BEBEBE';
  471. td_details_specifications.style.borderTop ='1px solid #BEBEBE';
  472. tr16.appendChild(td_details_specifications);
  473. var td_details_device_num = document.createElement('td');
  474. td_details_device_num.width='10%';
  475. td_details_device_num.style.textAlign='center';
  476. td_details_device_num.innerHTML=ConfirmStore16[i].ywc_num2;
  477. td_details_device_num.style.fontSize='14px';
  478. td_details_device_num.style.borderLeft ='1px solid #BEBEBE';
  479. td_details_device_num.style.borderTop ='1px solid #BEBEBE';
  480. tr16.appendChild(td_details_device_num);
  481. var td_wanchengdu= document.createElement('td');
  482. td_wanchengdu.width='10%';
  483. td_wanchengdu.style.textAlign='center';
  484. td_wanchengdu.innerHTML= ConfirmStore16[i].com_du+'%';
  485. td_wanchengdu.style.borderLeft ='1px solid #BEBEBE';
  486. td_wanchengdu.style.borderTop ='1px solid #BEBEBE';
  487. td_wanchengdu.style.fontSize='14px';
  488. tr16.appendChild(td_wanchengdu);
  489. }
  490. var tr_dianwei_wanchengdu_num1 = document.createElement('tr');
  491. sta3.appendChild(tr_dianwei_wanchengdu_num1);
  492. var td_dianwei_wanchengdu_num1 = document.createElement('td');
  493. // td_details_device_num1.width='30%';
  494. td_dianwei_wanchengdu_num1.style.textAlign='center';
  495. td_dianwei_wanchengdu_num1.colSpan='4';
  496. td_dianwei_wanchengdu_num1.innerHTML='合计';
  497. td_dianwei_wanchengdu_num1.style.fontSize='14px';
  498. td_dianwei_wanchengdu_num1.style.borderLeft ='1px solid #BEBEBE';
  499. td_dianwei_wanchengdu_num1.style.borderTop ='1px solid #BEBEBE';
  500. tr_dianwei_wanchengdu_num1.appendChild(td_dianwei_wanchengdu_num1);
  501. var td_dianwei_wanchengdu_num2 = document.createElement('td');
  502. td_dianwei_wanchengdu_num2.width='10%';
  503. td_dianwei_wanchengdu_num2.style.textAlign='center';
  504. td_dianwei_wanchengdu_num2.innerHTML=heji3;
  505. td_dianwei_wanchengdu_num2.style.fontSize='14px';
  506. td_dianwei_wanchengdu_num2.style.borderLeft ='1px solid #BEBEBE';
  507. td_dianwei_wanchengdu_num2.style.borderTop ='1px solid #BEBEBE';
  508. tr_dianwei_wanchengdu_num1.appendChild(td_dianwei_wanchengdu_num2);
  509. var td_dianwei_wanchengdu_num3 = document.createElement('td');
  510. td_dianwei_wanchengdu_num3.width='10%';
  511. td_dianwei_wanchengdu_num3.style.textAlign='center';
  512. td_dianwei_wanchengdu_num3.innerHTML=heji4;
  513. td_dianwei_wanchengdu_num3.style.fontSize='14px';
  514. td_dianwei_wanchengdu_num3.style.borderLeft ='1px solid #BEBEBE';
  515. td_dianwei_wanchengdu_num3.style.borderTop ='1px solid #BEBEBE';
  516. tr_dianwei_wanchengdu_num1.appendChild(td_dianwei_wanchengdu_num3);
  517. var td_dianwei_wanchengdu_num4 = document.createElement('td');
  518. td_dianwei_wanchengdu_num4.width='10%';
  519. td_dianwei_wanchengdu_num4.style.textAlign='center';
  520. td_dianwei_wanchengdu_num4.innerHTML=baifenbiresult16+'%';
  521. td_dianwei_wanchengdu_num4.style.fontSize='14px';
  522. td_dianwei_wanchengdu_num4.style.borderLeft ='1px solid #BEBEBE';
  523. td_dianwei_wanchengdu_num4.style.borderTop ='1px solid #BEBEBE';
  524. tr_dianwei_wanchengdu_num1.appendChild(td_dianwei_wanchengdu_num4);
  525. }
  526. }
  527. var patrolh43 = document.createElement('h4');
  528. patrolh43.style.textAlign='left';
  529. patrolh43.style.fontSize='14px';
  530. patrolh43.style.fontWeight='bold';
  531. patrolh43.innerHTML='1.7报修情况';
  532. div2.appendChild(patrolh43);
  533. var sta4 = document.createElement('table');
  534. sta4.style.marginTop='10px';
  535. sta4.width='100%';
  536. sta4.style.marginBottom='20px';
  537. sta4.style.borderRight ='1px solid #BEBEBE';
  538. sta4.style.borderBottom ='1px solid #BEBEBE';
  539. div2.appendChild(sta4);
  540. var tr17 = document.createElement('tr');
  541. sta4.appendChild(tr17);
  542. var th15 = document.createElement('th');
  543. th15.width='40%';
  544. th15.style.textAlign='center';
  545. th15.innerHTML='点位名称';
  546. th15.style.fontSize='14px';
  547. th15.style.borderLeft ='1px solid #BEBEBE';
  548. th15.style.borderTop ='1px solid #BEBEBE';
  549. tr17.appendChild(th15);
  550. var th16 = document.createElement('th');
  551. th16.width='20%';
  552. th16.style.textAlign='center';
  553. th16.innerHTML='扫码次数';
  554. th16.style.fontSize='14px';
  555. th16.style.borderLeft ='1px solid #BEBEBE';
  556. th16.style.borderTop ='1px solid #BEBEBE';
  557. tr17.appendChild(th16);
  558. var th17 = document.createElement('th');
  559. th17.width='20%';
  560. th17.style.textAlign='center';
  561. th17.innerHTML='报修次数';
  562. th17.style.fontSize='14px';
  563. th17.style.borderLeft ='1px solid #BEBEBE';
  564. th17.style.borderTop ='1px solid #BEBEBE';
  565. tr17.appendChild(th17);
  566. var th18 = document.createElement('th');
  567. th18.width='20%';
  568. th18.style.textAlign='center';
  569. th18.innerHTML='故障频率';
  570. th18.style.fontSize='14px';
  571. th18.style.borderLeft ='1px solid #BEBEBE';
  572. th18.style.borderTop ='1px solid #BEBEBE';
  573. tr17.appendChild(th18);
  574. if(ConfirmStore17.length>0){
  575. if(ConfirmStore17.length==1){
  576. var tr18 = document.createElement('tr');
  577. sta4.appendChild(tr18);
  578. var td_dianwei_name2 = document.createElement('td');
  579. td_dianwei_name2.width='40%';
  580. td_dianwei_name2.style.textAlign='center';
  581. td_dianwei_name2.style.borderLeft ='1px solid #BEBEBE';
  582. td_dianwei_name2.style.borderTop ='1px solid #BEBEBE';
  583. td_dianwei_name2.innerHTML=ConfirmStore17[0].dianwei_name17;
  584. td_dianwei_name2.style.fontSize='14px';
  585. tr18.appendChild(td_dianwei_name2);
  586. var td_saoma_num3= document.createElement('td');
  587. td_saoma_num3.width='20%';
  588. td_saoma_num3.style.textAlign='center';
  589. td_saoma_num3.innerHTML= ConfirmStore17[0].saoma_num17;
  590. td_saoma_num3.style.borderLeft ='1px solid #BEBEBE';
  591. td_saoma_num3.style.borderTop ='1px solid #BEBEBE';
  592. td_saoma_num3.style.fontSize='14px';
  593. tr18.appendChild(td_saoma_num3);
  594. var td_baoxiucishu= document.createElement('td');
  595. td_baoxiucishu.width='20%';
  596. td_baoxiucishu.style.textAlign='center';
  597. td_baoxiucishu.innerHTML= ConfirmStore17[0].baoxiu_num17;
  598. td_baoxiucishu.style.borderLeft ='1px solid #BEBEBE';
  599. td_baoxiucishu.style.borderTop ='1px solid #BEBEBE';
  600. td_baoxiucishu.style.fontSize='14px';
  601. tr18.appendChild(td_baoxiucishu);
  602. var td_baoxiupinlv = document.createElement('td');
  603. td_baoxiupinlv.width='20%';
  604. td_baoxiupinlv.style.textAlign='center';
  605. td_baoxiupinlv.innerHTML=ConfirmStore17[0].baoxiu_baifenbi17+'%';
  606. td_baoxiupinlv.style.fontSize='14px';
  607. td_baoxiupinlv.style.borderLeft ='1px solid #BEBEBE';
  608. td_baoxiupinlv.style.borderTop ='1px solid #BEBEBE';
  609. tr18.appendChild(td_baoxiupinlv);
  610. }else{
  611. for(var i=0;i<ConfirmStore17.length;i++){
  612. var tr18 = document.createElement('tr');
  613. sta4.appendChild(tr18);
  614. var td_dianwei_name2 = document.createElement('td');
  615. td_dianwei_name2.width='40%';
  616. td_dianwei_name2.style.textAlign='center';
  617. td_dianwei_name2.style.borderLeft ='1px solid #BEBEBE';
  618. td_dianwei_name2.style.borderTop ='1px solid #BEBEBE';
  619. td_dianwei_name2.innerHTML=ConfirmStore17[i].dianwei_name17;
  620. td_dianwei_name2.style.fontSize='14px';
  621. tr18.appendChild(td_dianwei_name2);
  622. var td_saoma_num3= document.createElement('td');
  623. td_saoma_num3.width='20%';
  624. td_saoma_num3.style.textAlign='center';
  625. td_saoma_num3.innerHTML= ConfirmStore17[i].saoma_num17;
  626. td_saoma_num3.style.borderLeft ='1px solid #BEBEBE';
  627. td_saoma_num3.style.borderTop ='1px solid #BEBEBE';
  628. td_saoma_num3.style.fontSize='14px';
  629. tr18.appendChild(td_saoma_num3);
  630. var td_baoxiucishu= document.createElement('td');
  631. td_baoxiucishu.width='20%';
  632. td_baoxiucishu.style.textAlign='center';
  633. td_baoxiucishu.innerHTML= ConfirmStore17[i].baoxiu_num17;
  634. td_baoxiucishu.style.borderLeft ='1px solid #BEBEBE';
  635. td_baoxiucishu.style.borderTop ='1px solid #BEBEBE';
  636. td_baoxiucishu.style.fontSize='14px';
  637. tr18.appendChild(td_baoxiucishu);
  638. var td_baoxiupinlv = document.createElement('td');
  639. td_baoxiupinlv.width='20%';
  640. td_baoxiupinlv.style.textAlign='center';
  641. td_baoxiupinlv.innerHTML=ConfirmStore17[i].baoxiu_baifenbi17+'%';
  642. td_baoxiupinlv.style.fontSize='14px';
  643. td_baoxiupinlv.style.borderLeft ='1px solid #BEBEBE';
  644. td_baoxiupinlv.style.borderTop ='1px solid #BEBEBE';
  645. tr18.appendChild(td_baoxiupinlv);
  646. }
  647. var tr19 = document.createElement('tr');
  648. sta4.appendChild(tr19);
  649. var td_dianwei_name17 = document.createElement('td');
  650. td_dianwei_name17.width='40%';
  651. td_dianwei_name17.style.textAlign='center';
  652. td_dianwei_name17.style.borderLeft ='1px solid #BEBEBE';
  653. td_dianwei_name17.style.borderTop ='1px solid #BEBEBE';
  654. td_dianwei_name17.innerHTML='合计';
  655. td_dianwei_name17.style.fontSize='14px';
  656. tr19.appendChild(td_dianwei_name17);
  657. var td_saoma_num17= document.createElement('td');
  658. td_saoma_num17.width='20%';
  659. td_saoma_num17.style.textAlign='center';
  660. td_saoma_num17.innerHTML= heji5;
  661. td_saoma_num17.style.borderLeft ='1px solid #BEBEBE';
  662. td_saoma_num17.style.borderTop ='1px solid #BEBEBE';
  663. td_saoma_num17.style.fontSize='14px';
  664. tr19.appendChild(td_saoma_num17);
  665. var td_baoxiucishu17= document.createElement('td');
  666. td_baoxiucishu17.width='20%';
  667. td_baoxiucishu17.style.textAlign='center';
  668. td_baoxiucishu17.innerHTML= heji6;
  669. td_baoxiucishu17.style.borderLeft ='1px solid #BEBEBE';
  670. td_baoxiucishu17.style.borderTop ='1px solid #BEBEBE';
  671. td_baoxiucishu17.style.fontSize='14px';
  672. tr19.appendChild(td_baoxiucishu17);
  673. var td_baoxiupinlv17 = document.createElement('td');
  674. td_baoxiupinlv17.width='20%';
  675. td_baoxiupinlv17.style.textAlign='center';
  676. td_baoxiupinlv17.innerHTML=baifenbiresult17+'%';
  677. td_baoxiupinlv17.style.fontSize='14px';
  678. td_baoxiupinlv17.style.borderLeft ='1px solid #BEBEBE';
  679. td_baoxiupinlv17.style.borderTop ='1px solid #BEBEBE';
  680. tr19.appendChild(td_baoxiupinlv17);
  681. }
  682. }
  683. var div3 = document.createElement('div');
  684. div3.width=400;
  685. div3.height=600;
  686. div3.setAttribute('id','patrolAnalysis_div3_label1');
  687. woker_talk.appendChild(div3);
  688. var title12 = document.createElement('h3');
  689. title12.style.textAlign='left';
  690. title12.style.fontSize='14px';
  691. title12.style.fontWeight='bold';
  692. title12.innerHTML='2分析意见';
  693. div3.appendChild(title12);
  694. var title26 = document.createElement('h4');
  695. title26.style.textAlign='left';
  696. title26.style.fontSize='14px';
  697. title26.style.fontWeight='bold';
  698. title26.innerHTML='2.1 任务完成度';
  699. woker_talk.appendChild(title26);
  700. var title27 = document.createElement('ol');
  701. // title27.setAttribute('class','title27_label1');
  702. // title27.style.textAlign='center';
  703. title27.style.border='1px solid #BEBEBE';
  704. title27.width='100%';
  705. title27.style.textAlign='left';
  706. title27.style.background='#AAAAAA';
  707. title27.style.minHeight='20px';
  708. title27.style.paddingLeft='36px';
  709. title27.style.marginBottom='20px';
  710. woker_talk.appendChild(title27);
  711. if(Number(baifenbiresult15)<60){
  712. var title27_p1 = document.createElement('li');
  713. title27_p1.innerHTML='60%以下 差,建议加强人员考核,定期举办工作流程培训。';
  714. // title27_p1.setAttribute('class','title14_label1_p1');
  715. title27_p1.style.fontSize='14px';
  716. title27.appendChild(title27_p1);
  717. }
  718. if(Number(baifenbiresult15)>=60 && Number(baifenbiresult15)<80 ){
  719. var title27_p3 = document.createElement('li');
  720. title27_p3.innerHTML='61~80%以下 一般,建议未完成任务的班组负责人优化班组的工作流程。';
  721. title27_p3.style.fontSize='14px';
  722. title27.appendChild(title27_p3);
  723. }
  724. if(Number(baifenbiresult15)>=80 && Number(baifenbiresult15)<=95 ){
  725. var title27_p3 = document.createElement('li');
  726. title27_p3.innerHTML='81~95% 良好,建议各班组负责人在任务期末查缺补漏。';
  727. title27_p3.style.fontSize='14px';
  728. title27.appendChild(title27_p3);
  729. }
  730. if(Number(baifenbiresult15)>95){
  731. var title27_p3 = document.createElement('li');
  732. title27_p3.innerHTML='96~100% 优秀,请继续保持。';
  733. title27_p3.style.fontSize='14px';
  734. title27.appendChild(title27_p3);
  735. }
  736. if(ConfirmStore15.length>0){
  737. for(var i=0;i<ConfirmStore15.length;i++){
  738. if(Number(ConfirmStore15[i].wcd_baifenbi)==100){
  739. var title27_p4 = document.createElement('li');
  740. title27_p4.innerHTML='完成所有任务的班组:'+ConfirmStore15[i].bz_name+',请继续保持。';
  741. title27_p4.style.fontSize='14px';
  742. title27.appendChild(title27_p4);
  743. }
  744. }
  745. }
  746. var title28 = document.createElement('h4');
  747. title28.style.textAlign='left';
  748. title28.style.fontSize='14px';
  749. title28.style.fontWeight='bold';
  750. title28.innerHTML='2.2点位扫码完成度';
  751. woker_talk.appendChild(title28);
  752. var title29 = document.createElement('ol');
  753. // title27.setAttribute('class','title27_label1');
  754. // title27.style.textAlign='center';
  755. title29.style.border='1px solid #BEBEBE';
  756. title29.width='100%';
  757. title29.style.textAlign='left';
  758. title29.style.background='#AAAAAA';
  759. title29.style.minHeight='20px';
  760. title29.style.paddingLeft='36px';
  761. title29.style.marginBottom='20px';
  762. woker_talk.appendChild(title29);
  763. if(Number(baifenbiresult16)<80){
  764. var title29_p1 = document.createElement('li');
  765. title29_p1.innerHTML='80%以下 差,建议对班组人员重新讲解工作的扫码流程。';
  766. // title27_p1.setAttribute('class','title14_label1_p1');
  767. title29_p1.style.fontSize='14px';
  768. title29.appendChild(title29_p1);
  769. }
  770. if(Number(baifenbiresult16)>=80 && Number(baifenbiresult16)<95 ){
  771. var title29_p3 = document.createElement('li');
  772. title29_p3.innerHTML='81~95% 一般,建议在发布任务后,负责人持续跟进班组任务的扫码情况。';
  773. title29_p3.style.fontSize='14px';
  774. title29.appendChild(title29_p3);
  775. }
  776. if(Number(baifenbiresult16)>=95 && Number(baifenbiresult16)<=99 ){
  777. var title29_p3 = document.createElement('li');
  778. title29_p3.innerHTML='96~99% 良好,建议各班组负责人在任务期末查缺补漏。';
  779. title29_p3.style.fontSize='14px';
  780. title29.appendChild(title29_p3);
  781. }
  782. if(Number(baifenbiresult16)==100){
  783. var title29_p3 = document.createElement('li');
  784. title29_p3.innerHTML='100% 优秀,请继续保持。';
  785. title29_p3.style.fontSize='14px';
  786. title29.appendChild(title29_p3);
  787. }
  788. // if(dwsjtotalCount>0){
  789. // if(Number(sjresult)>1){
  790. // var title27_p2 = document.createElement('li');
  791. // title27_p2.innerHTML='系统数据分析提示:消防水系统隐患极高或存在系统故障,建议尽早进行系统排查;';
  792. // title27_p2.style.fontSize='14px';
  793. // title27.appendChild(title27_p2);
  794. // }
  795. // if(Number(ConfirmStore4[0].lxsjresult)>0.5){
  796. // var title27_p4 = document.createElement('li');
  797. // title27_p4.innerHTML='系统数据分析提示:消防水系统监测设备通信情况不稳定,建议尽早进行系统排查;';
  798. // title27_p4.style.fontSize='14px';
  799. // title27.appendChild(title27_p4);
  800. // }
  801. // }
  802. // if(dwrtutotalCount>0){
  803. // if(Number(rturesult)>0.5){
  804. // var title27_p5 = document.createElement('li');
  805. // title27_p5.innerHTML='系统数据分析提示:RTU监测隐患极高或存在系统故障,建议尽早进行系统排查;';
  806. // title27_p5.style.fontSize='14px';
  807. // title27.appendChild(title27_p5);
  808. // }
  809. // if(Number(ConfirmStore4[0].lxrturesult)>0.5){
  810. // var title27_p6 = document.createElement('li');
  811. // title27_p6.innerHTML='系统数据分析提示:RTU监测监测设备通信情况不稳定,建议尽早进行系统排查;';
  812. // title27_p6.style.fontSize='14px';
  813. // title27.appendChild(title27_p6);
  814. // }
  815. // }
  816. // if(Number(hjresult)<=0.5 && Number(ConfirmStore4[0].lxhjresult)<=0.5 && Number(sjresult)<=1 && Number(ConfirmStore4[0].lxsjresult)<=0.5 && Number(rturesult)<=0.5 && Number(ConfirmStore4[0].lxrturesult)<=0.5){
  817. // var title27_li7 = document.createElement('li');
  818. // title27_li7.innerHTML='暂无问题及需要改进事项。';
  819. // title27_li7.style.fontSize='14px';
  820. // title27.appendChild(title27_li7);
  821. // }
  822. // var title28 = document.createElement('h4');
  823. // title28.style.textAlign='left';
  824. // title28.style.fontSize='14px';
  825. // title28.style.fontWeight='bold';
  826. // title28.innerHTML='4.2 其他事宜';
  827. // woker_talk.appendChild(title28);
  828. // var title29_ol1 = document.createElement('ol');
  829. // title29_ol1.style.border='1px solid #BEBEBE';
  830. // title29_ol1.width='100%';
  831. // title29_ol1.style.textAlign='left';
  832. // title29_ol1.style.background='#AAAAAA';
  833. // title29_ol1.style.minHeight='20px';
  834. // title29_ol1.style.paddingLeft='36px';
  835. // title29_ol1.style.marginBottom='20px';
  836. // woker_talk.appendChild(title29_ol1);
  837. // if(dwhjtotalCount>0){
  838. // if(Number(hjresult)<=0.5){
  839. // var title29_li6 = document.createElement('li');
  840. // title29_li6.innerHTML='目前数据反映:火灾监测运行状态较好,需要保持;';
  841. // title29_li6.style.fontSize='14px';
  842. // title29_ol1.appendChild(title29_li6);
  843. // }
  844. // if(Number(ConfirmStore4[0].lxhjresult)<=0.5){
  845. // var title29_li1 = document.createElement('li');
  846. // title29_li1.innerHTML='目前数据反映:火灾监测设备通信情况较好,需要保持;';
  847. // title29_li1.style.fontSize='14px';
  848. // title29_ol1.appendChild(title29_li1);
  849. // }
  850. // }
  851. // if(dwsjtotalCount>0){
  852. // if(Number(sjresult)<=1){
  853. // var title29_li2 = document.createElement('li');
  854. // title29_li2.innerHTML='目前数据反映:消防水系统监测运行状态较好,需要保持;';
  855. // title29_li2.style.fontSize='14px';
  856. // title29_ol1.appendChild(title29_li2);
  857. // }
  858. // if(Number(ConfirmStore4[0].lxsjresult)<=0.5){
  859. // var title29_li3 = document.createElement('li');
  860. // title29_li3.innerHTML='目前数据反映:消防水系统监测设备通信情况较好,需要保持;';
  861. // title29_li3.style.fontSize='14px';
  862. // title29_ol1.appendChild(title29_li3);
  863. // }
  864. // }
  865. // if(dwrtutotalCount>0){
  866. // if(Number(rturesult)<=0.5){
  867. // var title29_li4 = document.createElement('li');
  868. // title29_li4.innerHTML='目前数据反映:RTU监测运行状态较好,需要保持;';
  869. // title29_li4.style.fontSize='14px';
  870. // title29_ol1.appendChild(title29_li4);
  871. // }
  872. // if(Number(ConfirmStore4[0].lxrturesult)<=0.5){
  873. // var title29_li5 = document.createElement('li');
  874. // title29_li5.innerHTML='目前数据反映:RTU监测设备通信情况较好,需要保持。';
  875. // title29_li5.style.fontSize='14px';
  876. // title29_ol1.appendChild(title29_li5);
  877. // }
  878. // }
  879. // if(Number(hjresult)>0.5 && Number(ConfirmStore4[0].lxhjresult)>0.5 && Number(sjresult)>1 && Number(ConfirmStore4[0].lxsjresult)>0.5 && Number(rturesult)>0.5 && Number(ConfirmStore4[0].lxrturesult)>0.5){
  880. // var title29_li7 = document.createElement('li');
  881. // title29_li7.innerHTML='暂无其他事宜。';
  882. // title29_li7.style.fontSize='14px';
  883. // title29_ol1.appendChild(title29_li7);
  884. // }
  885. }
  886. var funDownload = function (content, filename) {
  887. var eleLink = document.createElement('a');
  888. eleLink.download = filename;
  889. eleLink.style.display = 'none';
  890. // 字符内容转变成blob地址
  891. var blob = new Blob([content]);
  892. eleLink.href = URL.createObjectURL(blob);
  893. // 触发点击
  894. document.body.appendChild(eleLink);
  895. eleLink.click();
  896. // 然后移除
  897. document.body.removeChild(eleLink);
  898. }
  899. var highcharts1 = function () {
  900. var ywcbaifenbi = parseFloat(xjywcbaifenbi);
  901. var csbaifenbi = parseFloat(xjcsbaifenbi);
  902. var jxzbaifenbi = parseFloat(xjjxzbaifenbi);
  903. $('#container1').highcharts({
  904. chart: {
  905. plotBackgroundColor: null,
  906. plotBorderWidth: null,
  907. plotShadow: false,
  908. type: 'pie'
  909. },
  910. credits: {
  911. enabled: false
  912. },
  913. exporting: { enabled:false },
  914. title: {
  915. text: '任务总数:'+xjrwnum
  916. },
  917. tooltip: {
  918. formatter: function() {
  919. return '<b>'+ this.series.name +'</b>: '+ Highcharts.numberFormat(this.percentage, 1) +'%'
  920. }
  921. },
  922. plotOptions: {
  923. pie: {
  924. allowPointSelect: true,
  925. cursor: 'pointer',
  926. dataLabels: {
  927. enabled: true,
  928. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  929. style: {
  930. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  931. }
  932. },
  933. showInLegend: true
  934. }
  935. },
  936. series: [{
  937. name: '百分比',
  938. colorByPoint: true,
  939. data: [{
  940. name: '已完成',
  941. y: ywcbaifenbi,
  942. sliced: true,
  943. selected: true
  944. },{
  945. name: '超时',
  946. y: csbaifenbi
  947. },{
  948. name: '进行中',
  949. y: jxzbaifenbi
  950. },{
  951. name: '未开始',
  952. y: 100-ywcbaifenbi-csbaifenbi-jxzbaifenbi
  953. }]
  954. }]
  955. });
  956. }
  957. var highcharts2 = function () {
  958. var huidan15 = parseFloat(baifenbihuidan15);
  959. $('#container2').highcharts({
  960. chart: {
  961. plotBackgroundColor: null,
  962. plotBorderWidth: null,
  963. plotShadow: false,
  964. type: 'pie'
  965. },
  966. credits: {
  967. enabled: false
  968. },
  969. exporting: { enabled:false },
  970. title: {
  971. text: '已扫码次数:'+heji2
  972. },
  973. tooltip: {
  974. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  975. },
  976. plotOptions: {
  977. pie: {
  978. allowPointSelect: true,
  979. cursor: 'pointer',
  980. dataLabels: {
  981. enabled: true,
  982. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  983. style: {
  984. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  985. }
  986. },
  987. showInLegend: true
  988. }
  989. },
  990. series: [{
  991. name: '百分比',
  992. colorByPoint: true,
  993. data: [{
  994. name: '已填写回单',
  995. y: huidan15,
  996. sliced: true,
  997. selected: true
  998. },{
  999. name: '未填写回单',
  1000. y: 100-huidan15
  1001. }]
  1002. }]
  1003. });
  1004. }
  1005. var highcharts3 = function () {
  1006. var ysmbaifenbi = parseFloat(xjysmbaifenbi);
  1007. var wsmbaifenbi = parseFloat(xjwsmbaifenbi);
  1008. $('#container3').highcharts({
  1009. chart: {
  1010. plotBackgroundColor: null,
  1011. plotBorderWidth: null,
  1012. plotShadow: false,
  1013. type: 'pie'
  1014. },
  1015. credits: {
  1016. enabled: false
  1017. },
  1018. exporting: { enabled:false },
  1019. title: {
  1020. text: '应扫码次数'+xjysmcsnum+'个'
  1021. },
  1022. tooltip: {
  1023. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  1024. },
  1025. plotOptions: {
  1026. pie: {
  1027. allowPointSelect: true,
  1028. cursor: 'pointer',
  1029. dataLabels: {
  1030. enabled: true,
  1031. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  1032. style: {
  1033. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  1034. }
  1035. },
  1036. showInLegend: true
  1037. }
  1038. },
  1039. series: [{
  1040. name: '百分比',
  1041. colorByPoint: true,
  1042. data: [{
  1043. name: '已扫码次数',
  1044. y: ysmbaifenbi,
  1045. sliced: true,
  1046. selected: true
  1047. },{
  1048. name: '未扫码次数',
  1049. y: wsmbaifenbi
  1050. }]
  1051. }]
  1052. });
  1053. }
  1054. // var daochu = function(){
  1055. // var woker_talk = document.getElementById('woker_talk');
  1056. // var eleTextarea = document.querySelector('#woker_talk');
  1057. // var aa = '<!DOCTYPE html>'+
  1058. // '<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">'+
  1059. // '<head>'+
  1060. // '<!--[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]-->'+
  1061. // '<meta charset="UTF-8">'+
  1062. // '<meta name="viewport" content="width=device-width, initial-scale=1.0">'+
  1063. // '<meta http-equiv="X-UA-Compatible" content="ie=edge">'+
  1064. // '<title>Document</title>'+
  1065. // '</head>'+
  1066. // '<body>'+
  1067. // eleTextarea.outerHTML+'</body></html>'
  1068. // funDownload(aa, 'project.html');
  1069. // }
  1070. var daochu = function(){
  1071. var woker_talk = document.getElementById('woker_talkxj');
  1072. var eleTextarea = document.querySelector('#woker_talkxj');
  1073. html2canvas(woker_talk, {
  1074. height: $("#woker_talkxj").outerHeight(),
  1075. onrendered:function(canvas) {
  1076. var contentWidth = canvas.width;
  1077. var contentHeight = canvas.height;
  1078. //一页pdf显示html页面生成的canvas高度;
  1079. var pageHeight = contentWidth / 592.28 * 841.89;
  1080. //未生成pdf的html页面高度
  1081. var leftHeight = contentHeight;
  1082. //页面偏移
  1083. var position = 0;
  1084. //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
  1085. var imgWidth = 555.28;
  1086. var imgHeight = 555.28/contentWidth * contentHeight;
  1087. var pageData = canvas.toDataURL('image/jpeg', 1.0);
  1088. var pdf = new jsPDF('', 'pt', 'a4');
  1089. //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
  1090. //当内容未超过pdf一页显示的范围,无需分页
  1091. if (leftHeight < pageHeight) {
  1092. pdf.addImage(pageData, 'JPEG', 20, 0, imgWidth, imgHeight );
  1093. } else {
  1094. while(leftHeight > 0) {
  1095. pdf.addImage(pageData, 'JPEG', 20, position, imgWidth, imgHeight)
  1096. leftHeight -= pageHeight;
  1097. position -= 841.89;
  1098. //避免添加空白页
  1099. if(leftHeight > 0) {
  1100. pdf.addPage();
  1101. }
  1102. }
  1103. }
  1104. pdf.save('content.pdf');
  1105. }
  1106. })
  1107. }
  1108. var print_detail = function (){
  1109. var div1_label1 = document.getElementById('woker_talkxj').innerHTML;
  1110. // var div2_label1 = document.getElementById('patrolAnalysis_div2_label1').innerHTML;
  1111. var hkey_key;
  1112. var hkey_root = 'HKEY_CURRENT_USER';
  1113. var hkey_path = '\\Software\\Micorsoft\\Internet Explorer\\PageSetup\\';
  1114. var print_win = window.open('打印窗口','_blank');
  1115. var div = document.createElement('div');
  1116. div.setAttribute('width', '100%');
  1117. div.setAttribute('height', '100%');
  1118. var div_print = document.createElement('div');
  1119. div_print.setAttribute('style', 'width:595px;height:842px;padding:20px;margin:0px auto 0px auto');
  1120. div_print.innerHTML=div1_label1;
  1121. div.appendChild(div_print);
  1122. // var div_print1 = document.createElement('div');
  1123. // div_print1.setAttribute('style', 'width:595px;height:842px;padding:20px;margin:0px auto 0px auto');
  1124. // div_print1.innerHTML=div2_label1;
  1125. // div.appendChild(div_print1);
  1126. print_win.document.write(div.innerHTML);
  1127. print_win.document.close();
  1128. try{
  1129. var RegWsh = new ActiveXObject('WScript.Shell');
  1130. hkey_key='header';
  1131. RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,'');
  1132. hkey_key='footer';
  1133. RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,'');
  1134. }catch(e){}
  1135. print_win.print();
  1136. print_win.close();
  1137. }
  1138. var show_detail_data = function(start_data,end_data,build_code,project_date){
  1139. var start_data = start_data;
  1140. var end_data = end_data;
  1141. var build_code = build_code;
  1142. var project_date = project_date;
  1143. Ext.create('Ext.window.Window', {
  1144. id:'project_data_win',
  1145. plain: true,
  1146. border: false,
  1147. closable: false,
  1148. draggable: false,
  1149. frame:false,
  1150. shadow : false,
  1151. height:maxHeight-88,
  1152. width: 650,
  1153. layout: 'fit',
  1154. closeAction:'destroy',
  1155. html:'<div style="overflow-y:auto;height:580px;width:640px;"><div id="woker_talkxj"></div></div>'
  1156. }).show();
  1157. var query = new Object();
  1158. query.V_LOGINNAME = $("#V_LOGINNAME").val();
  1159. // query.V_PASSWORD = $("#V_PASSWORD").val();
  1160. query.start_data = start_data;
  1161. query.end_data = end_data;
  1162. query.type = 'xunjian';
  1163. Ext.MessageBox.wait('Loading', '生成中…');
  1164. $.ajax({
  1165. type:'POST',
  1166. url: baseUrl+"iot/spotoperationrecord/getxjfenxi",
  1167. data: {
  1168. queryJson : Ext.JSON.encode(query)
  1169. },
  1170. success: function(result){
  1171. var json = eval('(' + result + ')');
  1172. if(json.action=='getxjfenxi'){
  1173. ConfirmStore15 = json.RESULT15;
  1174. ConfirmStore16 = json.RESULT16;
  1175. ConfirmStore17 = json.RESULT17;
  1176. // ConfirmStore4 = json.RESULT4;
  1177. xjrysl = json.xjrysl;
  1178. xjbz = json.xjbz;
  1179. zrrnum = json.zrrnum;
  1180. xjrwnum = json.xjrwnum;
  1181. xjdwnum = json.xjdwnum;
  1182. xjysmcsnum = json.xjysmcsnum;
  1183. xjbxcsnum = json.xjbxcsnum;
  1184. xjwksbaifenbi = json.xjwksbaifenbi;
  1185. xjjxzbaifenbi = json.xjjxzbaifenbi;
  1186. xjcsbaifenbi = json.xjcsbaifenbi;
  1187. xjywcbaifenbi = json.xjywcbaifenbi;
  1188. xjwksnum = json.xjwksnum;
  1189. xjjxznum = json.xjjxznum;
  1190. xjcsnum = json.xjcsnum;
  1191. xjywcnum = json.xjywcnum;
  1192. xjysmbaifenbi = json.xjysmbaifenbi;
  1193. xjwsmbaifenbi = json.xjwsmbaifenbi;
  1194. heji1 = json.heji1;
  1195. heji2 = json.heji2;
  1196. heji3 = json.heji3;
  1197. heji4 = json.heji4;
  1198. baifenbiresult16 = json.baifenbiresult16;
  1199. heji5 = json.heji5;
  1200. heji6 = json.heji6;
  1201. baifenbiresult17 = json.baifenbiresult17;
  1202. baifenbiresult15 = json.baifenbiresult15;
  1203. baifenbihuidan15 = json.baifenbihuidan15;
  1204. Ext.MessageBox.hide();
  1205. draw_confirm(query.start_data,query.end_data,project_date);
  1206. // highcharts();
  1207. highcharts1();
  1208. highcharts2();
  1209. highcharts3();
  1210. // highcharts4();
  1211. }
  1212. }
  1213. });
  1214. }
  1215. mouseon = function(obj){
  1216. var id = obj.id;
  1217. $("#"+id).removeClass(id);
  1218. $("#"+id).addClass(id+'_on');
  1219. }
  1220. mouseoff = function(obj){
  1221. var mid = "PatrolAnalysisCheck_";
  1222. for(var i=1;i<2;i++){
  1223. var id = "PatrolAnalysisCheck_title"+i+"_div";
  1224. $("#"+id).removeClass(id+'_on');
  1225. $("#"+id).addClass(id);
  1226. }
  1227. if(menuidx=='m1'){
  1228. mid += 'title1_div';
  1229. $("#"+mid).removeClass(mid);
  1230. $("#"+mid).addClass(mid+'_on');
  1231. }
  1232. }
  1233. menu_click = function(obj){
  1234. var id = obj.id;
  1235. if(id=='PatrolAnalysisCheck_title1_div'){
  1236. menuidx = 'm1';
  1237. print_detail();
  1238. }
  1239. }
  1240. var piedarHtml2 = function() {
  1241. var maintenanceCheckHtml = document.getElementById('PatrolAnalysisCheckHtml');
  1242. var title = document.createElement('div');
  1243. title.setAttribute('class','MaintenancePersonTitle');
  1244. title.innerHTML='巡检工作分析';
  1245. maintenanceCheckHtml.appendChild(title);
  1246. var title6 = document.createElement('div');
  1247. title6.setAttribute('class','PatrolAnalysisCheck_title1_div');
  1248. title6.setAttribute('id','PatrolAnalysisCheck_title1_div');
  1249. title6.setAttribute('onmouseover',"mouseon(this)");
  1250. title6.setAttribute('onmouseout',"mouseoff(this)");
  1251. title6.setAttribute('onclick',"menu_click(this)");
  1252. maintenanceCheckHtml.appendChild(title6);
  1253. }
  1254. new Ext.create('Ext.panel.Panel',{
  1255. width:'100%',
  1256. height:88,
  1257. id: 'PatrolAnalysisCheckHtml',
  1258. layout:'form',
  1259. defaults:{
  1260. border:false
  1261. },
  1262. renderTo: Ext.getBody()
  1263. });
  1264. Ext.define('CompanyComboStore1',{
  1265. extend:'Ext.data.Model',
  1266. fields: [
  1267. {name:'owner_name', type:'string'},
  1268. {name:'owner_id',type:'string'}
  1269. ]
  1270. });
  1271. CompanyStory = Ext.create('Ext.data.Store',{
  1272. model: 'CompanyComboStore1',
  1273. proxy: {
  1274. type: 'ajax',
  1275. actionMethods: {
  1276. create : 'POST',
  1277. read : 'POST', // by default GET
  1278. update : 'POST',
  1279. destroy: 'POST'
  1280. },
  1281. url: baseUrl+'iot/company/view/getNameList',
  1282. reader: {
  1283. type: 'json',
  1284. root: 'RESULT',
  1285. totalProperty: 'totalCount'
  1286. },
  1287. extraParams:{
  1288. queryJson:Ext.JSON.encode(queryJson)
  1289. }
  1290. }
  1291. });
  1292. FilterWin = Ext.create('Ext.form.Panel', {
  1293. id: 'PatrolPlanFilterForm',
  1294. labelWidth: 55,
  1295. defaultType: 'textfield',
  1296. bodyPadding: 15,
  1297. items: [{
  1298. xtype:'datefield',
  1299. fieldLabel:"开始日期",
  1300. minValue:'07/07/2017',
  1301. minText:"当前日期选择应大于2017-07-07",
  1302. format:"Y-m-d",
  1303. value:Ext.util.Format.date(Ext.Date.add(new Date(),Ext.Date.MONTH,-1),"Y-m-01"),
  1304. columnWidth:0.5,
  1305. id: 'start_date',
  1306. name:"start_date",
  1307. editable:false,//只读约束
  1308. allowBlank:false,
  1309. blankText:"不能为空",
  1310. anchor:'95%'
  1311. },{
  1312. xtype:'datefield',
  1313. fieldLabel:"结束日期",
  1314. minValue:'07/07/2017',
  1315. minText:"当前日期选择应大于2017-07-07",
  1316. format:"Y-m-d",
  1317. value:Ext.util.Format.date(new Date(new Date(new Date().getUTCFullYear(), new Date().getMonth(), 1) - 86400000), "Y-m-d"),
  1318. columnWidth:0.5,
  1319. id: 'end_date',
  1320. name:"end_date",
  1321. editable:false,//只读约束
  1322. allowBlank:false,
  1323. blankText:"不能为空",
  1324. anchor:'95%'
  1325. },
  1326. {
  1327. xtype:'combo',
  1328. fieldLabel:'建筑物名称',
  1329. id: 'company_code',
  1330. name:'company_code',
  1331. displayField : 'owner_name',
  1332. valueField : 'owner_id',
  1333. allowBlank:false,
  1334. blankText:"不能为空",
  1335. editable : false,
  1336. anchor:'80%',
  1337. store:CompanyStory
  1338. },
  1339. {
  1340. id:'ff_queryJson',
  1341. name:'queryJson',
  1342. hidden:true
  1343. }],
  1344. buttons: [{
  1345. text: '下一步',
  1346. iconCls:'ok_btn',
  1347. handler: function() {
  1348. var form = this.up('form').getForm();
  1349. if (form.isValid()) {
  1350. var start_date=Ext.util.Format.date(Ext.getCmp('start_date').getValue(), 'Y-m-d');
  1351. var end_date=Ext.util.Format.date(Ext.getCmp('end_date').getValue(), 'Y-m-d');
  1352. var project_date=Ext.util.Format.date(Ext.getCmp('start_date').getValue(), 'Y-m');
  1353. var build_code = Ext.getCmp('company_code').getValue();
  1354. show_detail_data(start_date,end_date,build_code,project_date);
  1355. this.up('window').hide();
  1356. }
  1357. }
  1358. }]
  1359. });
  1360. var filterwin = function() {
  1361. Ext.create('Ext.window.Window',{
  1362. title: '工作分析',
  1363. height: 300,
  1364. width: 350,
  1365. layout: 'fit',
  1366. modal:true,
  1367. items: FilterWin,
  1368. closeAction: 'hide'
  1369. }).show();
  1370. }();
  1371. piedarHtml2();
  1372. maxHeight = document.documentElement.clientHeight;
  1373. // Ext.getCmp('InspectorsCheckPiebar').setHeight(maxHeight);
  1374. });