diff --git a/src/api/sys/WFProcess.ts b/src/api/sys/WFProcess.ts index 91cd0ed..bc36167 100644 --- a/src/api/sys/WFProcess.ts +++ b/src/api/sys/WFProcess.ts @@ -21,6 +21,8 @@ import {MyUncompletedParams} from './model/WFTaskModel' Revoke='/api/WFProcess/Revoke', // 审核撤销 RevokeAudit='/api/WFProcess/RevokeAudit', + // 获取流程图详情 + GetBPMN='/api/WFProcess/GetBPMN' } @@ -101,4 +103,10 @@ export function create( params?:CreateParams) { params, }, ); +} +/** + * @description: getPBMN + */ + export function getBPMN(params?: DeleteDraftParams) { + return defHttp.get({ url: Api.GetBPMN, params }); } \ No newline at end of file diff --git a/src/api/sys/WFSchemeInfo.ts b/src/api/sys/WFSchemeInfo.ts index 5b56b7e..7a9b15a 100644 --- a/src/api/sys/WFSchemeInfo.ts +++ b/src/api/sys/WFSchemeInfo.ts @@ -11,9 +11,13 @@ import {SchemeListParams,GetSchemeModel,AddParams, Delete = '/api/WFSchemeInfo/Delete', UpDateState = '/api/WFSchemeInfo/UpDateState', GetDetail='/api/WFSchemeInfo/Get', + // 可用模板合集 + Load='/api/WFSchemeInfo/Load', // 流程模板详细信息 LoadHistoryPage= '/api/WFScheme/LoadPage', UpdateScheme='/api/WFSchemeInfo/UpdateScheme', + // 获取某模板历史数据 + VerisonsLoad='/api/WFScheme/Load', // 获取自定义流程列表(流程发起页) GetInfoList='/api/WFSchemeInfo/GetInfoList' } @@ -27,6 +31,12 @@ export function getLoadPage(params?: SchemeListParams) { export function getDetail(params?: DetailParams){ return defHttp.get({ url: Api.GetDetail, params }); } +/** + * @description: getLoad 可用模板列表 + */ + export function getLoad(params?: SchemeListParams) { + return defHttp.get({ url: Api.Load, params }); +} /** * @description: postAdd */ @@ -57,6 +67,10 @@ export function updateState(params:StateParams){ export function getLoadHistoryPage(params?:HistoryParams){ return defHttp.get({url:Api.LoadHistoryPage,params}) } +export function getVerisonsLoad(params?:HistoryParams){ + return defHttp.get({url:Api.VerisonsLoad,params}) +} + export function updateScheme(params:SchemeParams){ return defHttp.post({ url: Api.UpdateScheme + "?id=" + params.id +"&schemeId="+params.schemeId}); } diff --git a/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue index a48cbcd..851c920 100644 --- a/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue +++ b/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue @@ -343,34 +343,45 @@ // 审核节点 let taskFrom = await !(taskRef.value) ? {} : taskRef.value.getForm(); if (taskFrom != undefined) { - wfData.push(taskFrom) + if (taskFrom.id != '') { + wfData.push(taskFrom) + } } // 子流程 let subprocessFrom = await !(subprocessRef.value) ? {} : subprocessRef.value.getForm(); if (subprocessFrom != undefined) { - wfData.push(subprocessFrom) + if (subprocessFrom.id != '') { + wfData.push(subprocessFrom) + } } // 排他网关 let gatewayInclusiveFrom = await !(exclusiveGatewayRef.value) ? {} : exclusiveGatewayRef.value.getForm(); if (gatewayInclusiveFrom != undefined) { - wfData.push(gatewayInclusiveFrom) + if (gatewayInclusiveFrom.id != '') { + wfData.push(gatewayInclusiveFrom) + } } // 并排网关 let parallelGatewayFrom = await !(parallelGatewayRef.value) ? {} : parallelGatewayRef.value.getForm(); if (parallelGatewayFrom != undefined) { - wfData.push(parallelGatewayFrom) + if (parallelGatewayFrom.id != '') { + wfData.push(parallelGatewayFrom) + } } // 包含网关 let inclusiveGatewayFrom = await !(inclusiveGatewayRef.value) ? {} : inclusiveGatewayRef.value.getForm(); if (inclusiveGatewayFrom != undefined) { - wfData.push(inclusiveGatewayFrom) + if(inclusiveGatewayFrom.id != ''){ + wfData.push(inclusiveGatewayFrom) + } } + console.log(wfData) // 3.流程节点信息 wfData.forEach(node => { if (node.type == 'myline' && !node.isInit) { node.isInit = true node.lineConditions = '' - const fromNode = this.wfData.find(t => t.id == node.from) + const fromNode = wfData.find(t => t.id == node.from) if (fromNode.type == 'userTask') { if (fromNode.btnlist.findIndex(t => t.code == 'agree' && !t.hidden) != -1) { node.lineConditions = 'agree' // 流转条件 diff --git a/src/components/ProcessDesigner/package/penal/exclusiveGateway/index.vue b/src/components/ProcessDesigner/package/penal/exclusiveGateway/index.vue index a87f402..556c4f3 100644 --- a/src/components/ProcessDesigner/package/penal/exclusiveGateway/index.vue +++ b/src/components/ProcessDesigner/package/penal/exclusiveGateway/index.vue @@ -60,7 +60,6 @@ watch( () => props.element, (newVal, oldVal) => { - console.log(newVal) if (newVal.type == "bpmn:ExclusiveGateway") { node.value.id = newVal.id node.value.type = newVal.type diff --git a/src/components/ProcessDesigner/package/penal/inclusiveGateway/index.vue b/src/components/ProcessDesigner/package/penal/inclusiveGateway/index.vue index 618042a..c62d6e6 100644 --- a/src/components/ProcessDesigner/package/penal/inclusiveGateway/index.vue +++ b/src/components/ProcessDesigner/package/penal/inclusiveGateway/index.vue @@ -60,7 +60,6 @@ watch( () => props.element, (newVal, oldVal) => { - console.log(newVal) if (newVal.type == "bpmn:ExclusiveGateway") { node.value.id = newVal.id node.value.type = newVal.type diff --git a/src/components/ProcessDesigner/package/penal/parallelGateway/index.vue b/src/components/ProcessDesigner/package/penal/parallelGateway/index.vue index 355b56e..31f2970 100644 --- a/src/components/ProcessDesigner/package/penal/parallelGateway/index.vue +++ b/src/components/ProcessDesigner/package/penal/parallelGateway/index.vue @@ -31,7 +31,6 @@ watch( () => props.element, (newVal, oldVal) => { - console.log(newVal) if (newVal.type == "bpmn:ParallelGateway") { node.value.id = newVal.id node.value.type = newVal.type diff --git a/src/components/ProcessDesigner/package/penal/subprocess/index.vue b/src/components/ProcessDesigner/package/penal/subprocess/index.vue index 6636d36..afb127c 100644 --- a/src/components/ProcessDesigner/package/penal/subprocess/index.vue +++ b/src/components/ProcessDesigner/package/penal/subprocess/index.vue @@ -9,11 +9,11 @@ - + - + @@ -22,7 +22,7 @@ + \ No newline at end of file diff --git a/src/views/demo/workflow/task/myDraft.vue b/src/views/demo/workflow/task/myDraft.vue index 37b6f24..dc6db01 100644 --- a/src/views/demo/workflow/task/myDraft.vue +++ b/src/views/demo/workflow/task/myDraft.vue @@ -8,6 +8,10 @@