diff --git a/src/api/bpm/formprocessmapping/index.ts b/src/api/bpm/formprocessmapping/index.ts index 3726b0c..411b502 100644 --- a/src/api/bpm/formprocessmapping/index.ts +++ b/src/api/bpm/formprocessmapping/index.ts @@ -40,5 +40,13 @@ export const FormProcessMappingApi = { // 导出BPM 表单工作流对应 Excel exportFormProcessMapping: async (params) => { return await request.download({ url: `/bpm/form-process-mapping/export-excel`, params }) - } + }, + // 通过流程的key得到formCustomViewPath + getFormViewPath: async (key: string) => { + return await request.get({ url: `/bpm/form-process-mapping/get-form-view-path?processKey=` + key }) + }, + // 通过流程的key得到formCustomCreatePath + getFormCreatePath: async (key: string) => { + return await request.get({ url: `/bpm/form-process-mapping/get-form-create-path?processKey=` + key }) + }, } diff --git a/src/views/bpm/knows/knowledge/KnowledgeCreate.vue b/src/views/bpm/knows/knowledge/KnowledgeCreate.vue index 4997be5..e7fd33f 100644 --- a/src/views/bpm/knows/knowledge/KnowledgeCreate.vue +++ b/src/views/bpm/knows/knowledge/KnowledgeCreate.vue @@ -8,7 +8,7 @@ > - + diff --git a/src/views/bpm/model/ModelForm.vue b/src/views/bpm/model/ModelForm.vue index 7b7fa0a..05c28f7 100644 --- a/src/views/bpm/model/ModelForm.vue +++ b/src/views/bpm/model/ModelForm.vue @@ -78,44 +78,44 @@ /> - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + { startUserSelectTasks.value = [] startUserSelectAssignees.value = {} startUserSelectAssigneesFormRules.value = {} - + //console.log(row.formType,"row.formType") + //row.formCustomCreatePath ="/bpm/knows/knowledge/KnowledgeCreate" // 情况一:流程表单 if (row.formType == 10) { // 设置表单 @@ -220,10 +222,20 @@ const handleSelect = async (row, formVariables) => { } // 情况二:业务表单 } else if (row.formCustomCreatePath) { - await push({ - path: row.formCustomCreatePath - }) - // 这里暂时无需加载流程图,因为跳出到另外个 Tab; + await push({ + path: row.formCustomCreatePath + }) + // 这里暂时无需加载流程图,因为跳出到另外个 Tab; + } else { + //console.log(row.key,"row.key") + const process_key = row.key + const formCustomCreatePath = await FormProcessMappingApi.getFormCreatePath(process_key) + // console.log(formCustomCreatePath,"formCustomCreatePath") + if (formCustomCreatePath != "") { + await push({ + path: formCustomCreatePath + }) + } } } diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index 59861cc..2e1d583 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -157,6 +157,7 @@ import { registerComponent } from '@/utils/routerHelper' import { isEmpty } from '@/utils/is' import * as UserApi from '@/api/system/user' import {TabsPaneContext} from "element-plus"; +import { FormProcessMappingApi} from '@/api/bpm/formprocessmapping' defineOptions({ name: 'BpmProcessInstanceDetail' }) @@ -285,10 +286,10 @@ const getProcessInstance = async () => { return } processInstance.value = data - console.log(data,"processInstance_data") + //console.log(data,"processInstance_data") // 设置表单信息 const processDefinition = data.processDefinition - console.log(processDefinition.formType,"processDefinition.formType") + //console.log(processDefinition.formType,"processDefinition.formType") if (processDefinition.formType === 10) { setConfAndFields2( detailForm, @@ -306,7 +307,9 @@ const getProcessInstance = async () => { //console.log(data.processDefinition.formCustomViewPath,"formCustomViewPath") if ( data.processDefinition.formCustomViewPath == "") { const process_key = data.processDefinition.key - console.log(process_key,"process_key") + //console.log(process_key,"process_key") + const formCustomViewPath = await FormProcessMappingApi.getFormViewPath(process_key) + BusinessFormComponent.value = registerComponent(formCustomViewPath) } else { BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath) }