Skip to content

Conversation

@a516597993
Copy link

查询导出改为后台进行,bootstrap-table数据超过几百页面就会卡住,记录导出行为

记录查询类型
增加后台导出
增加后台导出
增加后台导出功能
后台导出
@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

Attention: Patch coverage is 4.90798% with 155 lines in your changes missing coverage. Please review.

Project coverage is 77.84%. Comparing base (4d9d3ba) to head (6618423).

Files with missing lines Patch % Lines
sql/query.py 2.36% 124 Missing ⚠️
sql/utils/download_help.py 11.42% 31 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3016      +/-   ##
==========================================
- Coverage   78.51%   77.84%   -0.67%     
==========================================
  Files         125      126       +1     
  Lines       17822    17985     +163     
==========================================
+ Hits        13993    14001       +8     
- Misses       3829     3984     +155     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@LeoQuote LeoQuote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 代码和查询部分的代码大部分重复, 如果查询逻辑和之前的在线显示的一致, 请考虑在 query 接口处新增参数, 并在前端新增适配进行实现
  2. query type 此处设置的没有意义, 从数据安全审查角度来看, 不管用户选择了下载还是不下载, 实际上都有数据的泄露, 不应该做区分
  3. 下载方式并没有根本上的改变, 标题上写了改为后台进行, 实际上依然是在一个阻塞的 http 请求中获取生成的 excel 或其他格式的数据文件, 建议修改描述或者更改下载流程, 改为分为两步完成: 用户请求查询, 获取查询 ID, 后台进行查询, 准备文件, 用户过一段时间使用 ID 进行数据文件的下载.

@LeoQuote
Copy link
Collaborator

可参考已有的 pr #2685 , 或基于此 pr 进行修改开发

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants