From 73efcb60beeafb3b536cb04ef5a6bafeda4ea1c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Fri, 8 Dec 2023 18:12:30 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PersonnelInfo.vue | 38 +++++++++++++++---- .../StandardConsultationProcess.vue | 6 ++- 2 files changed, 35 insertions(+), 9 deletions(-) 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: {