fix: [BPM 工作流] 更多设置不能选中表单项问题

This commit is contained in:
jason
2025-07-22 09:40:59 +08:00
parent ab8761d44c
commit f14dead55a
4 changed files with 71 additions and 27 deletions

View File

@ -232,6 +232,34 @@ import { ProcessVariableEnum } from '@/components/SimpleProcessDesignerV2/src/co
import HttpRequestSetting from '@/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestSetting.vue'
const modelData = defineModel<any>()
const formFields = ref<string[]>([])
const props = defineProps({
// 流程表单 ID
modelFormId: {
type: Number,
required: false,
default: undefined,
}
})
// 监听 modelFormId 变化
watch(
() => props.modelFormId,
async (newVal) => {
if (newVal) {
const form = await FormApi.getForm(newVal);
formFields.value = form?.fields;
} else {
// 如果 modelFormId 为空,清空表单字段
formFields.value = [];
}
},
{ immediate: true },
);
// 暴露给子组件使用
provide('formFields', formFields)
/** 自定义 ID 流程编码 */
const timeOptions = ref([

View File

@ -77,7 +77,10 @@
<!-- 第四步更多设置 -->
<div v-show="currentStep === 3" class="mx-auto w-700px">
<ExtraSettings v-model="formData" ref="extraSettingsRef" />
<ExtraSettings
ref="extraSettingsRef"
v-model="formData"
:model-form-id="formData.formId"/>
</div>
</div>
</div>