From 1de17cadb5a7342b2bfabdf79a07541c9272893d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 19 Feb 2025 12:55:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E3=80=91BPM=EF=BC=9A=E8=A7=A6=E5=8F=91=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8A=82=E7=82=B9=E7=9A=84=E8=AF=84=E5=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SimpleProcessDesignerV2/src/node.ts | 12 ++++++------ .../src/nodes-config/ConditionNodeConfig.vue | 5 ++--- .../src/nodes-config/TriggerNodeConfig.vue | 12 +++--------- .../src/nodes-config/components/ConditionDialog.vue | 6 +++++- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/node.ts b/src/components/SimpleProcessDesignerV2/src/node.ts index edd38fcd..e3ac7c26 100644 --- a/src/components/SimpleProcessDesignerV2/src/node.ts +++ b/src/components/SimpleProcessDesignerV2/src/node.ts @@ -551,21 +551,21 @@ export function useTaskStatusClass(taskStatus: TaskStatusEnum | undefined): stri /** 条件组件文字展示 */ export function getConditionShowText( - conditonType: ConditionType | undefined, + conditionType: ConditionType | undefined, conditionExpression: string | undefined, conditionGroups: ConditionGroup | undefined, fieldOptions: Array> ) { let showText = '' - if (conditonType === ConditionType.EXPRESSION) { + if (conditionType === ConditionType.EXPRESSION) { if (conditionExpression) { showText = `表达式:${conditionExpression}` } } - if (conditonType === ConditionType.RULE) { + if (conditionType === ConditionType.RULE) { // 条件组是否为与关系 const groupAnd = conditionGroups?.and - let warningMesg: undefined | string = undefined + let warningMessage: undefined | string = undefined const conditionGroup = conditionGroups?.conditions.map((item) => { return ( '(' + @@ -581,7 +581,7 @@ export function getConditionShowText( ) } else { // 有一条规则不完善。提示错误 - warningMesg = '请完善条件规则' + warningMessage = '请完善条件规则' return '' } }) @@ -589,7 +589,7 @@ export function getConditionShowText( ' ) ' ) }) - if (warningMesg) { + if (warningMessage) { showText = '' } else { showText = conditionGroup!.join(groupAnd ? ' 且 ' : ' 或 ') diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue index c7881cd2..6efed260 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue @@ -104,11 +104,10 @@ const handleClose = async (done: (cancel?: boolean) => void) => { done() } } -// 流程表单字段和发起人字段 -const fieldOptions = useFormFieldsAndStartUser() +/** 保存配置 */ +const fieldOptions = useFormFieldsAndStartUser() // 流程表单字段和发起人字段 const conditionRef = ref() -// 保存配置 const saveConfig = async () => { if (!currentNode.value.conditionSetting?.defaultFlow) { // 校验表单 diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue index ec2baffd..b2e2e330 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue @@ -252,17 +252,11 @@ import { FormTriggerSetting, DEFAULT_CONDITION_GROUP_VALUE } from '../consts' -import { - useWatchNode, - useDrawer, - useNodeName, - useFormFields, - useFormFieldsAndStartUser, - getConditionShowText -} from '../node' +import { useWatchNode, useDrawer, useNodeName, useFormFields, getConditionShowText } from '../node' import HttpRequestParamSetting from './components/HttpRequestParamSetting.vue' import ConditionDialog from './components/ConditionDialog.vue' const { proxy } = getCurrentInstance() as any + defineOptions({ name: 'TriggerNodeConfig' }) @@ -314,7 +308,7 @@ const optionalUpdateFormFields = computed(() => { })) }) -/** 添加 HTTP 请求返回值设置项*/ +/** 添加 HTTP 请求返回值设置项 */ const addHttpResponseSetting = (responseSetting: Record[]) => { responseSetting.push({ key: '', diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue index 1ac60b59..7b45901e 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue @@ -1,3 +1,4 @@ +