958181b95220ea277f6efd8044bbd3484b029ee5.svn-base 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. /************************************************有预警的应急预案响应时的短信通知应急组织的JS********************************************/
  2. $(function(){
  3. getOrgInfo();//初始化应急组织列表
  4. //window.setTimeout("setHeightThis()", 200);
  5. });
  6. function setHeightThis(){
  7. $(parent.document.body).find("iframe").height($(window.document.body).height()+30);
  8. $(parent.parent.document.body).find("iframe").height($(parent.document.body).height()+30);
  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. var org;
  84. function getOrgInfo() {
  85. var roleCons = roleButtonArr();
  86. var toolBarOpt2 = {
  87. items:[
  88. // {text: '查看', click: "onView", iconClass: 'view_tem',id:"10003"}
  89. ],
  90. roleCons:roleCons
  91. };
  92. /*********************************************工具条******************************************/
  93. var grid_option1 = {
  94. columns: [
  95. {display : '姓名',name : 'name',align : 'center',width : '20%'},
  96. { display: '一级响应',level1 : 'level1', isAllowHide: false, align: 'center', width:'20%',
  97. render: function (rowdata, rowindex, value, column){
  98. var fabu='';
  99. if(rowdata.level1=="1"){//"1"代表被选中的
  100. fabu = '<span id="1" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
  101. }else{
  102. fabu = '<span id="1" class="getUserInfo2 hand" title="取消" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
  103. }
  104. return fabu;
  105. },
  106. },
  107. { display: '二级响应',level2 : 'level2', isAllowHide: false, align: 'center', width:'20%',
  108. render: function (rowdata, rowindex, value, column){
  109. var fabu='';
  110. if(rowdata.level2=="1"){
  111. fabu = '<span id="2" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
  112. }else{
  113. fabu = '<span id="2" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
  114. }
  115. return fabu;
  116. },
  117. },
  118. { display: '三级响应',level3 : 'level3', isAllowHide: false, align: 'center', width:'20%',
  119. render: function (rowdata, rowindex, value, column){
  120. var fabu='';
  121. if(rowdata.level3=="1"){
  122. fabu = '<span id="3" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
  123. }else{
  124. fabu = '<span id="3" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
  125. }
  126. return fabu;
  127. },
  128. },
  129. { display: '四级响应',level4 : 'level4', isAllowHide: false, align: 'center', width:'20%',
  130. render: function (rowdata, rowindex, value, column){
  131. var fabu='';
  132. if(rowdata.level4=="1"){
  133. fabu = '<span id="4" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
  134. }else{
  135. fabu = '<span id="4" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
  136. }
  137. return fabu;
  138. },
  139. }
  140. ],
  141. rownumbers : true,
  142. checkbox : true,
  143. pageSize : 10,
  144. percentWidthMode : true,
  145. isChecked:checkedHandler,
  146. onCheckRow: checkRowHandler,
  147. onCheckAllRow: checkAllRowHandler
  148. };
  149. var options1={
  150. url :$.pathname()+ "/ws/planService/PlanService/queryDxtzyjzz",
  151. params:{
  152. fdId : sub_fd_id,
  153. gtype:"2",
  154. //gtype:tempValue,
  155. deptId:deptId
  156. },
  157. gridOptions:grid_option1,
  158. singleRecodeOptions:{a:"aa"},
  159. paperOpration:{showInput:"true"},
  160. toolBarOptions:toolBarOpt2
  161. };
  162. org=gridAndSingleRecode=$("#maingridorg1").quickgridAndSingleRecode(options1);
  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/changeDxtzyjzz/';
  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:"1", //组织1、队伍2、专家3
  184. msgOpter:userid,//人员ID
  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. /*****************************************短信通知人员列表*********************************************/
  212. $.messager=top.Dialog;
  213. /*$(window).resize(function(){
  214. $(parent.document.body).find("#frmright").css("height","600px");
  215. });
  216. */