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
32f2d406
authored
Feb 24, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】BPM:子流程
parent
cd0f1322
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
+8
-7
src/components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue
+2
-0
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
+1
-1
No files found.
src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
View file @
32f2d406
...
@@ -28,11 +28,7 @@
...
@@ -28,11 +28,7 @@
<div>
<div>
<el-form
ref=
"formRef"
:model=
"configForm"
label-position=
"top"
:rules=
"formRules"
>
<el-form
ref=
"formRef"
:model=
"configForm"
label-position=
"top"
:rules=
"formRules"
>
<el-form-item
label=
"是否异步"
prop=
"async"
>
<el-form-item
label=
"是否异步"
prop=
"async"
>
<el-switch
<el-switch
v-model=
"configForm.async"
active-text=
"异步"
inactive-text=
"不异步"
/>
v-model=
"configForm.async"
active-text=
"异步"
inactive-text=
"不异步"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"选择子流程"
prop=
"calledProcessDefinitionKey"
>
<el-form-item
label=
"选择子流程"
prop=
"calledProcessDefinitionKey"
>
<el-select
<el-select
...
@@ -107,6 +103,7 @@
...
@@ -107,6 +103,7 @@
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
添加一行
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
添加一行
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<!-- TODO @lesan:async、source、target 几个字段,会告警 -->
<el-form-item
<el-form-item
v-if=
"configForm.async === false"
v-if=
"configForm.async === false"
label=
"子→主变量传递"
label=
"子→主变量传递"
...
@@ -163,6 +160,7 @@
...
@@ -163,6 +160,7 @@
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
添加一行
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
添加一行
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<!-- TODO @lesan:startUserType、startUserEmptyType 要不走写下枚举类? -->
<el-form-item
label=
"子流程发起人"
prop=
"startUserType"
>
<el-form-item
label=
"子流程发起人"
prop=
"startUserType"
>
<el-radio-group
v-model=
"configForm.startUserType"
>
<el-radio-group
v-model=
"configForm.startUserType"
>
<el-radio
:value=
"1"
>
同主流程发起人
</el-radio>
<el-radio
:value=
"1"
>
同主流程发起人
</el-radio>
...
@@ -213,6 +211,7 @@ import { getForm } from '@/api/bpm/form'
...
@@ -213,6 +211,7 @@ import { getForm } from '@/api/bpm/form'
import
{
SimpleFlowNode
,
NodeType
}
from
'../consts'
import
{
SimpleFlowNode
,
NodeType
}
from
'../consts'
import
{
useWatchNode
,
useDrawer
,
useNodeName
,
useFormFieldsAndStartUser
}
from
'../node'
import
{
useWatchNode
,
useDrawer
,
useNodeName
,
useFormFieldsAndStartUser
}
from
'../node'
import
{
parseFormFields
}
from
'@/components/FormCreate/src/utils'
import
{
parseFormFields
}
from
'@/components/FormCreate/src/utils'
defineOptions
({
defineOptions
({
name
:
'ChildProcessNodeConfig'
name
:
'ChildProcessNodeConfig'
})
})
...
@@ -264,6 +263,7 @@ const saveConfig = async () => {
...
@@ -264,6 +263,7 @@ const saveConfig = async () => {
if
(
!
formRef
)
return
false
if
(
!
formRef
)
return
false
const
valid
=
await
formRef
.
value
.
validate
()
const
valid
=
await
formRef
.
value
.
validate
()
if
(
!
valid
)
return
false
if
(
!
valid
)
return
false
// TODO @lesan:这里的 option 黄色告警,也处理下哈
const
childInfo
=
childProcessOptions
.
value
.
find
(
const
childInfo
=
childProcessOptions
.
value
.
find
(
(
option
)
=>
option
.
key
===
configForm
.
value
.
calledProcessDefinitionKey
(
option
)
=>
option
.
key
===
configForm
.
value
.
calledProcessDefinitionKey
)
)
...
@@ -286,11 +286,11 @@ const saveConfig = async () => {
...
@@ -286,11 +286,11 @@ const saveConfig = async () => {
return
true
return
true
}
}
// 显示子流程节点配置, 由父组件传过来
// 显示子流程节点配置, 由父组件传过来
// TODO @lesan:inVariables、outVariables 红色告警
const
showChildProcessNodeConfig
=
(
node
:
SimpleFlowNode
)
=>
{
const
showChildProcessNodeConfig
=
(
node
:
SimpleFlowNode
)
=>
{
nodeName
.
value
=
node
.
name
nodeName
.
value
=
node
.
name
if
(
node
.
childProcessSetting
)
{
if
(
node
.
childProcessSetting
)
{
configForm
.
value
.
async
=
configForm
.
value
.
async
=
node
.
childProcessSetting
.
async
node
.
childProcessSetting
.
async
configForm
.
value
.
calledProcessDefinitionKey
=
configForm
.
value
.
calledProcessDefinitionKey
=
node
.
childProcessSetting
.
calledProcessDefinitionKey
node
.
childProcessSetting
.
calledProcessDefinitionKey
configForm
.
value
.
skipStartUserNode
=
node
.
childProcessSetting
.
skipStartUserNode
configForm
.
value
.
skipStartUserNode
=
node
.
childProcessSetting
.
skipStartUserNode
...
@@ -305,6 +305,7 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
...
@@ -305,6 +305,7 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
defineExpose
({
openDrawer
,
showChildProcessNodeConfig
})
// 暴露方法给父组件
defineExpose
({
openDrawer
,
showChildProcessNodeConfig
})
// 暴露方法给父组件
// TODO @lesan:这里的 arr 黄色告警,也处理下哈,可以用 cursor quick fix 哈
const
addVariable
=
(
arr
)
=>
{
const
addVariable
=
(
arr
)
=>
{
arr
.
push
({
arr
.
push
({
source
:
''
,
source
:
''
,
...
...
src/components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue
View file @
32f2d406
...
@@ -66,6 +66,7 @@ import { SimpleFlowNode, NodeType, NODE_DEFAULT_TEXT } from '../consts'
...
@@ -66,6 +66,7 @@ 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
ChildProcessNodeConfig
from
'../nodes-config/ChildProcessNodeConfig.vue'
import
ChildProcessNodeConfig
from
'../nodes-config/ChildProcessNodeConfig.vue'
defineOptions
({
defineOptions
({
name
:
'ChildProcessNode'
name
:
'ChildProcessNode'
})
})
...
@@ -86,6 +87,7 @@ const currentNode = useWatchNode(props)
...
@@ -86,6 +87,7 @@ const currentNode = useWatchNode(props)
// 节点名称编辑
// 节点名称编辑
const
{
showInput
,
blurEvent
,
clickTitle
}
=
useNodeName2
(
currentNode
,
NodeType
.
CHILD_PROCESS_NODE
)
const
{
showInput
,
blurEvent
,
clickTitle
}
=
useNodeName2
(
currentNode
,
NodeType
.
CHILD_PROCESS_NODE
)
const
nodeSetting
=
ref
()
const
nodeSetting
=
ref
()
// 打开节点配置
// 打开节点配置
const
openNodeConfig
=
()
=>
{
const
openNodeConfig
=
()
=>
{
if
(
readonly
)
{
if
(
readonly
)
{
...
...
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
View file @
32f2d406
...
@@ -157,7 +157,7 @@ const initProcessInfo = async (row: any, formVariables?: any) => {
...
@@ -157,7 +157,7 @@ const initProcessInfo = async (row: any, formVariables?: any) => {
}
}
/** 预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次 */
/** 预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次 */
// TODO @芋艿:这里我执行填写表单的时候不知道为啥一直报错,先注释了
// TODO @芋艿:这里我执行填写表单的时候不知道为啥一直报错,先注释了
@lesan:可以和群里的小北说下
// watch(
// watch(
// detailForm.value,
// detailForm.value,
// (newValue) => {
// (newValue) => {
...
...
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