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.
248 lines
7.1 KiB
248 lines
7.1 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
|
|
<title>用户菜单查询-主页</title>
|
|
<script type="text/javascript">
|
|
var _gridcode = "platform.uum.user_menu_grid";
|
|
var _gridid = $.getUUID();
|
|
var _account_id = $.getSessionUser().account_id;
|
|
var _appuuid = $.getSessionUser().appuuid;
|
|
//获得数uuid
|
|
var class_uuid = null;
|
|
|
|
//初始化加载左侧的树
|
|
$(function(){
|
|
//查询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,
|
|
formatter: {
|
|
// command:'formatter_command',
|
|
is_lock: 'formatter_is_lock',
|
|
name: 'formatter_name'
|
|
}
|
|
,onLoaded:function(){
|
|
$.wait_close();
|
|
},
|
|
onClickRow:function(index,row){
|
|
debugger;
|
|
loadOrgTree(row.account_uuid);
|
|
}
|
|
});
|
|
//组织参数
|
|
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;
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
|
|
//状态
|
|
//format 是否
|
|
function is_seal_up_fremark(value,row,index) {
|
|
if("0"== value)
|
|
showValue ="启用";
|
|
if("1"== value)
|
|
showValue ="未启用";
|
|
return showValue;
|
|
}
|
|
|
|
function btn_query(){
|
|
//组织参数
|
|
var dataParam = getGridQueryParam();
|
|
$.grid_reload({
|
|
id:_gridid,
|
|
queryParams:dataParam
|
|
});
|
|
}
|
|
|
|
|
|
//获取grid查询参数
|
|
function getGridQueryParam(){
|
|
_user_type_full = '0';
|
|
_user_type_not = '0';
|
|
_user_type_yes = '1';
|
|
|
|
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'})
|
|
}
|
|
,resultfields:''
|
|
,orderfields:''
|
|
})
|
|
,_RSTYPE:'grid'
|
|
,_RSFIELD:'account_info'
|
|
,_RSPARAM:$.json2str({pagequery:'1'})
|
|
};
|
|
return dataParam;
|
|
}
|
|
|
|
|
|
//加载组织树
|
|
function loadOrgTree(id){
|
|
//组织参数
|
|
debugger;
|
|
var queryMethod="queryMenuTree"; //方法名
|
|
//组织请求数据集
|
|
var dataParam = {
|
|
_SRVNAME: 'service.usr.account',
|
|
_SRVMETHOD: queryMethod,
|
|
_DATA: $.json2str({
|
|
form : {
|
|
accountId : id
|
|
}
|
|
}),
|
|
_RSFIELD: 'result',
|
|
_RSTYPE: 'tree',
|
|
_RSPARAM: $.json2str({
|
|
idField: 'resource_uuid'
|
|
,textField: 'resource_name'
|
|
,parentField: 'parent_uuid'
|
|
,asyn:'0' //是否是异步 0:同步;1:异步
|
|
,asyn_dataField:'parent_uuid' //如果是异步,则从url中取出的参数替换_DATA参数的名
|
|
})
|
|
};
|
|
|
|
|
|
//加载树
|
|
$.tree({
|
|
id: 'listtree',
|
|
checkbox: false,
|
|
expandall:true,
|
|
cascadeCheck: true, //cascadeCheck:true,//层叠选中 lines:true,//显示虚线效果
|
|
asyn: false,
|
|
url: 'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
|
queryParams: dataParam
|
|
});
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
//刷新页面
|
|
function query() {
|
|
//组织参数
|
|
var dataParam = getDataParam();
|
|
$.grid_reload({
|
|
id:_gridid,
|
|
queryParams:dataParam
|
|
});
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body 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"/>
|
|
</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 data-options="region:'east',border:true,collapsed:false" style="width:450px;background:#fff;" >
|
|
<div id="listtree"></div>
|
|
</div>
|
|
<div data-options="region:'center',border:false,collapsed:false" >
|
|
<div class="easyui-layout" data-options="fit:true">
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|