Skip to content

Commit

Permalink
chore: 🔨 导出文件时,如勾选,只导出勾选项 (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsnail authored Nov 16, 2024
1 parent a6018ed commit d28d7e9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/frontend/admin/src/components/scTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export default {
return
}
if (command === 'export') {
this.exportData()
await this.exportData()
return
}
if (command === 'edit') {
Expand Down Expand Up @@ -439,6 +439,16 @@ export default {
delete reqData[config.request.pageSize]
}
Object.assign(reqData, this.tableParams)

const ids = [...new Set(this.$refs.scTable.getSelectionRows().map((x) => x.idd))].filter((x) => !!x)
if (ids.length > 0) {
reqData.dynamicFilter = {
filters: [reqData.dynamicFilter],
field: 'id',
operator: 'Any',
value: ids,
}
}
return reqData
},
//获取数据
Expand Down

0 comments on commit d28d7e9

Please sign in to comment.