diff --git a/server/admin/entry.go b/server/admin/entry.go index 38dc6ec..7db10fc 100644 --- a/server/admin/entry.go +++ b/server/admin/entry.go @@ -5,6 +5,7 @@ import ( "x_admin/admin/common/captcha" "x_admin/admin/common/index" "x_admin/admin/common/upload" + "x_admin/admin/flow" "x_admin/admin/monitor" "x_admin/admin/setting/copyright" "x_admin/admin/setting/dict_data" @@ -46,9 +47,9 @@ func RegisterGroup(rg *gin.RouterGroup) { log.LogRoute(rg) ArticleCollectRoute(rg) - FlowTemplateRoute(rg) - FlowApplyRoute(rg) - FlowHistoryRoute(rg) + flow.FlowTemplateRoute(rg) + flow.FlowApplyRoute(rg) + flow.FlowHistoryRoute(rg) captcha.CaptchaRoute(rg) } diff --git a/server/admin/flow/enter.go b/server/admin/flow/enter.go new file mode 100644 index 0000000..a18e2de --- /dev/null +++ b/server/admin/flow/enter.go @@ -0,0 +1,83 @@ +package flow + +import ( + "x_admin/admin/flow/flow_apply" + "x_admin/admin/flow/flow_history" + "x_admin/admin/flow/flow_template" + "x_admin/middleware" + + "github.com/gin-gonic/gin" +) + +// 3. 后台手动添加菜单和按钮 +// flow_apply:add +// flow_apply:edit +// flow_apply:del +// flow_apply:list +// flow_apply:detail + +func FlowApplyRoute(rg *gin.RouterGroup) { + + handle := flow_apply.FlowApplyHandler{} + + rg = rg.Group("/", middleware.TokenAuth()) + rg.GET("/flow_apply/list", handle.List) + rg.GET("/flow_apply/detail", handle.Detail) + rg.POST("/flow_apply/add", handle.Add) + rg.POST("/flow_apply/edit", handle.Edit) + rg.POST("/flow_apply/del", handle.Del) + +} + +/** +3. 后台手动添加菜单和按钮 +flow_history:add +flow_history:edit +flow_history:del +flow_history:list +flow_history:listAll +flow_history:detail +*/ + +// FlowHistoryRoute(rg) +func FlowHistoryRoute(rg *gin.RouterGroup) { + + handle := flow_history.FlowHistoryHandler{} + + rg = rg.Group("/", middleware.TokenAuth()) + rg.GET("/flow_history/list", handle.List) + rg.GET("/flow_history/listAll", handle.ListAll) + rg.GET("/flow_history/detail", handle.Detail) + rg.POST("/flow_history/add", handle.Add) + rg.POST("/flow_history/edit", handle.Edit) + rg.POST("/flow_history/del", handle.Del) + + rg.POST("/flow_history/pass", handle.Pass) + rg.POST("/flow_history/next_node", handle.NextNode) + rg.POST("/flow_history/get_approver", handle.GetApprover) +} + +/** + +3. 后台手动添加菜单和按钮 +flow_template:add +flow_template:edit +flow_template:del +flow_template:list +flow_template:listAll +flow_template:detail +*/ + +// FlowTemplateRoute(rg) +func FlowTemplateRoute(rg *gin.RouterGroup) { + + handle := flow_template.FlowTemplateHandler{} + + rg = rg.Group("/", middleware.TokenAuth()) + rg.GET("/flow_template/list", handle.List) + rg.GET("/flow_template/listAll", handle.ListAll) + rg.GET("/flow_template/detail", handle.Detail) + rg.POST("/flow_template/add", handle.Add) + rg.POST("/flow_template/edit", handle.Edit) + rg.POST("/flow_template/del", handle.Del) +} diff --git a/server/admin/flow_apply/flow_apply_ctl.go b/server/admin/flow/flow_apply/flow_apply_ctl.go similarity index 100% rename from server/admin/flow_apply/flow_apply_ctl.go rename to server/admin/flow/flow_apply/flow_apply_ctl.go diff --git a/server/admin/flow_apply/flow_apply_schema.go b/server/admin/flow/flow_apply/flow_apply_schema.go similarity index 100% rename from server/admin/flow_apply/flow_apply_schema.go rename to server/admin/flow/flow_apply/flow_apply_schema.go diff --git a/server/admin/flow_apply/flow_apply_service.go b/server/admin/flow/flow_apply/flow_apply_service.go similarity index 99% rename from server/admin/flow_apply/flow_apply_service.go rename to server/admin/flow/flow_apply/flow_apply_service.go index 3078b9a..d8744cf 100644 --- a/server/admin/flow_apply/flow_apply_service.go +++ b/server/admin/flow/flow_apply/flow_apply_service.go @@ -1,7 +1,7 @@ package flow_apply import ( - "x_admin/admin/flow_template" + "x_admin/admin/flow/flow_template" "x_admin/core" "x_admin/core/request" "x_admin/core/response" diff --git a/server/admin/flow_history/flow_history_ctl.go b/server/admin/flow/flow_history/flow_history_ctl.go similarity index 100% rename from server/admin/flow_history/flow_history_ctl.go rename to server/admin/flow/flow_history/flow_history_ctl.go diff --git a/server/admin/flow_history/flow_history_schema.go b/server/admin/flow/flow_history/flow_history_schema.go similarity index 100% rename from server/admin/flow_history/flow_history_schema.go rename to server/admin/flow/flow_history/flow_history_schema.go diff --git a/server/admin/flow_history/flow_history_service.go b/server/admin/flow/flow_history/flow_history_service.go similarity index 99% rename from server/admin/flow_history/flow_history_service.go rename to server/admin/flow/flow_history/flow_history_service.go index 8df109c..8616d88 100644 --- a/server/admin/flow_history/flow_history_service.go +++ b/server/admin/flow/flow_history/flow_history_service.go @@ -2,7 +2,7 @@ package flow_history import ( "encoding/json" - "x_admin/admin/flow_apply" + "x_admin/admin/flow/flow_apply" "x_admin/admin/system/admin" "x_admin/core" "x_admin/core/request" diff --git a/server/admin/flow_template/flow_template_ctl.go b/server/admin/flow/flow_template/flow_template_ctl.go similarity index 100% rename from server/admin/flow_template/flow_template_ctl.go rename to server/admin/flow/flow_template/flow_template_ctl.go diff --git a/server/admin/flow_template/flow_template_schema.go b/server/admin/flow/flow_template/flow_template_schema.go similarity index 100% rename from server/admin/flow_template/flow_template_schema.go rename to server/admin/flow/flow_template/flow_template_schema.go diff --git a/server/admin/flow_template/flow_template_service.go b/server/admin/flow/flow_template/flow_template_service.go similarity index 100% rename from server/admin/flow_template/flow_template_service.go rename to server/admin/flow/flow_template/flow_template_service.go diff --git a/server/admin/flow_apply_route.go b/server/admin/flow_apply_route.go deleted file mode 100644 index 2ff24f7..0000000 --- a/server/admin/flow_apply_route.go +++ /dev/null @@ -1,39 +0,0 @@ -package admin - -import ( - "x_admin/admin/flow_apply" - "x_admin/middleware" - - "github.com/gin-gonic/gin" -) - -/** -集成 -1. 导入 -- 请先提交git避免文件覆盖!!! -- 下载并解压压缩包后,直接复制server、admin文件夹到项目根目录即可 - -2. 注册路由 -请在 admin/entry.go 文件引入FlowApplyRoute注册路由 - -3. 后台手动添加菜单和按钮 -flow_apply:add -flow_apply:edit -flow_apply:del -flow_apply:list -flow_apply:detail -*/ - -// FlowApplyRoute(rg) -func FlowApplyRoute(rg *gin.RouterGroup) { - - handle := flow_apply.FlowApplyHandler{} - - rg = rg.Group("/", middleware.TokenAuth()) - rg.GET("/flow_apply/list", handle.List) - rg.GET("/flow_apply/detail", handle.Detail) - rg.POST("/flow_apply/add", handle.Add) - rg.POST("/flow_apply/edit", handle.Edit) - rg.POST("/flow_apply/del", handle.Del) - -} diff --git a/server/admin/flow_history_route.go b/server/admin/flow_history_route.go deleted file mode 100644 index d96aaef..0000000 --- a/server/admin/flow_history_route.go +++ /dev/null @@ -1,44 +0,0 @@ -package admin - -import ( - "x_admin/admin/flow_history" - "x_admin/middleware" - - "github.com/gin-gonic/gin" -) - -/** -集成 -1. 导入 -- 请先提交git避免文件覆盖!!! -- 下载并解压压缩包后,直接复制server、admin文件夹到项目根目录即可 - -2. 注册路由 -请在 admin/entry.go 文件引入FlowHistoryRoute注册路由 - -3. 后台手动添加菜单和按钮 -flow_history:add -flow_history:edit -flow_history:del -flow_history:list -flow_history:listAll -flow_history:detail -*/ - -// FlowHistoryRoute(rg) -func FlowHistoryRoute(rg *gin.RouterGroup) { - - handle := flow_history.FlowHistoryHandler{} - - rg = rg.Group("/", middleware.TokenAuth()) - rg.GET("/flow_history/list", handle.List) - rg.GET("/flow_history/listAll", handle.ListAll) - rg.GET("/flow_history/detail", handle.Detail) - rg.POST("/flow_history/add", handle.Add) - rg.POST("/flow_history/edit", handle.Edit) - rg.POST("/flow_history/del", handle.Del) - - rg.POST("/flow_history/pass", handle.Pass) - rg.POST("/flow_history/next_node", handle.NextNode) - rg.POST("/flow_history/get_approver", handle.GetApprover) -} diff --git a/server/admin/flow_template_route.go b/server/admin/flow_template_route.go deleted file mode 100644 index 0eddc46..0000000 --- a/server/admin/flow_template_route.go +++ /dev/null @@ -1,40 +0,0 @@ -package admin - -import ( - "x_admin/admin/flow_template" - "x_admin/middleware" - - "github.com/gin-gonic/gin" -) - -/** -集成 -1. 导入 -- 请先提交git避免文件覆盖!!! -- 下载并解压压缩包后,直接复制server、admin文件夹到项目根目录即可 - -2. 注册路由 -请在 admin/entry.go 文件引入FlowTemplateRoute注册路由 - -3. 后台手动添加菜单和按钮 -flow_template:add -flow_template:edit -flow_template:del -flow_template:list -flow_template:listAll -flow_template:detail -*/ - -// FlowTemplateRoute(rg) -func FlowTemplateRoute(rg *gin.RouterGroup) { - - handle := flow_template.FlowTemplateHandler{} - - rg = rg.Group("/", middleware.TokenAuth()) - rg.GET("/flow_template/list", handle.List) - rg.GET("/flow_template/listAll", handle.ListAll) - rg.GET("/flow_template/detail", handle.Detail) - rg.POST("/flow_template/add", handle.Add) - rg.POST("/flow_template/edit", handle.Edit) - rg.POST("/flow_template/del", handle.Del) -}