处理权限代码,以我们公司一个项目为例

Posted 权哥是神

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了处理权限代码,以我们公司一个项目为例相关的知识,希望对你有一定的参考价值。

public class PurviewPublic
{
#region 读取全部权限
public static List<PurviewInfo> QueryAllPurview()
{
List<PurviewInfo> lstPurview = new List<PurviewInfo>();

#region 菜单1-微信
lstPurview.Add(new PurviewInfo() { PurviewId = 1, PurviewName = "微信", PurviewLevel = 1, PurviewCss = "wx", PurviewParent = 0 });
lstPurview.Add(new PurviewInfo() { PurviewId = 101, PurviewName = "微信设置", PurviewLevel = 2, PurviewParent = 1 });
lstPurview.Add(new PurviewInfo() { PurviewId = 101010, PurviewName = "微信帐号接入", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxset.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101020, PurviewName = "APP授权设置", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxapp.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101030, PurviewName = "被关注&默认回复", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxmsg.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101040, PurviewName = "关键字文本回复", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxkeytext.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101050, PurviewName = "关键字图文回复", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxkeynews.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101060, PurviewName = "自定义菜单", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxmenu.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101070, PurviewName = "用户消息记录", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxusermsg.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101080, PurviewName = "图文素材管理", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxnews.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101090, PurviewName = "公司/门店LBS", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxlbs1.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 101100, PurviewName = "关键字LBS回复", PurviewLevel = 3, PurviewParent = 101, PurviewLink = "wx/wxkeylbs.aspx" });

lstPurview.Add(new PurviewInfo() { PurviewId = 102, PurviewName = "微网站设置", PurviewLevel = 2, PurviewParent = 1 });
lstPurview.Add(new PurviewInfo() { PurviewId = 102010, PurviewName = "产品分类", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxprotypelist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102020, PurviewName = "产品管理", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxprolist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102030, PurviewName = "首页回复设置", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxkeyindexset.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102040, PurviewName = "关键字首页回复", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxkeyindex.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102050, PurviewName = "首页内容设置", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxindexset.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102060, PurviewName = "产品中心导航", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxprocenternav.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102070, PurviewName = "产品中心首页", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxprocenterindex.aspx?id=1" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102080, PurviewName = "产品留言列表", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxusermessagelist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102090, PurviewName = "活动列表", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxevent.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102100, PurviewName = "拍照报修列表", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxfixlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 102110, PurviewName = "投诉建议列表", PurviewLevel = 3, PurviewParent = 102, PurviewLink = "wx/wxfeedlist.aspx" });
#endregion

#region 菜单2-订单
lstPurview.Add(new PurviewInfo() { PurviewId = 2, PurviewName = "订单", PurviewLevel = 1, PurviewCss = "order", PurviewParent = 0 });
//订单管理
lstPurview.Add(new PurviewInfo() { PurviewId = 201, PurviewName = "订单管理", PurviewLevel = 2, PurviewParent = 2 });
lstPurview.Add(new PurviewInfo() { PurviewId = 201010, PurviewName = "活动政策", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "policy_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 201020, PurviewName = "活动政策审批", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "policy_verifylist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 201030, PurviewName = "订单列表", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "order_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 201100, PurviewName = "订单转单列表", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "order_updatelist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 201040, PurviewName = "订单退单", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "back_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 201050, PurviewName = "退单店长审批", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "back_verify1list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 201060, PurviewName = "退单领导审批", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "back_verify2list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 201070, PurviewName = "退单财务审批", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "back_verify3list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 201080, PurviewName = "退单财务付款", PurviewLevel = 3, PurviewParent = 201, PurviewLink = "back_verify4list.aspx" });
//初测复测

lstPurview.Add(new PurviewInfo() { PurviewId = 202, PurviewName = "初测复测", PurviewLevel = 2, PurviewParent = 2 });
lstPurview.Add(new PurviewInfo() { PurviewId = 202010, PurviewName = "初测预约", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "appoint1_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 202020, PurviewName = "初测安排", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "plan1_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 202030, PurviewName = "初测测量", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "measure1_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 202040, PurviewName = "复测预约", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "appoint2_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 202050, PurviewName = "复测安排", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "plan2_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 202060, PurviewName = "复测测量", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "measure2_list.aspx" });


//lstPurview.Add(new PurviewInfo() { PurviewId = 202070, PurviewName = "初测预约", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "test1_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 202090, PurviewName = "初测测量", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "test1_mealist.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 202080, PurviewName = "复测预约", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "test2_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 202100, PurviewName = "复测测量", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "test2_mealist.aspx" });
//合同管理
lstPurview.Add(new PurviewInfo() { PurviewId = 203, PurviewName = "合同管理", PurviewLevel = 2, PurviewParent = 2 });
lstPurview.Add(new PurviewInfo() { PurviewId = 203010, PurviewName = "合同预约", PurviewLevel = 3, PurviewParent = 203, PurviewLink = "contract_appointlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 203020, PurviewName = "合同列表", PurviewLevel = 3, PurviewParent = 203, PurviewLink = "contract_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 203140, PurviewName = "合同更改单", PurviewLevel = 3, PurviewParent = 203, PurviewLink = "contract_updatelist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 203090, PurviewName = "合同退单", PurviewLevel = 3, PurviewParent = 203, PurviewLink = "cback_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 203100, PurviewName = "退单店长审批", PurviewLevel = 3, PurviewParent = 203, PurviewLink = "cback_verify1list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 203120, PurviewName = "退单领导审批", PurviewLevel = 3, PurviewParent = 203, PurviewLink = "cback_verify2list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 203130, PurviewName = "退单财务审批", PurviewLevel = 3, PurviewParent = 203, PurviewLink = "cback_verify3list.aspx" });
//合同审批
lstPurview.Add(new PurviewInfo() { PurviewId = 206, PurviewName = "合同审批", PurviewLevel = 2, PurviewParent = 2 });
lstPurview.Add(new PurviewInfo() { PurviewId = 206010, PurviewName = "纸质合同审批", PurviewLevel = 3, PurviewParent = 206, PurviewLink = "verify22_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 206020, PurviewName = "设计图纸上传", PurviewLevel = 3, PurviewParent = 206, PurviewLink = "upload1_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 206030, PurviewName = "图纸造诣上传", PurviewLevel = 3, PurviewParent = 206, PurviewLink = "verify11_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 206040, PurviewName = "合同专员确认", PurviewLevel = 3, PurviewParent = 206, PurviewLink = "verify12_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 204010, PurviewName = "合同工厂下单", PurviewLevel = 3, PurviewParent = 206, PurviewLink = "factory_appointlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 206050, PurviewName = "电子合同上传", PurviewLevel = 3, PurviewParent = 206, PurviewLink = "upload2_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 206060, PurviewName = "电子合同审批", PurviewLevel = 3, PurviewParent = 206, PurviewLink = "verify21_list.aspx" });
//售后安装
//lstPurview.Add(new PurviewInfo() { PurviewId = 204, PurviewName = "售后安装", PurviewLevel = 2, PurviewParent = 2 });

//lstPurview.Add(new PurviewInfo() { PurviewId = 204020, PurviewName = "合同到货登记", PurviewLevel = 3, PurviewParent = 204, PurviewLink = "get_prolist.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 204030, PurviewName = "合同安装预约", PurviewLevel = 3, PurviewParent = 204, PurviewLink = "get_appointlist.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 204050, PurviewName = "合同送货安装", PurviewLevel = 3, PurviewParent = 204, PurviewLink = "install_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 204060, PurviewName = "合同安装验收", PurviewLevel = 3, PurviewParent = 204, PurviewLink = "check_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 204070, PurviewName = "合同客户回访", PurviewLevel = 3, PurviewParent = 204, PurviewLink = "call_list.aspx" });
//扩展功能
lstPurview.Add(new PurviewInfo() { PurviewId = 208, PurviewName = "扩展功能", PurviewLevel = 2, PurviewParent = 2 });
lstPurview.Add(new PurviewInfo() { PurviewId = 208010, PurviewName = "总务单管理", PurviewLevel = 3, PurviewParent = 208, PurviewLink = "general_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 208020, PurviewName = "订单属性修正", PurviewLevel = 3, PurviewParent = 208, PurviewLink = "order_allow.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 208030, PurviewName = "合同属性修正", PurviewLevel = 3, PurviewParent = 208, PurviewLink = "contract_allow.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 208040, PurviewName = "合同编号修正", PurviewLevel = 3, PurviewParent = 208, PurviewLink = "contract_snupdate.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 208050, PurviewName = "修改申请单", PurviewLevel = 3, PurviewParent = 208, PurviewLink = "update_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 208060, PurviewName = "修改申请审批", PurviewLevel = 3, PurviewParent = 208, PurviewLink = "update_verifylist.aspx" });

//其它订单合同
lstPurview.Add(new PurviewInfo() { PurviewId = 209, PurviewName = "订单/合同查阅", PurviewLevel = 2, PurviewParent = 2 });

//lstPurview.Add(new PurviewInfo() { PurviewId = 202110, PurviewName = "设计师订单", PurviewLevel = 3, PurviewParent = 202, PurviewLink = "order_designerlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 209020, PurviewName = "设计师合同", PurviewLevel = 3, PurviewParent = 209, PurviewLink = "contract_designerlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 209030, PurviewName = "家装渠道订单", PurviewLevel = 3, PurviewParent = 209, PurviewLink = "order_channel1list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 209040, PurviewName = "家装渠道合同", PurviewLevel = 3, PurviewParent = 209, PurviewLink = "contract_channel1list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 209050, PurviewName = "小区渠道订单", PurviewLevel = 3, PurviewParent = 209, PurviewLink = "order_channel2list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 209060, PurviewName = "小区渠道合同", PurviewLevel = 3, PurviewParent = 209, PurviewLink = "contract_channel2list.aspx" });


#endregion

#region 菜单3-客户
lstPurview.Add(new PurviewInfo() { PurviewId = 3, PurviewName = "客户", PurviewLevel = 1, PurviewCss = "customer", PurviewParent = 0 });
lstPurview.Add(new PurviewInfo() { PurviewId = 301040, PurviewName = "客户报备", PurviewLevel = 3, PurviewParent = 3, PurviewLink = "report_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 301010, PurviewName = "订单客户", PurviewLevel = 3, PurviewParent = 3, PurviewLink = "client_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 301020, PurviewName = "客户资源", PurviewLevel = 3, PurviewParent = 3, PurviewLink = "resource_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 301030, PurviewName = "黑名单客户", PurviewLevel = 3, PurviewParent = 3, PurviewLink = "blacklist_list.aspx" });
#endregion

#region 菜单4-资金
lstPurview.Add(new PurviewInfo() { PurviewId = 4, PurviewName = "资金", PurviewLevel = 1, PurviewCss = "pay" });
lstPurview.Add(new PurviewInfo() { PurviewId = 401, PurviewName = "资金流水", PurviewLevel = 2, PurviewParent = 4 });
lstPurview.Add(new PurviewInfo() { PurviewId = 401010, PurviewName = "收款单", PurviewLevel = 3, PurviewParent = 401, PurviewLink = "money_receiptlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 401020, PurviewName = "收款单审批", PurviewLevel = 3, PurviewParent = 401, PurviewLink = "money_receiptverifylist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 401030, PurviewName = "付款单", PurviewLevel = 3, PurviewParent = 401, PurviewLink = "money_paymentlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 401040, PurviewName = "付款单审批", PurviewLevel = 3, PurviewParent = 401, PurviewLink = "money_paymentverifylist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 401050, PurviewName = "优惠单", PurviewLevel = 3, PurviewParent = 401, PurviewLink = "discount_list.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 401060, PurviewName = "优惠单审批", PurviewLevel = 3, PurviewParent = 401, PurviewLink = "discount_verifylist.aspx" });

//lstPurview.Add(new PurviewInfo() { PurviewId = 402, PurviewName = "绩效核算", PurviewLevel = 2, PurviewParent = 4 });
//lstPurview.Add(new PurviewInfo() { PurviewId = 402010, PurviewName = "订单绩效核算", PurviewLevel = 3, PurviewParent = 402, PurviewLink = "#" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 402020, PurviewName = "合同绩效-导购", PurviewLevel = 3, PurviewParent = 402, PurviewLink = "#" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 402030, PurviewName = "合同绩效-渠道", PurviewLevel = 3, PurviewParent = 402, PurviewLink = "#" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 402040, PurviewName = "合同绩效-设计师", PurviewLevel = 3, PurviewParent = 402, PurviewLink = "#" });

lstPurview.Add(new PurviewInfo() { PurviewId = 409, PurviewName = "辅助功能", PurviewLevel = 2, PurviewParent = 4 });
lstPurview.Add(new PurviewInfo() { PurviewId = 409010, PurviewName = "批量收款录入", PurviewLevel = 3, PurviewParent = 409, PurviewLink = "mult_receipt.aspx" });

#endregion

//菜单5
//lstPurview.Add(new PurviewInfo() { PurviewId = 5, PurviewName = "营销", PurviewLevel = 1, PurviewCss = "marketing", PurviewParent = 0 });
//lstPurview.Add(new PurviewInfo() { PurviewId = 501010, PurviewName = "短信群发", PurviewLevel = 3, PurviewParent = 5, PurviewLink = "" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 501020, PurviewName = "电话外呼", PurviewLevel = 3, PurviewParent = 5, PurviewLink = "" });

//菜单6
#region 菜单6-报表
lstPurview.Add(new PurviewInfo() { PurviewId = 6, PurviewName = "报表", PurviewLevel = 1, PurviewCss = "report", PurviewParent = 0 });
lstPurview.Add(new PurviewInfo() { PurviewId = 601, PurviewName = "销售报表", PurviewLevel = 2, PurviewParent = 6 });
lstPurview.Add(new PurviewInfo() { PurviewId = 601010, PurviewName = "销售明细报表", PurviewLevel = 3, PurviewParent = 601, PurviewLink = "money_report1.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 601020, PurviewName = "收入成本报表", PurviewLevel = 3, PurviewParent = 601, PurviewLink = "money_report2.aspx" });


lstPurview.Add(new PurviewInfo() { PurviewId = 602, PurviewName = "台帐导出", PurviewLevel = 2, PurviewParent = 6 });
lstPurview.Add(new PurviewInfo() { PurviewId = 602010, PurviewName = "订单台帐导出", PurviewLevel = 3, PurviewParent = 602, PurviewLink = "order_report1.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 602020, PurviewName = "合同台帐导出", PurviewLevel = 3, PurviewParent = 602, PurviewLink = "contract_report1.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 602030, PurviewName = "更改单台帐导出", PurviewLevel = 3, PurviewParent = 602, PurviewLink = "contract_report2.aspx" });

lstPurview.Add(new PurviewInfo() { PurviewId = 603, PurviewName = "高级功能", PurviewLevel = 2, PurviewParent = 6 });
lstPurview.Add(new PurviewInfo() { PurviewId = 603010, PurviewName = "数据集合管理", PurviewLevel = 3, PurviewParent = 603, PurviewLink = "datatype_list.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 603020, PurviewName = "自定义报表", PurviewLevel = 3, PurviewParent = 603, PurviewLink = "datacol_list.aspx" });
#endregion


#region 菜单7-设置
lstPurview.Add(new PurviewInfo() { PurviewId = 7, PurviewName = "设置", PurviewLevel = 1, PurviewCss = "setting", PurviewParent = 0 });
lstPurview.Add(new PurviewInfo() { PurviewId = 701, PurviewName = "基础资料", PurviewLevel = 2, PurviewParent = 7 });
lstPurview.Add(new PurviewInfo() { PurviewId = 701010, PurviewName = "门店管理", PurviewLevel = 3, PurviewParent = 701, PurviewLink = "shoplist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 701020, PurviewName = "渠道管理", PurviewLevel = 3, PurviewParent = 701, PurviewLink = "channellist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 701030, PurviewName = "品牌管理", PurviewLevel = 3, PurviewParent = 701, PurviewLink = "brandlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 701040, PurviewName = "小区管理", PurviewLevel = 3, PurviewParent = 701, PurviewLink = "houselist.aspx" });
//lstPurview.Add(new PurviewInfo() { PurviewId = 701050, PurviewName = "设计师管理", PurviewLevel = 3, PurviewParent = 701, PurviewLink = "designerlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 701060, PurviewName = "职务管理", PurviewLevel = 3, PurviewParent = 701, PurviewLink = "positionlist.aspx" });

lstPurview.Add(new PurviewInfo() { PurviewId = 702, PurviewName = "产品中心", PurviewLevel = 2, PurviewParent = 7 });
lstPurview.Add(new PurviewInfo() { PurviewId = 702010, PurviewName = "产品分类", PurviewLevel = 3, PurviewParent = 702, PurviewLink = "protypelist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 702020, PurviewName = "产品列表", PurviewLevel = 3, PurviewParent = 702, PurviewLink = "prolist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 701070, PurviewName = "支付方式", PurviewLevel = 3, PurviewParent = 702, PurviewLink = "paytypelist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 701080, PurviewName = "客户等级", PurviewLevel = 3, PurviewParent = 702, PurviewLink = "clientlevellist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 701090, PurviewName = "短信模版", PurviewLevel = 3, PurviewParent = 702, PurviewLink = "smstemplate_list.aspx" });

lstPurview.Add(new PurviewInfo() { PurviewId = 703, PurviewName = "高级设置", PurviewLevel = 2, PurviewParent = 7 });
lstPurview.Add(new PurviewInfo() { PurviewId = 703010, PurviewName = "系统参数", PurviewLevel = 3, PurviewParent = 703, PurviewLink = "system-setting.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 703020, PurviewName = "用户管理", PurviewLevel = 3, PurviewParent = 703, PurviewLink = "userlist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 703030, PurviewName = "用户分组", PurviewLevel = 3, PurviewParent = 703, PurviewLink = "usergrouplist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 703040, PurviewName = "门店分组", PurviewLevel = 3, PurviewParent = 703, PurviewLink = "shopgrouplist.aspx" });
lstPurview.Add(new PurviewInfo() { PurviewId = 703050, PurviewName = "菜单分组", PurviewLevel = 3, PurviewParent = 703, PurviewLink = "purviewgrouplist.aspx" });
#endregion

return lstPurview;
}
#endregion

#region 处理权限代码
public static string PurviewOP(string strGPurview)
{
List<string> lstPurviewId = new List<string>(strGPurview.Split(‘,‘));
for (int i = 1; i <= 7; i++)
{
for (int j = i * 100 + 1; j < i * 100 + 99; j++)
{
if (lstPurviewId.Exists(v => Convert.ToInt32(v) >= j * 1000 + 1 && Convert.ToInt32(v) <= j * 1000 + 999))
{
strGPurview += "," + i + "," + j;
}
}
}
if (strGPurview.EndsWith(",")) { strGPurview = strGPurview.Remove(strGPurview.Length - 1, 1); }
//过滤重复
strGPurview = string.Join(",", strGPurview.Split(‘,‘).Distinct().ToArray());
return strGPurview;
}
#endregion

#region 判断是否存在此权限
public static bool IsExistsPurview(int intPurviewId)
{
if (HttpContext.Current.Session["purviewlist"] != null)
{
List<string> lstShop = new List<string>(HttpContext.Current.Session["purviewlist"].ToString().Split(‘,‘));
if (lstShop.Exists(v => v == intPurviewId.ToString()))
{
return true;
}
}
return false;
}
#endregion
}

以上是关于处理权限代码,以我们公司一个项目为例的主要内容,如果未能解决你的问题,请参考以下文章

appium 弹窗处理

快速构建一个权限项目

JSON文件的[读]与[写], 以JSON.SIMPLE 为例

销售系统项目业务分析和Java中使用邮箱

vue项目 动态路由怎么做

基于 oracle 的 flask 项目——配置项目