diff --git a/src/api/bpm/formprocessmapping/index.ts b/src/api/bpm/formprocessmapping/index.ts index bd1a9c4..35938e1 100644 --- a/src/api/bpm/formprocessmapping/index.ts +++ b/src/api/bpm/formprocessmapping/index.ts @@ -54,4 +54,12 @@ export const FormProcessMappingApi = { selectProcessKey: async (fullpath: string) => { return await request.get({ url: `/bpm/form-process-mapping/get-process-key?fullpath=` + fullpath }) }, + // 通过流程的formCustomCreatePath得到formCustomViewPath + getFormCustomViewPath: async (fullpath: string) => { + return await request.get({ url: `/bpm/form-process-mapping/get-form-custom-view-path?formCustomCreatePath=` + fullpath }) + }, + // 通过流程的key得到frommapping的List + getListByProcessKey: async (key: string) => { + return await request.get({ url: `/bpm/form-process-mapping/get-by-process-key?processKey=` + key }) + }, } diff --git a/src/api/bpm/processinstancetodo/index.ts b/src/api/bpm/processinstancetodo/index.ts index e88ce73..774405e 100644 --- a/src/api/bpm/processinstancetodo/index.ts +++ b/src/api/bpm/processinstancetodo/index.ts @@ -25,7 +25,10 @@ export const ProcessInstanceTodoApi = { getProcessInstanceTodo: async (id: number) => { return await request.get({ url: `/bpm/process-instance-todo/get?id=` + id }) }, - + //通过流程实例的id得到流程业务表单 + getProcessInstanceFormCreatePath: async (processInstanceId: number) => { + return await request.get({ url: `/bpm/process-instance-todo/get-form-custom-create-path?processInstanceId=` + processInstanceId }) + }, // 新增BPM 流程实例信息 createProcessInstanceTodo: async (data: ProcessInstanceTodoVO) => { return await request.post({ url: `/bpm/process-instance-todo/create`, data }) @@ -45,4 +48,4 @@ export const ProcessInstanceTodoApi = { exportProcessInstanceTodo: async (params) => { return await request.download({ url: `/bpm/process-instance-todo/export-excel`, params }) } -} \ No newline at end of file +} diff --git a/src/views/bpm/knows/knowledge/KnowledgeCreate.vue b/src/views/bpm/knows/knowledge/KnowledgeCreate.vue index 0759a09..d4aba1a 100644 --- a/src/views/bpm/knows/knowledge/KnowledgeCreate.vue +++ b/src/views/bpm/knows/knowledge/KnowledgeCreate.vue @@ -169,6 +169,9 @@ const submitForm = async () => { } const curFullPath = currentRoute.value.fullPath + if( curFullPath ) { + data.curfullpath = curFullPath + } const processKey = await FormProcessMappingApi.selectProcessKey( curFullPath ) if ( processKey) { data.processDefinitionKey = processKey diff --git a/src/views/bpm/processInstance/create/index.vue b/src/views/bpm/processInstance/create/index.vue index fdaaed4..ba81d19 100644 --- a/src/views/bpm/processInstance/create/index.vue +++ b/src/views/bpm/processInstance/create/index.vue @@ -227,14 +227,18 @@ const handleSelect = async (row, formVariables) => { }) // 这里暂时无需加载流程图,因为跳出到另外个 Tab; } else { - //console.log(row.key,"row.key") + console.log(row.key,"row.key") const process_key = row.key const formCustomCreatePath = await FormProcessMappingApi.getFormCreatePath(process_key) - // console.log(formCustomCreatePath,"formCustomCreatePath") - if (formCustomCreatePath != "") { + console.log(formCustomCreatePath.length,"formCustomCreatePath.length") + if (formCustomCreatePath.length == 1) { await push({ - path: formCustomCreatePath + path: formCustomCreatePath[0] }) + }else { + console.log("else..............") + const formMappingList = await FormProcessMappingApi.getListByProcessKey(process_key) + console.log(formMappingList,"formMappingList") } } } diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index ba16067..b72b11e 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -24,7 +24,7 @@ - - + - + - + - +