From 99afcd44d59b1200e928830a342c2b6ea24e8a4f Mon Sep 17 00:00:00 2001 From: pch <75729660@qq.com> Date: Tue, 26 Nov 2024 10:50:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=9A=E5=8A=A1=E8=A1=A8?= =?UTF-8?q?=E5=8D=951=EF=BC=9An=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/formprocessmapping/index.ts | 8 ++++ src/api/bpm/processinstancetodo/index.ts | 7 +++- .../bpm/knows/knowledge/KnowledgeCreate.vue | 3 ++ .../bpm/processInstance/create/index.vue | 12 ++++-- .../bpm/processInstance/detail/index.vue | 41 ++++++++++--------- 5 files changed, 45 insertions(+), 26 deletions(-) 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 @@ - - + - + - + - +