fix(training): 修复出国培训规则培训bug
This commit is contained in:
1 parent
683f602475
commit
258098ea7b
13 files changed
+280
-26
No files matched your search
@@ -27,6 +27,7 @@ from app.services.training_config_service import get_published_config, list_trai
|
||||
from app.services.lean_training_service import (
|
||||
LEAN_TRAINING_TYPE,
|
||||
create_or_update_weekly_task,
|
||||
export_dashboard_excel,
|
||||
get_current_weekly_task,
|
||||
get_weekly_task_for_admin,
|
||||
list_dashboard,
|
||||
@@ -275,3 +276,16 @@ def get_admin_lean_training_dashboard():
|
||||
_require_lean_training_manager()
|
||||
raw_task_id = request.args.get("task_id", type=int)
|
||||
return ok(list_dashboard(raw_task_id))
|
||||
|
||||
|
||||
@training_admin_bp.route("/lean-training/dashboard/export", methods=["GET"])
|
||||
def export_admin_lean_training_dashboard():
|
||||
_require_lean_training_manager()
|
||||
raw_task_id = request.args.get("task_id", type=int)
|
||||
file_data, file_name = export_dashboard_excel(raw_task_id)
|
||||
return send_file(
|
||||
BytesIO(file_data),
|
||||
as_attachment=True,
|
||||
download_name=file_name,
|
||||
mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
)
|
||||
Reference in new issue
Block a user