Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3f9408bf
authored
Jan 07, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】BPM:Simple 设计器 - 路由分支
parent
eca1c83c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+1
-0
src/components/SimpleProcessDesignerV2/src/consts.ts
+2
-2
src/components/SimpleProcessDesignerV2/src/nodes-config/RouteNodeConfig.vue
+2
-0
src/components/SimpleProcessDesignerV2/src/nodes/RouteNode.vue
+7
-7
No files found.
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
View file @
3f9408bf
...
@@ -236,6 +236,7 @@ const addNode = (type: number) => {
...
@@ -236,6 +236,7 @@ const addNode = (type: number) => {
emits
(
'update:childNode'
,
data
)
emits
(
'update:childNode'
,
data
)
}
}
if
(
type
===
NodeType
.
ROUTE_BRANCH_NODE
)
{
if
(
type
===
NodeType
.
ROUTE_BRANCH_NODE
)
{
// TODO @lesan:高亮那边,需要考虑下。
const
data
:
SimpleFlowNode
=
{
const
data
:
SimpleFlowNode
=
{
id
:
'GateWay_'
+
generateUUID
(),
id
:
'GateWay_'
+
generateUUID
(),
name
:
NODE_DEFAULT_NAME
.
get
(
NodeType
.
ROUTE_BRANCH_NODE
)
as
string
,
name
:
NODE_DEFAULT_NAME
.
get
(
NodeType
.
ROUTE_BRANCH_NODE
)
as
string
,
...
...
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
3f9408bf
...
@@ -98,7 +98,7 @@ export interface SimpleFlowNode {
...
@@ -98,7 +98,7 @@ export interface SimpleFlowNode {
// 审批节点的审批人与发起人相同时,对应的处理类型
// 审批节点的审批人与发起人相同时,对应的处理类型
assignStartUserHandlerType
?:
number
assignStartUserHandlerType
?:
number
// 创建任务监听器
// 创建任务监听器
createTaskListener
:
ListenerHandler
createTaskListener
?
:
ListenerHandler
// 条件类型
// 条件类型
conditionType
?:
ConditionType
conditionType
?:
ConditionType
// 条件表达式
// 条件表达式
...
@@ -646,7 +646,7 @@ export const DELAY_TYPE = [
...
@@ -646,7 +646,7 @@ export const DELAY_TYPE = [
*/
*/
export
type
RouteCondition
=
{
export
type
RouteCondition
=
{
nodeId
:
string
nodeId
:
string
conditionType
:
number
conditionType
:
number
// TODO @lesan:ConditionType
conditionExpression
:
string
conditionExpression
:
string
conditionGroups
:
ConditionGroup
conditionGroups
:
ConditionGroup
}
}
src/components/SimpleProcessDesignerV2/src/nodes-config/RouteNodeConfig.vue
View file @
3f9408bf
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
</el-radio>
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<!-- TODO @lesan:1)1、2 使用枚举;2)默认先 条件组关系,再 条件表达式;3)这种可以封装成一个小组件么? -->
<el-form-item
<el-form-item
v-if=
"item.conditionType === 1"
v-if=
"item.conditionType === 1"
label=
"条件表达式"
label=
"条件表达式"
...
@@ -278,6 +279,7 @@ const getShowText = () => {
...
@@ -278,6 +279,7 @@ const getShowText = () => {
return
`
${
routeGroup
.
value
.
length
}
条路由分支`
return
`
${
routeGroup
.
value
.
length
}
条路由分支`
}
}
// TODO @lesan:这个需要实现么?
const
changeConditionType
=
()
=>
{}
const
changeConditionType
=
()
=>
{}
const
deleteConditionGroup
=
(
conditions
,
index
)
=>
{
const
deleteConditionGroup
=
(
conditions
,
index
)
=>
{
...
...
src/components/SimpleProcessDesignerV2/src/nodes/RouteNode.vue
View file @
3f9408bf
...
@@ -10,7 +10,9 @@
...
@@ -10,7 +10,9 @@
>
>
<div
class=
"node-title-container"
>
<div
class=
"node-title-container"
>
<!-- TODO @芋艿 需要更换一下iconfont的图标 -->
<!-- TODO @芋艿 需要更换一下iconfont的图标 -->
<div
class=
"node-title-icon copy-task"
><span
class=
"iconfont icon-copy"
></span></div>
<div
class=
"node-title-icon copy-task"
>
<span
class=
"iconfont icon-copy"
></span>
</div>
<input
<input
v-if=
"!readonly && showInput"
v-if=
"!readonly && showInput"
type=
"text"
type=
"text"
...
@@ -47,11 +49,7 @@
...
@@ -47,11 +49,7 @@
:current-node=
"currentNode"
:current-node=
"currentNode"
/>
/>
</div>
</div>
<RouteNodeConfig
<RouteNodeConfig
v-if=
"!readonly && currentNode"
ref=
"nodeSetting"
:flow-node=
"currentNode"
/>
v-if=
"!readonly && currentNode"
ref=
"nodeSetting"
:flow-node=
"currentNode"
/>
</div>
</div>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -59,16 +57,18 @@ import { SimpleFlowNode, NodeType, NODE_DEFAULT_TEXT } from '../consts'
...
@@ -59,16 +57,18 @@ import { SimpleFlowNode, NodeType, NODE_DEFAULT_TEXT } from '../consts'
import
NodeHandler
from
'../NodeHandler.vue'
import
NodeHandler
from
'../NodeHandler.vue'
import
{
useNodeName2
,
useWatchNode
,
useTaskStatusClass
}
from
'../node'
import
{
useNodeName2
,
useWatchNode
,
useTaskStatusClass
}
from
'../node'
import
RouteNodeConfig
from
'../nodes-config/RouteNodeConfig.vue'
import
RouteNodeConfig
from
'../nodes-config/RouteNodeConfig.vue'
defineOptions
({
defineOptions
({
name
:
'RouteNode'
name
:
'RouteNode'
})
})
const
props
=
defineProps
({
const
props
=
defineProps
({
flowNode
:
{
flowNode
:
{
type
:
Object
as
()
=>
SimpleFlowNode
,
type
:
Object
as
()
=>
SimpleFlowNode
,
required
:
true
required
:
true
}
}
})
})
// 定义事件,更新父组件
。
// 定义事件,更新父组件
const
emits
=
defineEmits
<
{
const
emits
=
defineEmits
<
{
'update:flowNode'
:
[
node
:
SimpleFlowNode
|
undefined
]
'update:flowNode'
:
[
node
:
SimpleFlowNode
|
undefined
]
}
>
()
}
>
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment