diff --git a/src/components/PersonnelInfo.vue b/src/components/PersonnelInfo.vue index d5a8ae54..a232a67f 100644 --- a/src/components/PersonnelInfo.vue +++ b/src/components/PersonnelInfo.vue @@ -28,9 +28,21 @@
{{ step.userList }}
@@ -69,20 +81,32 @@ export default { type: String, required: false, default: null + }, + // 特殊流程需要用indexOf判断的前缀 + specialProcessNodePrefix: { + type: String, + required: false, + default: null } }, data () { return { - stepsData: [], - currentNodeIndex: 0 // 当前节点的位置 + stepsData: [] + } + }, + computed: { + // 当前节点的位置 + currentNodeIndex () { + if (this.specialProcessNodePrefix) { + return this.stepsData.findIndex(tt => tt.xmlNodeId.indexOf(this.specialProcessNodePrefix) === 0) + } + return this.stepsData.findIndex(tt => tt.xmlNodeId === this.currentNode) } }, watch: { data: { handler () { this.stepsData = JSON.parse(JSON.stringify(this.data)) - console.log(this.stepsData) - this.currentNodeIndex = this.stepsData.findIndex(tt => tt.nodeName === this.currentNode) }, deep: true, immediate: true diff --git a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue index 95414fb4..784f697a 100644 --- a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue +++ b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue @@ -253,7 +253,7 @@
@@ -732,7 +732,8 @@ export default { scopedSlots: { customRender: 'text' } } ], - businessId: null + businessId: null, + currentNodePrefix: null // 当前节点的固定前缀,用于人员信息组件处理 } }, computed: { @@ -809,6 +810,7 @@ export default { }) // 找不到这个节点默认使用审批节点页面及按钮,发起除外 this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValueByLike(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate' + this.currentNodePrefix = ConsultationProcess[this.nodeEnumsKey].value this.btnList = ConsultationProcess[this.nodeEnumsKey].btn }, methods: {