diff --git a/src/components/SimpleProcessDesignerV2/src/node.ts b/src/components/SimpleProcessDesignerV2/src/node.ts index 23e3c52d..407fd483 100644 --- a/src/components/SimpleProcessDesignerV2/src/node.ts +++ b/src/components/SimpleProcessDesignerV2/src/node.ts @@ -106,14 +106,16 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType) getNodeConfigFormFields } } + /** - * @description 获取流程表单的字段。 + * @description 获取流程表单的字段 */ export function useFormFields() { const formFields = inject>('formFields', ref([])) // 流程表单字段 return parseFormCreateFields(unref(formFields)) } +// TODO @芋艿:后续需要把各种类似 useFormFieldsPermission 的逻辑,抽成一个通用方法。 /** * @description 获取流程表单的字段和发起人字段 */ @@ -155,19 +157,19 @@ export type UserTaskFormType = { taskCreateListenerEnable?: boolean taskCreateListenerPath?: string taskCreateListener?: { - header: HttpRequestParam[], + header: HttpRequestParam[] body: HttpRequestParam[] } taskAssignListenerEnable?: boolean taskAssignListenerPath?: string taskAssignListener?: { - header: HttpRequestParam[], + header: HttpRequestParam[] body: HttpRequestParam[] } taskCompleteListenerEnable?: boolean taskCompleteListenerPath?: string - taskCompleteListener?:{ - header: HttpRequestParam[], + taskCompleteListener?: { + header: HttpRequestParam[] body: HttpRequestParam[] } signEnable: boolean diff --git a/src/views/bpm/processInstance/report/index.vue b/src/views/bpm/processInstance/report/index.vue index 57a5f349..ae0bd172 100644 --- a/src/views/bpm/processInstance/report/index.vue +++ b/src/views/bpm/processInstance/report/index.vue @@ -72,7 +72,7 @@ :label="item.title" :prop="item.field" > - + - + + { } } +/** 获取流程定义 */ const getProcessDefinition = async () => { const processDefinition = await DefinitionApi.getProcessDefinition(processDefinitionId) formFields.value = parseFormCreateFields(processDefinition.formFields) } +/** 解析表单字段 */ const parseFormCreateFields = (formFields?: string[]) => { const result: Array> = [] if (formFields) { @@ -210,8 +213,11 @@ const resetQuery = () => { /** 初始化 **/ onMounted(async () => { + // 获取流程定义,用于 table column 的展示 await getProcessDefinition() + // 获取流程列表 await getList() + // 获取用户列表 userList.value = await UserApi.getSimpleUserList() })