3a03bc8a6d1279538e07a1ea57348d7de2d21bf2.svn-base 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247
  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. // getShareNum();
  8. // getXiubianNum();
  9. getChildInfo();
  10. /** 绑定更多的按钮点击事件 */
  11. $more = $("#more"); // 更多按钮
  12. $more.bind('click', function() {
  13. more();
  14. });
  15. $searchButt = $("#searchButt");// 更多查询按钮
  16. $searchButt.live('click', function() {
  17. searchHandler();
  18. });
  19. //清空条件
  20. $("#emptyCondition").bind("click",function(){
  21. $("#PLAN_NAME_214").val("");
  22. var $selConditions = $("#selectConditions");
  23. var $selCon = $selConditions.find(".selectCondi");
  24. for(var i=0;i<$selCon.length;i++){
  25. $selCon[i].click();
  26. }
  27. });
  28. $searchOne = $("#searchOne");//查询图标绑定查询事件
  29. $searchOne.bind('click', function() {
  30. searchHandler();
  31. });
  32. });
  33. //造数据用的测试方法
  34. function zaoshuju(){
  35. alert(111);
  36. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/zaoshuju/';
  37. var params = {
  38. id : parent_id,
  39. };
  40. $.ajax({
  41. url : url,
  42. type : 'post',
  43. timeout : 60000,
  44. data : params,
  45. dataType : 'json',
  46. success : function(data){
  47. },
  48. error : function(e){
  49. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  50. }
  51. });
  52. }
  53. //导出
  54. function daochu(){
  55. var rows = g.getSelectedRows();
  56. var rowsLength = rows.length;
  57. if (rowsLength == 0) {
  58. top.Dialog.confirm("是否导出所有的应急预案信息?|确定", function() {
  59. excelExport(214,loadParams,"应急预案","CHANGE_TYPE,PLAN_BIAOZHI,FD_OBJECTID,IS_DEL,PLAN_ID,UPDATEDATE,REMARK1,COLUMN_1,PLAN_STAT,REPORT_COMP_ID,PLAN_STAT1,PLAN_STURTS,UPLOAND_FLAG,ENTERING_TEL,PLAN_VERSION_REMARK,PLAN_SHARE,ENTERING");});
  60. return;
  61. }
  62. var ids = "";
  63. for ( var i = 0; i < rowsLength; i++) {
  64. ids += "'"+rows[i].FD_OBJECTID214+"'" + ",";
  65. }
  66. var temp = ids.substring(0,ids.length-1);
  67. var condition = " IS_DEL='0' ";
  68. condition += " AND FD_OBJECTID IN (" + temp + ") " ;
  69. var sql = {
  70. "listId" :'214' ,
  71. "condition" : condition,
  72. direction:'DESC',
  73. sort: 'UPDATEDATE'
  74. };
  75. excelExport(214,sql,"应急预案","CHANGE_TYPE,PLAN_BIAOZHI,FD_OBJECTID,IS_DEL,PLAN_ID,UPDATEDATE,REMARK1,COLUMN_1,PLAN_STAT,REPORT_COMP_ID,PLAN_STAT1,PLAN_STURTS,UPLOAND_FLAG,ENTERING_TEL,PLAN_VERSION_REMARK,PLAN_SHARE,ENTERING");
  76. }
  77. //后台返回待修编的预案个数
  78. function getXiubianNum(){
  79. //取系统时间:年月日时分秒
  80. var date = allGetServerTime();
  81. var seperator1 = "";
  82. var seperator2 = "";
  83. var month = date.getMonth() + 1;
  84. var strDate = date.getDate();
  85. if (month >= 1 && month <= 9) {
  86. month = "0" + month;
  87. }
  88. if (strDate >= 0 && strDate <= 9) {
  89. strDate = "0" + strDate;
  90. }
  91. var time = date.getFullYear() + seperator1 +"-" + month + "-"+seperator1 + strDate;
  92. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/getXiubianNum/';
  93. var params = {
  94. id : parent_id,
  95. time:time
  96. };
  97. $.ajax({
  98. url : url,
  99. type : 'post',
  100. timeout : 60000,
  101. data : params,
  102. dataType : 'json',
  103. success : function(data){
  104. var num = data.rows[0].NUM;
  105. appendTwoDiv(num);
  106. },
  107. error : function(e){
  108. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  109. }
  110. });
  111. }
  112. //后台返回共享中的预案个数
  113. function getShareNum(){
  114. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/getShareNum/';
  115. var params = {
  116. id : parent_id,
  117. time:time
  118. };
  119. $.ajax({
  120. url : url,
  121. type : 'post',
  122. timeout : 60000,
  123. data : params,
  124. dataType : 'json',
  125. success : function(data){
  126. var num = data.rows[0].NUM;
  127. appendOneDiv(num);
  128. },
  129. error : function(e){
  130. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  131. }
  132. });
  133. }
  134. var conditionData2="";
  135. //String sql ="select DEPT_ID ,DEPT_NAME from SYS_DEPARTMENT where dept_id in(select parent_id from sys_department where dept_id='"+id+"') or PARENT_ID='"+id+"'and DEPT_TYPE='CORP' and (DEPT_NAME like '%供电局%' or DEPT_NAME like '%供电分局%' or DEPT_NAME ='广东电网有限责任公司' or DEPT_NAME like '%广西电网%' or DEPT_NAME like '%海南电网%' or DEPT_NAME like '%云南电网%' or DEPT_NAME like '%贵州电网%') order by sort ASC" ;
  136. //取下级单位
  137. function getChildInfo(){
  138. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/getChidInfo/';
  139. var params = {
  140. id : parent_id,
  141. parentID:parent_ids
  142. };
  143. $.ajax({
  144. url : url,
  145. type : 'post',
  146. timeout : 60000,
  147. data : params,
  148. dataType : 'json',
  149. success : function(data){
  150. conditionData2 = JSON.stringify(data);
  151. conditionData2 = conditionData2.replace(/\\\"/g,"\"");
  152. conditionData2 = conditionData2.replace(/\"{/g,"{");
  153. conditionData2 = conditionData2.replace(/}\"/g,"}");
  154. var test = eval("("+conditionData2+")");
  155. if(conditionData2!='{"list":[{"name":"查询单位","className":"UNITS","equalType":"equal","list":[]}]}'){
  156. test.dept.list[0].equalType = "equal";
  157. conditionData.list.push(test.dept.list[0]);
  158. }
  159. /* if(parent_id!="1"){
  160. conditionData.list.push(test1.list[0]);
  161. }*/
  162. createConditionsDom(conditionData);
  163. $(".item").unbind("click").bind("click",bindSelectOne);
  164. },
  165. error : function(e){
  166. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  167. }
  168. });
  169. }
  170. var g;
  171. /**定义变量**/
  172. var getUser_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id()+""; //登录人ID
  173. //列表默认显示上级单位发布、下级单位上报的信息
  174. //var condition = "IS_DEL='0' and (PLAN_STAT='1' or PLAN_STAT1='1' or REMARK1='"+ getUser_id +"') and (UNITS='"+parent_id+"' or units='"+parent_ids+"' or UNITS IN(SELECT A.ID FROM EMC_AM_ORG_DEPARTMENT_TEST A WHERE A.PARENT_ID='"+parent_id+"' ) and PLAN_STAT1='1')";
  175. //列表默认显示本级单位的数据。
  176. var condition = "IS_DEL='0' and PLAN_TYPE = '103' and (PLAN_STAT='1' or PLAN_STAT1='1' or REMARK1='"+ getUser_id +"') and UNITS='"+parent_id+"'";
  177. //var condition = "IS_DEL='0' and ( REMARK1='"+ getUser_id +"' or (PLAN_STAT='1' and (UNITS='"+parent_id+"' or UNITS='"+parent_ids+"')) or (PLAN_STAT1='1' and UNITS IN(SELECT A.ID FROM EMC_AM_ORG_DEPARTMENT_TEST A WHERE A.PARENT_ID='"+parent_id+"')))";
  178. //列表加载参数
  179. var loadParams = {
  180. "listId" : '214',
  181. "condition" : condition,
  182. direction:'DESC',
  183. sort: 'UPDATEDATE'
  184. };
  185. function initComplete(){
  186. $("body").eq(0).showLoading();
  187. /**
  188. * 工具条
  189. */
  190. var roleCons = roleButtonArr();
  191. var toolBarOpt1 = {
  192. items:[
  193. {text: '新增', click: "addUnit", iconClass: 'add1_tem',id:"rcxz"},
  194. {text: '删除', click: "deleteUnit", iconClass: 'delete_tem',id:"rcsc"},
  195. {text: '修改', click: "updateUnit", iconClass: 'update_tem',id:"rcxg"},
  196. {text: '绑定', click: "bangDing", iconClass: 'binding_tem',id:"rcbd"},
  197. {text: '撤销', click: "noPublish", iconClass: 'release_tem',id:"10215"}
  198. ],
  199. roleCons:roleCons
  200. };
  201. /**
  202. * 树形列
  203. */
  204. var grid_option1 = {
  205. columns: [
  206. { display: '预案名称', name: 'PLAN_NAME_214', align: 'center', width: "12%",isPrimaryKey:true,
  207. // render : function(rowdata, value) {
  208. // return '<a href="javascript:void(0)" '
  209. // + 'onclick=jumpPage("'
  210. // + rowdata.FD_OBJECTID214+'","'+rowdata.PLAN_BIAOZHI_214+'","'+ rowdata.PLAN_REFINE_CATEGORY_214+'","'+ rowdata.PLAN_NAME_214 +'","'+ rowdata.PLAN_TYPE_214
  211. // +'")>'+ rowdata.PLAN_NAME_214 +'</a>';
  212. // }
  213. render : function(rowdata, rowindex, value, column) {
  214. return "<a href='javascript:;' style='width:100%;height:100%;display:block' title='" + value + "' onclick='openDetail(" + rowindex + ")'>" + value + "</a>";
  215. }
  216. },
  217. { display: '预案编码', name: 'PLAN_NO_214', align: 'center', width: '10%',showTitle:true},
  218. { display: '预案类型', name: 'PLAN_TYPE_214_SHOW', align: 'center', width: '10%',showTitle:true},
  219. { display: '突发事件类型', name: 'BYSUNESS_TYPE_214_SHOW', align: 'center', width: '10%',showTitle:true},
  220. // { display: '变更类别', name: 'CHANGE_TYPE_214_SHOW', align: 'center' , width: '10%',showTitle:true},
  221. //{ display: '适用范围', name: 'SYFW_214', align: 'center', width: '8%',showTitle:true},
  222. { display: '归口部门', name: 'INS_UNITS_214_SHOW', align: 'center', width: '8%',showTitle:true},
  223. { display: '颁布日期', name: 'TAKE_DATE_214', align: 'center' , width: '8%' ,showTitle:true},
  224. { display: '实施日期', name: 'ISSUE_DATE_214', align: 'center' , width: '8%' ,showTitle:true},
  225. { display: '所属单位', name: 'UNITS_214_SHOW', align: 'center', width: '12%',showTitle:true },
  226. { display: '简要说明', name: 'SYFW_214', align: 'center', width: '14%',showTitle:true},
  227. { display: '操作', isAllowHide: false, align: 'center', width:'8%',
  228. render: function (rowdata, rowindex, value, column){
  229. //判断是否已经发布。取发布的状态,如果已经发布为“1”;未发布为“0”
  230. var fabu='';//fabu
  231. if(rowdata.PLAN_STAT_214=="1"){
  232. fabu = '<span class="fashang_07 hand" title="发布" onclick="fabu1()"></span>';
  233. }else{
  234. fabu = '<span class="fashang_06 hand" title="发布" onclick="fabu(' + rowindex + ')"></span>';
  235. }
  236. //判断是否已经发布。取发布的状态,如果已经上报为“1”;未上报为“0”fashang_09fashang_plan
  237. var shangbao='';
  238. if(rowdata.PLAN_STAT1_214=="1"){
  239. shangbao = '<span class="sendup_templan hand" title="上报" onclick="shangbao1(' + rowindex + ')"></span>';
  240. }else{
  241. shangbao = '<span class="fashang_plan hand" title="上报" onclick="shangbao(' + rowindex + ')"></span>';
  242. //shangbao = '<span class="fashang_plan hand" title="上报" onclick="fillShangbao(' + rowindex + ')"></span>';
  243. }
  244. //判断是否已经共享。取共享的状态,如果已经共享为“1”;未共享为“0”
  245. var gongxiang='';
  246. if(rowdata.PLAN_SHARE_214=="1"){
  247. gongxiang = '<span class="share_07 hand" title="撤销共享" onclick="gongxiang1(' + rowindex + ')"></span>';
  248. }else{
  249. gongxiang = '<span class="share_03 hand" title="共享" onclick="gongxiang(' + rowindex + ')"></span>';
  250. }
  251. return fabu + shangbao + gongxiang;
  252. }
  253. }
  254. ],
  255. rownumbers : true,
  256. checkbox : true,
  257. pageSize : 10,
  258. percentWidthMode : true
  259. };
  260. var options1={
  261. url :'/nwyj/ws/crud/CRUDService/queryQui',
  262. params:loadParams,
  263. height: '100%',
  264. width:"100%",
  265. gridOptions:grid_option1,
  266. singleRecodeOptions:{a:"aa"},
  267. paperOpration:{showInput:"true"},
  268. toolBarOptions:toolBarOpt1
  269. };
  270. g=gridAndSingleRecode=$("#maingrid").quickgridAndSingleRecode(options1);
  271. $("body").eq(0).hideLoading();
  272. }
  273. function showImportDialog(){
  274. window.location.href="ContingencyPlan-import.jsp";
  275. };
  276. //历史版本
  277. function showVersion(){
  278. var rows = g.getSelectedRows();
  279. if(rows.length==0){
  280. top.Dialog.alert("请选择一条记录");
  281. return;
  282. }
  283. if(rows.length>1){
  284. top.Dialog.alert("只能选择一条记录");
  285. return;
  286. }
  287. //上一个版本的预案ID
  288. var fd_id = rows[0].PLAN_BIAOZHI_214;
  289. var fd_id1 = rows[0].FD_OBJECTID214;
  290. $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/am/contingencyPlan/PlanVersion.jsp?"+fd_id+"?"+fd_id1);
  291. }
  292. //预案共享
  293. function publicShare(){
  294. var rows = g.getSelectedRows();
  295. var rowsLength = rows.length;
  296. if (rowsLength == 0) {
  297. top.Dialog.alert("请选中要分享的记录!");
  298. return;
  299. }
  300. var REMARK1 = rows[0].REMARK1_214;
  301. if(REMARK1!=getUser_id){
  302. top.Dialog.alert("只能分享自己上传的预案!");
  303. return;
  304. }
  305. var ids = "";
  306. var sturtssb = "";
  307. for ( var i = 0; i < rowsLength; i++) {
  308. ids += rows[i].FD_OBJECTID214 + ",";
  309. sturtssb += rows[i].PLAN_STAT_214 + ",";
  310. if(rows[i].PLAN_STAT_214!="1"){
  311. if(rowsLength==1){
  312. top.Dialog.alert("您选中的记录未发布!");
  313. }else{
  314. top.Dialog.alert("您选中的记录有未发布的!");
  315. }
  316. return;
  317. }
  318. }
  319. $("#BUSINE_ID_217").val(ids);
  320. var diag = new top.Dialog();
  321. diag.Title = "文件共享";
  322. diag.URL = $.pathname() + '/page/business/am/public/readDept.jsp';
  323. diag.Width = 700;
  324. diag.Height = 500;
  325. diag.Top = "80%";
  326. diag.Left = "50%";
  327. diag.ShowButtonRow=true;
  328. diag.ButtonAlign = 'center';
  329. diag.OkButtonText="确 定";
  330. diag.OKEvent = function(){
  331. Validate(diag);
  332. };
  333. diag.show();
  334. }
  335. function Validate(diag){
  336. var zhh="";//总指挥
  337. var fzhh="";//副总指挥
  338. var yjbzr="";//应急办主任
  339. var yjbfzr="";//应急办副主任
  340. var yjbcy="";//应急办副成员
  341. var zyglry="";//专业部门管理人员
  342. var getUser_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id()+""; //登录人ID
  343. //分享单位的ID deptId
  344. var time1=diag.innerFrame.contentWindow.$("#time1").val();
  345. var time2=diag.innerFrame.contentWindow.$("#time2").val();
  346. //获取应急角色被勾选的值
  347. if(diag.innerFrame.contentWindow.document.getElementById("football-1").checked){
  348. //选中取值(可以取到这个值)
  349. zhh = "R002105430201";
  350. }else{
  351. zhh = "";
  352. }
  353. if(diag.innerFrame.contentWindow.document.getElementById("football-2").checked){
  354. //选中取值(可以取到这个值)
  355. fzhh = "R002105430202";
  356. }else{
  357. zyglry = "";
  358. }
  359. if(diag.innerFrame.contentWindow.document.getElementById("football-3").checked){
  360. //选中取值(可以取到这个值)
  361. yjbzr = "R002105430203";
  362. }else{
  363. yjbzr = "";
  364. }
  365. if(diag.innerFrame.contentWindow.document.getElementById("football-4").checked){
  366. //选中取值(可以取到这个值)
  367. yjbfzr = "R002105430204";
  368. }else{
  369. yjbfzr = "";
  370. }
  371. if(diag.innerFrame.contentWindow.document.getElementById("football-5").checked){
  372. //选中取值(可以取到这个值)
  373. yjbcy = "R002105430205";
  374. }else{
  375. yjbcy = "";
  376. }
  377. if(diag.innerFrame.contentWindow.document.getElementById("football-6").checked){
  378. //选中取值(可以取到这个值)
  379. zyglry = "R002105430206||R002105430207||R002105430208||R002105430209||R002105430210||R002105430211||R002105430212||R002105430213||R002105430214";
  380. }else{
  381. zyglry = "";
  382. }
  383. //被分享查看的人
  384. var RECEIVE_MAN = zhh + "||" + fzhh + "||" + yjbzr + "||" + yjbfzr + "||" + yjbcy + "||" + zyglry;
  385. //分享的单位 deptId
  386. //获取zTree对象
  387. var zTree = diag.innerFrame.contentWindow.$.fn.zTree.getZTreeObj("tree-1");
  388. //得到选中的数据集
  389. var checkedNodes = zTree.getCheckedNodes(true);
  390. if(time1==""||time2==""){
  391. $.messager.alert('请选择分享的起始时间!');
  392. return;
  393. }
  394. if(time1>time2){
  395. $.messager.alert('请选择正确的分享起始时间!');
  396. return;
  397. }
  398. if(checkedNodes==""){
  399. $.messager.alert('请选择要申请查看的单位!');
  400. return;
  401. }
  402. var compValue="";
  403. //var compValue2="";
  404. for(var i = 0; i < checkedNodes.length; i++){
  405. //机构名称
  406. compValue += checkedNodes[i].id + ",";
  407. //compValue2 += checkedNodes[i].name+",";
  408. }
  409. var compid = compValue.substring(0,compValue.length-1);
  410. //var compname = compValue2.substring(0,compValue2.length-1);
  411. //给第二个form的字段设置值
  412. $("#SHARE_MAN_217").val(getUser_id); //SHARE_MAN_217 分享人
  413. $("#SHARE_UNITS_217").val(deptId); //SHARE_UNITS_217分享单位
  414. $("#RECEIVE_UNITS_217").val(compid); //RECEIVE_UNITS_217 被分享单位
  415. //SHARE_TYPE_217分享的业务类型 写死3
  416. $("#SHARE_START_TIME_217").val(time1); //SHARE_START_TIME_217开始时间
  417. $("#SHARE_END_TIME_217").val(time2); //SHARE_END_TIME_217结束时间
  418. //BUSINE_ID_217业务ID 点击分享的时候已经赋值给页面了
  419. $("#RECEIVE_MAN_217").val(RECEIVE_MAN); //RECEIVE_MAN_217接收的人
  420. var $form = $('#fillForm1');
  421. var url = $.pathname() + '/ws/crud/CRUDService/create';
  422. $.ajax({
  423. url : url,
  424. type : 'post',
  425. data : $form.serialize(),
  426. dataType : 'text',
  427. timeout : 60000,
  428. success : function(data){
  429. $.messager.alert("共享成功",null,null,null,-1);
  430. },
  431. error : function(){
  432. $.messager.alert('操作失败');
  433. }
  434. });
  435. top.Dialog.close();//关闭新增窗口
  436. }
  437. //下载
  438. function onDownload(){
  439. var FD_OBJECTID = "";
  440. var rows = g.getSelectedRows();
  441. for (var i = 0; i < rows.length; i++) {
  442. var FD_OBJECTID1= rows[i].FD_OBJECTID214;//预案的主键
  443. var PLAN_BIAOZHI1 =rows[i].PLAN_BIAOZHI_214;//预案的标识位(新的预案还是旧的预案)
  444. var UPLOAND_FLAG1 =rows[i].UPLOAND_FLAG_214;//上传标识
  445. var PLAN_VERSION_REMAR1 =rows[i].PLAN_VERSION_REMARK_214;//修改预案后新增预案的情况,也必有附件
  446. //新增预案,控制必传附件 纯新增
  447. if(PLAN_BIAOZHI1=="0"&&PLAN_VERSION_REMAR1=="0"&&UPLOAND_FLAG1=="1"){
  448. //getFileList(fd_id,1);
  449. FD_OBJECTID += "'"+FD_OBJECTID1 +"'"+ ",";//预案的主键
  450. }
  451. //修改预案后新增预案的情况,也必有附件 纯修编
  452. if(PLAN_BIAOZHI1!="0"&&PLAN_VERSION_REMAR1!="0"&&UPLOAND_FLAG1=="1"){
  453. //getFileList(fd_bojectid,1);
  454. FD_OBJECTID += "'"+FD_OBJECTID1+"'" + ",";//预案的主键
  455. }
  456. //纯修改
  457. if(PLAN_BIAOZHI1=="0"&&PLAN_VERSION_REMAR1!="0"&&UPLOAND_FLAG1=="0"){
  458. //getFileList(PLAN_VERSION_REMARK,1);
  459. FD_OBJECTID += "'"+PLAN_VERSION_REMAR1+"'" + ",";//预案的主键
  460. }
  461. //修编修改
  462. if(PLAN_BIAOZHI1!="0"&&PLAN_VERSION_REMAR1!="0"&&UPLOAND_FLAG1=="0"){
  463. //getFileList(PLAN_VERSION_REMARK,1);
  464. FD_OBJECTID += "'"+PLAN_VERSION_REMAR1+"'" + ",";//预案的主键
  465. }
  466. }
  467. var temp = FD_OBJECTID.substring(0,FD_OBJECTID.length-1);
  468. //alert("temp****"+temp + "****99999****");
  469. //发送请求,获取文件名的集合。
  470. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/getPlanFile/';
  471. var params = {
  472. fileId : temp
  473. };
  474. var SAVENAME1="";
  475. var NAME1 = "";
  476. var FILEEXT1="";
  477. $.ajax({
  478. url : url,
  479. type : 'post',
  480. timeout : 60000,
  481. data : params,
  482. dataType : 'json',
  483. success : function(data){
  484. var dataLenth = data.rows.length;
  485. var filenames="";
  486. var downfilename = "";
  487. for (var i = 0; i < dataLenth; i++) {
  488. SAVENAME1= data.rows[i].SAVENAME;
  489. NAME1= data.rows[i].NAME;
  490. FILEEXT1= data.rows[i].FILEEXT;
  491. filenames +=SAVENAME1 + "." + FILEEXT1 + ";";
  492. downfilename+=NAME1 + "." + FILEEXT1 + ";";
  493. }
  494. var filenames1 = filenames.substring(0,filenames.length-1);
  495. filenames = decodeURI(filenames1);
  496. var downfilename1 = downfilename.substring(0,downfilename.length-1);
  497. downfilename = decodeURI(downfilename1);
  498. showFile(filenames1,downfilename1);
  499. //alert(downfilename1+"============"+filenames1);
  500. //返回回调打包下载的函数,拼传给回调函数的filenames,downfilename
  501. },
  502. error : function(e){
  503. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  504. }
  505. });
  506. }
  507. function showFile(downfilename,filenames){
  508. var url = "/nwyj/page/business/am/org/query/getZipFile.jsp?downfilename="+downfilename+"&filenames="+filenames;
  509. window.open(url);
  510. }
  511. //高级查询
  512. function searchHandler(){
  513. $queryForm = $("#queryForm");
  514. if($("#PLAN_NAME").val()=="预案名称"){
  515. $("#PLAN_NAME").val("");
  516. }
  517. var name = $("#PLAN_NAME").val();
  518. $queryForm.serialize();
  519. var $comp_id = $("#selectConditions").find(".UNITS");
  520. var loadParams11;
  521. //判断是否有用单位做查询条件
  522. if(!!$comp_id.prop("outerHTML")){
  523. if(name==""){
  524. loadParams11 = {
  525. "listId" : '214',
  526. "condition" : "IS_DEL='0' and (PLAN_STAT='1' or PLAN_STAT1='1' or REMARK1='"+ getUser_id +"') and (UNITS='"+parent_id+"' or units='"+parent_ids+"' or UNITS IN(SELECT A.DEPT_ID FROM SYS_DEPARTMENT A WHERE A.PARENT_ID='"+parent_id+"' ) and PLAN_STAT1='1') ",
  527. direction:'DESC',
  528. sort: 'UPDATEDATE'
  529. };
  530. }else{
  531. loadParams11 = {
  532. "listId" : '214',
  533. "condition" : "IS_DEL='0' and (PLAN_STAT='1' or PLAN_STAT1='1' or REMARK1='"+ getUser_id +"') and (UNITS='"+parent_id+"' or units='"+parent_ids+"' or UNITS IN(SELECT A.ID FROM EMC_AM_ORG_DEPARTMENT_TEST A WHERE A.PARENT_ID='"+parent_id+"' ) and PLAN_STAT1='1') and (PLAN_NO like '%"+name+"%' or PLAN_NAME like '%"+name+"%' or SYFW like '%"+name+"%' or ISSUE_DATE like '%"+name+"%' or TAKE_DATE like '%"+name+"%')",
  534. direction:'DESC',
  535. sort: 'UPDATEDATE'
  536. };
  537. }
  538. }else{
  539. if(name==""){
  540. loadParams11 = $.extend({},loadParams,loadParams);
  541. }else{
  542. loadParams11 = {
  543. "listId" : '214',
  544. "condition" : "IS_DEL='0' and PLAN_TYPE = '103' and (PLAN_STAT='1' or PLAN_STAT1='1' or REMARK1='"+ getUser_id +"') and UNITS='"+parent_id+"' and (PLAN_NO like '%"+name+"%' or PLAN_NAME like '%"+name+"%' or SYFW like '%"+name+"%' or ISSUE_DATE like '%"+name+"%' or TAKE_DATE like '%"+name+"%')",
  545. direction:'DESC',
  546. sort: 'UPDATEDATE'
  547. };
  548. }
  549. }
  550. //获取选中的值
  551. var searchCondition = getSelectCon(conditionData);
  552. var queryParams = getQueryFormParams($queryForm);
  553. var params=$.extend({},loadParams11,queryParams);
  554. //与之前参数条件拼接
  555. params.condition = searchCondition.condition + params.condition;
  556. g.setOptions({"params":params});
  557. //加载数据
  558. g.rend();
  559. }
  560. //绑定
  561. function bangDing(){
  562. //根据预案类型分别跳转不同的预案绑定的页面
  563. var rows = g.getSelectedRows();
  564. if(rows.length==0){
  565. top.Dialog.alert("请选择一条记录");
  566. return;
  567. }
  568. if(rows.length>1){
  569. top.Dialog.alert("只能选择一条记录");
  570. return;
  571. }
  572. /**
  573. * 如果是地震预案,跳转到地震对应的预案.
  574. * 传给子页面的值:
  575. * 1、主键
  576. * 2、 版本(初次版本为0;方便日后修订预案后将原有预案的绑定条件带出来。避免用户再次录入绑定条件)
  577. * 3、预案具体业务分类,方便分别找到对应的报表填报计划页面
  578. *
  579. * **/
  580. var PLAN_TYPE = rows[0].PLAN_TYPE_214;
  581. if(PLAN_TYPE!="103"){
  582. top.Dialog.alert("绑定关系请选择专项预案!");
  583. return;
  584. }
  585. var fd_id = rows[0].FD_OBJECTID214;
  586. var PLAN_BIAOZHI = rows[0].PLAN_BIAOZHI_214;
  587. // var PLAN_REFINE_CATEGORY = rows[0].PLAN_REFINE_CATEGORY_214;
  588. var BM_YAXHLB = rows[0].PLAN_REFINE_CATEGORY_214;
  589. var PLAN_NAME = rows[0].PLAN_NAME_214;
  590. window.location.href="PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB+"?ZX";
  591. // if(PLAN_REFINE_CATEGORY=="17"){//网络与信息安全
  592. // window.location.href="PlanType/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  593. // }else if(PLAN_REFINE_CATEGORY=="4"){//人身事故
  594. // window.location.href="PlanType/PlanNexusRSSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  595. // }else if(PLAN_REFINE_CATEGORY=="5"){//大面积停电事件
  596. // window.location.href="PlanType/PlanNexusDMJTD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  597. // }else if(PLAN_REFINE_CATEGORY=="6"){//设备事故
  598. // window.location.href="PlanType/PlanNexusSBSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  599. // }else if(PLAN_REFINE_CATEGORY=="7"){//电厂大坝厂房事故
  600. // window.location.href="PlanType/PlanNexusDCDB.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  601. // }else if(PLAN_REFINE_CATEGORY=="8"){//环境污染
  602. // window.location.href="PlanType/PlanNexusHJWR.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  603. // }else if(PLAN_REFINE_CATEGORY=="9"){//防风防汛
  604. // window.location.href="PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  605. //
  606. // }else if(PLAN_REFINE_CATEGORY=="10"){//地震灾害
  607. // window.location.href="PlanType/PlanNexusDZZH.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  608. // }else if(PLAN_REFINE_CATEGORY=="11"){//低温雨雪冰冻灾害
  609. // window.location.href="PlanType/PlanNexusDWBD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  610. // }else if(PLAN_REFINE_CATEGORY=="12"){//电力供应及客户服务PlanNexusDLGY.jsp
  611. // window.location.href="PlanType/PlanNexusDLGY.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  612. // }else if(PLAN_REFINE_CATEGORY=="13"){//生产场所防恐怖袭击
  613. // window.location.href="PlanType/PlanNexusKBXJ.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  614. // }else if(PLAN_REFINE_CATEGORY=="14"){//突发性群体事件
  615. // window.location.href="PlanType/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  616. // }else if(PLAN_REFINE_CATEGORY=="15"){//突发新闻事件
  617. // window.location.href="PlanType/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  618. // }else if(PLAN_REFINE_CATEGORY=="16"){//涉外突发事件
  619. // window.location.href="PlanType/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  620. // }else if(PLAN_REFINE_CATEGORY=="18"){//突发公共卫生
  621. // window.location.href="PlanType/PlanNexusGGWS.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  622. // }else{
  623. // top.Dialog.alert("您选中的预案未填写包含的突发事件类型,请在修改页面勾选该预案的突发事件类型后再进行绑定!");
  624. // return;
  625. // }
  626. }
  627. //新增
  628. function addUnit(){
  629. window.location.href="PlanAdd.jsp?ZX";
  630. }
  631. //发布(修改预案的状态)
  632. function fabu1(){
  633. top.Dialog.alert("该预案已经发布!");
  634. }
  635. function fabu(data){
  636. var row = g.getRow(data);
  637. var fd_id = row.FD_OBJECTID214;
  638. var REMARK1 = row.REMARK1_214;
  639. if(REMARK1!=getUser_id){
  640. top.Dialog.alert("只能发布自己上传的预案!");
  641. return;
  642. }
  643. top.Dialog.confirm("确定要发布吗?|发布", function() {
  644. // 发布
  645. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/issue/", {
  646. //当前单位id
  647. comp_id : deptId,
  648. fd_id : fd_id,
  649. }, function(result) {
  650. if (result.Msg.sucsess == true) {
  651. $.messager.alert("发布成功",null,null,null,-1);
  652. // 刷新表格数据
  653. g.rend();
  654. } else {
  655. top.Dialog.alert("发布失败!");
  656. }
  657. }, "json");
  658. });
  659. }
  660. //撤销发布
  661. function noPublish(){
  662. var rows = g.getSelectedRows();
  663. var rowsLength = rows.length;
  664. if (rowsLength == 0) {
  665. top.Dialog.alert("请选中要撤销的记录!");
  666. return;
  667. } else if (rowsLength > 1) {
  668. top.Dialog.alert("请选中一条要撤销的记录!");
  669. return;
  670. }
  671. var ids = "";
  672. for ( var i = 0; i < rowsLength; i++) {
  673. ids += rows[i].FD_OBJECTID214 + ",";
  674. //判断是否包含已经发布的记录
  675. if(rows[i].PLAN_STAT_214=="0"){
  676. top.Dialog.alert("您选中的记录还未发布!");
  677. return;
  678. }
  679. }
  680. top.Dialog.confirm("确定要撤销发布吗?|撤销", function() {
  681. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/noissue/", {
  682. comp_id : deptId,
  683. fd_id : ids,
  684. }, function(result) {
  685. if (result.Msg.sucsess == true) {
  686. $.messager.alert("撤销成功",null,null,null,-1);
  687. g.rend();// 刷新表格数据
  688. } else {
  689. top.Dialog.alert("撤销失败!");
  690. }
  691. }, "json");
  692. });
  693. }
  694. //撤销共享
  695. //预案共享
  696. function gongxiang1(data){
  697. var row = g.getRow(data);
  698. var fd_id = row.FD_OBJECTID214;
  699. var flag = row.UPLOAND_FLAG_214;
  700. var user = row.ENTERING_214;//录入人ID
  701. var sata = row.PLAN_STAT_214;//发布状态
  702. if(getUser_id!=user){
  703. top.Dialog.alert("只能共享自己上传的预案!");
  704. return;
  705. }
  706. if(sata=="0"){
  707. top.Dialog.alert("该预案未发布,请发布后在共享!");
  708. return;
  709. }
  710. top.Dialog.confirm("确定要撤销共享吗?|撤销共享", function() {
  711. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/planShare/", {
  712. //当前单位id
  713. fd_id : fd_id,
  714. share:"0"
  715. }, function(result) {
  716. if (result.Msg.sucsess == true) {
  717. $.messager.alert("撤销共享成功",null,null,null,-1);
  718. getShareNum();
  719. // 刷新表格数据 上报成功后不能刷新表格
  720. g.rend();
  721. } else {
  722. top.Dialog.alert("撤销共享失败!");
  723. }
  724. }, "json");
  725. });
  726. }
  727. //预案共享
  728. function gongxiang(data){
  729. var row = g.getRow(data);
  730. var fd_id = row.FD_OBJECTID214;
  731. var flag = row.UPLOAND_FLAG_214;
  732. var user = row.ENTERING_214;//录入人ID
  733. var sata = row.PLAN_STAT_214;//发布状态
  734. if(getUser_id!=user){
  735. top.Dialog.alert("只能共享自己上传的预案!");
  736. return;
  737. }
  738. if(sata=="0"){
  739. top.Dialog.alert("该预案未发布,请发布后在共享!");
  740. return;
  741. }
  742. top.Dialog.confirm("确定要共享吗?|共享", function() {
  743. // 上报
  744. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/planShare/", {
  745. //当前单位id
  746. fd_id : fd_id,
  747. share:"1"
  748. }, function(result) {
  749. if (result.Msg.sucsess == true) {
  750. $.messager.alert("共享成功",null,null,null,-1);
  751. // 刷新表格数据 上报成功后不能刷新表格
  752. getShareNum();
  753. g.rend();
  754. } else {
  755. top.Dialog.alert("共享失败!");
  756. }
  757. }, "json");
  758. });
  759. }
  760. function shangbao1(data){
  761. var row = g.getRow(data);
  762. var fd_id = row.FD_OBJECTID214;
  763. var REMARK1 = row.REMARK1_214;
  764. if(REMARK1!=getUser_id){
  765. top.Dialog.alert("只能撤销自己上传的预案!");
  766. return;
  767. }
  768. top.Dialog.confirm("确定要撤销上报吗?|撤销", function() {
  769. // 上报
  770. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/appear1/", {
  771. //当前单位id
  772. comp_id : 214,
  773. fd_id : fd_id,
  774. }, function(result) {
  775. if (result.Msg.sucsess == true) {
  776. $.messager.alert("撤销成功",null,null,null,-1);
  777. //推送消息
  778. //fillShangbao(data);
  779. // 刷新表格数据 上报成功后不能刷新表格
  780. g.rend();
  781. } else {
  782. top.Dialog.alert("撤销上报失败!");
  783. }
  784. }, "json");
  785. });
  786. }
  787. //上报前先给上级单位公共消息库里插入一条记录
  788. /**
  789. * 1、取本级单位ID
  790. * 2、上报人ID
  791. * 3、上报消息主键
  792. * 4、服务名称(URL)
  793. **/
  794. function fillShangbao(data){
  795. var row = g.getRow(data);
  796. var fd_id = row.FD_OBJECTID214;
  797. var flag = row.UPLOAND_FLAG_214;
  798. var remark;
  799. if(flag=="0")
  800. remark = row.PLAN_VERSION_REMARK_214;
  801. else
  802. remark=fd_id;
  803. //向后台发送请求调用dwr
  804. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/sendMsgDwr/';
  805. var msg = "<a href=\"javascript:void(0)\" onclick=\"openY('/nwyj/page/business/am/public/Planinfo.jsp?"+fd_id+"?"+ remark +"')\">"+corp_name+"的应急预案</a>";
  806. //var msg = "<a href=\"javascript:void(0)\" onclick=\"openY('/nwyj/page/business/am/contingencyPlan/PlanAdd.jsp')\">应急预案</a>";
  807. var params = {
  808. parentDeptName:parent_ids,
  809. msg:msg
  810. };
  811. $.ajax({
  812. url : url,
  813. type : 'post',
  814. data : params,
  815. dataType : 'text',
  816. timeout : 60000,
  817. success : function(data){
  818. },
  819. error : function(){
  820. $.messager.alert('操作失败');
  821. }
  822. });
  823. }
  824. //上报(修改预案的状态)
  825. function shangbao(data){
  826. var row = g.getRow(data);
  827. var fd_id = row.FD_OBJECTID214;
  828. var REMARK1 = row.REMARK1_214;
  829. if(REMARK1!=getUser_id){
  830. top.Dialog.alert("只能上报自己上传的预案!");
  831. return;
  832. }
  833. top.Dialog.confirm("确定要上报吗?|上报", function() {
  834. // 上报
  835. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/appear/", {
  836. //当前单位id
  837. comp_id : 214,
  838. fd_id : fd_id,
  839. }, function(result) {
  840. if (result.Msg.sucsess == true) {
  841. $.messager.alert("上报成功",null,null,null,-1);
  842. //推送消息
  843. fillShangbao(data);
  844. // 刷新表格数据 上报成功后不能刷新表格
  845. g.rend();
  846. } else {
  847. top.Dialog.alert("上报失败!");
  848. }
  849. }, "json");
  850. });
  851. }
  852. //历史版本(查看该预案的历史版本信息)
  853. function lishibanb(){
  854. window.location.href="expertadd.jsp";
  855. }
  856. //汇总(汇总本级单位预案信息)
  857. function huizong(){
  858. window.location.href="ContingencyPlanHuiZong.jsp";
  859. }
  860. //汇总(汇总本级单位预案修编信息)
  861. function xiubianhuizong(){
  862. window.location.href="ContingencyPlanXBHuiZong.jsp";
  863. }
  864. //修改
  865. function updateUnit(){
  866. var rows = g.getSelectedRows();
  867. //判断是不是自己上传的预案
  868. //取当前登录人ID getUser_id
  869. var fd_id = rows[0].FD_OBJECTID214;
  870. var REMARK1 = rows[0].REMARK1_214;
  871. if(REMARK1!=getUser_id){
  872. top.Dialog.alert("只能修改自己上传的预案!");
  873. return;
  874. }
  875. if(rows.length==0){
  876. top.Dialog.alert("请选择一条记录");
  877. return;
  878. }
  879. if(rows.length>1){
  880. top.Dialog.alert("只能选择一条记录");
  881. return;
  882. }
  883. var sturtssb = rows[0].PLAN_STAT_214;
  884. if(sturtssb=="1"){
  885. top.Dialog.alert("您选中的记录已经发布!");
  886. }
  887. //上报不允许修改
  888. /*else if(rows[0].PLAN_STAT1_214=="1"){
  889. top.Dialog.alert("您选中的记录已经上报!");
  890. }*/
  891. else{
  892. window.location.href="PlanEdit.jsp?"+fd_id+"?ZX";
  893. }
  894. }
  895. //删除
  896. function deleteUnit(){
  897. var rows = g.getSelectedRows();
  898. var rowsLength = rows.length;
  899. if (rowsLength == 0) {
  900. top.Dialog.alert("请选中要删除的记录!");
  901. return;
  902. }
  903. var REMARK1 = rows[0].REMARK1_214;
  904. if(REMARK1!=getUser_id){
  905. top.Dialog.alert("只能删除自己上传的预案!");
  906. return;
  907. }
  908. var ids = "";
  909. var sturtssb = "";
  910. for ( var i = 0; i < rowsLength; i++) {
  911. ids += rows[i].FD_OBJECTID214 + ",";
  912. sturtssb += rows[i].PLAN_STAT_214 + ",";
  913. if(rows[i].PLAN_STAT_214=="1"){
  914. if(rowsLength==1){
  915. top.Dialog.alert("您选中的记录已经发布!");
  916. }else{
  917. top.Dialog.alert("您选中的记录有已经发布的!");
  918. }
  919. return;
  920. }
  921. if(rows[i].PLAN_STAT1_214=="1"){
  922. if(rowsLength==1){
  923. top.Dialog.alert("您选中的记录已经上报!");
  924. }else{
  925. top.Dialog.alert("您选中的记录有已经上报的!");
  926. }
  927. return;
  928. }
  929. }
  930. top.Dialog.confirm("确定要删除吗?|删除", function() {
  931. // 删除记录
  932. $.post($.pathname() +"/ws/crud/CRUDService/delete/", {
  933. "objectIDs" : ids,
  934. classid : 214
  935. }, function(result) {
  936. if (result.Msg.sucsess == true) {
  937. $.messager.alert("删除成功",null,null,null,-1);
  938. // 刷新表格数据
  939. g.rend();
  940. } else {
  941. top.Dialog.alert("删除失败!");
  942. }
  943. }, "json");
  944. });
  945. }
  946. //点击主键跳转详细信息页面
  947. this.openDetail = function(rowindex) {
  948. var row = g.getRow(rowindex);
  949. var fd_id = row.FD_OBJECTID214;
  950. var PLAN_BIAOZHI = row.PLAN_BIAOZHI_214;
  951. var BM_YAXHLB = row.PLAN_REFINE_CATEGORY_214;
  952. var PLAN_NAME = row.PLAN_NAME_214;
  953. var PLAN_TYPE = row.PLAN_TYPE_214;
  954. if(PLAN_TYPE!="103"){
  955. window.location.href="Planinfo.jsp?"+fd_id;
  956. }else{
  957. window.location.href="/nwyj/page/business/am/contingencyPlan/PlanNexusView.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB+"?ZX";
  958. };
  959. };
  960. function showPrimaryKey(obj,index){
  961. var fd_id = obj.FD_OBJECTID214;
  962. var PLAN_BIAOZHI = obj.PLAN_BIAOZHI_214;
  963. var BM_YAXHLB = obj.PLAN_REFINE_CATEGORY_214;
  964. var PLAN_NAME = obj.PLAN_NAME_214;
  965. var PLAN_TYPE = obj.PLAN_TYPE_214;
  966. if(PLAN_TYPE!="103"){
  967. window.location.href="Planinfo.jsp?"+fd_id;
  968. }else{
  969. window.location.href="/nwyj/page/business/am/contingencyPlan/PlanNexusView.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB+"?ZX";
  970. };
  971. }
  972. //点击查看
  973. function jumpPage(fd_id,PLAN_BIAOZHI,BM_YAXHLB,PLAN_NAME,PLAN_TYPE){
  974. if(PLAN_TYPE!="103"){
  975. window.location.href="Planinfo.jsp?"+fd_id;
  976. }else{
  977. window.location.href="/nwyj/page/business/am/contingencyPlan/PlanNexusView.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB+"?" + PLAN_NAME;
  978. // if(PLAN_REFINE_CATEGORY=="17"){//网络与信息安全
  979. // //window.location.href="huizong.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  980. // window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  981. // }else if(PLAN_REFINE_CATEGORY=="4"){//人身事故
  982. // window.location.href="PlanOnViewNexus/PlanNexusRSSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  983. // }else if(PLAN_REFINE_CATEGORY=="5"){//大面积停电事件
  984. // window.location.href="PlanOnViewNexus/PlanNexusDMJTD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  985. // }else if(PLAN_REFINE_CATEGORY=="6"){//设备事故
  986. // window.location.href="PlanOnViewNexus/PlanNexusSBSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  987. // }else if(PLAN_REFINE_CATEGORY=="7"){//电厂大坝厂房事故
  988. // window.location.href="PlanOnViewNexus/PlanNexusDCDB.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  989. // }else if(PLAN_REFINE_CATEGORY=="8"){//环境污染
  990. // window.location.href="PlanOnViewNexus/PlanNexusHJWR.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  991. // }else if(PLAN_REFINE_CATEGORY=="9"){//防风防汛PlanOnViewList\NewMsgNotice
  992. // window.location.href="PlanOnViewNexus/PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  993. // }else if(PLAN_REFINE_CATEGORY=="10"){//地震灾害
  994. // window.location.href="PlanOnViewNexus/PlanNexusDZZH.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  995. // }else if(PLAN_REFINE_CATEGORY=="11"){//低温雨雪冰冻灾害
  996. // window.location.href="PlanOnViewNexus/PlanNexusDWBD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  997. // }else if(PLAN_REFINE_CATEGORY=="12"){//电力供应及客户服务PlanNexusDLGY.jsp
  998. // window.location.href="PlanOnViewNexus/PlanNexusDLGY.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  999. // }else if(PLAN_REFINE_CATEGORY=="13"){//生产场所防恐怖袭击
  1000. // window.location.href="PlanOnViewNexus/PlanNexusKBXJ.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1001. // }else if(PLAN_REFINE_CATEGORY=="14"){//突发性群体事件
  1002. // window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1003. // }else if(PLAN_REFINE_CATEGORY=="15"){//突发新闻事件
  1004. // window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1005. // }else if(PLAN_REFINE_CATEGORY=="16"){//涉外突发事件
  1006. // window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1007. // }else if(PLAN_REFINE_CATEGORY=="18"){//突发公共卫生
  1008. // window.location.href="PlanOnViewNexus/PlanNexusGGWS.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1009. // }else{
  1010. // window.location.href="PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1011. // }
  1012. }
  1013. }
  1014. function onView(){
  1015. //根据预案类型分别跳转不同的预案绑定的页面
  1016. var rows = g.getSelectedRows();
  1017. if(rows.length==0){
  1018. top.Dialog.alert("请选择一条记录");
  1019. return;
  1020. }
  1021. if(rows.length>1){
  1022. top.Dialog.alert("只能选择一条记录");
  1023. return;
  1024. }
  1025. /**
  1026. * 如果是地震预案,跳转到地震对应的预案.
  1027. * 传给子页面的值:
  1028. * 1、主键
  1029. * 2、 版本(初次版本为0;方便日后修订预案后将原有预案的绑定条件带出来。避免用户再次录入绑定条件)
  1030. * 3、预案具体业务分类,方便分别找到对应的报表填报计划页面
  1031. *
  1032. * **/
  1033. var fd_id = rows[0].FD_OBJECTID214;
  1034. var PLAN_BIAOZHI = rows[0].PLAN_BIAOZHI_214;
  1035. var PLAN_REFINE_CATEGORY = rows[0].PLAN_REFINE_CATEGORY_214;
  1036. var BM_YAXHLB = rows[0].PLAN_REFINE_CATEGORY_214;
  1037. var PLAN_TYPE = rows[0].PLAN_TYPE_214;
  1038. if(PLAN_TYPE!="103"){
  1039. window.location.href="Planinfo.jsp?"+fd_id;
  1040. }else{
  1041. if(PLAN_REFINE_CATEGORY=="17"){//网络与信息安全
  1042. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1043. }else if(PLAN_REFINE_CATEGORY=="4"){//人身事故
  1044. window.location.href="PlanOnViewNexus/PlanNexusRSSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1045. }else if(PLAN_REFINE_CATEGORY=="5"){//大面积停电事件
  1046. window.location.href="PlanOnViewNexus/PlanNexusDMJTD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1047. }else if(PLAN_REFINE_CATEGORY=="6"){//设备事故
  1048. window.location.href="PlanOnViewNexus/PlanNexusSBSG.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1049. }else if(PLAN_REFINE_CATEGORY=="7"){//电厂大坝厂房事故
  1050. window.location.href="PlanOnViewNexus/PlanNexusDCDB.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1051. }else if(PLAN_REFINE_CATEGORY=="8"){//环境污染
  1052. window.location.href="PlanOnViewNexus/PlanNexusHJWR.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1053. }else if(PLAN_REFINE_CATEGORY=="9"){//防风防汛
  1054. window.location.href="PlanOnViewNexus/PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1055. }else if(PLAN_REFINE_CATEGORY=="10"){//地震灾害
  1056. window.location.href="PlanOnViewNexus/PlanNexusDZZH.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1057. }else if(PLAN_REFINE_CATEGORY=="11"){//低温雨雪冰冻灾害
  1058. window.location.href="PlanOnViewNexus/PlanNexusDWBD.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1059. }else if(PLAN_REFINE_CATEGORY=="12"){//电力供应及客户服务PlanNexusDLGY.jsp
  1060. window.location.href="PlanOnViewNexus/PlanNexusDLGY.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1061. }else if(PLAN_REFINE_CATEGORY=="13"){//生产场所防恐怖袭击
  1062. window.location.href="PlanOnViewNexus/PlanNexusKBXJ.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1063. }else if(PLAN_REFINE_CATEGORY=="14"){//突发性群体事件
  1064. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1065. }else if(PLAN_REFINE_CATEGORY=="15"){//突发新闻事件
  1066. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1067. }else if(PLAN_REFINE_CATEGORY=="16"){//涉外突发事件
  1068. window.location.href="PlanOnViewNexus/PlanNexusTFQT.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1069. }else if(PLAN_REFINE_CATEGORY=="18"){//突发公共卫生
  1070. window.location.href="PlanOnViewNexus/PlanNexusGGWS.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1071. }else{
  1072. window.location.href="PlanNexus.jsp?"+fd_id+"?"+PLAN_BIAOZHI+"?" + BM_YAXHLB;
  1073. }
  1074. }
  1075. }
  1076. $.messager=top.Dialog;
  1077. /************动态more*****************/
  1078. // 更多
  1079. function more() {
  1080. $('#moreDiv').toggle(400,function(){
  1081. $("#emptyCondition").click();
  1082. $(parent.document.body).find("#frmright").height($(window.document.body).height()+30);
  1083. });
  1084. }
  1085. /*****************非动态more**********************/
  1086. /* // 更多
  1087. function more() {
  1088. $('#moreDiv').toggle();
  1089. $(parent.document.body).find("#frmright").height($(window.document.body).height());
  1090. }*/
  1091. $.messager=top.Dialog;