admin.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. package admin
  2. import "zhiyuan/pkg/param/common"
  3. var Entry = struct {
  4. PC string
  5. Leader string
  6. Servicer string
  7. Material string
  8. Manager string
  9. Work string
  10. Mobile string
  11. Final string
  12. Dispatch string
  13. }{
  14. PC: "pc",
  15. Leader: "leader",
  16. Servicer: "servicer",
  17. Material: "material",
  18. Manager: "manager",
  19. Work: "work",
  20. Mobile: "mobile",
  21. Final: "final",
  22. Dispatch: "dispatch",
  23. }
  24. const (
  25. LeaderRoleId = 5
  26. SupervisorRoleId = 6
  27. ServicerRoleId = 1
  28. ManagerRoleId = 4
  29. DesignerRoleId = 2
  30. SalesmanRoleId = 3
  31. QualityRoleId = 17
  32. AssistantRoleId = 16
  33. AdminRoleId = 7
  34. MaterialAdminRoleId = 12
  35. DivisionDirectorRoleId = 22
  36. )
  37. var Params = struct {
  38. DataAuth []common.Base `json:"data_auth"`
  39. DataSite []common.Base `json:"data_site"`
  40. District []common.Base `json:"district"`
  41. State []common.BaseWithColor `json:"state"`
  42. }{
  43. DataAuth: []common.Base{
  44. {1, "个人"},
  45. {2, "所在部门"},
  46. {3, "所在部门及下属部门"},
  47. {99, "所有"},
  48. },
  49. DataSite: []common.Base{
  50. {1, "基装"},
  51. {2, "轻改"},
  52. {0, "所有"},
  53. },
  54. State: []common.BaseWithColor{
  55. {1, "在职", "blue-500"},
  56. {-1, "离职", "pink-500"},
  57. },
  58. District: []common.Base{
  59. {1, "高新区"},
  60. {2, "经开区"},
  61. {3, "西湖区"},
  62. {4, "象湖区"},
  63. {5, "朝阳区"},
  64. {6, "青云谱区"},
  65. {7, "望城区"},
  66. {8, "青山湖区"},
  67. {9, "东湖区"},
  68. {10, "红谷滩区"},
  69. {11, "九龙湖区"},
  70. {12, "新建区"},
  71. {13, "南昌县"},
  72. {14, "莲塘区"},
  73. {15, "湾里区"},
  74. {16, "安义区"},
  75. {17, "进贤区"},
  76. {18, "新干"},
  77. {19, "向塘县"},
  78. {20, "丰城"},
  79. {21, "奉新"},
  80. {22, "高安"},
  81. {23, "永修"},
  82. {24, "樟树"},
  83. {25, "共青城"},
  84. },
  85. }
  86. func GetStateMap() map[int]common.BaseWithColor {
  87. stateMap := make(map[int]common.BaseWithColor)
  88. for _, v := range Params.State {
  89. stateMap[v.ID] = v
  90. }
  91. return stateMap
  92. }