fix 流程参数里的taskName从接口获取
This commit is contained in:
@@ -4,6 +4,8 @@ import { getAction, postAction } from './manage.js'
|
||||
const getProcessNodeList = (params) => getAction('/activiti/getNodeList', params)
|
||||
// 催办
|
||||
const urgeProcessNode = (params) => postAction('/workCenter/urging', params)
|
||||
// 获取taskName
|
||||
const queryTaskNameByTaskId = (params) => getAction('/workCenter/getByTaskId', params)
|
||||
|
||||
// 流程配置-部署
|
||||
const deployWorkFlow = (params) => getAction('/activitiModel/deploy', params)
|
||||
@@ -441,6 +443,7 @@ const getStandardEditFileByNo = (params) => getAction('/onlyOffice/findEditFileB
|
||||
export {
|
||||
getProcessNodeList,
|
||||
urgeProcessNode,
|
||||
queryTaskNameByTaskId,
|
||||
|
||||
deployWorkFlow,
|
||||
getFlowNodeList,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getProcessNodeList } from '../api/workCenter'
|
||||
import { getProcessNodeList, queryTaskNameByTaskId } from '../api/workCenter'
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO } from '../store/mutation-types'
|
||||
|
||||
@@ -95,5 +95,24 @@ export const WorkCenterMixin = {
|
||||
switchChange (value) {
|
||||
this.switchValue = value
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 所有流程详情统一从接口获取流程节点名称
|
||||
* @param to
|
||||
* @param from
|
||||
* @param next
|
||||
*/
|
||||
beforeRouteEnter (to, from, next) {
|
||||
if (to.query.taskId) {
|
||||
queryTaskNameByTaskId({taskId: to.query.taskId}).then(res => {
|
||||
if (res.success) {
|
||||
to.query.taskName = res.result.taskName
|
||||
}
|
||||
}).finally(() => {
|
||||
next()
|
||||
})
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user