76cb7236069ae47265e02ba1403f525f44e18a37.svn-base 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  2. var parent_id = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  3. var parent_ids = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  4. //登陆用户的单位名称
  5. var corp_name = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  6. $(function(){
  7. getChildInfo();
  8. /** 绑定更多的按钮点击事件 */
  9. $more = $("#more"); // 更多按钮
  10. $more.bind('click', function() {
  11. more();
  12. });
  13. $searchButt = $("#searchButt");// 更多查询按钮
  14. $searchButt.live('click', function() {
  15. searchHandler();
  16. });
  17. //清空条件
  18. $("#emptyCondition").bind("click",function(){
  19. $("#PLAN_NAME_214").val("");
  20. var $selConditions = $("#selectConditions");
  21. var $selCon = $selConditions.find(".selectCondi");
  22. for(var i=0;i<$selCon.length;i++){
  23. $selCon[i].click();
  24. }
  25. });
  26. $searchOne = $("#searchOne");//查询图标绑定查询事件
  27. $searchOne.bind('click', function() {
  28. searchHandler();
  29. });
  30. });
  31. var conditionData2="";
  32. function getChildInfo(){
  33. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/getChidInfo/';
  34. var params = {
  35. id : parent_id,
  36. };
  37. $.ajax({
  38. url : url,
  39. type : 'post',
  40. timeout : 60000,
  41. data : params,
  42. dataType : 'json',
  43. success : function(data){
  44. conditionData2 = JSON.stringify(data);
  45. conditionData2 = conditionData2.replace(/\\\"/g,"\"");
  46. conditionData2 = conditionData2.replace(/\"{/g,"{");
  47. conditionData2 = conditionData2.replace(/}\"/g,"}");
  48. var test = eval("("+conditionData2+")");
  49. if(conditionData2!='{"list":[{"name":"查询单位","className":"UNITS","list":[]}]}'){
  50. conditionData.list.push(test.dept.list[0]);
  51. }
  52. createConditionsDom(conditionData);
  53. //$(".item").unbind("click").bind("click",bindSelectOne);
  54. },
  55. error : function(e){
  56. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  57. }
  58. });
  59. }
  60. //当前系统时间
  61. //var time = TAKE_DATE
  62. var date = allGetServerTime();
  63. var seperator1 = "";
  64. var seperator2 = "";
  65. var month = date.getMonth() + 1;
  66. var strDate = date.getDate();
  67. if (month >= 1 && month <= 9) {
  68. month = "0" + month;
  69. }
  70. if (strDate >= 0 && strDate <= 9) {
  71. strDate = "0" + strDate;
  72. }
  73. time = date.getFullYear() + seperator1 +"-"+ month + seperator1 + "-"+strDate;
  74. var g;
  75. /**定义变量**/
  76. var getUser_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id()+""; //登录人ID
  77. var condition = "DATEDIFF(MONTH,take_date , DATE '"+time+"') >35 and IS_DEL='0' and UNITS='"+parent_id+"' and PLAN_STAT='1' and PLAN_STAT1='1'";
  78. //列表加载参数
  79. var loadParams = {
  80. "listId" : '214',
  81. "condition" : condition,
  82. direction:'DESC',
  83. sort: 'UPDATEDATE'
  84. };
  85. function initComplete(){
  86. $("body").eq(0).showLoading();
  87. /**
  88. * 工具条
  89. */
  90. var roleCons = roleButtonArr();
  91. var toolBarOpt1 = {
  92. items:[
  93. //{ text : '短信',click : 'sendMessage',iconClass : 'sendmsg_tem',id:"10005",disabled : false }
  94. ],
  95. roleCons:roleCons
  96. };
  97. /**
  98. * 树形列
  99. */
  100. var grid_option1 = {
  101. columns: [
  102. { display: '预案名称', name: 'PLAN_NAME_214', align: 'left', width: "10%",isPrimaryKey:true,
  103. render : function(rowdata, value) {
  104. return '<a href="javascript:void(0)" '
  105. +'title='+rowdata.PLAN_NAME_214
  106. + ' onclick=jumpPage("'
  107. + rowdata.FD_OBJECTID214+'","'+rowdata.PLAN_BIAOZHI_214+'","'+ rowdata.PLAN_REFINE_CATEGORY_214+'","'+ rowdata.PLAN_REFINE_CATEGORY_214 +'","'+ rowdata.PLAN_TYPE_214
  108. +'")>'+ rowdata.PLAN_NAME_214 +'</a>';
  109. }
  110. },
  111. { display: '预案编码', name: 'PLAN_NO_214', align: 'center', width: '10%',showTitle:true},
  112. { display: '预案类型', name: 'PLAN_TYPE_214_SHOW', align: 'center', width: '10%',showTitle:true},
  113. { display: '突发事件类型', name: 'BYSUNESS_TYPE_214_SHOW', align: 'center', width: '10%',showTitle:true},
  114. { display: '归口部门', name: 'INS_UNITS_214_SHOW', align: 'center', width: '8%',showTitle:true},
  115. { display: '颁布日期', name: 'TAKE_DATE_214', align: 'center' , width: '8%' ,showTitle:true},
  116. { display: '实施日期', name: 'ISSUE_DATE_214', align: 'center' , width: '8%' ,showTitle:true},
  117. { display: '所属单位', name: 'UNITS_214_SHOW', align: 'center', width: '15%' ,showTitle:true},
  118. { display: '简要说明', name: 'SYFW_214', align: 'center', width: '20%',showTitle:true}
  119. /* { display: '操作', isAllowHide: false, align: 'center', width:'8%',
  120. render: function (rowdata, rowindex, value, column){
  121. //判断是否已经发布。取发布的状态,如果已经发布为“1”;未发布为“0”
  122. var fabu='';//fabu
  123. if(rowdata.PLAN_STAT_214=="1"){
  124. fabu = '<span class="fashang_07 hand" title="发布" onclick="fabu1()"></span>';
  125. }else{
  126. fabu = '<span class="fashang_06 hand" title="发布" onclick="fabu(' + rowindex + ')"></span>';
  127. }
  128. //判断是否已经发布。取发布的状态,如果已经上报为“1”;未上报为“0”fashang_09fashang_plan
  129. var shangbao='';
  130. if(rowdata.PLAN_STAT1_214=="1"){
  131. shangbao = '<span class="sendup_templan hand" title="上报" onclick="shangbao1()"></span>';
  132. }else{
  133. shangbao = '<span class="fashang_plan hand" title="上报" onclick="shangbao(' + rowindex + ')"></span>';
  134. //shangbao = '<span class="fashang_plan hand" title="上报" onclick="fillShangbao(' + rowindex + ')"></span>';
  135. }
  136. return fabu
  137. + shangbao;
  138. }
  139. }*/
  140. ],
  141. rownumbers : true,
  142. checkbox : true,
  143. pageSize : 10,
  144. percentWidthMode : true
  145. };
  146. var options1={
  147. url :'/nwyj/ws/crud/CRUDService/queryQui',
  148. params:loadParams,
  149. height: '100%',
  150. width:"100%",
  151. gridOptions:grid_option1,
  152. singleRecodeOptions:{a:"aa"},
  153. paperOpration:{showInput:"true"},
  154. toolBarOptions:toolBarOpt1
  155. };
  156. g=gridAndSingleRecode=$("#maingrid").quickgridAndSingleRecode(options1);
  157. $("body").eq(0).hideLoading();
  158. }
  159. //下载
  160. function onDownload(){
  161. var FD_OBJECTID = "";
  162. var rows = g.getSelectedRows();
  163. for (var i = 0; i < rows.length; i++) {
  164. var FD_OBJECTID1= rows[i].FD_OBJECTID214;//预案的主键
  165. var PLAN_BIAOZHI1 =rows[i].PLAN_BIAOZHI_214;//预案的标识位(新的预案还是旧的预案)
  166. var UPLOAND_FLAG1 =rows[i].UPLOAND_FLAG_214;//上传标识
  167. var PLAN_VERSION_REMAR1 =rows[i].PLAN_VERSION_REMARK_214;//修改预案后新增预案的情况,也必有附件
  168. //新增预案,控制必传附件 纯新增
  169. if(PLAN_BIAOZHI1=="0"&&PLAN_VERSION_REMAR1=="0"&&UPLOAND_FLAG1=="1"){
  170. //getFileList(fd_id,1);
  171. FD_OBJECTID += "'"+FD_OBJECTID1 +"'"+ ",";//预案的主键
  172. }
  173. //修改预案后新增预案的情况,也必有附件 纯修编
  174. if(PLAN_BIAOZHI1!="0"&&PLAN_VERSION_REMAR1!="0"&&UPLOAND_FLAG1=="1"){
  175. //getFileList(fd_bojectid,1);
  176. FD_OBJECTID += "'"+FD_OBJECTID1+"'" + ",";//预案的主键
  177. }
  178. //纯修改
  179. if(PLAN_BIAOZHI1=="0"&&PLAN_VERSION_REMAR1!="0"&&UPLOAND_FLAG1=="0"){
  180. //getFileList(PLAN_VERSION_REMARK,1);
  181. FD_OBJECTID += "'"+PLAN_VERSION_REMAR1+"'" + ",";//预案的主键
  182. }
  183. //修编修改
  184. if(PLAN_BIAOZHI1!="0"&&PLAN_VERSION_REMAR1!="0"&&UPLOAND_FLAG1=="0"){
  185. //getFileList(PLAN_VERSION_REMARK,1);
  186. FD_OBJECTID += "'"+PLAN_VERSION_REMAR1+"'" + ",";//预案的主键
  187. }
  188. }
  189. var temp = FD_OBJECTID.substring(0,FD_OBJECTID.length-1);
  190. //alert("temp****"+temp + "****99999****");
  191. //发送请求,获取文件名的集合。
  192. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/getPlanFile/';
  193. var params = {
  194. fileId : temp
  195. };
  196. var SAVENAME1="";
  197. var NAME1 = "";
  198. var FILEEXT1="";
  199. $.ajax({
  200. url : url,
  201. type : 'post',
  202. timeout : 60000,
  203. data : params,
  204. dataType : 'json',
  205. success : function(data){
  206. var dataLenth = data.rows.length;
  207. var filenames="";
  208. var downfilename = "";
  209. for (var i = 0; i < dataLenth; i++) {
  210. SAVENAME1= data.rows[i].SAVENAME;
  211. NAME1= data.rows[i].NAME;
  212. FILEEXT1= data.rows[i].FILEEXT;
  213. filenames +=SAVENAME1 + "." + FILEEXT1 + ";";
  214. downfilename+=NAME1 + "." + FILEEXT1 + ";";
  215. }
  216. var filenames1 = filenames.substring(0,filenames.length-1);
  217. filenames = decodeURI(filenames1);
  218. var downfilename1 = downfilename.substring(0,downfilename.length-1);
  219. downfilename = decodeURI(downfilename1);
  220. showFile(filenames1,downfilename1);
  221. //alert(downfilename1+"============"+filenames1);
  222. //返回回调打包下载的函数,拼传给回调函数的filenames,downfilename
  223. },
  224. error : function(e){
  225. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  226. }
  227. });
  228. }
  229. function showFile(downfilename,filenames){
  230. var url = "/nwyj/page/business/am/org/query/getZipFile.jsp?downfilename="+downfilename+"&filenames="+filenames;
  231. window.open(url);
  232. }
  233. //高级查询
  234. function searchHandler(){
  235. $queryForm = $("#queryForm");
  236. if($("#PLAN_NAME_214").val()=="预案名称"){
  237. $("#PLAN_NAME_214").val("");
  238. }
  239. $queryForm.serialize();
  240. //获取选中的值
  241. var searchCondition = getSelectCon(conditionData);
  242. var queryParams = getQueryFormParams($queryForm);
  243. var params=$.extend({},loadParams,queryParams);
  244. //与之前参数条件拼接
  245. params.condition = searchCondition.condition + params.condition;
  246. g.setOptions({"params":params});
  247. //加载数据
  248. g.rend();
  249. }
  250. //点击查看
  251. function jumpPage(fd_id,PLAN_BIAOZHI,BM_YAXHLB,PLAN_REFINE_CATEGORY,PLAN_TYPE){
  252. if(PLAN_TYPE!="103"){
  253. window.location.href="Planinfo.jsp?"+fd_id;
  254. }else{
  255. if(PLAN_REFINE_CATEGORY=="17"){//网络与信息安全
  256. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  257. }else if(PLAN_REFINE_CATEGORY=="4"){//人身事故
  258. window.location.href="PlanOnViewNexus/PlanNexusRSSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  259. }else if(PLAN_REFINE_CATEGORY=="5"){//大面积停电事件
  260. window.location.href="PlanOnViewNexus/PlanNexusDMJTD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  261. }else if(PLAN_REFINE_CATEGORY=="6"){//设备事故
  262. window.location.href="PlanOnViewNexus/PlanNexusSBSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  263. }else if(PLAN_REFINE_CATEGORY=="7"){//电厂大坝厂房事故
  264. window.location.href="PlanOnViewNexus/PlanNexusDCDB.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  265. }else if(PLAN_REFINE_CATEGORY=="8"){//环境污染
  266. window.location.href="PlanOnViewNexus/PlanNexusHJWR.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  267. }else if(PLAN_REFINE_CATEGORY=="9"){//防风防汛PlanOnViewList\NewMsgNotice
  268. window.location.href="PlanOnViewNexus/PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  269. }else if(PLAN_REFINE_CATEGORY=="10"){//地震灾害
  270. window.location.href="PlanOnViewNexus/PlanNexusDZZH.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  271. }else if(PLAN_REFINE_CATEGORY=="11"){//低温雨雪冰冻灾害
  272. window.location.href="PlanOnViewNexus/PlanNexusDWBD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  273. }else if(PLAN_REFINE_CATEGORY=="12"){//电力供应及客户服务PlanNexusDLGY.jsp
  274. window.location.href="PlanOnViewNexus/PlanNexusDLGY.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  275. }else if(PLAN_REFINE_CATEGORY=="13"){//生产场所防恐怖袭击
  276. window.location.href="PlanOnViewNexus/PlanNexusKBXJ.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  277. }else if(PLAN_REFINE_CATEGORY=="14"){//突发性群体事件
  278. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  279. }else if(PLAN_REFINE_CATEGORY=="15"){//突发新闻事件
  280. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  281. }else if(PLAN_REFINE_CATEGORY=="16"){//涉外突发事件
  282. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  283. }else if(PLAN_REFINE_CATEGORY=="18"){//突发公共卫生
  284. window.location.href="PlanOnViewNexus/PlanNexusGGWS.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  285. }else{
  286. window.location.href="PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  287. }
  288. }
  289. }
  290. function onView(){
  291. //根据预案类型分别跳转不同的预案绑定的页面
  292. var rows = g.getSelectedRows();
  293. if(rows.length==0){
  294. top.Dialog.alert("请选择一条记录");
  295. return;
  296. }
  297. if(rows.length>1){
  298. top.Dialog.alert("只能选择一条记录");
  299. return;
  300. }
  301. /**
  302. * 如果是地震预案,跳转到地震对应的预案.
  303. * 传给子页面的值:
  304. * 1、主键
  305. * 2、 版本(初次版本为0;方便日后修订预案后将原有预案的绑定条件带出来。避免用户再次录入绑定条件)
  306. * 3、预案具体业务分类,方便分别找到对应的报表填报计划页面
  307. *
  308. * **/
  309. var fd_id = rows[0].FD_OBJECTID214;
  310. var PLAN_BIAOZHI = rows[0].PLAN_BIAOZHI_214;
  311. var PLAN_REFINE_CATEGORY = rows[0].PLAN_REFINE_CATEGORY_214;
  312. var BM_YAXHLB = rows[0].PLAN_REFINE_CATEGORY_214;
  313. var PLAN_TYPE = rows[0].PLAN_TYPE_214;
  314. if(PLAN_TYPE!="103"){
  315. window.location.href="Planinfo.jsp?"+fd_id;
  316. }else{
  317. if(PLAN_REFINE_CATEGORY=="17"){//网络与信息安全
  318. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  319. }else if(PLAN_REFINE_CATEGORY=="4"){//人身事故
  320. window.location.href="PlanOnViewNexus/PlanNexusRSSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  321. }else if(PLAN_REFINE_CATEGORY=="5"){//大面积停电事件
  322. window.location.href="PlanOnViewNexus/PlanNexusDMJTD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  323. }else if(PLAN_REFINE_CATEGORY=="6"){//设备事故
  324. window.location.href="PlanOnViewNexus/PlanNexusSBSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  325. }else if(PLAN_REFINE_CATEGORY=="7"){//电厂大坝厂房事故
  326. window.location.href="PlanOnViewNexus/PlanNexusDCDB.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  327. }else if(PLAN_REFINE_CATEGORY=="8"){//环境污染
  328. window.location.href="PlanOnViewNexus/PlanNexusHJWR.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  329. }else if(PLAN_REFINE_CATEGORY=="9"){//防风防汛
  330. window.location.href="PlanOnViewNexus/PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  331. }else if(PLAN_REFINE_CATEGORY=="10"){//地震灾害
  332. window.location.href="PlanOnViewNexus/PlanNexusDZZH.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  333. }else if(PLAN_REFINE_CATEGORY=="11"){//低温雨雪冰冻灾害
  334. window.location.href="PlanOnViewNexus/PlanNexusDWBD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  335. }else if(PLAN_REFINE_CATEGORY=="12"){//电力供应及客户服务PlanNexusDLGY.jsp
  336. window.location.href="PlanOnViewNexus/PlanNexusDLGY.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  337. }else if(PLAN_REFINE_CATEGORY=="13"){//生产场所防恐怖袭击
  338. window.location.href="PlanOnViewNexus/PlanNexusKBXJ.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  339. }else if(PLAN_REFINE_CATEGORY=="14"){//突发性群体事件
  340. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  341. }else if(PLAN_REFINE_CATEGORY=="15"){//突发新闻事件
  342. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  343. }else if(PLAN_REFINE_CATEGORY=="16"){//涉外突发事件
  344. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  345. }else if(PLAN_REFINE_CATEGORY=="18"){//突发公共卫生
  346. window.location.href="PlanOnViewNexus/PlanNexusGGWS.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  347. }else{
  348. window.location.href="PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  349. }
  350. }
  351. }
  352. $.messager=top.Dialog;
  353. // 更多
  354. function more() {
  355. $('#moreDiv').toggle();
  356. $(parent.document.body).find("#frmright").height($(window.document.body).height());
  357. }
  358. //短信
  359. function sendMessage(){
  360. addMsg();
  361. }
  362. $.messager=top.Dialog;