Leave.go 1.4 KB

12345678910111213141516171819202122232425262728
  1. package routers
  2. import (
  3. "ERP_ams/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. ns := beego.NewNamespace("/Leave",
  8. beego.NSRouter("/List", &controllers.LeaveController{}, "*:Leave_List"), // 请假列表
  9. beego.NSRouter("/User_list", &controllers.LeaveController{}, "*:Leave_User_List"), // 获取请假
  10. beego.NSRouter("/Finance_List", &controllers.LeaveController{}, "*:Leave_Finance_List"), // 财务列表
  11. beego.NSRouter("/Add", &controllers.LeaveController{}, "*:Leave_Add"), // 添加请假
  12. beego.NSRouter("/Deduct", &controllers.LeaveController{}, "*:Leave_Deduct"), // 扣除
  13. beego.NSRouter("/Edit", &controllers.LeaveController{}, "*:Leave_Update"), // 修改请假
  14. beego.NSRouter("/Approval", &controllers.LeaveController{}, "*:Leave_Approval"), // 请假审批
  15. beego.NSRouter("/Del", &controllers.LeaveController{}, "*:Leave_Del"), // 删除请假
  16. beego.NSRouter("/DaysOff", &controllers.LeaveController{}, "*:Leave_RemainingDaysOff"), // 剩余调休时长
  17. beego.NSRouter("/Duration", &controllers.LeaveController{}, "*:Leave_Duration"), // 剩余调休时长
  18. )
  19. // 请假类型
  20. ns_tp := beego.NewNamespace("/LeaveType",
  21. beego.NSRouter("/List", &controllers.LeaveController{}, "*:Leave_Type_List"), // 添加权限-请假类型列表
  22. )
  23. beego.AddNamespace(ns, ns_tp)
  24. }