Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
4f673493
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
332
Star
18154
Fork
5505
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4f673493
编写于
11月 24, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
隐藏0.01未完成功能
上级
da0f416e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
43 addition
and
38 deletion
+43
-38
server/constant/workflow.go
server/constant/workflow.go
+19
-0
server/model/wf_process.go
server/model/wf_process.go
+0
-18
server/service/wk_process.go
server/service/wk_process.go
+9
-8
web/src/components/gva-wfd/components/DetailPanel/UserTaskDetail.vue
...ponents/gva-wfd/components/DetailPanel/UserTaskDetail.vue
+2
-2
web/src/components/gva-wfd/components/ItemPanel.vue
web/src/components/gva-wfd/components/ItemPanel.vue
+11
-10
web/src/components/gva-wfd/components/Wfd.vue
web/src/components/gva-wfd/components/Wfd.vue
+1
-0
web/src/view/workflow/workflowCreate/workflowCreate.vue
web/src/view/workflow/workflowCreate/workflowCreate.vue
+1
-0
未找到文件。
server/constant/workflow.go
0 → 100644
浏览文件 @
4f673493
package
constant
//定义clazz常量
const
(
USER_TASK
string
=
"userTask"
// 审批节点
//SCRIPT_TASK string = "scriptTask" //脚本节点
//RECEIVE_TASK string = "receiveTask"
//MAIL_TASK string = "mailTask" //邮件节点
//TIMER_START string = "timerStart" // 定时节点
//MESSAGE_START string = "messageStart" // 消息节点
EXCLUSIVE_GATEWAY
string
=
"exclusiveGateway"
// 排他网关
INCLUSIVE_GATEWAY
string
=
"inclusiveGateway"
// 包容网关
PARELLEL_GATEWAY
string
=
"parallelGateway"
// 并行网关
FLOW
string
=
"flow"
// 连线
START
string
=
"start"
// 开始节点
END
string
=
"end"
// 结束节点
//PROCESS string = "process" // 基础节点
)
server/model/wf_process.go
浏览文件 @
4f673493
...
...
@@ -55,24 +55,6 @@ func (w WorkflowBase) GetWorkflowBase() (workflowBase WorkflowBase) {
return
w
}
//定义clazz常量
const
(
USER_TASK
string
=
"userTask"
SCRIPT_TASK
string
=
"scriptTask"
RECEIVE_TASK
string
=
"receiveTask"
MAIL_TASK
string
=
"mailTask"
TIMER_START
string
=
"timerStart"
MESSAGE_START
string
=
"messageStart"
EXCLUSIVE_GATEWAY
string
=
"exclusiveGateway"
// 排他网关
INCLUSIVE_GATEWAY
string
=
"inclusiveGateway"
// 包容网关
PARELLEL_GATEWAY
string
=
"parallelGateway"
// 并行网关
FLOW
string
=
"flow"
START
string
=
"start"
END
string
=
"end"
PROCESS
string
=
"process"
)
type
WorkflowMove
struct
{
global
.
GVA_MODEL
WorkflowProcessID
string
`json:"workflowProcessID" gorm:"comment:工作流模板ID"`
...
...
server/service/wk_process.go
浏览文件 @
4f673493
...
...
@@ -3,6 +3,7 @@ package service
import
(
"errors"
"fmt"
"gin-vue-admin/constant"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
...
...
@@ -134,7 +135,7 @@ func GetWorkflowProcess(id string) (err error, workflowProcess model.WorkflowPro
//@return: err error, workflowNodes []model.WorkflowNode
func
FindWorkflowStep
(
id
string
)
(
err
error
,
workflowNode
model
.
WorkflowProcess
)
{
err
=
global
.
GVA_DB
.
Preload
(
"Nodes"
,
"clazz = ?"
,
model
.
START
)
.
Where
(
"id = ?"
,
id
)
.
First
(
&
workflowNode
)
.
Error
err
=
global
.
GVA_DB
.
Preload
(
"Nodes"
,
"clazz = ?"
,
constant
.
START
)
.
Where
(
"id = ?"
,
id
)
.
First
(
&
workflowNode
)
.
Error
return
}
...
...
@@ -221,7 +222,7 @@ func complete(tx *gorm.DB, wfm *model.WorkflowMove) (err error) {
return
txErr
}
if
nodeInfo
.
Clazz
==
model
.
START
||
nodeInfo
.
Clazz
==
model
.
USER_TASK
{
if
nodeInfo
.
Clazz
==
constant
.
START
||
nodeInfo
.
Clazz
==
constant
.
USER_TASK
{
txErr
=
tx
.
Find
(
&
Edges
,
"workflow_process_id = ? and source = ?"
,
wfm
.
WorkflowProcessID
,
wfm
.
WorkflowNodeID
)
.
Error
if
txErr
!=
nil
{
return
txErr
...
...
@@ -273,11 +274,11 @@ func complete(tx *gorm.DB, wfm *model.WorkflowMove) (err error) {
}
}
}
}
else
if
nodeInfo
.
Clazz
==
model
.
EXCLUSIVE_GATEWAY
{
}
else
if
nodeInfo
.
Clazz
==
constant
.
EXCLUSIVE_GATEWAY
{
return
errors
.
New
(
"目前只支持start节点和userTask功能,其他功能正在开发中"
)
}
else
if
nodeInfo
.
Clazz
==
model
.
INCLUSIVE_GATEWAY
{
}
else
if
nodeInfo
.
Clazz
==
constant
.
INCLUSIVE_GATEWAY
{
return
errors
.
New
(
"目前只支持start节点和userTask功能,其他功能正在开发中"
)
}
else
if
nodeInfo
.
Clazz
==
model
.
PARELLEL_GATEWAY
{
}
else
if
nodeInfo
.
Clazz
==
constant
.
PARELLEL_GATEWAY
{
return
errors
.
New
(
"目前只支持start节点和userTask功能,其他功能正在开发中"
)
}
else
{
return
errors
.
New
(
"目前只支持start节点和userTask功能,其他功能正在开发中"
)
...
...
@@ -296,7 +297,7 @@ func createNewWorkflowMove(tx *gorm.DB, oldWfm *model.WorkflowMove, targetNodeID
return
txErr
,
[]
model
.
WorkflowMove
{}
}
switch
nodeInfo
.
Clazz
{
case
model
.
EXCLUSIVE_GATEWAY
:
case
constant
.
EXCLUSIVE_GATEWAY
:
// 当为排他网关时候 选择一个参数进行排他线路选择
txErr
:=
tx
.
First
(
&
edge
,
"workflow_process_id = ? and source = ? and condition_expression = ?"
,
oldWfm
.
WorkflowProcessID
,
nodeInfo
.
ID
,
oldWfm
.
Param
)
.
Error
if
txErr
!=
nil
{
...
...
@@ -313,7 +314,7 @@ func createNewWorkflowMove(tx *gorm.DB, oldWfm *model.WorkflowMove, targetNodeID
Action
:
""
,
IsActive
:
true
})
return
nil
,
newWfm
case
model
.
INCLUSIVE_GATEWAY
:
case
constant
.
INCLUSIVE_GATEWAY
:
// 当为包容网关时,需要等待其他网关执行结束才进行创建
txErr
:=
tx
.
Find
(
&
edges
,
"workflow_process_id = ? and target = ?"
,
oldWfm
.
WorkflowProcessID
,
nodeInfo
.
ID
)
.
Error
if
txErr
!=
nil
{
...
...
@@ -361,7 +362,7 @@ func createNewWorkflowMove(tx *gorm.DB, oldWfm *model.WorkflowMove, targetNodeID
}
return
nil
,
newWfm
case
model
.
PARELLEL_GATEWAY
:
case
constant
.
PARELLEL_GATEWAY
:
// 当为并行网关时候 找出所有线路创建并行节点
txErr
:=
tx
.
Find
(
&
edges
,
"workflow_process_id = ? and source = ?"
,
oldWfm
.
WorkflowProcessID
,
nodeInfo
.
ID
)
.
Error
if
txErr
!=
nil
{
...
...
web/src/components/gva-wfd/components/DetailPanel/UserTaskDetail.vue
浏览文件 @
4f673493
...
...
@@ -74,14 +74,14 @@
@
input=
"(value) => onChange('dueDate', value)"
/>
</div>
<div
class=
"panelRow"
>
<
!--
<
div
class=
"panelRow"
>
<el-checkbox
@
change=
"(value) => onChange('isSequential', value)"
:disabled=
"readOnly"
:value=
"!!model.isSequential"
>
{{
i18n
[
'
userTask.counterSign
'
]
}}
</el-checkbox
>
</div>
</div>
-->
<div
class=
"panelRow"
>
<div>
视图文件路径(以view开头)
</div>
...
...
web/src/components/gva-wfd/components/ItemPanel.vue
浏览文件 @
4f673493
...
...
@@ -5,9 +5,9 @@
<img
data-item=
"
{clazz:'start',size:'50*50',label:''}"
:src="require('../assets/flow/start.svg')" style="width:42px;height:42px" />
<div>
{{
i18n
[
'
startEvent
'
]
}}
</div>
<img
data-item=
"
{clazz:'timerStart',size:'50*50',label:''}"
<
!--
<
img
data-item=
"
{clazz:'timerStart',size:'50*50',label:''}"
:src="require('../assets/flow/timer-start.svg')" style="width:42px;height:42px" />
<div>
{{
i18n
[
'
timerEvent
'
]
}}
</div>
<div>
{{
i18n
[
'
timerEvent
'
]
}}
</div>
-->
<!--
<img
data-item=
"
{clazz:'messageStart',size:'50*50',label:''}"
:src="require('../assets/flow/message-start.svg')" style="width:42px;height:42px" />
<div>
{{
i18n
[
'
messageEvent
'
]
}}
</div>
...
...
@@ -19,18 +19,18 @@
<img
:data-item=
"userTaskData"
:src=
"require('../assets/flow/user-task.svg')"
style=
"width:80px;height:44px"
/>
<div>
{{
i18n
[
'
userTask
'
]
}}
</div>
<img
:data-item=
"scriptTaskData"
<
!--
<
img
:data-item=
"scriptTaskData"
:src=
"require('../assets/flow/script-task.svg')"
style=
"width:80px;height:44px"
/>
<div>
{{
i18n
[
'
scriptTask
'
]
}}
</div>
<div>
{{
i18n
[
'
scriptTask
'
]
}}
</div>
-->
<!--
<img
:data-item=
"javaTaskData"
:src=
"require('../assets/flow/java-task.svg')"
style=
"width:80px;height:44px"
/>
<div>
{{
i18n
[
'
javaTask
'
]
}}
</div>
-->
<img
:data-item=
"mailTaskData"
<
!--
<
img
:data-item=
"mailTaskData"
:src=
"require('../assets/flow/mail-task.svg')"
style=
"width:80px;height:44px"
/>
<div>
{{
i18n
[
'
mailTask
'
]
}}
</div>
<img
:data-item=
"receiveTaskData"
:src=
"require('../assets/flow/receive-task.svg')"
style=
"width:80px;height:44px"
/>
<div>
{{
i18n
[
'
receiveTask
'
]
}}
</div>
<div>
{{
i18n
[
'
receiveTask
'
]
}}
</div>
-->
</el-collapse-item>
<el-collapse-item
:title=
"i18n['gateway']"
name=
"3"
>
<img
data-item=
"
{clazz:'exclusiveGateway',size:'60*60',label:''}"
...
...
@@ -43,23 +43,24 @@
:src="require('../assets/flow/inclusive-gateway.svg')" style="width:48px;height:48px" />
<div>
{{
i18n
[
'
inclusiveGateway
'
]
}}
</div>
</el-collapse-item>
<el-collapse-item
:title=
"i18n['catch']"
name=
"4"
>
<
!--
<
el-collapse-item
:title=
"i18n['catch']"
name=
"4"
>
<img
data-item=
"
{clazz:'timerCatch',size:'60*35',label:''}"
:src="require('../assets/flow/timer-catch.svg')" style="width:58px;height:38px" />
<div>
{{
i18n
[
'
timerEvent
'
]
}}
</div>
<
!--
<
img
data-item=
"
{clazz:'messageCatch',size:'60*35',label:''}"
<img
data-item=
"
{clazz:'messageCatch',size:'60*35',label:''}"
:src="require('../assets/flow/message-catch.svg')" style="width:58px;height:38px" />
<div>
{{
i18n
[
'
messageEvent
'
]
}}
</div>
<img
data-item=
"
{clazz:'signalCatch',size:'60*35',label:''}"
:src="require('../assets/flow/signal-catch.svg')" style="width:58px;height:38px" />
<div>
{{
i18n
[
'
signalEvent
'
]
}}
</div>
-->
</el-collapse-item>
<div>
{{
i18n
[
'
signalEvent
'
]
}}
</div>
</el-collapse-item>
-->
<el-collapse-item
:title=
"i18n['end']"
name=
"5"
>
<img
data-item=
"
{clazz:'end',size:'50*50',label:''}"
:src="require('../assets/flow/end.svg')" style="width:42px;height:42px" />
<div>
{{
i18n
[
'
endEvent
'
]
}}
</div>
</el-collapse-item>
</el-collapse>
</div>
</
template
>
<
script
>
...
...
web/src/components/gva-wfd/components/Wfd.vue
浏览文件 @
4f673493
...
...
@@ -249,6 +249,7 @@
},
created
()
{
this
.
processModel
=
this
.
propProcessModel
this
.
selectedModel
=
this
.
processModel
},
};
</
script
>
...
...
web/src/view/workflow/workflowCreate/workflowCreate.vue
浏览文件 @
4f673493
<
template
>
<div>
<p
style=
"text-align:center;padding-bottom:4px"
>
当前版本为0.01试用版本,可满足最简单的流程功能,未完成功能,如脚本节点,邮件节点等目前暂时注释入口,期待大家PR
</p>
<el-button
size=
"small"
style=
"float: right; margin-top: 6px; margin-right: 6px"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录