From d34ab7feddeee675ce9af75896074d636e375de0 Mon Sep 17 00:00:00 2001 From: zhanghongyu04 <137910324+zhanghongyu04@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:37:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=80=9F=E4=B9=A6=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85=E7=94=A8=E6=88=B7id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/boook/borrwing/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/boook/borrwing/index.vue b/ruoyi-ui/src/views/boook/borrwing/index.vue index cd51c7e..33cdcb6 100644 --- a/ruoyi-ui/src/views/boook/borrwing/index.vue +++ b/ruoyi-ui/src/views/boook/borrwing/index.vue @@ -98,7 +98,7 @@ export default { borrowDialogTitle: "借书", // 借书表单 borrowForm: { - userId: "", + userId: "", // 预填充用户编号 bookId: "", borrowDate: null, expectedReturnDate: null, @@ -137,6 +137,10 @@ export default { // 如果从行点击,则预填充书籍编号 this.borrowForm.bookId = row.bookId; } + + // 自动填充当前用户的用户编号 + this.borrowForm.userId = this.$store.state.user.id || ""; // 使用用户id作为编号 + this.borrowDialogVisible = true; },