From 65ac3e68301d77990657dc5e2121090cab06bcd3 Mon Sep 17 00:00:00 2001 From: yangzhq68909 <993367776@qq.com> Date: Thu, 24 Jul 2025 11:01:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E9=94=80=E5=81=87=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E6=98=BE=E7=A4=BA=E5=85=A8=E9=83=A8=E5=8A=B3?= =?UTF-8?q?=E8=B5=84=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages-humanResource/absence/add.vue | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/pages-humanResource/absence/add.vue b/src/pages-humanResource/absence/add.vue index 76e9b69..c92f8b9 100644 --- a/src/pages-humanResource/absence/add.vue +++ b/src/pages-humanResource/absence/add.vue @@ -338,21 +338,16 @@ roleId: '1554379432313397250', orgCode: code }).then(res => { - if (res.result.length == 0) { - toast.warning('请切换工作单位!') - setTimeout(() => { - uni.navigateBack() - }, 2000) - } else { + if (res.result.length > 0) { model.hr = res.result[0].username - if (!code) { - hrData.value = res.result.map(item => { - return { - label: item.realname, - value: item.username - } - }) - } + } + if (!code) { + hrData.value = res.result.map(item => { + return { + label: item.realname, + value: item.username + } + }) } }) }