package routers import ( "ERP_project/controllers" beego "github.com/beego/beego/v2/server/web" errorlibs "gogs.baozhida.cn/zoie/ERP_libs/Error" ) func init() { beego.ErrorController(&errorlibs.ErrorController{}) //过滤器,拦截所有请求 beego.InsertFilter("/*", beego.BeforeRouter, RBACFilter) ns := beego.NewNamespace("/Project", beego.NSRouter("/Finance_List", &controllers.ProjectController{}, "*:Project_Finance_List"), // 财务查看列表 beego.NSRouter("/List", &controllers.ProjectController{}, "*:Project_List"), // 部门负责人查看列表 beego.NSRouter("/User_list", &controllers.ProjectController{}, "*:Project_User_List"), // 用户列表 beego.NSRouter("/Add", &controllers.ProjectController{}, "*:Project_Add"), // 添加项目 beego.NSRouter("/Get", &controllers.ProjectController{}, "*:Project_Get"), // 项目详情 beego.NSRouter("/Edit", &controllers.ProjectController{}, "*:Project_Edit"), // 修改项目 beego.NSRouter("/Approval", &controllers.ProjectController{}, "*:Project_Approval"), // 项目审批 beego.NSRouter("/Del", &controllers.ProjectController{}, "*:Project_Del"), // 删除项目 beego.NSRouter("/Word", &controllers.ProjectController{}, "*:Project_Word"), // 删除项目 ) beego.Router("/User/List", &controllers.ProjectController{}, "*:User_List") beego.AddNamespace(ns) }