You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
484 lines
14 KiB
484 lines
14 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="org.wdk.WDKConstant"%>
|
|
<%@ page import="org.wdk.WDKCore"%>
|
|
<%@ page import="org.wdk.WDK"%>
|
|
<%@ page import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
|
|
<%
|
|
String path = request.getContextPath();
|
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
|
SessionUser su = (SessionUser)WDK.getSessionUser(request, response);
|
|
WDK.writeSessionUser(out, su);
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
|
|
<title>用户管理</title>
|
|
<base href="<%=basePath%>" target="_self">
|
|
|
|
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
var _account_id = $.getSessionUser().account_id;
|
|
//grid相关
|
|
var _gridcode = "platform.uum.uum_account_grid";
|
|
var _gridid = $.getUUID();
|
|
//初始化
|
|
$(function(){
|
|
//账号状态
|
|
$.radio({
|
|
id : 'user_status_scode',
|
|
initvalue:'1',
|
|
spacing : 2,
|
|
data : [ {
|
|
id : '1',
|
|
text : '正常'
|
|
}, {
|
|
id : '0',
|
|
text : '停用'
|
|
} ],
|
|
onChange : function(data) {
|
|
btn_query();
|
|
}
|
|
});
|
|
|
|
//组织参数
|
|
var dataJson = {
|
|
op_acc: $.getSessionUser().account_id
|
|
,parent_uuid: '-1'
|
|
,org_id: $.getSessionUser().companyuuid
|
|
,level:1
|
|
,include_self : 1
|
|
,result_fields:'org_uuid,org_code,org_name,parent_uuid'
|
|
,order_expr:'display_order'
|
|
};
|
|
//方法名
|
|
var queryMethod="queryAccountOrgListByParentID";
|
|
//组织请求数据集
|
|
var dataParam = {
|
|
_SRVNAME: 'service.usr.org',
|
|
_SRVMETHOD: queryMethod,
|
|
_DATA: $.json2str(dataJson),
|
|
_RSFIELD: 'resultset',//TODO:待确认
|
|
_RSTYPE: 'tree',
|
|
_RSPARAM: $.json2str({
|
|
idField: 'org_uuid'
|
|
,textField: 'org_name'
|
|
,parentField: 'parent_uuid'
|
|
,asyn:'1' //是否是异步 0:同步;1:异步
|
|
,asyn_urlField:'parent_uuid'
|
|
,asyn_dataField:'parent_uuid' //如果是异步,则从url中取出的参数替换_DATA参数的名
|
|
})
|
|
};
|
|
$.inputpop({
|
|
id:'org_uuid',
|
|
type:'tree',
|
|
title:'组织机构',
|
|
width:320,
|
|
height:480,
|
|
editable:false,
|
|
required:false,
|
|
checkbox:false,
|
|
asyn:true,
|
|
parentField:'parent_uuid',
|
|
initid: $.getSessionUser().companyuuid,
|
|
inittext:$.getSessionUser().companyname,
|
|
initvalue:$.getSessionUser().companyuuid,
|
|
dataurl:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
|
queryParams:dataParam,
|
|
onBeforeOpen:'',
|
|
callback:function(jparam){
|
|
$.inputpop_setValue ({
|
|
id:'org_uuid',
|
|
value_id:jparam.value_id,
|
|
value_text:jparam.value_text,
|
|
value_value:jparam.value_text
|
|
});
|
|
|
|
//获取父id 只返回第一个结果集数据
|
|
//var pid = jparam.value_rows[0].pid;
|
|
}
|
|
});
|
|
|
|
//初始化grid
|
|
var dataParam = getGridQueryParam();
|
|
$.grid({
|
|
id : _gridid,
|
|
containerid : 'layout_grid',
|
|
gridcode : _gridcode,
|
|
checkbox : false,
|
|
checkOnSelect : false,
|
|
selectOnCheck : false,
|
|
idField:"account_uuid",
|
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
|
queryParams:dataParam,
|
|
fitColumns:true, //是否自动填充满
|
|
nowrap:false, //自动换行
|
|
pagination:true,
|
|
showContextMenu:false,
|
|
formatter: {
|
|
command:'formatter_command',
|
|
is_lock: 'formatter_is_lock',
|
|
name: 'formatter_name'
|
|
}
|
|
,onLoaded:function(){
|
|
$.wait_close();
|
|
}
|
|
});
|
|
|
|
//注册按钮事件
|
|
$("#btn_add").on("click", function(){
|
|
$.openWin({
|
|
id:$.getUUID()
|
|
,title:'账户管理-新增账户'
|
|
,height:400
|
|
,width:700
|
|
,url:'platform/uum/uum_account_add.jsp'
|
|
,queryParams:{
|
|
actionflag:'add'
|
|
}
|
|
,onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
});
|
|
|
|
$("input[name='user_type_full']").change(function() {
|
|
btn_query();
|
|
});
|
|
});
|
|
|
|
function removeBlank(e) {
|
|
if(e.keyCode == 32){
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
|
|
//format 操作
|
|
function formatter_command(value,row,index) {
|
|
var str = '<i tilte="修改" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" onclick="btn_modify(\''+ row.account_uuid +'\')"></i>';
|
|
str += '<i tilte="删除" class="fa fa-trash-o grid-oper-icon" aria-hidden="true" onclick="btn_delete(\''+ row.account_uuid +'\')"></i>';
|
|
return str;
|
|
}
|
|
|
|
function formatter_is_lock(value,row,index) {
|
|
return row.is_lock == "0" ? "否" : "是";
|
|
}
|
|
|
|
function formatter_name(value,row,index) {
|
|
return (row.person_name && row.person_name != "")?row.person_name:row.nickname;
|
|
}
|
|
|
|
|
|
//获取grid查询参数
|
|
function getGridQueryParam(){
|
|
var account_name = $('#account_name').val();
|
|
var dataParam = {
|
|
_SRVNAME:'service.usr.account'
|
|
,_SRVMETHOD:'pagequeryAccList'
|
|
,_DATA:$.json2str({
|
|
op_account_uuid:_account_id
|
|
,account_info: {
|
|
account_name:account_name
|
|
,depart_uuid:$.inputpop_getValue({id:'org_uuid'})
|
|
,user_status_scode:$("input[name='user_status_scode']:checked").val()
|
|
}
|
|
,resultfields:''
|
|
,order_fields:'display_order'
|
|
})
|
|
,_RSTYPE:'grid'
|
|
,_RSFIELD:'account_info'
|
|
,_RSPARAM:$.json2str({pagequery:'1'})
|
|
};
|
|
return dataParam;
|
|
}
|
|
|
|
//查询
|
|
function btn_query(){
|
|
//组织参数
|
|
var dataParam = getGridQueryParam();
|
|
$.grid_reload({
|
|
id:_gridid,
|
|
queryParams:dataParam
|
|
});
|
|
}
|
|
|
|
//修改 btn_modify Button
|
|
function btn_modify(account_uuid){
|
|
$.openWin({
|
|
id:$.getUUID()
|
|
,title:'账户管理-修改账户'
|
|
,height:400
|
|
,width:700
|
|
,url:'platform/uum/uum_account_add.jsp'
|
|
,queryParams:{
|
|
actionflag:'update'
|
|
,account_uuid:account_uuid
|
|
}
|
|
,onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
//删除
|
|
function btn_delete(account_uuid) {
|
|
confirmDialog("是否确认删除!",function(){
|
|
//打开旋转
|
|
$.wait_open();
|
|
|
|
//组织参数
|
|
var dataParam = {
|
|
_SRVNAME:'service.usr.account'
|
|
,_SRVMETHOD:'delete'
|
|
,_DATA:$.json2str({
|
|
op_account_uuid:$.getSessionUser().account_id
|
|
,account_uuid:account_uuid
|
|
})
|
|
};
|
|
|
|
//加载数据
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
|
|
,method:"post"
|
|
,timeout:WDK_Timeout
|
|
,data:dataParam
|
|
,success:function(result) {
|
|
//关闭旋转
|
|
$.wait_close();
|
|
var jres = $.str2json(result);
|
|
if (jres.code == "1") { //操作成功
|
|
alert(jres.desc);
|
|
//删除后重新请求
|
|
btn_query();
|
|
}else{
|
|
alert(jres.desc);
|
|
}
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
},function(){});
|
|
}
|
|
|
|
|
|
//停用 btn_disable Button
|
|
function btn_disable(){
|
|
var row = $.grid_getSelected({
|
|
id : _gridid
|
|
});
|
|
if (!row.account_uuid) {
|
|
alert('请选择一条账号记录!');
|
|
return;
|
|
}
|
|
$.openWin({
|
|
id:$.getUUID(),
|
|
title:'账户管理-账户停用',
|
|
height:400,
|
|
width:700,
|
|
url:'platform/uum/uum_account_reset.jsp',
|
|
queryParams:{
|
|
actionflag:'disable'
|
|
,account_uuid:row.account_uuid
|
|
},
|
|
onClose:function(jparam){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
//启用 btn_enable Button
|
|
function btn_enable(){
|
|
var row = $.grid_getSelected({
|
|
id : _gridid
|
|
});
|
|
if (!row.account_uuid) {
|
|
alert('请选择一条账号记录!');
|
|
return;
|
|
}
|
|
$.openWin({
|
|
id:$.getUUID(),
|
|
title:'账户管理-账户启用',
|
|
height:400,
|
|
width:700,
|
|
url:'platform/uum/uum_account_reset.jsp',
|
|
queryParams:{
|
|
actionflag:'active'
|
|
,account_uuid:row.account_uuid
|
|
},
|
|
onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
//密码重置 btn_reset Button
|
|
function btn_reset(){
|
|
var row = $.grid_getSelected({
|
|
id : _gridid
|
|
});
|
|
if (!row.account_uuid) {
|
|
alert('请选择一条账号记录!');
|
|
return;
|
|
}
|
|
$.openWin({
|
|
id:$.getUUID(),
|
|
title:'账户管理-密码重置',
|
|
height:400,
|
|
width:700,
|
|
url:'platform/uum/uum_account_reset.jsp',
|
|
queryParams:{
|
|
actionflag:'resetpwd'
|
|
,account_uuid:row.account_uuid
|
|
},
|
|
onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
//解锁 btn_unlock Button
|
|
function btn_unlock(){
|
|
var row = $.grid_getSelected({
|
|
id : _gridid
|
|
});
|
|
if (!row.account_uuid) {
|
|
alert('请选择一条账号记录!');
|
|
return;
|
|
}
|
|
$.openWin({
|
|
id:$.getUUID(),
|
|
title:'账户管理-用户解锁',
|
|
height:400,
|
|
width:700,
|
|
url:'platform/uum/uum_account_reset.jsp',
|
|
queryParams:{
|
|
actionflag:'unlock'
|
|
,account_uuid:row.account_uuid
|
|
},
|
|
onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
//应用授权 btn_acc2app Button
|
|
function btn_acc2app(){
|
|
var row = $.grid_getSelected({
|
|
id : _gridid
|
|
});
|
|
if (!row.account_uuid) {
|
|
alert('请选择一条账号记录!');
|
|
return;
|
|
}
|
|
$.openWin({
|
|
id:$.getUUID(),
|
|
title:'账户管理-应用授权',
|
|
height:490,
|
|
width:600,
|
|
url:'platform/uum/uum_account_func.jsp',
|
|
queryParams:{
|
|
account_uuid:row.account_uuid
|
|
},
|
|
onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
//关联人员 btn_acc2user Button
|
|
function btn_acc2user(account_uuid,login_name){
|
|
$.openWin({
|
|
id:$.getUUID(),
|
|
title:'账户管理-关联人员',
|
|
height:300,
|
|
width:500,
|
|
url:'platform/uum/uum_account_user.jsp',
|
|
queryParams:{
|
|
account_uuid:account_uuid
|
|
,login_name:login_name
|
|
},
|
|
onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
//关联角色 btn_acc2role Button
|
|
function btn_acc2role(account_uuid,depart_uuid){
|
|
$.openWin({
|
|
id:$.getUUID(),
|
|
title:'用户关联角色',
|
|
height:400,
|
|
width:600,
|
|
url:'platform/uum/uum_account_role.jsp',
|
|
queryParams:{
|
|
account_uuid:account_uuid
|
|
,depart_uuid:depart_uuid
|
|
},
|
|
onClose:function(){
|
|
btn_query();
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="overflow:hidden">
|
|
<div class="page-toolbar" style="padding-bottom: 5px;">
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" id="btn_add" >新增</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-arrow'" onclick="btn_disable()">停用</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-arrow'" onclick="btn_enable()" >启用</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-arrow'" onclick="btn_reset()">密码重置</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-arrow'" onclick="btn_unlock()">解锁</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-arrow'" onclick="btn_acc2app()">应用授权</a>
|
|
</div>
|
|
</div>
|
|
<div data-options="region:'center',border:false,collapsed:false" >
|
|
<div class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="row-1" style="padding:0 10px;overflow:hidden;" >
|
|
<form id="search_form" >
|
|
<div class="h_layout">
|
|
<div>
|
|
<div class="inputgroup" >
|
|
<label>组织结构</label>
|
|
<div style="line-height: 22px;">
|
|
<input id="org_uuid" name="org_uuid"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup">
|
|
<label>关键字</label>
|
|
<div>
|
|
<input class="easyui-validatebox" id="account_name" name="account_name" placeholder="输入登录账号、姓名、手机号、邮箱"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup" >
|
|
<label>状态</label>
|
|
<div>
|
|
<input id="user_status_scode" name="user_status_scode" title=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width:125px;">
|
|
<a class="eapbutton" style="float:right;" onclick="btn_query()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|