123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- $(function(){
- $("#titlename").html(parent.titlename);
- //getRelevancyInfo(sub_fd_id,SUB_BM_YAXHLB);//初始化存入库表的值
- getOrgInfo2();//初始化应急组织列表
-
-
- });
-
-
- function goBack(){
- var url = "/nwyj/page/business/am/contingencyPlan/"+"ContingencyPlan.jsp";
- top.parent.document.getElementById("frmright").setAttribute("src", ""+encodeURI(url));
- }
- //取预案的主键
- var sub_fd_id ="";
- //取页面传过来的预案主键ID : 传过来的预案ID
- sub_fd_id = parent.fd_id;
-
- //预案的类型
- var SUB_BM_YAXHLB= "";
- SUB_BM_YAXHLB = parent.BM_YAXHLB;
-
- var tempValue="";
-
- /**************************拼接类型*************************************************/
- //判断细化类型
- /**
- * 细化类型
- * 4、人身事故
- * 5、大面积停电事件
- * 6、设备事故
- * 7、电厂大坝厂房事故
- * 8、环境污染
- * 9、防风防汛
- * 10、地震灾害
- * 11、低温雨雪冰冻灾害
- * 12、电力供应及客户服务
- * 13、生产场所防恐怖袭击
- * 14、突发性群体事件
- * 15、突发新闻事件
- * 16、涉外突发事件
- * 17、网络与信息安全
- * 18、突发公共卫生
- * **/
- if(SUB_BM_YAXHLB=="4"){
- tempValue="4_5_2";
- }else if(SUB_BM_YAXHLB=="5"){
- tempValue="5_5_2";
- }else if(SUB_BM_YAXHLB=="6"){
- tempValue="6_5_2";
- }else if(SUB_BM_YAXHLB=="7"){
- tempValue="7_5_2";
- }else if(SUB_BM_YAXHLB=="8"){
- tempValue="8_5_2";
- }else if(SUB_BM_YAXHLB=="9"){
- tempValue="9_5_2";
- }else if(SUB_BM_YAXHLB=="10"){
- tempValue="10_5_2";
- }else if(SUB_BM_YAXHLB=="11"){
- tempValue="11_5_2";
- }else if(SUB_BM_YAXHLB=="12"){
- tempValue="12_5_2";
- }else if(SUB_BM_YAXHLB=="13"){
- tempValue="13_5_2";
- }else if(SUB_BM_YAXHLB=="14"){
- tempValue="14_5_2";
- }else if(SUB_BM_YAXHLB=="15"){
- tempValue="15_5_2";
- }else if(SUB_BM_YAXHLB=="16"){
- tempValue="16_5_2";
- }else if(SUB_BM_YAXHLB=="17"){
- tempValue="17_5_2";
- }else if(SUB_BM_YAXHLB=="18"){
- tempValue="18_5_2";
- }else if(SUB_BM_YAXHLB=="21"){
- tempValue="21_5_2";
- }else if(SUB_BM_YAXHLB=="22"){
- tempValue="22_5_2";
- }else if(SUB_BM_YAXHLB=="23"){
- tempValue="23_5_2";
- }else if(SUB_BM_YAXHLB=="24"){
- tempValue="24_5_2";
- }
-
- 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 getOrgInfo2() {
- org = $("#maingritream").quiGrid({
- columns: [
- {display : '队伍名称',name : 'name',align : 'center',width : '20%'},
- { display: '一级响应',level1 : 'level1', isAllowHide: false, align: 'center', width:'20%',
- 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:'20%',
- 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:'20%',
- 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:'20%',
- 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;
- },
- }
- ],
- url :$.pathname()+ "/ws/planService/PlanService/queryTeam",
- params :{
- fdId : sub_fd_id,
- gtype:"2",
- deptId:deptId
- },
- // sortName : '',
- // sortOrder : '',
- rownumbers : true,
- checkbox : false,
- // height: '100%',
- // width:"100%",
- pageSize : 10,
- percentWidthMode : true,
- isChecked:checkedHandler,
- onCheckRow: checkRowHandler,
- onCheckAllRow: checkAllRowHandler,
- //顶部图标按钮栏
- toolbar:{
- items:[
- //{text: '查看', click: "onView", iconClass: 'view_tem',id:"10003"}
- //{text: '查看', click: onView, iconClass: 'view_tem'},
- { line : true }
- ]
- }
- });
-
-
- }
-
-
- //预案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/changeTeam/';
- if(is_del=="1"){
- is_del="0";
- }else{
- is_del="1";
- }
- var params = {
- gtype : "2",
- //gtype:tempValue,
- fdId:sub_fd_id,
- msgType:"2",//应急队伍
- msgOpter:userid,
- clum:id,
- clv: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');
- }
- });
- };
-
- $.messager=top.Dialog;
|