码迷,mamicode.com
首页 > Web开发 > 详细

.net通用权限框架B/S (五)--WEB(3)组织机构

时间:2015-04-20 14:43:08      阅读:285      评论:0      收藏:0      [点我收藏+]

标签:

.net通用权限框架B/S

首先我们看导航菜单中,对组织机构的设置

我们设置了组织机构名称,链接(对应的mvc控制器名/orga),图标是个小钥匙,菜单的操作权限设置的是"添加,编辑,删除"三个

当一个用户登录系统,根据这个用户对应的角色,他可能有三个权限,也可能只有编辑权限;当然他也可能根本看不到"组织机构"这个导航菜单

用户登录先判断导航菜单权限,有就显示,用户单击导航菜单,再判断他的操作权限.如添加,删除

 

技术分享

组织机构首页:如下图,整个看是列表使用easuyui的 treegrid ,所以可以看到可以折叠的树形状表格,截图能看到添加,编辑,删除,说明登录用户拥有的角色对该页面有这三个权限

treegrid对应json格式是这样的

技术分享
{
    "totale": "9",
    "rows": [
        {
            "id": "1",
            "orgaid": "10",
            "organame": "总部",
            "parentid": "0",
            "sort": "1",
            "manager": "a",
            "remark": "",
            "delflag": "",
            "createon": "",
            "createby": "",
            "modifyon": "",
            "modifyby": "",
            "children": [
                {
                    "id": "2",
                    "orgaid": "1010",
                    "organame": "济南分部",
                    "parentid": "1",
                    "sort": "1",
                    "manager": "",
                    "remark": "",
                    "delflag": "False",
                    "createon": "2015/2/9 16:23:14",
                    "createby": "",
                    "modifyon": "2015/2/9 16:23:14",
                    "modifyby": "",
                    "children": [
                        {
                            "id": "5",
                            "orgaid": "101010",
                            "organame": "财务部",
                            "parentid": "2",
                            "sort": "0",
                            "manager": "1",
                            "remark": "1",
                            "delflag": "",
                            "createon": "",
                            "createby": "",
                            "modifyon": "",
                            "modifyby": "",
                            "children": []
                        },
                        {
                            "id": "6",
                            "orgaid": "101011",
                            "organame": "市场部",
                            "parentid": "2",
                            "sort": "1",
                            "manager": "",
                            "remark": "",
                            "delflag": "False",
                            "createon": "2015/2/9 16:23:14",
                            "createby": "",
                            "modifyon": "2015/2/9 16:23:14",
                            "modifyby": "",
                            "children": []
                        }
                    ]
                },
                {
                    "id": "3",
                    "orgaid": "1011",
                    "organame": "广州分部",
                    "parentid": "1",
                    "sort": "1",
                    "manager": "",
                    "remark": "",
                    "delflag": "False",
                    "createon": "2015/2/9 16:23:14",
                    "createby": "",
                    "modifyon": "2015/2/9 16:23:14",
                    "modifyby": "",
                    "children": [
                        {
                            "id": "9",
                            "orgaid": "11",
                            "organame": "信息部",
                            "parentid": "3",
                            "sort": "1",
                            "manager": "王刚",
                            "remark": "2222",
                            "delflag": "",
                            "createon": "",
                            "createby": "",
                            "modifyon": "",
                            "modifyby": "",
                            "children": []
                        }
                    ]
                },
                {
                    "id": "4",
                    "orgaid": "1012",
                    "organame": "合肥分部",
                    "parentid": "1",
                    "sort": "1",
                    "manager": "1",
                    "remark": "",
                    "delflag": "",
                    "createon": "",
                    "createby": "",
                    "modifyon": "",
                    "modifyby": "",
                    "children": [
                        {
                            "id": "8",
                            "orgaid": "1",
                            "organame": "营销部",
                            "parentid": "4",
                            "sort": "0",
                            "manager": "",
                            "remark": "啊啊111",
                            "delflag": "",
                            "createon": "",
                            "createby": "",
                            "modifyon": "",
                            "modifyby": "",
                            "children": []
                        }

                    ]
                }
            ]
        }
    ]
}
View Code

技术分享

 

.net通用权限框架B/S (五)--WEB(3)组织机构

标签:

原文地址:http://www.cnblogs.com/qilinliu/p/4441498.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!