From 6d89eca6e4ddffc0d5d442748b49d3c142c0c328 Mon Sep 17 00:00:00 2001 From: shihao0303 <2936013465@qq.com> Date: Tue, 2 Dec 2025 23:26:42 +0800 Subject: [PATCH] =?UTF-8?q?202512022323-start=E8=8E=B7=E5=8F=96=E8=AD=A6?= =?UTF-8?q?=E5=91=98=E5=88=97=E8=A1=A8=E5=8A=A0=E4=B8=8A=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/reportAudit/start.vue | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/components/reportAudit/start.vue b/src/components/reportAudit/start.vue index 29f9b4f..cbcf746 100644 --- a/src/components/reportAudit/start.vue +++ b/src/components/reportAudit/start.vue @@ -28,6 +28,7 @@ }); let polices = ref([]) function getPoliceList() { + debugger listPolice(query.value).then((data) => { polices.value = data.records; }); @@ -90,6 +91,7 @@ } const submitFun = async ()=>{ + debugger await auditForm.value.validate(); await feedback.confirm("是否确认通过?"); formData.value.reportId = props.reportId; @@ -129,6 +131,8 @@ }) //获用户名称 watch(()=>formData.value.approverId,(val)=>{ + debugger + console.log(polices.value) if(props.isWarning && "inform" === props.isWarning){ return; } @@ -152,6 +156,7 @@ watch(()=>props.dialog,(val)=>{ + debugger if(val){ const data = catchSotre.getDepartNotPolice() const departId = userStore.user.departId; @@ -199,6 +204,23 @@ } }) + + watch( + () => polices.value, + (list) => { + if (!formData.value.approverId) return + + const target = list.find( + s => String(s.idCode) === String(formData.value.approverId) + ) + if (target) { + formData.value.approver = target.name + console.log('polices 加载完成后命中 approver:', target.name) + } + }, + { deep: true } + ) + function getShortName(departData, id) { let name = null; if (departData) {