From 859170194b677ea83ffad725bb60fc98790da96a Mon Sep 17 00:00:00 2001 From: wsm <2746563060@qq.com> Date: Fri, 26 Jun 2026 16:55:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(xispeak):=20=E5=8F=8D=E9=A6=88=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E8=BF=87=E6=BB=A4=E6=94=B9=E7=94=A8=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=B8=AD=E7=9A=84=E9=83=A8=E9=97=A8=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原先用登录用户部门(getCurrentUserDeptId)过滤,改为从流程变量 (vars.implDept/dept_id/pending_depts_id)中读取当前流程所属部门, 覆盖收集流程、反馈流程和主流程子流程三种场景。 Co-Authored-By: Claude Opus 4.7 --- .../xispeak/components/BgXiSpeakBPMForm.vue | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue b/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue index 662be6a..c207cc5 100644 --- a/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue +++ b/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue @@ -577,6 +577,17 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi } } + function getProcessVarDeptIds(): string[] { + const vars = (props.formData?.vars ?? {}) as Record; + const value = vars.implDept ?? vars.impl_dept_id ?? vars.pending_depts_id ?? vars.dept_id ?? vars.deptid; + if (!value) return []; + if (Array.isArray(value)) return value.map((v: any) => String(v).trim()).filter(Boolean); + return String(value) + .split(',') + .map((s: string) => s.trim()) + .filter(Boolean); + } + function getCurrentUserDeptId() { const userInfo = (userStore.getUserInfo || {}) as Record; const loginInfo = (userStore.getLoginInfo || {}) as Record; @@ -603,13 +614,13 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi const res = await apiFn({ mainId: mainForm.id, bpmProcessId, pageNo: 1, pageSize: 999 }); let list = res?.records || res?.result?.records || []; if (list.length && showDeptFeedback.value) { - const deptId = getCurrentUserDeptId(); - if (deptId) { + const deptIds = getProcessVarDeptIds(); + if (deptIds.length) { list = list.filter((item: any) => { - const deptIds = String(item.responDeptid || '') + const responDeptIds = String(item.responDeptid || '') .split(',') .map((s: string) => s.trim()); - return deptIds.includes(String(deptId)); + return deptIds.some((id) => responDeptIds.includes(id)); }); } }