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

.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

技术分享

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。