324bfa27fcd256863273e25536f3576763612fcd.svn-base 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /************************************************有预警的应急预案响应时的短信通知应急组织的JS********************************************/
  2. $(function(){
  3. $("#titlename").html(parent.titlename);
  4. getOrgInfo();//初始化应急组织列表
  5. //window.setTimeout("setHeightThis()", 200);
  6. });
  7. function setHeightThis(){
  8. $(parent.document.body).find("iframe").height($(window.document.body).height()+30);
  9. $(parent.parent.document.body).find("iframe").height($(parent.document.body).height()+30);
  10. }
  11. //取预案的主键
  12. var sub_fd_id ="";
  13. //取页面传过来的预案主键ID : 传过来的预案ID
  14. sub_fd_id = parent.fd_id;
  15. //预案的类型
  16. var SUB_BM_YAXHLB= "";
  17. SUB_BM_YAXHLB =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 loadData;
  84. var org;
  85. function getOrgInfo() {
  86. var roleCons = roleButtonArr();
  87. var toolBarOpt2 = {
  88. items:[
  89. // {text: '查看', click: "onView", iconClass: 'view_tem',id:"10003"}
  90. ],
  91. roleCons:roleCons
  92. };
  93. /*********************************************工具条******************************************/
  94. var grid_option1 = {
  95. columns: [
  96. {display : '姓名',name : 'name',align : 'center',width : '20%'},
  97. { display: '一级响应',level1 : 'level1', isAllowHide: false, align: 'center', width:'20%',
  98. render: function (rowdata, rowindex, value, column){
  99. var fabu='';
  100. if(rowdata.level1=="1"){//"1"代表被选中的
  101. fabu = '<span id="1" class="getUserInfo1 hand" title="取消" ></span>';
  102. }else{
  103. fabu = '<span id="1" class="getUserInfo2 hand" title="选中" ></span>';
  104. }
  105. return fabu;
  106. },
  107. },
  108. { display: '二级响应',level2 : 'level2', isAllowHide: false, align: 'center', width:'20%',
  109. render: function (rowdata, rowindex, value, column){
  110. var fabu='';
  111. if(rowdata.level2=="1"){
  112. fabu = '<span id="2" class="getUserInfo1 hand" title="取消" ></span>';
  113. }else{
  114. fabu = '<span id="2" class="getUserInfo2 hand" title="选中" ></span>';
  115. }
  116. return fabu;
  117. },
  118. },
  119. { display: '三级响应',level3 : 'level3', isAllowHide: false, align: 'center', width:'20%',
  120. render: function (rowdata, rowindex, value, column){
  121. var fabu='';
  122. if(rowdata.level3=="1"){
  123. fabu = '<span id="3" class="getUserInfo1 hand" title="取消" ></span>';
  124. }else{
  125. fabu = '<span id="3" class="getUserInfo2 hand" title="选中" ></span>';
  126. }
  127. return fabu;
  128. },
  129. },
  130. { display: '四级响应',level4 : 'level4', isAllowHide: false, align: 'center', width:'20%',
  131. render: function (rowdata, rowindex, value, column){
  132. var fabu='';
  133. if(rowdata.level4=="1"){
  134. fabu = '<span id="4" class="getUserInfo1 hand" title="取消" ></span>';
  135. }else{
  136. fabu = '<span id="4" class="getUserInfo2 hand" title="选中" ></span>';
  137. }
  138. return fabu;
  139. },
  140. }
  141. ],
  142. rownumbers : true,
  143. checkbox : false,
  144. pageSize : 10,
  145. percentWidthMode : true,
  146. isChecked:checkedHandler,
  147. onCheckRow: checkRowHandler,
  148. onCheckAllRow: checkAllRowHandler
  149. };
  150. var options1={
  151. url :$.pathname()+ "/ws/planService/PlanService/queryDxtzyjzz",
  152. params:{
  153. fdId : sub_fd_id,
  154. gtype:"2",
  155. //gtype:tempValue,
  156. deptId:deptId
  157. },
  158. gridOptions:grid_option1,
  159. singleRecodeOptions:{a:"aa"},
  160. paperOpration:{showInput:"true"},
  161. toolBarOptions:toolBarOpt2
  162. };
  163. org=gridAndSingleRecode=$("#maingridorg1").quickgridAndSingleRecode(options1);
  164. }
  165. //预案ID.
  166. //人ID.
  167. //预警还是响应.
  168. //1234.
  169. //0 1
  170. //123组织、队伍、专家
  171. //地址changeDxtzyjzz
  172. function fabu(rowindex,event,userid,is_del){
  173. var id = $(event).attr("id");//取1234个等级
  174. var url = $.pathname() + '/ws/planService/PlanService/changeDxtzyjzz/';
  175. if(is_del=="1"){
  176. is_del="0";
  177. }else{
  178. is_del="1";
  179. }
  180. var params = {
  181. gtype : "2", //预警或响应
  182. //gtype:tempValue,
  183. fdId:sub_fd_id,//预案主键
  184. msgType:"1", //组织1、队伍2、专家3
  185. msgOpter:userid,//人员ID
  186. clum:id,//
  187. clv:is_del//删除还是创建标志
  188. };
  189. $.ajax({
  190. url : url,
  191. type : 'post',
  192. timeout : 60000,
  193. data : params,
  194. dataType : 'json',
  195. success : function(data){
  196. if(data=="1"){
  197. var classValue = $(event).attr("class");
  198. if(classValue=="getUserInfo2 hand"){
  199. $(event).removeClass("getUserInfo2 hand");
  200. $(event).addClass("getUserInfo1 hand");
  201. }else{
  202. $(event).removeClass("getUserInfo1 hand");
  203. $(event).addClass("getUserInfo2 hand");
  204. }
  205. }
  206. },
  207. error : function(e){
  208. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  209. }
  210. });
  211. };
  212. /*****************************************短信通知人员列表*********************************************/
  213. $.messager=top.Dialog;
  214. /*$(window).resize(function(){
  215. $(parent.document.body).find("#frmright").css("height","600px");
  216. });
  217. */