Merge branch 'dev' of https://gitee.com/yudaocode/yudao-ui-admin-vue3
This commit is contained in:
@ -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([
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
<template v-else>
|
||||
<SimpleModelDesign
|
||||
v-if="showDesigner"
|
||||
:model-id="modelData.id"
|
||||
:model-key="modelData.key"
|
||||
:model-name="modelData.name"
|
||||
:model-form-id="modelData.formId"
|
||||
:model-form-type="modelData.formType"
|
||||
:start-user-ids="modelData.startUserIds"
|
||||
:start-dept-ids="modelData.startDeptIds"
|
||||
@success="handleDesignSuccess"
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -209,15 +209,18 @@ onActivated(() => {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep() {
|
||||
.el-table--fit .el-table__inner-wrapper:before {
|
||||
.el-table--fit .el-table__inner-wrapper::before {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<ContentWrap :bodyStyle="{ padding: '20px 16px' }">
|
||||
<SimpleProcessDesigner
|
||||
:model-id="modelId"
|
||||
:model-key="modelKey"
|
||||
:model-name="modelName"
|
||||
@success="handleSuccess"
|
||||
:model-form-id="modelFormId"
|
||||
:model-form-type="modelFormType"
|
||||
:start-user-ids="startUserIds"
|
||||
:start-dept-ids="startDeptIds"
|
||||
@success="handleSuccess"
|
||||
ref="designerRef"
|
||||
/>
|
||||
</ContentWrap>
|
||||
@ -19,9 +18,9 @@ defineOptions({
|
||||
})
|
||||
|
||||
defineProps<{
|
||||
modelId?: string
|
||||
modelKey?: string
|
||||
modelName?: string
|
||||
modelFormId?: number
|
||||
modelFormType?: number
|
||||
startUserIds?: number[]
|
||||
startDeptIds?: number[]
|
||||
}>()
|
||||
|
||||
Reference in New Issue
Block a user