Commit 78d8782b by jason

【功能优化】 代码评审修改

parent 6be64a21
......@@ -747,9 +747,9 @@ export enum TriggerTypeEnum {
*/
HTTP_REQUEST = 1,
/**
* 更新流程表单触发器
* 流程表单更新触发器
*/
UPDATE_NORMAL_FORM = 2 // TODO @jason:FORM_UPDATE?
FORM_UPDATE = 2
}
/**
......@@ -782,5 +782,5 @@ export type FormTriggerSetting = {
export const TRIGGER_TYPES: DictDataVO[] = [
{ label: 'HTTP 请求', value: TriggerTypeEnum.HTTP_REQUEST },
{ label: '修改表单数据', value: TriggerTypeEnum.UPDATE_NORMAL_FORM }
{ label: '修改表单数据', value: TriggerTypeEnum.FORM_UPDATE }
]
......@@ -122,7 +122,7 @@
</el-form-item>
</div>
<!-- 表单数据修改触发器 -->
<div v-if="configForm.type === TriggerTypeEnum.UPDATE_NORMAL_FORM">
<div v-if="configForm.type === TriggerTypeEnum.FORM_UPDATE">
<div v-for="(formSetting, index) in configForm.formSettings" :key="index">
<el-card class="w-580px mt-4">
<template #header>
......@@ -404,7 +404,7 @@ const saveConfig = async () => {
if (configForm.value.type === TriggerTypeEnum.HTTP_REQUEST) {
configForm.value.formSettings = undefined
}
if (configForm.value.type === TriggerTypeEnum.UPDATE_NORMAL_FORM) {
if (configForm.value.type === TriggerTypeEnum.FORM_UPDATE) {
configForm.value.httpRequestSetting = undefined
}
currentNode.value.triggerSetting = configForm.value
......@@ -417,7 +417,7 @@ const getShowText = (): string => {
let showText = ''
if (configForm.value.type === TriggerTypeEnum.HTTP_REQUEST) {
showText = `${configForm.value.httpRequestSetting?.url}`
} else if (configForm.value.type === TriggerTypeEnum.UPDATE_NORMAL_FORM) {
} else if (configForm.value.type === TriggerTypeEnum.FORM_UPDATE) {
for (const [index, setting] of configForm.value.formSettings!.entries()) {
if (!setting.updateFormFields || Object.keys(setting.updateFormFields).length === 0) {
message.warning(`请添加表单设置${index + 1}的修改字段`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment