d296d6787d0e5906566a06bb077b4bcbd50dd7ae.svn-base 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. $(function(){
  2. $("#titlename").html(parent.titlename);
  3. //getRelevancyInfo(sub_fd_id,SUB_BM_YAXHLB);//初始化存入库表的值
  4. getOrgInfo2();//初始化应急组织列表
  5. });
  6. function goBack(){
  7. var url = "/nwyj/page/business/am/contingencyPlan/"+"ContingencyPlan.jsp";
  8. top.parent.document.getElementById("frmright").setAttribute("src", ""+encodeURI(url));
  9. }
  10. //取预案的主键
  11. var sub_fd_id ="";
  12. //取页面传过来的预案主键ID : 传过来的预案ID
  13. sub_fd_id = parent.fd_id;
  14. //预案的类型
  15. var SUB_BM_YAXHLB= "";
  16. SUB_BM_YAXHLB = parent.BM_YAXHLB;
  17. var tempValue="";
  18. /**************************拼接类型*************************************************/
  19. //判断细化类型
  20. /**
  21. * 细化类型
  22. * 4、人身事故
  23. * 5、大面积停电事件
  24. * 6、设备事故
  25. * 7、电厂大坝厂房事故
  26. * 8、环境污染
  27. * 9、防风防汛
  28. * 10、地震灾害
  29. * 11、低温雨雪冰冻灾害
  30. * 12、电力供应及客户服务
  31. * 13、生产场所防恐怖袭击
  32. * 14、突发性群体事件
  33. * 15、突发新闻事件
  34. * 16、涉外突发事件
  35. * 17、网络与信息安全
  36. * 18、突发公共卫生
  37. * **/
  38. if(SUB_BM_YAXHLB=="4"){
  39. tempValue="4_5_2";
  40. }else if(SUB_BM_YAXHLB=="5"){
  41. tempValue="5_5_2";
  42. }else if(SUB_BM_YAXHLB=="6"){
  43. tempValue="6_5_2";
  44. }else if(SUB_BM_YAXHLB=="7"){
  45. tempValue="7_5_2";
  46. }else if(SUB_BM_YAXHLB=="8"){
  47. tempValue="8_5_2";
  48. }else if(SUB_BM_YAXHLB=="9"){
  49. tempValue="9_5_2";
  50. }else if(SUB_BM_YAXHLB=="10"){
  51. tempValue="10_5_2";
  52. }else if(SUB_BM_YAXHLB=="11"){
  53. tempValue="11_5_2";
  54. }else if(SUB_BM_YAXHLB=="12"){
  55. tempValue="12_5_2";
  56. }else if(SUB_BM_YAXHLB=="13"){
  57. tempValue="13_5_2";
  58. }else if(SUB_BM_YAXHLB=="14"){
  59. tempValue="14_5_2";
  60. }else if(SUB_BM_YAXHLB=="15"){
  61. tempValue="15_5_2";
  62. }else if(SUB_BM_YAXHLB=="16"){
  63. tempValue="16_5_2";
  64. }else if(SUB_BM_YAXHLB=="17"){
  65. tempValue="17_5_2";
  66. }else if(SUB_BM_YAXHLB=="18"){
  67. tempValue="18_5_2";
  68. }else if(SUB_BM_YAXHLB=="21"){
  69. tempValue="21_5_2";
  70. }else if(SUB_BM_YAXHLB=="22"){
  71. tempValue="22_5_2";
  72. }else if(SUB_BM_YAXHLB=="23"){
  73. tempValue="23_5_2";
  74. }else if(SUB_BM_YAXHLB=="24"){
  75. tempValue="24_5_2";
  76. }
  77. var type = SUB_BM_YAXHLB + "5_2";//拼短信通知的类型
  78. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  79. /*****************************************测试返回数据*************************************************/
  80. //单位ID
  81. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  82. var loadData;
  83. /****************************************************单表**********************************************************/
  84. function getOrgInfo2() {
  85. org = $("#maingritream").quiGrid({
  86. columns: [
  87. {display : '队伍名称',name : 'name',align : 'center',width : '20%'},
  88. { display: '一级响应',level1 : 'level1', isAllowHide: false, align: 'center', width:'20%',
  89. render: function (rowdata, rowindex, value, column){
  90. var fabu='';
  91. if(rowdata.level1=="1"){//"1"代表被选中的
  92. fabu = '<span id="1" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
  93. }else{
  94. fabu = '<span id="1" class="getUserInfo2 hand" title="取消" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
  95. }
  96. return fabu;
  97. },
  98. },
  99. { display: '二级响应',level2 : 'level2', isAllowHide: false, align: 'center', width:'20%',
  100. render: function (rowdata, rowindex, value, column){
  101. var fabu='';
  102. if(rowdata.level2=="1"){
  103. fabu = '<span id="2" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
  104. }else{
  105. fabu = '<span id="2" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
  106. }
  107. return fabu;
  108. },
  109. },
  110. { display: '三级响应',level3 : 'level3', isAllowHide: false, align: 'center', width:'20%',
  111. render: function (rowdata, rowindex, value, column){
  112. var fabu='';
  113. if(rowdata.level3=="1"){
  114. fabu = '<span id="3" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
  115. }else{
  116. fabu = '<span id="3" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
  117. }
  118. return fabu;
  119. },
  120. },
  121. { display: '四级响应',level4 : 'level4', isAllowHide: false, align: 'center', width:'20%',
  122. render: function (rowdata, rowindex, value, column){
  123. var fabu='';
  124. if(rowdata.level4=="1"){
  125. fabu = '<span id="4" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
  126. }else{
  127. fabu = '<span id="4" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
  128. }
  129. return fabu;
  130. },
  131. }
  132. ],
  133. url :$.pathname()+ "/ws/planService/PlanService/queryTeam",
  134. params :{
  135. fdId : sub_fd_id,
  136. gtype:"2",
  137. deptId:deptId
  138. },
  139. // sortName : '',
  140. // sortOrder : '',
  141. rownumbers : true,
  142. checkbox : false,
  143. // height: '100%',
  144. // width:"100%",
  145. pageSize : 10,
  146. percentWidthMode : true,
  147. isChecked:checkedHandler,
  148. onCheckRow: checkRowHandler,
  149. onCheckAllRow: checkAllRowHandler,
  150. //顶部图标按钮栏
  151. toolbar:{
  152. items:[
  153. //{text: '查看', click: "onView", iconClass: 'view_tem',id:"10003"}
  154. //{text: '查看', click: onView, iconClass: 'view_tem'},
  155. { line : true }
  156. ]
  157. }
  158. });
  159. }
  160. //预案ID.
  161. //人ID.
  162. //预警还是响应.
  163. //1234.
  164. //0 1
  165. //123组织、队伍、专家
  166. //地址changeDxtzyjzz
  167. function fabu(rowindex,event,userid,is_del){
  168. var id = $(event).attr("id");//取1234个等级
  169. var url = $.pathname() + '/ws/planService/PlanService/changeTeam/';
  170. if(is_del=="1"){
  171. is_del="0";
  172. }else{
  173. is_del="1";
  174. }
  175. var params = {
  176. gtype : "2",
  177. //gtype:tempValue,
  178. fdId:sub_fd_id,
  179. msgType:"2",//应急队伍
  180. msgOpter:userid,
  181. clum:id,
  182. clv:is_del,
  183. };
  184. $.ajax({
  185. url : url,
  186. type : 'post',
  187. timeout : 60000,
  188. data : params,
  189. dataType : 'json',
  190. success : function(data){
  191. if(data=="1"){
  192. var classValue = $(event).attr("class");
  193. if(classValue=="getUserInfo2 hand"){
  194. $(event).removeClass("getUserInfo2 hand");
  195. $(event).addClass("getUserInfo1 hand");
  196. }else{
  197. $(event).removeClass("getUserInfo1 hand");
  198. $(event).addClass("getUserInfo2 hand");
  199. }
  200. }
  201. },
  202. error : function(e){
  203. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  204. }
  205. });
  206. };
  207. $.messager=top.Dialog;