{
 "hidden": false,
 "children": [{
  "configs": {
   "serverScript": "var sql, data = app.get();\
\
sql = 'SELECT USER_ID, USER_NAME, DISPLAY_NAME, STATUS, CREATE_DATE, LOGIN_TIMES, EMAIL, USE_LANG, LAST_LOGIN, TENANCY_ID, IS_SUPERUSER, WORK_GROUP, DEPT_ID, POST, GROUPS, MACH, LOGIN_TIME, GCLASS, EMAILPWD, EMAILSERVICE, FROMEMAIL, FROMEMAILNAME, SUPER_FLAG, created_by, created_on, updated_by, updated_on, open_id, ic_card, iphone '+\
 ' from WB_USER where dept_id = {?deptId?}';\
if (!Wb.isEmpty(data.findCombo)) {\
  sql += ' and USER_NAME ={?findCombo?}';\
} else if (data.selRoleGrid) {\
  //按角色进行搜索用户\
  var paramName, i = 0,\
    roleParams = [],  \
    roles = Wb.decode(data.selRoleGrid);\
  if (roles.length) {\
    Wb.each(roles, function(role) {\
      paramName = 'role' + (i++);\
      request.setAttribute(paramName, role.ROLE_ID);\
      roleParams.push('{?' + paramName + '?}');\
    });\
    sql += ' and USER_ID in (select distinct USER_ID from WB_USER_ROLE where ROLE_ID in (' + roleParams + '))';\
  }\
}\
request.setAttribute('sql', sql);",
   "itemId": "module"
  },
  "expanded": true,
  "children": [{
   "configs": {
    "itemId": "dataprovider1",
    "dictTableNames": "WB_USER",
    "sql": "{#sql#} {#sql.orderBy#}"
   },
   "expanded": false,
   "children": [],
   "type": "dataprovider"
  }],
  "type": "module"
 }],
 "roles": {"demo": 1},
 "title": "查询",
 "iconCls": "",
 "inframe": false,
 "pageLink": ""
}