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')) } + + +