/// <summary> /// 获取机构分页数据 /// </summary> /// <param name="Page"></param> /// <param name="Rows"></param> /// <returns></returns> public JsonResult OrganGridJson(int page = 1, int rows = 30, string typeId = null, string level = null, string organName = null, string parentId = null) { JsonResult result = new JsonResult(); if (Limits.Contains(1)) { GridPage <OrganGrid> jr = new GridPage <OrganGrid>(); var loginInfo = LoginFac.Admin.GetLoginInfo(); string pid = loginInfo.OrganId; var haveme = false; if (!string.IsNullOrEmpty(parentId) && loginInfo.OrganId.Split(',').Any(o => parentId.StartsWith(o))) { pid = parentId; } else { haveme = loginInfo.RoleId == CustomConfig.SuperRoleId; } var data = DbOp.GetPageList(page, rows, typeId, level, organName, pid, haveme); jr.rows = data.Items; jr.total = data.TotalItems; result.Data = jr; } return(result); }
public JsonResult OrganComboGridJson(int page = 1, int rows = 30, string typeId = null, string level = null, string organName = null) { GridPage <OrganGrid> jr = new GridPage <OrganGrid>(); var data = DbOp.GetPageList(page, rows, typeId, level, organName, LoginFac.Admin.GetLoginInfo().OrganId, true); jr.rows = data.Items; jr.total = data.TotalItems; return(Json(jr)); }