From 946f9f41ec8c3d7d49c0cbd2796361d1b8b78fac Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 23 May 2025 16:20:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../passwordBook/personnelPasswordBook.html | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html b/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html index 3768f5f..1628af9 100644 --- a/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html +++ b/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html @@ -137,12 +137,14 @@ } if (res.obj && res.obj.length > 0) { $('.password-book-list').empty() - $('.password-book-list').append( - '
' + - '' + item.fileName + '' + - `删除` + // 直接传 id - '
' - ); + res.obj.forEach(item => { + $('.password-book-list').append( + '
' + + '' + item.fileName + '' + + `删除` + // 直接传 id + '
' + ); + }) } } }) @@ -151,10 +153,13 @@ getUploadFile() // 删除文件 - function deleteFile(id) { - console.log('删除', id) + function deleteFile() { + console.log('删除', $(this).data('id')) } + + +