diff --git a/src/main.js b/src/main.js index 9a21d14e2..3a04c4e08 100644 --- a/src/main.js +++ b/src/main.js @@ -59,15 +59,19 @@ router.beforeEach(function (to, from, next) { let prcNum = to.query.prcNum; let prcName = to.query.prcName; let prcType = to.query.prcType; + let param = "?taskIds="+taskId+"&prcId="+prcId + +"&prcNum="+prcNum+"&prcName="+prcName+"&prcType="+prcType; if(taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null){ get_verify_by_instance({ taskId: taskId, // 任务id pId: prcId // 流程实例 }).then(res => { - if(res && res > 0){ - let param = "?taskIds="+taskId+"&prcId="+prcId - +"&prcNum="+prcNum+"&prcName="+prcName+"&prcType="+prcType; - // 根据type判断跳转具体流程页面 + let hisCount = res.hisCount === undefined ? 0 : res.hisCount; + let commitStatus = res.commitStatus === undefined ? 0 : res.commitStatus; + let isNotFinished = res.isNotFinished === undefined ? 0 :res.isNotFinished; + + if(hisCount && hisCount > 0){ // 业务系统 当前节点已完成 + // 根据type判断跳转具体流程页面 if (prcType === '1') { // 标准入库流程数据 next({path:"bzrkStep5"+param}) @@ -103,6 +107,18 @@ router.beforeEach(function (to, from, next) { //项目清单确认 next({path:"xmqdqrStep1-3"+param}) } + }else { // 业务系统 当前节点未完成 + // commitStatus 大于0 表示当前节点存在未完成干活流程 + if(isNotFinished && isNotFinished > 0 && commitStatus && commitStatus > 0){ + if(prcType === '3'){ + //标准征求意见 接受节点 未完成 oa已办 跳转详情页面 + if(path === '/bzzqyjStep3'){ + next({path:"processAcceptDetail?prcNum="+prcNum+"&tabsName=AlreadyProcess"}) + } + } + }else{ + next() + } } console.log("res : res =>", res); })