3e31c601faf2e1eced3c66e0ff663d8aa0fc152b.svn-base 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935
  1. /**
  2. * 功能:
  3. *
  4. *
  5. * @author zhuanghuiliang
  6. * @date 2015/10/27
  7. */
  8. EventAllInfo = function() {
  9. /**定义变量**/
  10. var _this = this;
  11. _this.listGrid = null;//数据列表
  12. _this.grid = null;//数据列表
  13. _this.grid1 = null;//数据列表
  14. $queryForm = null;//查询区域表单
  15. $searchButt = null;//查询按钮
  16. $more = null; //更多
  17. _this.loadParams = null;//列表加载参数
  18. _this.exportParams = null;//导出EXCEL参数
  19. var releaseUnitId = "";//通知单发布单位
  20. var planTypeId = "";
  21. _this.eventInfo = function(){
  22. //查询详细信息
  23. if(eventID.length>0){
  24. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  25. var params = {
  26. classid : '365',
  27. objectID : eventID
  28. };
  29. $.ajax({
  30. url : url,
  31. type : 'post',
  32. timeout : 15000,
  33. data : params,
  34. async:false,
  35. dataType : 'json',
  36. success : function(data){
  37. if(data.WRITER_ID_365 == user_ID){//如果登录人id等于填报人id(那么【调整】【解除】【预警转响应】显示)
  38. if(is_alert==0){
  39. $("#aTOpBut").show();
  40. }
  41. $("#adjustBut").show();
  42. $("#RelieveBut").show();
  43. }
  44. $("#TYPEIN_PEOPLE_UNITE").html(data.WRITE_DEPT_365_SHOW);
  45. $("#EVENT_ID_365_SHOW").html(data.EVENT_ID_365_SHOW);//事件名称
  46. $.ajax({
  47. url : $.pathname() + '/ws/sendsms/SendSmsService/getUserMsg',
  48. data : { userId : data.WRITER_ID_365 },
  49. type : 'post',
  50. dataType : 'json',
  51. timeout : 15000,
  52. //async:false,
  53. success : function(userMsg){
  54. $("#TYPEIN_PEOPLE").html(userMsg.realName);
  55. if(userMsg.phoneNum == null || userMsg.phoneNum == "" || userMsg.phoneNum == undefined){
  56. $("#TYPEIN_PEOPLE_PHONE_NUM").html("暂无电话");
  57. }else{
  58. $("#TYPEIN_PEOPLE_PHONE_NUM").html(userMsg.phoneNum);
  59. }
  60. },error : function(e){
  61. top.Dialog.alert("系统错误!");
  62. }
  63. });
  64. releaseUnitId = data.RELEASE_UNIT_365;
  65. //本级预警级别
  66. if(data.EARLY_WARNING_PROPERTY_365 == 51){//解除
  67. $(".show4950").hide();
  68. $("#RELIEVE_DATE_365").html(data.RELIEVE_DATE_365);
  69. $("#yjgy").text("解除原因:");
  70. $("#warningArea").text("解除范围:");
  71. $("#workRequir").text("工作要求:");
  72. $(".show4950").show();
  73. }else{//初次49,调整50
  74. $(".show51").hide();
  75. }
  76. if(data.CURRENT_EW_LEVEL_365_SHOW){
  77. $("#CURRENT_EW_LEVEL_365").html(data.CURRENT_EW_LEVEL_365_SHOW);//显示本次预警级别
  78. }
  79. //本次响应级别
  80. if(data.CURRENT_ER_LEVEL_365_SHOW){
  81. $("#CURRENT_EW_LEVEL_365").html(data.CURRENT_ER_LEVEL_365_SHOW);//显示本次响应级别
  82. }
  83. //上次预警级别
  84. if(data.PREV_EW_LEVEL_365_SHOW){
  85. $("#PREV_EW_LEVEL_365").html(data.PREV_EW_LEVEL_365_SHOW);//显示上次预警级别
  86. }
  87. //上次响应级别
  88. if(data.PREV_ER_LEVEL_365_SHOW){
  89. $("#PREV_EW_LEVEL_365").html(data.CURRENT_ER_LEVEL_365_SHOW);//显示上次预警级别
  90. }
  91. $("#EARLY_WARNING_NAME_365").html(data.EARLY_WARNING_NAME_365);//预警名称
  92. $("#RELEASE_RELIEVE_DATE_365").html(data.RELEASE_RELIEVE_DATE_365);//发布时间
  93. $("#EARLY_WARNING_ID_365").html(data.EARLY_WARNING_ID_365);//预警编号
  94. $("#EARLY_WARNING_AREA_NAME_365").html(data.EARLY_WARNING_AREA_NAME_365);//预警范围
  95. $("#MEET_EMERGENCIES_PLAN_365_SHOW").html(data.MEET_EMERGENCIES_PLAN_365_SHOW);//应急预案
  96. $("#EW_SUMMARY_365").html(data.EW_SUMMARY_365);//预警概要
  97. $("#MEASURE_AND_REQUEST_365").html(data.MEASURE_AND_REQUEST_365);//预防措施及工作要求
  98. $("#EVENT_ID_365_SHOW").html(data.EVENT_ID_365_SHOW);//事件名称
  99. $("#REMARK_365").html(data.REMARK_365);//备注
  100. $("#RELEASE_UNIT_365_SHOW").text(data.RELEASE_UNIT_365_SHOW);//发布单位
  101. $("#WRITER_365").text(data.WRITER_365);//填报人
  102. $("#PREV_EW_ID").text(data.PREV_EW_ID_365);//上次预警单号
  103. if(data.WETHER_EW_ADJUST_365 == 1){//是否预警调整 0非预警调整1、是预警(预警性质)
  104. $("#WETHER_EW_ADJUST").attr("checked","checked");
  105. }
  106. if(data.EARLY_WARNING_PROPERTY_365 == 49){//如果预警性质 == 49(49为初次发布,50为非初次发布,51为调账)
  107. $("#WARNING_PROPERTY").attr("checked","checked");
  108. };
  109. if(data.EARLY_WARNING_PROPERTY_365 == 51){//如果预警性质 == 51(49为初次发布,50为非初次发布,51为调账)
  110. $(".titleShow").text("查看预警解除通知单详情");
  111. $(".titleShow1").text("预警解除通知单");
  112. //$("#showForm2").show();
  113. //$('#showForm1').hide();
  114. $("#EARLY_WARNING_NAME").html(data.EARLY_WARNING_NAME_365);//预警名称
  115. $("#EARLY_WARNING_ID").html(data.EARLY_WARNING_ID_365);//预警编号
  116. $("#RELEASE_RELIEVE_DATE").html(data.RELEASE_RELIEVE_DATE_365);//解除时间
  117. $("#EARLY_WARNING_AREA_NAME").html(data.EARLY_WARNING_AREA_NAME_365);//解除范围
  118. $("#EVENT_ID_365_SHOW").html(data.EVENT_ID_365_SHOW);//事件名称
  119. $("#EW_SUMMARY").html(data.EW_SUMMARY_365);//预警概要
  120. $("#MEASURE_AND_REQUEST").html(data.MEASURE_AND_REQUEST_365);//预防措施及工作要求
  121. $("#REMARK").html(data.REMARK_365);//备注
  122. };
  123. //预警/响应编号
  124. warningId = data.EARLY_WARNING_ID_365;
  125. evevtId = data.EVENT_ID_365;
  126. isAlert1 = data.IS_ALERT_365;
  127. //上次预警/响应编号
  128. prevId = data.PREV_EW_ID_365;
  129. //标题 默认显示预警/响应通知单名称
  130. $('#titleShow').html(data.EARLY_WARNING_NAME_365);
  131. var typhoonDate = data.TYPHOON_DATE_365;
  132. if(typhoonDate != ""){
  133. $("#TYPHOON_DATE_365").html(typhoonDate);
  134. $("#typhoonDate_tr").show();
  135. }else{
  136. $("#typhoonDate_tr").hide();
  137. }
  138. var n = data.IS_ALERT_365;//预警-0;响应-1
  139. if(n == 0){
  140. $("#yj_xy_name").text("预警名称:");
  141. $("#yj_xy_num").text("预警编号:");
  142. $("#warningArea").text("预警范围:");
  143. $("#yj_xy_property").text("预警性质:");
  144. $("#yj_xy_level").text("预警级别:");
  145. $("#yjgy").text("预警概要:");
  146. $("#adjust1").text("是否预警调整:");
  147. $("#adjust2").text("预警调整:");
  148. $("#lastNum").text("上次预警单号:(");
  149. } else if(n == 1){
  150. $("#yj_xy_name").text("响应名称:");
  151. $("#yj_xy_num").text("响应编号:");
  152. $("#warningArea").text("响应范围:");
  153. $("#yj_xy_property").text("响应性质:");
  154. $("#yj_xy_level").text("响应级别:");
  155. $("#yjgy").text("响应概要:");
  156. $("#adjust1").text("是否响应调整:");
  157. $("#adjust2").text("响应调整:");
  158. $("#lastNum").text("上次响应单号:(");
  159. }
  160. //if(data.IS_SEND_365 == 6){//结束状态
  161. if(data.EARLY_WARNING_PROPERTY_365 == '51'){//预警/响应性质
  162. $("#warningArea").text("解除范围:");
  163. $("#yjgy").text("解除原因:");
  164. }
  165. //}
  166. if(data.IS_SEND_365 == 6){//结束状态
  167. $("#aTOpBut").hide();
  168. $("#adjustBut").hide();
  169. $("#RelieveBut").hide();
  170. }
  171. planTypeId = data.PLAN_TYPE_ID_365;
  172. _this.getQianfaren();
  173. fabuDanwei = data.RELEASE_UNIT_365;
  174. },error : function(e){
  175. top.Dialog.alert("加载数据失败");
  176. }
  177. });
  178. }
  179. };
  180. //签发人
  181. _this.getQianfaren = function(){
  182. var url1 = $.pathname() + '/ws/qdbbi/QueryDataByBusinessId/query/';
  183. var params1 = {
  184. 'businessId' :eventID
  185. };
  186. $.ajax({
  187. url:url1,
  188. type:"post",
  189. data:params1,
  190. dataType : "json",
  191. success : function(data) {
  192. for (var i = 0; i < data.length; i++) {
  193. personName = data[i].PERSON_NAME;
  194. if(data[i].STATUES=="3"){
  195. //为签发人赋值
  196. $("#WRITER_365").html(personName);
  197. }
  198. }
  199. },
  200. error:function(e){
  201. alert("访问服务失败! ")
  202. }
  203. });
  204. //如果走到这里,说明没有签发人
  205. $("#WRITER_365").html("");
  206. }
  207. _this.historyInfo = function(previd){
  208. var corpId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  209. var url =$.pathname()+'/ws/EventService/EventService/getInfoByPrevId/';
  210. var params = {
  211. classid : '365',
  212. prevId : previd,
  213. fd_id:eventID,
  214. //comp_id:corpId//以查看人的层级去展示本单位、同级政府、上下级应对的情况
  215. comp_id:fabuDanwei//根据发布单位去查询
  216. };
  217. $.request.query(url,params,function(data){
  218. var tr = "";
  219. for(var i in data){
  220. var obj = data[i];
  221. var time = obj["RELEASE_RELIEVE_DATE"];
  222. if(time.length>20){
  223. time = time.substring(0,19);
  224. }
  225. tr += "<tr>" +
  226. "<td>"+obj["EARLY_WARNING_NAME"] + "</td>" +
  227. "<td>"+obj["EARLY_WARNING_ID"] + "</td>" +
  228. "<td>" +obj["LEVEL_SHOW"]+ "</td>" +
  229. "<td style='word-wrap:break-word; word-break:break-all;'>"+obj["EARLY_WARNING_AREA_NAME"]+"</td>" +
  230. "<td style='word-wrap:break-word; word-break:break-all;'>"+time+"</td>"+
  231. "</tr>";
  232. }
  233. if(tr==""){
  234. tr += "<tr>" +
  235. "<td colspan='5' align='center'>暂无数据</td>" +
  236. "</tr>";
  237. }
  238. $('#historyTr').after(tr);
  239. });
  240. };
  241. //同级政府情况
  242. _this.getGovInfo = function(deptId){
  243. var planTypeId369 = "";
  244. if(planTypeId == "9"){//防风防汛---------------------通知单预案类型
  245. planTypeId369 = "311";// ****政府或气象预警通知单--预警类别
  246. }else if(planTypeId == "10"){//地震灾害--------------通知单预案类型
  247. planTypeId369 = "312";// ****政府或气象预警通知单--预警类别
  248. }else if(planTypeId == "11"){//低温雨雪冰冻灾害-------通知单预案类型
  249. planTypeId369 = "313";// ****政府或气象预警通知单--预警类别
  250. }else if(planTypeId == "4"){//人身事故---------------通知单预案类型
  251. planTypeId369 = "314";// ****政府或气象预警通知单--预警类别
  252. }else if(planTypeId == "5"){//大面积停电事件----------通知单预案类型
  253. planTypeId369 = "315";// ****政府或气象预警通知单--预警类别
  254. }else if(planTypeId == "6"){//设备事故---------------通知单预案类型
  255. planTypeId369 = "316";// ****政府或气象预警通知单--预警类别
  256. }else if(planTypeId == "7"){//电厂大坝厂房事故--------通知单预案类型
  257. planTypeId369 = "317";// ****政府或气象预警通知单--预警类别
  258. }else if(planTypeId == "8"){//环境污染---------------通知单预案类型
  259. planTypeId369 = "318";// ****政府或气象预警通知单--预警类别
  260. }else if(planTypeId == "18"){//突发公共卫生----------通知单预案类型
  261. planTypeId369 = "319";// ****政府或气象预警通知单--预警类别
  262. }else if(planTypeId == "12"){//电厂供应及客户服务-----通知单预案类型
  263. planTypeId369 = "320";// ****政府或气象预警通知单--预警类别
  264. }else if(planTypeId == "13"){//生产场所防恐怖袭击-----通知单预案类型
  265. planTypeId369 = "321";// ****政府或气象预警通知单--预警类别
  266. }else if(planTypeId == "14"){//突发性群体事件---------通知单预案类型
  267. planTypeId369 = "322";// ****政府或气象预警通知单--预警类别
  268. }else if(planTypeId == "15"){//突发新闻事件-----------通知单预案类型
  269. planTypeId369 = "323";// ****政府或气象预警通知单--预警类别
  270. }else if(planTypeId == "16"){//涉外突发事件-----------通知单预案类型
  271. planTypeId369 = "324";// ****政府或气象预警通知单--预警类别
  272. }else if(planTypeId == "17"){//网络与信息安全---------通知单预案类型
  273. planTypeId369 = "325";// ****政府或气象预警通知单--预警类别
  274. }else if(planTypeId == ""){//气象信息----------------通知单预案类型
  275. planTypeId369 = "326";// ****政府或气象预警通知单--预警类别
  276. }else if(planTypeId == "21"){//通信类----------------通知单预案类型
  277. planTypeId369 = "";// ****政府或气象预警通知单--预警类别
  278. }else if(planTypeId == "23"){//消防------------------通知单预案类型
  279. planTypeId369 = "";// ****政府或气象预警通知单--预警类别
  280. }else if(planTypeId == "24"){//应对社会突发事件供电保障----通知单预案类型
  281. planTypeId369 = "";// ****政府或气象预警通知单--预警类别
  282. }
  283. //单位id为空直接返回
  284. /*if(!deptId){
  285. return ;
  286. }*/
  287. var url =$.pathname()+'/ws/EventService/EventService/getGovInfo/';
  288. var params = {
  289. //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况
  290. deptId : fabuDanwei,//根据发布单位去查询
  291. planTypeId : planTypeId369,
  292. evevtId : evevtId//事件ID
  293. };
  294. //alert(JSON.stringify(params))
  295. $.ajax({
  296. url : url,
  297. type : 'post',
  298. timeout : 15000,
  299. data : params,
  300. dataType : 'json',
  301. success : function(data){
  302. var tr = "";
  303. for(var i in data){
  304. var obj = data[i];
  305. var area = obj["AREA"];
  306. area = area==null?"":area;
  307. tr += "<tr>" +
  308. "<td class='breakWork'>"+obj["RELEASE_UNIT"] + "</td>" +
  309. "<td class='breakWork'>"+obj["RELEASE_DATE"] + "</td>" +
  310. "<td class='breakWork'>" +obj["NOTICETYPE"]+ "</td>" +
  311. "<td class='breakWork'>"+obj["LEVEL"]+"</td>" +
  312. "<td class='breakWork' style='word-wrap:break-word; word-break:break-all;'>"+area+"</td>" +
  313. "<td class='breakWork' style='word-wrap:break-word; word-break:break-all;'>"+obj["CONTENT"]+"</td>"+
  314. "</tr>";
  315. }
  316. if(tr==""){
  317. tr += "<tr>" +
  318. "<td colspan='6' align='center'>暂无数据</td>" +
  319. "</tr>";
  320. }
  321. $('#govInfoTr').after(tr);
  322. }
  323. });
  324. };
  325. //上下级单位当前事件情况
  326. _this.parentAndChildrenInfo = function(deptId){
  327. debugger;
  328. //var url =$.pathname()+'/ws/EventService/EventService/getParentAndChildrenInfo/';
  329. var url =$.pathname()+'/ws/EventService/EventService/getParentAndChildrenInfo1/';//guoenle
  330. var params = {
  331. classid : '365',
  332. //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况
  333. deptId : fabuDanwei,//根据发布单位去查询
  334. plan_Type_Id : planTypeId
  335. };
  336. // $.request.query(url,params,function(data){
  337. $.ajax({
  338. url : url,
  339. data : params,
  340. type : 'post',
  341. dataType : 'json',
  342. timeout : 66666,
  343. // async : false,
  344. success : function(data){
  345. var n = data.length;
  346. var tr = "";
  347. /*for(var i in data){
  348. var obj = data[i];
  349. var time = obj["RELEASE_RELIEVE_DATE"];
  350. if(time!=null&&time.length>20){
  351. time = time.substring(0,19);
  352. }
  353. tr += "<tr>" +
  354. "<td>"+obj["RELEASE_UNIT_SHOW"]+"</td>" +
  355. "<td>"+obj["EARLY_WARNING_NAME"] + "</td>" +
  356. "<td>"+obj["EARLY_WARNING_ID"] + "</td>" +
  357. "<td>" +obj["LEVEL_SHOW"]+ "</td>" +
  358. "<td style='word-wrap:break-word; word-break:break-all;'>"+obj["EARLY_WARNING_AREA_NAME"]+"</td>" +
  359. "<td style='word-wrap:break-word; word-break:break-all;'>"+time+"</td>"+
  360. "</tr>";
  361. }*/
  362. if(n>0){
  363. for(var i=0;i<n;i++){
  364. var level = "";
  365. if(data[i].d == ""){
  366. level = data[i].e;
  367. if(level==29){
  368. level = "Ⅰ级";
  369. }else if(level==30){
  370. level = "Ⅱ级";
  371. }else if(level==31){
  372. level = "Ⅲ级";
  373. }else if(level==32){
  374. level = "Ⅳ级";
  375. }
  376. }else if(data[i].e == ""){
  377. level = data[i].d;
  378. if(level==35){
  379. level = "红色预警";
  380. }else if(level==36){
  381. level = "橙色预警";
  382. }else if(level==37){
  383. level = "黄色预警";
  384. }else if(level==38){
  385. level = "蓝色预警";
  386. }
  387. }
  388. tr += "<tr>" +
  389. "<td>"+data[i].a+"</td>" +//发布单位
  390. "<td>"+data[i].b+"</td>" +//预警/响应名称
  391. "<td>"+data[i].c+"</td>" +//预警/响应编号
  392. "<td>"+level+"</td>" +//预警/响应级别
  393. "<td style='word-wrap:break-word; word-break:break-all;'>"+data[i].f+"</td>" +//预警/响应范围
  394. "<td style='word-wrap:break-word; word-break:break-all;'>"+data[i].g+"</td>"+//发布时间
  395. "</tr>";
  396. };
  397. };
  398. if(tr==""){
  399. tr += "<tr>" +
  400. "<td colspan='6' align='center'>暂无数据</td>" +
  401. "</tr>";
  402. }
  403. $('#parentAndChildren').after(tr);
  404. },error : function(e){
  405. top.Dialog.alert("系统错误!");
  406. }
  407. });
  408. };
  409. //报表填报情况
  410. _this.showBaobiaoInfo = function(warningId,deptId){
  411. var url =$.pathname() + '/ws/EventService/EventService/getBaobiaoInfo/';
  412. var params = {
  413. warningId : warningId,
  414. //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况
  415. deptId : fabuDanwei//根据发布单位去查询
  416. };
  417. $.ajax({
  418. url : url,
  419. type : 'post',
  420. timeout : 15000,
  421. data : params,
  422. dataType : 'json',
  423. success : function(data){
  424. var tr = "";
  425. for(var i in data){
  426. var obj = data[i];
  427. var time =obj["REPORT_TIME"];
  428. if(!time){
  429. time = "未填报";
  430. }else{
  431. time = time.substring(0,19);
  432. }
  433. tr += "<tr>" +
  434. "<td>"+obj["REPORT_NAME"]+"</td>" +
  435. "<td>"+obj["DEPT_NAME"] + "</td>" +
  436. "<td>"+time+ "</td>"+
  437. "</tr>";
  438. }
  439. if(tr==""){
  440. tr += "<tr>" +
  441. "<td colspan='3' align='center'>暂无数据</td>" +
  442. "</tr>";
  443. }
  444. $('#baobiao').after(tr);
  445. }
  446. });
  447. }
  448. //报告填报情况
  449. _this.showBaogaoInfo = function(warningId,deptId){
  450. var url =$.pathname() + '/ws/EventService/EventService/getBaogaoInfo/';
  451. var params = {
  452. warningId : warningId,
  453. //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况
  454. deptId : fabuDanwei,//根据发布单位去查询
  455. is_alert : isAlert1
  456. };
  457. $.ajax({
  458. url : url,
  459. type : 'post',
  460. timeout : 15000,
  461. data : params,
  462. dataType : 'json',
  463. success : function(data){
  464. var tr = "";
  465. for(var i in data){
  466. var obj = data[i];
  467. var time =obj["TIME"];
  468. if(!time){
  469. time = "未填报";
  470. }else{
  471. time = time.substring(0,19);
  472. }
  473. tr += "<tr>" +
  474. "<td>"+obj["REPORT_TYPE"]+"</td>" +
  475. "<td>"+obj["INPUT_UNIT_SHOW"] + "</td>" +
  476. "<td>"+time+ "</td>"+
  477. "</tr>";
  478. }
  479. if(tr==""){
  480. tr += "<tr>" +
  481. "<td colspan='3' align='center'>暂无数据</td>" +
  482. "</tr>";
  483. }
  484. $('#baogao').after(tr);
  485. }
  486. });
  487. };
  488. //显示相同事件的预警和响应通知单gel
  489. _this.showSameEventNotice = function(evevtId,deptId){
  490. //alert(evevtId+"\n"+fabuDanwei+"\n"+deptId)
  491. var url = $.pathname() + '/ws/sendsms/SendSmsService/getLetterOfNoticeInfo';;//获取通知单信息
  492. var params = {
  493. eventId : evevtId,
  494. //deptId : deptId//以查看人的层级去展示本单位、同级政府、上下级应对的情况
  495. deptId : fabuDanwei//根据发布单位去查询
  496. };
  497. $.ajax({
  498. url : url,
  499. type : 'post',
  500. timeout : 15000,
  501. data : params,
  502. dataType : 'json',
  503. //async : false,
  504. success : function(data){
  505. var n=data.length;
  506. var tr = "";
  507. //for(var i in data){
  508. for(var i=0;i<n;i++){
  509. tr += "<tr> "+
  510. "<td style='width:10%'><a href='EventAllInfo.jsp?fd_id="+data[i].fdId365+"&is_alert="+data[i].isAlert+"' title='点击查看该通知单详情'>"+data[i].eventName+"</a></td>" +
  511. "<td style='width:10%'>"+data[i].issueUnitName+"</td>" +
  512. "<td style='width:15%'>"+data[i].noticeName+"</td>" +
  513. "<td style='width:20%'>"+data[i].noticeNum+"</td>" +
  514. "<td style='width:33%'>"+data[i].noticeAreaName+"</td>" +
  515. "<td style='width:10%'>"+data[i].issueDate+"</td> </tr>";
  516. }
  517. if(tr==""){
  518. tr += "<tr>" +
  519. "<td colspan='7' align='center'>暂无数据</td>" +
  520. "</tr>";
  521. }
  522. $('#eventManage_Tr').after(tr);
  523. }
  524. });
  525. };
  526. /*_this.reportInfo = function(code){
  527. _this.showDeptGrid();
  528. var url ='/nwyj/ws/EventService/EventService/getReportInfoById/';
  529. var params = {
  530. classid : '320',
  531. fd_id : code
  532. };
  533. $.request.query(url,params,function(data){
  534. if(data!=null&&data!=undefined&&data!=""){
  535. _this.setDeptData(data+"a");
  536. }
  537. });
  538. };
  539. _this.showDeptGrid = function() {
  540. var myCols = [{name : 'RESPONSIBLE_NAME_322',id : 'RESPONSIBLE_NAME_322',
  541. width : "20%",align : 'left',render :_this._addStatus,isSort:false,headerRender:function(column){
  542. return '<div class="padding_left2"><span class="icon_btn_down" id="openAllTreeDom">填报部门</span></div>';
  543. }
  544. },
  545. {display : '计划时间',name : 'PROGRAMME_TIME_322',width : "20%",type : 'int',align : 'center'},
  546. {display : '填报时间',name : 'updateTime',width : "20%",align : 'center'},
  547. {display : '填报人',name : 'WRITER_322',width : "10%",align : 'center'},
  548. {display : '是否填报',name : 'WRITER_STATE_322',width : "10%",align : 'center',
  549. render : function(rowdata,rowindex, value, column) {
  550. return "未填报" == value ? "<font color=blue>"
  551. + value + "</font>"
  552. : value;
  553. }
  554. },
  555. {display : '是否超时',name : 'IS_OVERTIME_322',width : "10%",align : 'center',
  556. render : function(rowdata,rowindex, value, column) {
  557. return "是" == value ? "<font color=red>"
  558. + value + "</font>"
  559. : value;
  560. }
  561. },
  562. {display : '操作',name : 'HANDLE_322',width : "8%",align : 'center',
  563. render : function(rowdata,rowindex, value, column) {
  564. var handledom = "";
  565. if(rowdata.WRITER_STATE_322=="" || rowdata.WRITER_STATE_322==null || rowdata.WRITER_STATE_322==undefined){
  566. value = "";
  567. handledom = value;
  568. }else{
  569. value = "下载";
  570. if(rowdata.WRITER_STATE_322=="未填报"){
  571. handledom = "<font class='nodownload'>" + value + "</font>";
  572. }else{
  573. handledom = _this._canDownload(rowdata,rowindex, value, column);
  574. }
  575. }
  576. return handledom;
  577. }
  578. }];
  579. _this.grid = $("#maingrid").quiGrid({
  580. columns:myCols,
  581. height : '477px',
  582. width : '100%',
  583. checkbox : false,
  584. usePager : false,
  585. data : "",
  586. autoCheckChildren : true,
  587. percentWidthMode:true,
  588. tree : {
  589. columnId : 'RESPONSIBLE_NAME_322'
  590. },
  591. treeAjax : true,
  592. treeChildDataPath : $.pathname()
  593. + '/ws/qrps/QueryReportProgrammeService/queryReportPra?params=',
  594. treeAutoParam : "params"
  595. });
  596. $("#openAllTreeDom").on("click",function(){
  597. var openstatus = $(this).attr("id");
  598. if(openstatus=="openAllTreeDom"){
  599. $(".l-grid-tree-link-close").click();
  600. $(this).attr("id","closeAllTreeDom").attr("class","icon_btn_up");
  601. }else if(openstatus=="closeAllTreeDom"){
  602. $(".l-grid-tree-link-open").click();
  603. $(this).attr("id","openAllTreeDom").attr("class","icon_btn_down");
  604. }
  605. });
  606. };
  607. //显示计划下所有部门填报情况
  608. _this.setDeptData = function(planId) {
  609. $.ajax({
  610. url : $.pathname()
  611. + '/ws/qrps/QueryReportProgrammeService/queryReportDept',
  612. type : 'post',
  613. //timeout : 15000,
  614. data : {
  615. 'planId' : planId
  616. },
  617. dataType : 'json',
  618. success : function(data) {
  619. if(data){
  620. for (var i = 0; i < data.rows.length; i++) {
  621. data.rows[i]['isParent'] = true;
  622. }
  623. console.log(JSON.stringify(data));
  624. _this.grid.setOptions({
  625. "data" : data
  626. });
  627. _this.grid.loadData();
  628. }
  629. },
  630. error : function(e) {
  631. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  632. }
  633. });
  634. }
  635. _this._canDownload = function(rowdata,rowindex, value, column){
  636. var returndata = "<font class='nodownload'>下载</font>";
  637. var fd_id = rowdata.fd_object_id;
  638. var params ={
  639. listId : 110,
  640. condition : "is_Del = '0' and MainId ='"+ fd_id + "'"
  641. };
  642. var url1 = $.pathname() + "/ws/uploadForm/FileUpDownService/queryFiles";
  643. var url = "";
  644. $.ajax({
  645. url : url1,
  646. data : params,
  647. type : 'post',
  648. dataType : 'json',
  649. async :false,
  650. success : function(result){
  651. if(result.rows.length==0){
  652. }else{
  653. url = $.pathname() + '/page/common/getFileExc.jsp?objectID=' + result.rows[0].FD_OBJECTID110
  654. + "&filename=" + result.rows[0].SAVENAME_110
  655. + "." + result.rows[0].FILEEXT_110 + "&downfilename=" + encodeURI(encodeURI(result.rows[0].NAME_110)+ "." + result.rows[0].FILEEXT_110);
  656. returndata = '<a onclick="javascript:window.open(\'' + url + '\')">下载</a>&nbsp;&nbsp;';
  657. }
  658. },
  659. error : function(e) {
  660. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  661. }
  662. });
  663. return returndata;
  664. }
  665. //对填报部门列进行渲染
  666. _this._addStatus = function(rowdata, rowindex, value, column){
  667. if(value=="预警行动信息报告" || value=="预警总结报告"){
  668. var now = allGetServerTime();
  669. var timestr = rowdata.PROGRAMME_TIME_322.replace(/-/g,"/");
  670. var progressTime = new Date(timestr);
  671. if(rowdata.IS_OVERTIME_322=="是"){
  672. //超时,红色
  673. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/red1.png'/></span>" + value + "</a></div>";
  674. }else if(rowdata.WRITER_STATE_322=="已填报"){
  675. //否则,已填报,绿色
  676. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
  677. }else if(rowdata.WRITER_STATE_322=="未填报"){
  678. if(Date.parse(now)+1000*60*60>Date.parse(progressTime) && Date.parse(now) < Date.parse(progressTime)){
  679. //若时间将近(在1小时之内了),则黄色
  680. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/yellow1.png'/></span>" + value + "</a></div>";
  681. }else{
  682. //绿色
  683. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
  684. }
  685. }
  686. }else{
  687. return value;
  688. }
  689. }
  690. _this.baobiaoInfo = function(code){
  691. showDeptGrid1();
  692. var url ='/nwyj/ws/EventService/EventService/getBaobiaoInfoById/';
  693. var params = {
  694. classid : '337',
  695. fd_id : code
  696. };
  697. $.request.query(url,params,function(data){
  698. if(data!=null&&data!=undefined&&data!=""){
  699. setDeptData1(data+"a","11");
  700. }
  701. });
  702. };
  703. function showDeptGrid1() {
  704. var myCols = [{name : 'RESPONSIBLE_NAME',id : 'RESPONSIBLE_NAME',
  705. width : "30%",align : 'left',render :_addStatus1,isSort:false,headerRender:function(column){
  706. return '<div class="padding_left2"><span class="icon_btn_down" id="openAllTreeDom1">填报部门</span></div>'
  707. }
  708. },
  709. {display : '计划时间',name : 'PROGRAMME_TIME',width : "15%",type : 'int',align : 'center'},
  710. {display : '填报时间',name : 'updateTime',width : "15%",align : 'center'},
  711. {display : '填报人',name : 'WRITER',width : "8%",align : 'center'},
  712. {display : '是否填报',name : 'WRITER_STATE',width : "10%",align : 'center',
  713. render : function(rowdata,rowindex, value, column) {
  714. return "未填报" == value ? "<font color=blue>"
  715. + value + "</font>"
  716. : value;
  717. }
  718. },
  719. {display : '是否超时',name : 'IS_OVERTIME',width : "5%",align : 'center',
  720. render : function(rowdata,rowindex, value, column) {
  721. return "是" == value ? "<font color=red>"
  722. + value + "</font>"
  723. : value;
  724. }
  725. },
  726. {display : '操作',name : 'HANDLE',width : "8%",align : 'center',
  727. render : function(rowdata,rowindex, value, column) {
  728. var handledom = "";
  729. if(rowdata.WRITER_STATE=="" || rowdata.WRITER_STATE==null || rowdata.WRITER_STATE==undefined){
  730. value = "";
  731. handledom = value;
  732. }else{
  733. value = "下载";
  734. if(rowdata.WRITER_STATE=="未填报"){
  735. handledom = "<font class='nodownload'>" + value + "</font>";
  736. }else{
  737. handledom = _canDownload(rowdata,rowindex, value, column);
  738. }
  739. }
  740. return handledom;
  741. }
  742. }];
  743. // debugger;
  744. grid1 = $("#maingrid1").quiGrid({
  745. columns:myCols,
  746. height : '477px',
  747. width : '100%',
  748. checkbox : false,
  749. usePager : false,
  750. data : "",
  751. autoCheckChildren : true,
  752. percentWidthMode:true,
  753. tree : {
  754. columnId : 'RESPONSIBLE_NAME'
  755. },
  756. treeAjax : true,
  757. treeChildDataPath : $.pathname()
  758. + '/ws/reportMonitor/ReportPlanService/queryReportPra?params=',
  759. treeAutoParam : "params"
  760. });
  761. $("#openAllTreeDom1").on("click",function(){
  762. var openstatus = $(this).attr("id");
  763. if(openstatus=="openAllTreeDom"){
  764. $(".l-grid-tree-link-close").click();
  765. $(this).attr("id","closeAllTreeDom").attr("class","icon_btn_up");
  766. }else if(openstatus=="closeAllTreeDom"){
  767. $(".l-grid-tree-link-open").click();
  768. $(this).attr("id","openAllTreeDom").attr("class","icon_btn_down");
  769. }
  770. })
  771. };
  772. //显示计划下所有部门填报情况
  773. function setDeptData1(planId,compId) {
  774. $.ajax({
  775. url : $.pathname()
  776. + '/ws/reportMonitor/ReportPlanService/queryReportDept',
  777. type : 'post',
  778. //timeout : 15000,
  779. data : {
  780. 'planId' : planId,
  781. 'comp_id':compId
  782. },
  783. dataType : 'json',
  784. success : function(data) {
  785. if(data){
  786. for (var i = 0; i < data.rows.length; i++) {
  787. data.rows[i]['isParent'] = true;
  788. }
  789. grid1.setOptions({
  790. "data" : data
  791. });
  792. grid1.loadData();
  793. }
  794. },
  795. error : function(e) {
  796. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  797. }
  798. });
  799. }
  800. function _canDownload(rowdata,rowindex, value, column){
  801. var returndata = "<font class='nodownload'>下载</font>";
  802. var fd_id = rowdata.fd_object_id;
  803. var params ={
  804. listId : 110,
  805. condition : "is_Del = '0' and MainId ='"+ fd_id + "'"
  806. };
  807. var url1 = $.pathname() + "/ws/uploadForm/FileUpDownService/queryFiles";
  808. var url = "";
  809. $.ajax({
  810. url : url1,
  811. data : params,
  812. type : 'post',
  813. dataType : 'json',
  814. async :false,
  815. success : function(result){
  816. if(result.rows.length==0){
  817. }else{
  818. url = $.pathname() + '/page/common/getFileExc.jsp?objectID=' + result.rows[0].FD_OBJECTID110
  819. + "&filename=" + result.rows[0].SAVENAME_110
  820. + "." + result.rows[0].FILEEXT_110 + "&downfilename=" + encodeURI(encodeURI(result.rows[0].NAME_110)+ "." + result.rows[0].FILEEXT_110);
  821. returndata = '<a onclick="javascript:window.open(\'' + url + '\')">下载</a>&nbsp;&nbsp;'
  822. }
  823. },
  824. error : function(e) {
  825. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  826. }
  827. })
  828. return returndata;
  829. }
  830. //对填报部门列进行渲染
  831. function _addStatus1(rowdata, rowindex, value, column){
  832. var now = allGetServerTime();
  833. var timestr = rowdata.PROGRAMME_TIME_322.replace(/-/g,"/");
  834. var progressTime = new Date(timestr);
  835. if(rowdata.IS_OVERTIME=="是"){
  836. //超时,红色
  837. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/red1.png'/></span>" + value + "</a></div>";
  838. }else if(rowdata.WRITER_STATE=="已填报"){
  839. //否则,已填报,绿色
  840. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
  841. }else if(rowdata.WRITER_STATE=="未填报"){
  842. if(Date.parse(now)+1000*60*60>Date.parse(progressTime) && Date.parse(now) < Date.parse(progressTime)){
  843. //若时间将近(在1小时之内了),则黄色
  844. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/yellow1.png'/></span>" + value + "</a></div>";
  845. }else{
  846. //绿色
  847. return "<div><a><span style='margin-right:5px'><img src='/nwyj/scripts/qui/libs/images/colorball/green1.png'/></span>" + value + "</a></div>";
  848. }
  849. }
  850. else{
  851. return value;
  852. }
  853. }*/
  854. return {
  855. init : function() {
  856. //单位id
  857. var deptId = /*window.opener.*/top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  858. //通知单详细信息
  859. _this.eventInfo();
  860. //本单位预警/响应调整情况
  861. _this.historyInfo(prevId);
  862. //上下级单位当前事件情况
  863. //alert(releaseUnitId+"\n"+deptId);//发布单位he登录人单位
  864. //_this.parentAndChildrenInfo(deptId);//参数为:登录人单位
  865. _this.parentAndChildrenInfo(releaseUnitId);//参数为:发布单位
  866. //同级政府发布的通知单信息
  867. _this.getGovInfo(deptId);
  868. //报表填报情况
  869. _this.showBaobiaoInfo(warningId,deptId);
  870. //报告填报情况
  871. _this.showBaogaoInfo(warningId,deptId);
  872. //_this.reportInfo(warningId);
  873. //_this.baobiaoInfo(warningId);
  874. _this.showSameEventNotice(evevtId,deptId);//显示相同事件的预警和响应通知单
  875. $(".tzd_show").live("click",function(){
  876. var id = $(this).attr("id");
  877. id = "content_"+id.split("_")[1];
  878. $("#"+id).hide();
  879. $(this).removeClass("tzd_show");
  880. $(this).addClass("tzd_hide");
  881. $(top.document.body).find("#frmright").height($(window.document.body).height());
  882. });
  883. $(".tzd_hide").live("click",function(){
  884. var id = $(this).attr("id");
  885. var idd = id.split("_")[1];
  886. id = "content_"+idd;
  887. $("#"+id).show();
  888. $(this).removeClass("tzd_hide");
  889. $(this).addClass("tzd_show");
  890. $(top.document.body).find("#frmright").height($(window.document.body).height());
  891. });
  892. }
  893. };
  894. }();
  895. $(function() {
  896. if(stat=="解除"){
  897. $("#yjgy").text("解除原因:");
  898. }else{
  899. $("#yjgy").text("预警/响应概要:");
  900. }
  901. EventAllInfo.init();
  902. });