fce5d9411565c20efe9c15a86120147e57f20f3c.svn-base 33 KB

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