5f4c5515d8a3cacb7e64cdbfc100f3d27fcffbb5.svn-base 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. $(function(){
  2. //getRelevancyInfo(sub_fd_id,SUB_BM_YAXHLB);//初始化存入库表的值
  3. getOrgInfo();//初始化应急组织列表
  4. });
  5. //取预案的主键
  6. var sub_fd_id ="";
  7. //取页面传过来的预案主键ID : 传过来的预案ID
  8. sub_fd_id = parent.fd_id;
  9. //预案的类型
  10. var SUB_BM_YAXHLB= "";
  11. SUB_BM_YAXHLB = parent.BM_YAXHLB;
  12. var type = SUB_BM_YAXHLB + "5_2";//拼短信通知的类型
  13. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  14. /*****************************************测试返回数据*************************************************/
  15. //单位ID
  16. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  17. var loadData;
  18. function getOrgInfo() {
  19. var roleCons = roleButtonArr();
  20. var toolBarOpt2 = {
  21. items:[
  22. {text: '查看', click: "onView", iconClass: 'view_tem',id:"10003"},
  23. {text: '确定', click: "addTeamInfo",id:"10208"}
  24. ],
  25. roleCons:roleCons
  26. };
  27. /*********************************************工具条******************************************/
  28. var grid_option1 = {
  29. columns: [
  30. {display : '姓名',name : 'name',align : 'center',width : '20%'},
  31. //{display : '一级响应',level1 : 'level1',align : 'center',width : '16%'},
  32. { display: '一级响应',level1 : 'level1', isAllowHide: false, align: 'center', width:'16%',
  33. render: function (rowdata, rowindex, value, column){
  34. var fabu='';
  35. if(rowdata.level1=="1"){//"1"代表被选中的
  36. fabu = '<span id="1" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
  37. }else{
  38. fabu = '<span id="1" class="getUserInfo2 hand" title="取消" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
  39. }
  40. return fabu;
  41. },
  42. },
  43. { display: '二级响应',level2 : 'level2', isAllowHide: false, align: 'center', width:'16%',
  44. render: function (rowdata, rowindex, value, column){
  45. var fabu='';
  46. if(rowdata.level2=="1"){
  47. fabu = '<span id="2" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
  48. }else{
  49. fabu = '<span id="2" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
  50. }
  51. return fabu;
  52. },
  53. },
  54. { display: '三级响应',level3 : 'level3', isAllowHide: false, align: 'center', width:'16%',
  55. render: function (rowdata, rowindex, value, column){
  56. var fabu='';
  57. if(rowdata.level3=="1"){
  58. fabu = '<span id="3" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
  59. }else{
  60. fabu = '<span id="3" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
  61. }
  62. return fabu;
  63. },
  64. },
  65. { display: '四级响应',level4 : 'level4', isAllowHide: false, align: 'center', width:'16%',
  66. render: function (rowdata, rowindex, value, column){
  67. var fabu='';
  68. if(rowdata.level4=="1"){
  69. fabu = '<span id="4" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
  70. }else{
  71. fabu = '<span id="4" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
  72. }
  73. return fabu;
  74. },
  75. }
  76. ],
  77. rownumbers : true,
  78. checkbox : true,
  79. pageSize : 10,
  80. percentWidthMode : true,
  81. isChecked:checkedHandler,
  82. onCheckRow: checkRowHandler,
  83. onCheckAllRow: checkAllRowHandler
  84. };
  85. var options1={
  86. url :$.pathname()+ "/ws/planService/PlanService/queryDxtzyjzz",
  87. params:{
  88. fdId : sub_fd_id,
  89. msgType:"2",
  90. deptId:deptId,
  91. },
  92. gridOptions:grid_option1,
  93. singleRecodeOptions:{a:"aa"},
  94. paperOpration:{showInput:"true"},
  95. toolBarOptions:toolBarOpt2
  96. };
  97. org=gridAndSingleRecode=$("#conditions").quickgridAndSingleRecode(options1);
  98. }
  99. //预案ID.
  100. //人ID.
  101. //预警还是响应.
  102. //1234.
  103. //0 1
  104. //123组织、队伍、专家
  105. //地址changeDxtzyjzz
  106. function fabu(rowindex,event,userid,is_del){
  107. var id = $(event).attr("id");//取1234个等级
  108. var url = $.pathname() + '/ws/planService/PlanService/changeDxtzyjzz/';
  109. if(is_del=="1"){
  110. is_del="0";
  111. }else{
  112. is_del="1";
  113. }
  114. var params = {
  115. gtype : "2",
  116. fdId:sub_fd_id,
  117. msgType:"1",
  118. msgOpter:userid,
  119. clum:id,
  120. clv:is_del,
  121. };
  122. alert("is_del:" + is_del);
  123. $.ajax({
  124. url : url,
  125. type : 'post',
  126. timeout : 60000,
  127. data : params,
  128. dataType : 'json',
  129. success : function(data){
  130. if(data=="1"){
  131. var classValue = $(event).attr("class");
  132. if(classValue=="getUserInfo2 hand"){
  133. $(event).removeClass("getUserInfo2 hand");
  134. $(event).addClass("getUserInfo1 hand");
  135. }else{
  136. $(event).removeClass("getUserInfo1 hand");
  137. $(event).addClass("getUserInfo2 hand");
  138. }
  139. }
  140. },
  141. error : function(e){
  142. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  143. }
  144. });
  145. };
  146. // var id = $(event).attr("id");//取1234个等级
  147. // var classValue = $(event).attr("class");
  148. // org.setOptions({data:result});
  149. // org.rend();
  150. //}
  151. function fabu1(rowindex,event,userid,username,userphone){
  152. var id = $(event).attr("id");
  153. alert(id);
  154. var classValue = $(event).attr("class");
  155. if(classValue=="fashang_06 hand"){
  156. $(event).removeClass("fashang_06 hand");
  157. $(event).addClass("fashang_07 hand");
  158. if(id==1){
  159. fristid +=userid + "*";
  160. frist += username + "*" + userphone + "*" + userid +"*" + "|";
  161. }else if(id==2){
  162. secondid +=userid + "*";
  163. second += username + "*" + userphone + "*"+ userid +"*" + "|";
  164. }else if(id==3){
  165. thirdid +=userid + "*";
  166. third += username + "*" + userphone + "*"+ userid +"*" + "|";
  167. }else if(id==4){
  168. forthid +=userid + "*";
  169. forth += username + "*" + userphone + "*"+ userid +"*" + "|";
  170. }
  171. }else{
  172. $(event).removeClass("fashang_07 hand");
  173. $(event).addClass("fashang_06 hand");
  174. if(id==1){
  175. fristid=fristid.replace(userid +"*",'');
  176. frist=frist.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
  177. }else if(id==2){
  178. secondid=fristid.replace(userid +"*",'');
  179. second=second.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
  180. }else if(id==3){
  181. thirdid=fristid.replace(userid +"*",'');
  182. third=third.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
  183. }else if(id==4){
  184. forthid=fristid.replace(userid +"*",'');
  185. forth=forth.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
  186. }
  187. }
  188. }
  189. /*****************************************短信通知人员列表*********************************************/
  190. $.messager=top.Dialog;
  191. $(window).resize(function(){
  192. $(parent.document.body).find("#frmright").css("height","600px");
  193. });