123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- $(function(){
-
- //getRelevancyInfo(sub_fd_id,SUB_BM_YAXHLB);//初始化存入库表的值
- getOrgInfo();//初始化应急组织列表
-
- });
- //取预案的主键
- var sub_fd_id ="";
- //取页面传过来的预案主键ID : 传过来的预案ID
- sub_fd_id = parent.fd_id;
-
- //预案的类型
- var SUB_BM_YAXHLB= "";
- SUB_BM_YAXHLB = parent.BM_YAXHLB;
-
- var type = SUB_BM_YAXHLB + "5_2";//拼短信通知的类型
-
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
-
- /*****************************************测试返回数据*************************************************/
- //单位ID
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- var loadData;
- function getOrgInfo() {
- var roleCons = roleButtonArr();
- var toolBarOpt2 = {
- items:[
- {text: '查看', click: "onView", iconClass: 'view_tem',id:"10003"},
- {text: '确定', click: "addTeamInfo",id:"10208"}
- ],
- roleCons:roleCons
- };
-
- /*********************************************工具条******************************************/
- var grid_option1 = {
- columns: [
- {display : '姓名',name : 'name',align : 'center',width : '20%'},
- //{display : '一级响应',level1 : 'level1',align : 'center',width : '16%'},
- { display: '一级响应',level1 : 'level1', isAllowHide: false, align: 'center', width:'16%',
- render: function (rowdata, rowindex, value, column){
- var fabu='';
- if(rowdata.level1=="1"){//"1"代表被选中的
- fabu = '<span id="1" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
- }else{
- fabu = '<span id="1" class="getUserInfo2 hand" title="取消" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level1+'\')"></span>';
- }
- return fabu;
- },
- },
- { display: '二级响应',level2 : 'level2', isAllowHide: false, align: 'center', width:'16%',
- render: function (rowdata, rowindex, value, column){
- var fabu='';
- if(rowdata.level2=="1"){
- fabu = '<span id="2" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
- }else{
- fabu = '<span id="2" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level2+'\')"></span>';
- }
- return fabu;
- },
- },
- { display: '三级响应',level3 : 'level3', isAllowHide: false, align: 'center', width:'16%',
- render: function (rowdata, rowindex, value, column){
- var fabu='';
- if(rowdata.level3=="1"){
- fabu = '<span id="3" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
- }else{
- fabu = '<span id="3" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level3+'\')"></span>';
- }
- return fabu;
- },
- },
- { display: '四级响应',level4 : 'level4', isAllowHide: false, align: 'center', width:'16%',
- render: function (rowdata, rowindex, value, column){
- var fabu='';
- if(rowdata.level4=="1"){
- fabu = '<span id="4" class="getUserInfo1 hand" title="取消" onclick="fabu(' + rowindex + ',this,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
- }else{
- fabu = '<span id="4" class="getUserInfo2 hand" title="选中" onclick="fabu(' + rowindex + ',this ,\''+rowdata.fd_objectid+'\',\''+rowdata.level4+'\')"></span>';
- }
- return fabu;
- },
- }
- ],
-
- rownumbers : true,
- checkbox : true,
- pageSize : 10,
- percentWidthMode : true,
- isChecked:checkedHandler,
- onCheckRow: checkRowHandler,
- onCheckAllRow: checkAllRowHandler
- };
- var options1={
- url :$.pathname()+ "/ws/planService/PlanService/queryDxtzyjzz",
- params:{
- fdId : sub_fd_id,
- msgType:"2",
- deptId:deptId,
- },
- gridOptions:grid_option1,
- singleRecodeOptions:{a:"aa"},
- paperOpration:{showInput:"true"},
- toolBarOptions:toolBarOpt2
- };
- org=gridAndSingleRecode=$("#conditions").quickgridAndSingleRecode(options1);
- }
-
-
- //预案ID.
- //人ID.
- //预警还是响应.
- //1234.
- //0 1
- //123组织、队伍、专家
- //地址changeDxtzyjzz
- function fabu(rowindex,event,userid,is_del){
- var id = $(event).attr("id");//取1234个等级
- var url = $.pathname() + '/ws/planService/PlanService/changeDxtzyjzz/';
- if(is_del=="1"){
- is_del="0";
- }else{
- is_del="1";
- }
- var params = {
- gtype : "2",
- fdId:sub_fd_id,
- msgType:"1",
- msgOpter:userid,
- clum:id,
- clv:is_del,
-
- };
-
- alert("is_del:" + is_del);
-
- $.ajax({
- url : url,
- type : 'post',
- timeout : 60000,
- data : params,
- dataType : 'json',
- success : function(data){
- if(data=="1"){
- var classValue = $(event).attr("class");
- if(classValue=="getUserInfo2 hand"){
- $(event).removeClass("getUserInfo2 hand");
- $(event).addClass("getUserInfo1 hand");
- }else{
- $(event).removeClass("getUserInfo1 hand");
- $(event).addClass("getUserInfo2 hand");
- }
-
- }
- },
- error : function(e){
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- };
-
- // var id = $(event).attr("id");//取1234个等级
- // var classValue = $(event).attr("class");
- // org.setOptions({data:result});
- // org.rend();
- //}
-
-
- function fabu1(rowindex,event,userid,username,userphone){
- var id = $(event).attr("id");
- alert(id);
- var classValue = $(event).attr("class");
- if(classValue=="fashang_06 hand"){
- $(event).removeClass("fashang_06 hand");
- $(event).addClass("fashang_07 hand");
- if(id==1){
- fristid +=userid + "*";
- frist += username + "*" + userphone + "*" + userid +"*" + "|";
- }else if(id==2){
- secondid +=userid + "*";
- second += username + "*" + userphone + "*"+ userid +"*" + "|";
- }else if(id==3){
- thirdid +=userid + "*";
- third += username + "*" + userphone + "*"+ userid +"*" + "|";
- }else if(id==4){
- forthid +=userid + "*";
- forth += username + "*" + userphone + "*"+ userid +"*" + "|";
- }
- }else{
- $(event).removeClass("fashang_07 hand");
- $(event).addClass("fashang_06 hand");
- if(id==1){
- fristid=fristid.replace(userid +"*",'');
- frist=frist.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
- }else if(id==2){
- secondid=fristid.replace(userid +"*",'');
- second=second.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
- }else if(id==3){
- thirdid=fristid.replace(userid +"*",'');
- third=third.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
- }else if(id==4){
- forthid=fristid.replace(userid +"*",'');
- forth=forth.replace(username + "*" + userphone+ "*"+ userid +"*" + "|",'');
- }
- }
- }
-
- /*****************************************短信通知人员列表*********************************************/
-
- $.messager=top.Dialog;
- $(window).resize(function(){
- $(parent.document.body).find("#frmright").css("height","600px");
- });
|