diff --git a/src/components/PersonnelInfo.vue b/src/components/PersonnelInfo.vue index ab6cc3e..63c2123 100644 --- a/src/components/PersonnelInfo.vue +++ b/src/components/PersonnelInfo.vue @@ -102,6 +102,12 @@ export default { default: () => { return [] } + }, + // 当前节点对应的多个nodeId + currentNodeArr: { + type: Array, + required: false, + default: () => ([]) } }, data () { @@ -115,7 +121,12 @@ export default { if (this.specialProcessNodePrefix) { return this.stepsData.findIndex(tt => tt.xmlNodeId.indexOf(this.specialProcessNodePrefix) === 0) } - return this.stepsData.findIndex(tt => tt.xmlNodeId === this.currentNode) + let index = this.stepsData.findIndex(tt => tt.xmlNodeId === this.currentNode) + // 分发情况下,传入的nodeId和xmlNodeId不一样,可能是节点对应多个nodeId,但后端只传入一个其中 + if (this.currentNodeArr && this.currentNodeArr.length && index === -1) { + index = this.stepsData.findIndex(tt => this.currentNodeArr.includes(tt.xmlNodeId)) + } + return index } }, watch: { diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js index 7180129..7e79ffc 100644 --- a/src/enums/commonEnums.js +++ b/src/enums/commonEnums.js @@ -192,7 +192,7 @@ export const StandardInterpretationNodes = new EsEnums({ standardInterpreterDistribution: { text: '标准主解读人分发', value: 'master_interpret_distribute', btn: ['reject', 'transfer', 'save', 'submit'] }, standardInterpreterReDistribution: { text: '标准主解读人分发', value: 'master_interpret_again_distribute', btn: ['reject', 'transfer', 'save', 'submit'] }, interpreterFillInfo: { text: '解读人填写信息', value: 'interpreting_people_fillout', btn: ['reject', 'transfer', 'save', 'submit'] }, - mainInterpreterSingleLineReview: { text: '标准主解读人单线审核', value: 'master_interpret_approve', btn: ['reject', 'transfer', 'save', 'submit'] }, + mainInterpreterSingleLineReview: { text: '标准主解读人审核', value: 'master_interpret_approve', btn: ['reject', 'transfer', 'save', 'agree'] }, standardInterpreterSummary: { text: '标准主解读人汇总', value: 'master_interpret_summary', btn: ['transfer', 'save', 'submit'] }, countersignOne: { text: '会签', value: 'jointly_sign_1', btn: ['countersign', 'reject', 'transfer', 'save', 'agree'] }, countersignTwo: { text: '会签', value: 'jointly_sign_2', btn: ['countersign', 'reject', 'transfer', 'save', 'agree'] }, diff --git a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue index 8a2841d..f2fb451 100644 --- a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue +++ b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue @@ -106,7 +106,7 @@
- +
@@ -239,6 +239,41 @@ export default { } }, computed: { + /** + * 当前节点数组 + * 一个节点对应多个nodeId + * @return [] + */ + currentNodeArr () { + const obj = { + // 主解读人分发节点 + distributeNodes: [ + StandardInterpretationNodes.standardInterpreterDistribution.value, + StandardInterpretationNodes.standardInterpreterReDistribution.value + ], + // 会签节点 + countersignNodes: [ + StandardInterpretationNodes.countersignOne.value, + StandardInterpretationNodes.countersignTwo.value + ], + // 部门审批节点 + departCheckNodes: [ + StandardInterpretationNodes.departManagerReviewOne.value, + StandardInterpretationNodes.departManagerReviewTwo.value + ], + // 主控部门审批节点 + mainDepartCheckNodes: [ + StandardInterpretationNodes.manageOrTechnicalOfficerApprovalOne.value, + StandardInterpretationNodes.manageOrTechnicalOfficerApprovalTwo.value + ] + } + for (const key in obj) { + if (obj[key].includes(this.currentNodeId)) { + return obj[key] + } + } + return [] + }, // 是否发起节点 isInitiate () { return this.currentNodeId === StandardInterpretationNodes.initiated.value