Code Monkey home page Code Monkey logo

lanyulei / ferry Goto Github PK

View Code? Open in Web Editor NEW
6.0K 118.0 1.1K 6.47 MB

本系统是集工单统计、任务钩子、权限管理、灵活配置流程与模版等等于一身的开源工单系统,当然也可以称之为工作流引擎。 致力于减少跨部门之间的沟通,自动任务的执行,提升工作效率与工作质量,减少不必要的工作量与人为出错率。

License: MIT License

Makefile 0.01% Go 1.97% PLpgSQL 0.82% HTML 0.14% Shell 0.06% Python 0.01% Dockerfile 0.01% JavaScript 96.99%

ferry's Introduction

license donate

基于Gin + Vue + Element UI前后端分离的工单系统

新版工单演示地址(非开源):http://fdevops.com:8000

账号密码:lanyulei / lanyulei

流程中心

通过灵活的配置流程、模版等数据,非常快速方便的生成工单流程,通过对流程进行任务绑定,实现流程中的钩子操作,目前支持绑定邮件来通知处理,当然为兼容更多的通知方式,也可以自己写任务脚本来进行任务通知,可根据自己的需求定制。

兼容了多种处理情况,包括串行处理、并行处理以及根据条件判断进行节点跳转。

可通过变量设置处理人,例如:直接负责人、部门负责人、HRBP等变量数据。

系统管理

基于casbin的RBAC权限控制,借鉴了go-admin项目的前端权限管理,可以在页面对API、菜单、页面按钮等操作,进行灵活且简单的配置。

演示demo: http://fdevops.com:8001/#/dashboard

账号:admin
密码:123456

演示demo登陆需要取消ldap验证,就是登陆页面取消ldap的打勾。

文档: https://www.fdevops.com/docs/ferry

视频教程(由群内好友<稳定>提供,非常感谢。):

需注意,因有人恶意删除演示数据,将可删除的数据全都删除了,因此演示的Demo上已经将删除操作的隐藏了。

但是直接在Github或者Gitee下载下来的代码是完整的,请放心。

如果总是出现此类删除数据,关闭演示用户的情况的话,可能考虑不在维护demo,仅放置一些项目截图。

请大家一起监督。

功能介绍

下面对本系统的功能做一个简单介绍。

工单系统相关功能:

  • 工单提交申请
  • 工单统计
  • 多维度工单列表,包括(我创建的、我相关的、我待办的、所有工单)
  • 自定义流程
  • 自定义模版
  • 任务钩子
  • 任务管理
  • 催办
  • 转交
  • 手动结单
  • 加签
  • 多维度处理人,包括(个人,变量(创建者、创建者负责人))
  • 排他网关,即根据条件判断进行工单跳转
  • 并行网关,即多个节点同时进行审批处理
  • 通知提醒(目前仅支持邮件)
  • 流程分类管理

权限管理相关功能,使用casbin实现接口权限控制:

  • 用户、角色、岗位的增删查改,批量删除,多条件搜索
  • 角色、岗位数据导出Excel
  • 重置用户密码
  • 维护个人信息,上传管理头像,修改当前账户密码
  • 部门的增删查改
  • 菜单目录、跳转、按钮及API接口的增删查改
  • 登陆日志管理
  • 左菜单权限控制
  • 页面按钮权限控制
  • API接口权限控制

快速安装部署:

bash build.sh install

启动服务:

bash build.sh start

交流

加群条件是需给项目一个star,不需要您费多大的功夫与力气,一个小小的star是作者能维护下去的动力。

如果您只是使用本项目的话,您可以在群内提出您使用中需要改进的地方,我会尽快修改。

如果您是想基于此项目二次开发的话,您可以在群里提出您在开发过程中的任何疑问,我会尽快答复并讲解。

群里只要不说骂人、侮辱人之类人身攻击的话,您就可以畅所欲言,有bug我及时修改,使用中有不懂的,我会及时回复,感谢。

QQ群 5:361011819

兰玉磊的技术博客

个人微信,添加好友请描述地区、公司及名字,例如:北京-微软-xxx。

本项目现成立了付费的 VIP 交流群,赞助金额达到 299 以上,我将邀请进入付费交流群,本群能更快更优先的协助解决问题。

但是有一点需要跟大家明确好,因为本人需要上班,所以工作日的白天,小问题的话,我会尽快协助解决,大问题需晚上处理呢,大家请按需选择,是否进入,感谢支持。

目前正在使用最新技术重构最新版,最新本也将优先在本群发布。

本人微信:lanyulei666

战略合作

特别感谢

等等...

打赏

如果您觉得这个项目帮助到了您,您可以请作者喝一杯咖啡表示鼓励:

打赏名人榜

鸣谢

特别感谢 JetBrains 为本开源项目提供免费的 IntelliJ GoLand 授权

License

MIT

Copyright (c) 2022 lanyulei

ferry's People

Contributors

acdiost avatar chenhaohu avatar fanliangbin320 avatar forgethub avatar gakkiyomi avatar kagurazakanyaa avatar lanyulei avatar liouxiao avatar mhxw avatar mizhexiaoxiao avatar mr-changk avatar niujinkai avatar qknow-w avatar sp3c73r2038 avatar wumanho avatar xiaolei-shuai avatar zixiliuyue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ferry's Issues

图片上传有问题

image
image
1.图片上传有问题
2.创建新的普通用户后,所有用户图片都不能上传。都是以上截图的报错

我有两个人一起会签,只要有一个同意,这个事情就通过了

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

上传图片时一直是0%,无法确定是否上传成功

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

执行脚本出错

执行脚本时报错怎么解决?
{"level":"error","ts":"2020-10-07 21:58:50.035036","caller":"worker/tasks.go:19","msg":"task exec failed,fork/exec ./static/scripts/echo_test-4171bc7f4a05-admin.sh: permission deied"}。
谢谢!

查看工单详情,登录跳转问题

未登录情况下,收到工单邮件后,点击连接登录后跳转没携带参数,导致工单查看出错
修改permission.js 中 “next(/login?redirect=${to.fullPath})”,问题修复

文件上传Bug

模板中增加文件上传,但是文件上传后找不到上传的文件,接口使用的还是图片上传地址
image

Feature:模板基础字段中提供密码插件

背景

  • 在工单的实际使用过程中,工单中可能会有部分字段属于个人私有信息,不应当对外暴露

思路

  1. 在工单的模板管理->编辑模板->基础字段中增加密码插件
  2. 在提交申请后,工单的查询和审批界面不应当显示具体的私有信息
  3. 在Python或者Shell后端执行的脚本能够获取到具体的私有信息

建议线上部署时增加前端免nginx的部署方式

目前线上部署的时候,前端代码需要通过部署nginx来代理,这个会增加部署难度和后期线上出问题的可能性。
希望能增加一种ferry+前端代码的直接部署方式,即通过修改gin来实现前端静态资源的直接访问。

搜索方面的建议-和其他一些bug的提交

级联选择器有问题

级联选择器没有设置列表项的地方

image-20200929150358499

image-20200929150232023

紧急需求

所有工单列表支持模糊搜索

希望添加所有工单列表支持模糊搜索和自定义字段搜索包括级联选择项里面的字段进行筛选查询

类似于如图这种

image-20200929150305639

image-20200929150008968

次级需求

首页图表展现页面能自定义字段展示

image-20200929164428224

现在首页显示的是用户提交的工单排名,在实际过程中,这个并不是很需要的,能否自定义字段展示比如某个产品的工单数量。

次级需求

所有工单展示页列表项支持自定义字段显示

希望添加工单展示页列表项除了系统定义的id/标题/当前状态/当前处理人/优先级/创建时间/操作/ 等 还能支持自定义字段展示并可以排序保存。或者提供可定制页面保存。

image-20200929150059817

image-20200929150134531

次次次级需求

安装完成后,配置好流程试用创建新工单时提交报错

/api/v1/work-order/create

192.168.100.223:56151是我路由器的地址,不知道为什么会连到这个端口和ip

2020/11/02 15:58:52 http: panic serving 192.168.100.223:56151: interface conversion: interface {} is nil, not string
goroutine 59 [running]:
net/http.(*conn).serve.func1(0xc002fdfb80)
/usr/local/go/src/net/http/server.go:1801 +0x147
panic(0x14b3e00, 0xc000c98750)
/usr/local/go/src/runtime/panic.go:975 +0x47a
ferry/middleware.CustomError.func1(0xc002ff89c0)
/home/www/ferry/middleware/customerror.go:44 +0x5d3
panic(0x14b3e00, 0xc000c98750)
/usr/local/go/src/runtime/panic.go:969 +0x1b9
ferry/pkg/service.CreateWorkOrder(0xc002ff89c0, 0x140bec0, 0x192d0e0)
/home/www/ferry/pkg/service/createWorkOrder.go:106 +0x3f5f
ferry/apis/process.AddWorkOrder(0xc002ff89c0)
/home/www/ferry/apis/process/workOrder.go:60 +0x6a
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.AuthCheckRole.func1(0xc002ff89c0)
/home/www/ferry/middleware/permission.go:28 +0x67b
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/pkg/jwtauth.(*GinJWTMiddleware).middlewareImpl(0xc0006c2900, 0xc002ff89c0)
/home/www/ferry/pkg/jwtauth/jwtauth.go:406 +0x2de
ferry/pkg/jwtauth.(*GinJWTMiddleware).MiddlewareFunc.func1(0xc002ff89c0)
/home/www/ferry/pkg/jwtauth/jwtauth.go:369 +0x34
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.AuthCheckRole.func1(0xc002ff89c0)
/home/www/ferry/middleware/permission.go:28 +0x67b
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/pkg/jwtauth.(*GinJWTMiddleware).middlewareImpl(0xc0006c2900, 0xc002ff89c0)
/home/www/ferry/pkg/jwtauth/jwtauth.go:406 +0x2de
ferry/pkg/jwtauth.(*GinJWTMiddleware).MiddlewareFunc.func1(0xc002ff89c0)
/home/www/ferry/pkg/jwtauth/jwtauth.go:369 +0x34
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.AuthCheckRole.func1(0xc002ff89c0)
/home/www/ferry/middleware/permission.go:28 +0x67b
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/pkg/jwtauth.(*GinJWTMiddleware).middlewareImpl(0xc0006c2900, 0xc002ff89c0)
/home/www/ferry/pkg/jwtauth/jwtauth.go:406 +0x2de
ferry/pkg/jwtauth.(*GinJWTMiddleware).MiddlewareFunc.func1(0xc002ff89c0)
/home/www/ferry/pkg/jwtauth/jwtauth.go:369 +0x34
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.RequestId.func1(0xc002ff89c0)
/home/www/ferry/middleware/requestid.go:24 +0x1eb
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.Options(0xc002ff89c0)
/home/www/ferry/middleware/header.go:23 +0x3d
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.NoCache(0xc002ff89c0)
/home/www/ferry/middleware/header.go:15 +0x16a
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.CustomError(0xc002ff89c0)
/home/www/ferry/middleware/customerror.go:48 +0x4e
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
ferry/middleware.LoggerToFile.func1(0xc002ff89c0)
/home/www/ferry/middleware/logger.go:18 +0x6b
github.com/gin-gonic/gin.(*Context).Next(0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 +0x3b
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000160280, 0xc002ff89c0)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:403 +0x685
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000160280, 0x1979980, 0xc003686700, 0xc000404100)
/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:364 +0x14d
net/http.serverHandler.ServeHTTP(0xc0002582a0, 0x1979980, 0xc003686700, 0xc000404100)
/usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc002fdfb80, 0x197ebc0, 0xc0036801c0)
/usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2969 +0x36c

点击我的待办,不能获取到内容,只能重新登录

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

多次调用AuthCheckRole导致效率慢

Describe the bug

原因:
RegisterBaseRouter 和 RegisterPageRouter 方法没有使用 v1.Group(“XXX”)的方法,而后面的.Use(middleware.AuthCheckRole()) 作用于全局对象。

例如:
访问 /dept/:deptId 这个接口,会调用3次AuthCheckRole()这个方法,这3次分别是由以下方法添加进去的。
RegisterBaseRouter 1次全局
RegisterPageRouter 1次全局
RegisterDeptRouter 1次局部

测试方法:在AuthCheckRole 中增加一个Trace 以便打印方法进出的时间,我们会明显看到调用3次的日志

//权限检查中间件
func AuthCheckRole() gin.HandlerFunc {
return func(c *gin.Context) {
defer Trace("AuthCheckRole")()
data, _ := c.Get("JWT_PAYLOAD")

Trace方法如下
func Trace(msg string) func() {
start := time.Now()
fmt.Printf("enter %s\n", msg)
return func() {
fmt.Printf("exit %s (%s)\n", msg, time.Since(start))
}
}

图片上传bug

requestHostList := strings.Split(c.Request.Host, ":")
	if len(requestHostList) > 0 && requestHostList[1] == "80" {
		requestHost = requestHostList[0]
	} else {
		requestHost = c.Request.Host
	}

requestHostList[1]存在越界

希望加入工时统计

期望加入工时统计功能,这样可以查看每个月每个员工都处理了多少工单,用了多少工时。考核员工工作量

Feature:工单模板向Python脚本传参使用Dict格式

背景

  • 目前模板向Python模板的传参使用的是list格式,Python通过app(*args)方法接受参数,这样会导致代码维护困难,需要严格按照顺序接受参数。如果模板发生修改,在更新相应脚本的过程中容易出错。

思路

  • 模板管理下的编辑模板中的预览提供获取数据功能,是以{"字段名称":参数值}的json格式返回
  • 模板中提供了字段标示的修改功能

考虑将Python的app(*args)变为app(**kwargs)。在设计模板的时候修改字段标示的值。在编写app函数的时候,可以直接通过字段标示设置的变量名获取对应的模板中的参数值,方便不容易出错

执行任务脚本问题

1、执行python脚本报错,shell 脚本执行也不需要 -c 参数。修改为下面代码正常运行
task.go :
func executeTaskBase(classify string, scriptPath string) {

command := exec.Command("/bin/bash", scriptPath) //初始化Cmd
if classify == "python" {
	command = exec.Command("python", scriptPath) //初始化Cmd
}

}

2、流程在某个节点处理时调用任务的时候,应该需要获取任务执行状态,如果失败需要手动处理完再进去下个环节

切换用户登录时报告404错误

复现步骤:
1、使用admin用户登录后,修改接口权限,保存并退出登录
2、使用普通用户登录(Ldap身份认证),报告404错误
3、然后点“Back to Home”,就直接登录了
4、再次点击退出登录,然后再次登录就正常了

上传了文件,但是创建者和审批者,都预览不到内容

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.
__

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.