Skip to content

Commit 1de17ca

Browse files
committed
【代码评审】BPM:触发器,修改节点的评审
1 parent 78d8782 commit 1de17ca

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

src/components/SimpleProcessDesignerV2/src/node.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,21 +551,21 @@ export function useTaskStatusClass(taskStatus: TaskStatusEnum | undefined): stri
551551

552552
/** 条件组件文字展示 */
553553
export function getConditionShowText(
554-
conditonType: ConditionType | undefined,
554+
conditionType: ConditionType | undefined,
555555
conditionExpression: string | undefined,
556556
conditionGroups: ConditionGroup | undefined,
557557
fieldOptions: Array<Record<string, any>>
558558
) {
559559
let showText = ''
560-
if (conditonType === ConditionType.EXPRESSION) {
560+
if (conditionType === ConditionType.EXPRESSION) {
561561
if (conditionExpression) {
562562
showText = `表达式:${conditionExpression}`
563563
}
564564
}
565-
if (conditonType === ConditionType.RULE) {
565+
if (conditionType === ConditionType.RULE) {
566566
// 条件组是否为与关系
567567
const groupAnd = conditionGroups?.and
568-
let warningMesg: undefined | string = undefined
568+
let warningMessage: undefined | string = undefined
569569
const conditionGroup = conditionGroups?.conditions.map((item) => {
570570
return (
571571
'(' +
@@ -581,15 +581,15 @@ export function getConditionShowText(
581581
)
582582
} else {
583583
// 有一条规则不完善。提示错误
584-
warningMesg = '请完善条件规则'
584+
warningMessage = '请完善条件规则'
585585
return ''
586586
}
587587
})
588588
.join(item.and ? ' 且 ' : ' 或 ') +
589589
' ) '
590590
)
591591
})
592-
if (warningMesg) {
592+
if (warningMessage) {
593593
showText = ''
594594
} else {
595595
showText = conditionGroup!.join(groupAnd ? ' 且 ' : ' 或 ')

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ const handleClose = async (done: (cancel?: boolean) => void) => {
104104
done()
105105
}
106106
}
107-
// 流程表单字段和发起人字段
108-
const fieldOptions = useFormFieldsAndStartUser()
109107
108+
/** 保存配置 */
109+
const fieldOptions = useFormFieldsAndStartUser() // 流程表单字段和发起人字段
110110
const conditionRef = ref()
111-
// 保存配置
112111
const saveConfig = async () => {
113112
if (!currentNode.value.conditionSetting?.defaultFlow) {
114113
// 校验表单

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,17 +252,11 @@ import {
252252
FormTriggerSetting,
253253
DEFAULT_CONDITION_GROUP_VALUE
254254
} from '../consts'
255-
import {
256-
useWatchNode,
257-
useDrawer,
258-
useNodeName,
259-
useFormFields,
260-
useFormFieldsAndStartUser,
261-
getConditionShowText
262-
} from '../node'
255+
import { useWatchNode, useDrawer, useNodeName, useFormFields, getConditionShowText } from '../node'
263256
import HttpRequestParamSetting from './components/HttpRequestParamSetting.vue'
264257
import ConditionDialog from './components/ConditionDialog.vue'
265258
const { proxy } = getCurrentInstance() as any
259+
266260
defineOptions({
267261
name: 'TriggerNodeConfig'
268262
})
@@ -314,7 +308,7 @@ const optionalUpdateFormFields = computed(() => {
314308
}))
315309
})
316310
317-
/** 添加 HTTP 请求返回值设置项*/
311+
/** 添加 HTTP 请求返回值设置项 */
318312
const addHttpResponseSetting = (responseSetting: Record<string, string>[]) => {
319313
responseSetting.push({
320314
key: '',

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- TODO @jason:有可能,它里面套 Condition 么? -->
12
<template>
23
<Dialog v-model="dialogVisible" title="条件配置" width="600px" :fullscreen="false">
34
<div class="h-410px">
@@ -106,7 +107,10 @@
106107
<el-input v-model="rule.rightSide" style="width: 160px" />
107108
</el-form-item>
108109
</div>
109-
<div class="cursor-pointer mr-1 flex items-center" v-if="equation.rules.length > 1">
110+
<div
111+
class="cursor-pointer mr-1 flex items-center"
112+
v-if="equation.rules.length > 1"
113+
>
110114
<Icon
111115
icon="ep:delete"
112116
:size="18"

0 commit comments

Comments
 (0)