e2542b4d6493e31cf0cf0a8002d77c7f207b6bc7.svn-base 7.7 KB

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