Skip to content

Commit 32f2d40

Browse files
committed
【代码评审】BPM:子流程
1 parent cd0f132 commit 32f2d40

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@
2828
<div>
2929
<el-form ref="formRef" :model="configForm" label-position="top" :rules="formRules">
3030
<el-form-item label="是否异步" prop="async">
31-
<el-switch
32-
v-model="configForm.async"
33-
active-text="异步"
34-
inactive-text="不异步"
35-
/>
31+
<el-switch v-model="configForm.async" active-text="异步" inactive-text="不异步" />
3632
</el-form-item>
3733
<el-form-item label="选择子流程" prop="calledProcessDefinitionKey">
3834
<el-select
@@ -107,6 +103,7 @@
107103
<Icon icon="ep:plus" class="mr-5px" />添加一行
108104
</el-button>
109105
</el-form-item>
106+
<!-- TODO @lesan:async、source、target 几个字段,会告警 -->
110107
<el-form-item
111108
v-if="configForm.async === false"
112109
label="子→主变量传递"
@@ -163,6 +160,7 @@
163160
<Icon icon="ep:plus" class="mr-5px" />添加一行
164161
</el-button>
165162
</el-form-item>
163+
<!-- TODO @lesan:startUserType、startUserEmptyType 要不走写下枚举类? -->
166164
<el-form-item label="子流程发起人" prop="startUserType">
167165
<el-radio-group v-model="configForm.startUserType">
168166
<el-radio :value="1">同主流程发起人</el-radio>
@@ -213,6 +211,7 @@ import { getForm } from '@/api/bpm/form'
213211
import { SimpleFlowNode, NodeType } from '../consts'
214212
import { useWatchNode, useDrawer, useNodeName, useFormFieldsAndStartUser } from '../node'
215213
import { parseFormFields } from '@/components/FormCreate/src/utils'
214+
216215
defineOptions({
217216
name: 'ChildProcessNodeConfig'
218217
})
@@ -264,6 +263,7 @@ const saveConfig = async () => {
264263
if (!formRef) return false
265264
const valid = await formRef.value.validate()
266265
if (!valid) return false
266+
// TODO @lesan:这里的 option 黄色告警,也处理下哈
267267
const childInfo = childProcessOptions.value.find(
268268
(option) => option.key === configForm.value.calledProcessDefinitionKey
269269
)
@@ -286,11 +286,11 @@ const saveConfig = async () => {
286286
return true
287287
}
288288
// 显示子流程节点配置, 由父组件传过来
289+
// TODO @lesan:inVariables、outVariables 红色告警
289290
const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
290291
nodeName.value = node.name
291292
if (node.childProcessSetting) {
292-
configForm.value.async =
293-
node.childProcessSetting.async
293+
configForm.value.async = node.childProcessSetting.async
294294
configForm.value.calledProcessDefinitionKey =
295295
node.childProcessSetting.calledProcessDefinitionKey
296296
configForm.value.skipStartUserNode = node.childProcessSetting.skipStartUserNode
@@ -305,6 +305,7 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
305305
306306
defineExpose({ openDrawer, showChildProcessNodeConfig }) // 暴露方法给父组件
307307
308+
// TODO @lesan:这里的 arr 黄色告警,也处理下哈,可以用 cursor quick fix 哈
308309
const addVariable = (arr) => {
309310
arr.push({
310311
source: '',

src/components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import { SimpleFlowNode, NodeType, NODE_DEFAULT_TEXT } from '../consts'
6666
import NodeHandler from '../NodeHandler.vue'
6767
import { useNodeName2, useWatchNode, useTaskStatusClass } from '../node'
6868
import ChildProcessNodeConfig from '../nodes-config/ChildProcessNodeConfig.vue'
69+
6970
defineOptions({
7071
name: 'ChildProcessNode'
7172
})
@@ -86,6 +87,7 @@ const currentNode = useWatchNode(props)
8687
// 节点名称编辑
8788
const { showInput, blurEvent, clickTitle } = useNodeName2(currentNode, NodeType.CHILD_PROCESS_NODE)
8889
const nodeSetting = ref()
90+
8991
// 打开节点配置
9092
const openNodeConfig = () => {
9193
if (readonly) {

src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const initProcessInfo = async (row: any, formVariables?: any) => {
157157
}
158158
159159
/** 预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次 */
160-
// TODO @芋艿:这里我执行填写表单的时候不知道为啥一直报错,先注释了
160+
// TODO @芋艿:这里我执行填写表单的时候不知道为啥一直报错,先注释了 @lesan:可以和群里的小北说下
161161
// watch(
162162
// detailForm.value,
163163
// (newValue) => {

0 commit comments

Comments
 (0)