From a449394a0715b9d8fc104545ac0d2c7251f53db8 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 27 Nov 2025 09:25:21 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docCenter/components/rightTable.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/publicService/docCenter/components/rightTable.vue b/src/views/publicService/docCenter/components/rightTable.vue index 0397f00..579c596 100644 --- a/src/views/publicService/docCenter/components/rightTable.vue +++ b/src/views/publicService/docCenter/components/rightTable.vue @@ -761,17 +761,22 @@ export default { return } - if ( - this.acthType == 2 || - this.authType == 'otherShare' || - this.authType == 'myShare' - ) { + if (this.acthType == 2 || this.authType == 'otherShare') { // 判断选择的文件中 有没有auth 为1的 为1时仅可查看 不能下载 const hasAuth1 = this.selectedRows.some((row) => row.auth == 1) // 如果有多个则把多个的序号拼接起来 const auth1Indexes = this.selectedRows .filter((row) => row.auth == 1) - .map((row, index) => index + 1) + .map((row) => { + // 找到该行在 tableData 中的索引 + const tableIndex = this.tableData.findIndex( + (item) => item.id === row.id, + ) + // 返回表格中的序号(索引+1) + return tableIndex !== -1 ? tableIndex + 1 : null + }) + .filter((index) => index !== null) + .sort((a, b) => a - b) if (hasAuth1) { this.$modal.msgWarning( `序号为${auth1Indexes.join(