procdefiChoosePeopleTab.js 4.56 KB
Newer Older
陈玉兰 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
/**
 * 序号:1
 * 功能:定义分页(EasyUI)
 * 参数:
 * 说明:
 * 作者:高伟杰
 * 时间:2016-01-22
 * 单位:宁波金网
 * 备注:无需更改
 **/
var ls_width = $(window).width();
var ls_height = $(window).height();

var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;

//重置分页参数
function resetQueryData(){
	queryData = "";
	queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}

//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务) 
var ls_ywlx = 'YBYW';

//定义grid列表
var ls_title="选择人员";
var is_column = [ [
				{field : 'LINK_NAME',title : '环节名',width : 300,align : 'center'},
				{field : 'PROC_DEFIN_KEY',title : 'PROC_DEFIN_KEY',width : 300,align : 'center'}
				] ];
//列表加载完成回调
function dataOnLoadSuccess(){
	
}
//设置颜色和每行高度
function rowstyler(index,row){
	
}

$(function(){
	var DEPLOYMENT_ID = $.getUrlParam("DEPLOYMENT_ID");
	//展示列表
	datagrid("list", ls_title, gaowj.WEB_APP_NAME + "/procdefinitionData_getLinksList?DEPLOYMENT_ID="+DEPLOYMENT_ID, queryData, is_column, 60, 80);
})


/****/

/**
 * 序号:4
 * 功能:设置主页面操作列菜单
 * 参数:
 * 说明:
 * 作者:高伟杰
 * 时间:2016-01-22
 * 单位:宁波金网
 * 备注:需更改
 **/
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
	var returnData="";
	return  returnData
	      + "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>"
	      + "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>";
}

//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
陈玉兰 committed
75 76 77
	var returnData= "<span class=\"icon-ext-02_22\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"memberRow('"
		+ index + "')\">人员</a> |<span class=\"icon-ext-09_20\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"departmentRow('"
		+ index + "')\">部门</a>  ";
陈玉兰 committed
78 79 80 81 82
	return returnData;
}

//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
陈玉兰 committed
83
	var is_menu_count = 2;
陈玉兰 committed
84 85 86 87 88 89 90 91
	return is_menu_count;
}

function memberRow(index){
	$('#list').datagrid('selectRow',index);
	var is_row = $('#list').datagrid('getSelections');
	$('#list').datagrid('clearSelections');
	is_row[0].OPETYPE = 'insert';
陈玉兰 committed
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
	$('#people').dialog( {
		title : '选择人员',
		iconCls : $.getJwWindowPic(),
		width : ls_width *  0.65,
		height :ls_height * 0.95,
		closed : false,
		cache : false,
		maximizable:true,
		left:0,
		top:0,
		content : '<iframe scrolling="yes" id="choosePeopleIframe" frameborder="0"  src="procdefinitionView_peopleTab?procdef_linkId='+is_row[0].UUID+'" style="width:100%;height:98%;"></iframe><span id="return_text"></span>',
		queryParams:is_row[0],
		modal : true,
		buttons : [{
			text : '保存',
			iconCls : 'icon-save',
			handler : function() {
				document.getElementById("choosePeopleIframe").contentWindow.savePeople(is_row[0].UUID);
				$('#people').dialog('close');
			}
		} ,{
			text : '关闭',
			iconCls : 'icon-back',
			handler : function() {
				$('#people').dialog('close');
			}
		} ],
		onClose: function () {
			closeCallback(is_row);
		}
	});
陈玉兰 committed
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
}

function departmentRow(index){
	//systemdata_listSysRole
	$('#list').datagrid('selectRow',index);
	var is_row = $('#list').datagrid('getSelections');
	$('#list').datagrid('clearSelections');
	is_row[0].OPETYPE = 'insert';
	$('#people').dialog( {
		title : '选择人员',
		iconCls : $.getJwWindowPic(),
		width : ls_width *  0.65,
		height :ls_height * 0.95,
		closed : false,
		cache : false,
		maximizable:true,
		left:0,
		top:0,
		content : '<iframe scrolling="yes" id="chooseDepartmentIframe" frameborder="0"  src="procdefinitionView_departmentTab?procdef_linkId='+is_row[0].UUID+'" style="width:100%;height:98%;"></iframe><span id="return_text"></span>',
		queryParams:is_row[0],
		modal : true,
		buttons : [{
			text : '保存',
			iconCls : 'icon-save',
			handler : function() {
				document.getElementById("chooseDepartmentIframe").contentWindow.saveDepartment(is_row[0].UUID);
				$('#people').dialog('close');
			}
		} ,{
			text : '关闭',
			iconCls : 'icon-back',
			handler : function() {
				$('#people').dialog('close');
			}
		} ],
		onClose: function () {
			closeCallback(is_row);
		}
	});
	
	
陈玉兰 committed
164
}