| | |
| | | //获取所有模块页面 |
| | | [Route("Web/ModePageList")] |
| | | [HttpGet] |
| | | public object ModePageList() |
| | | public object ModePageList(string HMakeName, string HType) |
| | | { |
| | | try |
| | | { |
| | | |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where isnull(Hurl,'') like'%html%' Order by HItemID ", "Gy_Menu"); //获取Gy_Menu_1中的所有菜单信息,用于为menuInitList列表充 |
| | | |
| | | |
| | | string sql = "select * from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' and HType = '" + HType + "' and isnull(Hurl,'') like'%html%' order by HPosition"; |
| | | ds = oCn.RunProcReturn(sql, "Gy_MenuDefineSet"); //查询当前用户的自定义菜单数据 |
| | | if (ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0) //判断当前用户是否有设置过自定义信息,若记录数为0,则没有设置过,加载所有的菜单信息 |
| | | { |
| | | string sql1 = "select * from Gy_MenuDefineSet where HMakeName=" + |
| | | "(select top 1 c.GroupName from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId " + |
| | | "left join System_UserGroup c on b.GroupId = c.GroupID where a.Czymc ='" + HMakeName + "' order by len(c.GroupName )) and isnull(Hurl,'') like'%html%'"; |
| | | ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //查询用户绑定的角色 是否设置菜单信息 取角色名称最短的一个 |
| | | if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) |
| | | { |
| | | sql = "Select * from h_v_Gy_Menu_1 Order by HPosition,len(HitemID),HitemID "; |
| | | ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where isnull(Hurl,'') like'%html%' Order by HItemID ", "Gy_Menu_1"); //获取Gy_Menu_1中的所有菜单信息,用于为menuInitList列表充 |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "查询成功!"; |
| | | objJsonResult.data = ds; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |