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
77756467
authored
Jan 09, 2025
by
Lesan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 检查所有route->router
parent
077dfdcd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
30 deletions
+29
-30
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+4
-4
src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue
+3
-3
src/components/SimpleProcessDesignerV2/src/consts.ts
+5
-5
src/components/SimpleProcessDesignerV2/src/nodes-config/RouterNodeConfig.vue
+11
-12
src/components/SimpleProcessDesignerV2/src/nodes/RouterNode.vue
+5
-5
src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue
+1
-1
No files found.
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
View file @
77756467
...
...
@@ -46,7 +46,7 @@
</div>
<div
class=
"handler-item-text"
>
延迟器
</div>
</div>
<div
class=
"handler-item"
@
click=
"addNode(NodeType.ROUTE_BRANCH_NODE)"
>
<div
class=
"handler-item"
@
click=
"addNode(NodeType.ROUTE
R
_BRANCH_NODE)"
>
<!-- TODO @芋艿 需要更换一下iconfont的图标 -->
<div
class=
"handler-item-icon copy"
>
<span
class=
"iconfont icon-size icon-copy"
></span>
...
...
@@ -241,12 +241,12 @@ const addNode = (type: number) => {
}
emits
(
'update:childNode'
,
data
)
}
if
(
type
===
NodeType
.
ROUTE_BRANCH_NODE
)
{
if
(
type
===
NodeType
.
ROUTE
R
_BRANCH_NODE
)
{
const
data
:
SimpleFlowNode
=
{
id
:
'GateWay_'
+
generateUUID
(),
name
:
NODE_DEFAULT_NAME
.
get
(
NodeType
.
ROUTE_BRANCH_NODE
)
as
string
,
name
:
NODE_DEFAULT_NAME
.
get
(
NodeType
.
ROUTE
R
_BRANCH_NODE
)
as
string
,
showText
:
''
,
type
:
NodeType
.
ROUTE_BRANCH_NODE
,
type
:
NodeType
.
ROUTE
R
_BRANCH_NODE
,
childNode
:
props
.
childNode
}
emits
(
'update:childNode'
,
data
)
...
...
src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue
View file @
77756467
...
...
@@ -45,8 +45,8 @@
@
update:flow-node=
"handleModelValueUpdate"
/>
<!-- 路由分支节点 -->
<RouteNode
v-if=
"currentNode && currentNode.type === NodeType.ROUTE_BRANCH_NODE"
<Route
r
Node
v-if=
"currentNode && currentNode.type === NodeType.ROUTE
R
_BRANCH_NODE"
:flow-node=
"currentNode"
@
update:flow-node=
"handleModelValueUpdate"
/>
...
...
@@ -73,7 +73,7 @@ import ExclusiveNode from './nodes/ExclusiveNode.vue'
import
ParallelNode
from
'./nodes/ParallelNode.vue'
import
InclusiveNode
from
'./nodes/InclusiveNode.vue'
import
DelayTimerNode
from
'./nodes/DelayTimerNode.vue'
import
Route
Node
from
'./nodes/Route
Node.vue'
import
Route
rNode
from
'./nodes/Router
Node.vue'
import
{
SimpleFlowNode
,
NodeType
}
from
'./consts'
import
{
useWatchNode
}
from
'./node'
defineOptions
({
...
...
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
77756467
...
...
@@ -48,7 +48,7 @@ export enum NodeType {
/**
* 路由分支节点
*/
ROUTE_BRANCH_NODE
=
54
ROUTE
R
_BRANCH_NODE
=
54
}
export
enum
NodeId
{
...
...
@@ -116,7 +116,7 @@ export interface SimpleFlowNode {
// 延迟设置
delaySetting
?:
DelaySetting
// 路由分支
routerGroups
?:
RouteCondition
[]
routerGroups
?:
Route
r
Condition
[]
defaultFlowId
?:
string
// 签名
signEnable
?:
boolean
...
...
@@ -471,7 +471,7 @@ NODE_DEFAULT_TEXT.set(NodeType.COPY_TASK_NODE, '请配置抄送人')
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
CONDITION_NODE
,
'请设置条件'
)
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
START_USER_NODE
,
'请设置发起人'
)
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
DELAY_TIMER_NODE
,
'请设置延迟器'
)
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
ROUTE_BRANCH_NODE
,
'请设置路由节点'
)
NODE_DEFAULT_TEXT
.
set
(
NodeType
.
ROUTE
R
_BRANCH_NODE
,
'请设置路由节点'
)
export
const
NODE_DEFAULT_NAME
=
new
Map
<
number
,
string
>
()
NODE_DEFAULT_NAME
.
set
(
NodeType
.
USER_TASK_NODE
,
'审批人'
)
...
...
@@ -479,7 +479,7 @@ NODE_DEFAULT_NAME.set(NodeType.COPY_TASK_NODE, '抄送人')
NODE_DEFAULT_NAME
.
set
(
NodeType
.
CONDITION_NODE
,
'条件'
)
NODE_DEFAULT_NAME
.
set
(
NodeType
.
START_USER_NODE
,
'发起人'
)
NODE_DEFAULT_NAME
.
set
(
NodeType
.
DELAY_TIMER_NODE
,
'延迟器'
)
NODE_DEFAULT_NAME
.
set
(
NodeType
.
ROUTE_BRANCH_NODE
,
'路由分支'
)
NODE_DEFAULT_NAME
.
set
(
NodeType
.
ROUTE
R
_BRANCH_NODE
,
'路由分支'
)
// 候选人策略。暂时不从字典中取。 后续可能调整。控制显示顺序
export
const
CANDIDATE_STRATEGY
:
DictDataVO
[]
=
[
...
...
@@ -660,7 +660,7 @@ export const DELAY_TYPE = [
/**
* 路由分支结构定义
*/
export
type
RouteCondition
=
{
export
type
Route
r
Condition
=
{
nodeId
:
string
conditionType
:
ConditionType
conditionExpression
:
string
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/RouteNodeConfig.vue
→
src/components/SimpleProcessDesignerV2/src/nodes-config/Route
r
NodeConfig.vue
View file @
77756467
...
...
@@ -37,7 +37,7 @@
:value=
"node.value"
/>
</el-select>
<el-button
class=
"mla"
type=
"danger"
link
@
click=
"deleteRouteGroup(index)"
<el-button
class=
"mla"
type=
"danger"
link
@
click=
"deleteRoute
r
Group(index)"
>
删除
</el-button
>
</div>
...
...
@@ -46,7 +46,7 @@
</el-card>
</el-form>
<el-button
class=
"w-1/1"
type=
"primary"
:icon=
"Plus"
@
click=
"addRouteGroup"
>
<el-button
class=
"w-1/1"
type=
"primary"
:icon=
"Plus"
@
click=
"addRoute
r
Group"
>
新增路由分支
</el-button>
</div>
...
...
@@ -61,11 +61,11 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
Plus
}
from
'@element-plus/icons-vue'
import
{
SimpleFlowNode
,
NodeType
,
ConditionType
,
RouteCondition
}
from
'../consts'
import
{
SimpleFlowNode
,
NodeType
,
ConditionType
,
Route
r
Condition
}
from
'../consts'
import
{
useWatchNode
,
useDrawer
,
useNodeName
}
from
'../node'
import
Condition
from
'./components/Condition.vue'
defineOptions
({
name
:
'RouteNodeConfig'
name
:
'Route
r
NodeConfig'
})
const
message
=
useMessage
()
// 消息弹窗
const
props
=
defineProps
({
...
...
@@ -80,8 +80,8 @@ const { settingVisible, closeDrawer, openDrawer } = useDrawer()
// 当前节点
const
currentNode
=
useWatchNode
(
props
)
// 节点名称
const
{
nodeName
,
showInput
,
clickIcon
,
blurEvent
}
=
useNodeName
(
NodeType
.
ROUTE_BRANCH_NODE
)
const
routerGroups
=
ref
<
RouteCondition
[]
>
([])
const
{
nodeName
,
showInput
,
clickIcon
,
blurEvent
}
=
useNodeName
(
NodeType
.
ROUTE
R
_BRANCH_NODE
)
const
routerGroups
=
ref
<
Route
r
Condition
[]
>
([])
const
nodeOptions
=
ref
()
// 保存配置
...
...
@@ -96,7 +96,7 @@ const saveConfig = async () => {
}
// 显示路由分支节点配置, 由父组件传过来
const
showRouteNodeConfig
=
(
node
:
SimpleFlowNode
)
=>
{
getRout
able
Node
()
getRout
er
Node
()
routerGroups
.
value
=
[]
nodeName
.
value
=
node
.
name
if
(
node
.
routerGroups
)
{
...
...
@@ -132,7 +132,7 @@ const getShowText = () => {
return
`
${
routerGroups
.
value
.
length
}
条路由分支`
}
const
addRouteGroup
=
()
=>
{
const
addRoute
r
Group
=
()
=>
{
routerGroups
.
value
.
push
({
nodeId
:
''
,
conditionType
:
ConditionType
.
RULE
,
...
...
@@ -157,12 +157,11 @@ const addRouteGroup = () => {
})
}
const
deleteRouteGroup
=
(
index
:
number
)
=>
{
const
deleteRoute
r
Group
=
(
index
:
number
)
=>
{
routerGroups
.
value
.
splice
(
index
,
1
)
}
// TODO @lesan:还有一些 router 的命名,没改过来呢
const
getRoutableNode
=
()
=>
{
const
getRouterNode
=
()
=>
{
// TODO @lesan 还需要满足以下要求
// 并行分支、包容分支内部节点不能跳转到外部节点
// 条件分支节点可以向上跳转到外部节点
...
...
@@ -170,7 +169,7 @@ const getRoutableNode = () => {
nodeOptions
.
value
=
[]
while
(
true
)
{
if
(
!
node
)
break
if
(
node
.
type
!==
NodeType
.
ROUTE_BRANCH_NODE
)
{
if
(
node
.
type
!==
NodeType
.
ROUTE
R
_BRANCH_NODE
)
{
nodeOptions
.
value
.
push
({
label
:
node
.
name
,
value
:
node
.
id
...
...
src/components/SimpleProcessDesignerV2/src/nodes/RouteNode.vue
→
src/components/SimpleProcessDesignerV2/src/nodes/Route
r
Node.vue
View file @
77756467
...
...
@@ -31,7 +31,7 @@
{{
currentNode
.
showText
}}
</div>
<div
class=
"node-text"
v-else
>
{{
NODE_DEFAULT_TEXT
.
get
(
NodeType
.
ROUTE_BRANCH_NODE
)
}}
{{
NODE_DEFAULT_TEXT
.
get
(
NodeType
.
ROUTE
R
_BRANCH_NODE
)
}}
</div>
<Icon
v-if=
"!readonly"
icon=
"ep:arrow-right-bold"
/>
</div>
...
...
@@ -49,17 +49,17 @@
:current-node=
"currentNode"
/>
</div>
<RouteNodeConfig
v-if=
"!readonly && currentNode"
ref=
"nodeSetting"
:flow-node=
"currentNode"
/>
<Route
r
NodeConfig
v-if=
"!readonly && currentNode"
ref=
"nodeSetting"
:flow-node=
"currentNode"
/>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
SimpleFlowNode
,
NodeType
,
NODE_DEFAULT_TEXT
}
from
'../consts'
import
NodeHandler
from
'../NodeHandler.vue'
import
{
useNodeName2
,
useWatchNode
,
useTaskStatusClass
}
from
'../node'
import
Route
NodeConfig
from
'../nodes-config/Route
NodeConfig.vue'
import
Route
rNodeConfig
from
'../nodes-config/Router
NodeConfig.vue'
defineOptions
({
name
:
'RouteNode'
name
:
'Route
r
Node'
})
const
props
=
defineProps
({
...
...
@@ -77,7 +77,7 @@ const readonly = inject<Boolean>('readonly')
// 监控节点的变化
const
currentNode
=
useWatchNode
(
props
)
// 节点名称编辑
const
{
showInput
,
blurEvent
,
clickTitle
}
=
useNodeName2
(
currentNode
,
NodeType
.
ROUTE_BRANCH_NODE
)
const
{
showInput
,
blurEvent
,
clickTitle
}
=
useNodeName2
(
currentNode
,
NodeType
.
ROUTE
R
_BRANCH_NODE
)
const
nodeSetting
=
ref
()
// 打开节点配置
...
...
src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue
View file @
77756467
...
...
@@ -129,7 +129,7 @@ const setSimpleModelNodeTaskStatus = (
simpleModel
.
type
===
NodeType
.
CONDITION_BRANCH_NODE
||
simpleModel
.
type
===
NodeType
.
PARALLEL_BRANCH_NODE
||
simpleModel
.
type
===
NodeType
.
INCLUSIVE_BRANCH_NODE
||
simpleModel
.
type
===
NodeType
.
ROUTE_BRANCH_NODE
simpleModel
.
type
===
NodeType
.
ROUTE
R
_BRANCH_NODE
)
{
// 网关节点。只有通过和未执行状态
if
(
finishedActivityIds
.
includes
(
simpleModel
.
id
))
{
...
...
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