1.Excel文件字段顺序调整

2.测试排程时增加执行记录,编号与其他场景编号分开
This commit is contained in:
hugo committed 2026-05-20 18:50:53 +08:00
1 parent ddc461f548
commit ae6ced00b5
10 files changed
+194 -76

No files matched your search

+4 -2
View File
@@ -54,6 +54,7 @@ def workspace_schedule_run_detail(run_id: int):
@workspace_schedule_bp.route('/schedule-runs/<int:run_id>/excel', methods=['GET'])
def workspace_schedule_run_excel(run_id: int):
from io import BytesIO
user, err = _require_user()
if err:
return err
@@ -62,6 +63,7 @@ def workspace_schedule_run_excel(run_id: int):
return jsonify({'error': 'Not found'}), 404
if not can_view_run(run, user.id):
return jsonify({'error': 'Forbidden'}), 403
if not run.excel_file_path:
if not run.excel_file_data:
return jsonify({'error': 'Excel not found'}), 404
return send_file(run.excel_file_path, as_attachment=True, download_name=run.excel_file_name or 'result.xlsx')
buf = BytesIO(run.excel_file_data)
return send_file(buf, as_attachment=True, download_name=run.excel_file_name or 'result.xlsx', mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')