feat: 增加 analyst 角色——仅测试数据查询/下载+修改密码
This commit is contained in:
@@ -10,12 +10,14 @@ bp = Blueprint("test_data", __name__)
|
||||
|
||||
|
||||
@bp.route("/test-data")
|
||||
@login_required
|
||||
def test_data_page():
|
||||
"""测试信息页"""
|
||||
return render_template("test_data.html")
|
||||
|
||||
|
||||
@bp.route("/api/test-data")
|
||||
@login_required
|
||||
def api_test_data():
|
||||
"""分页查询测试数据"""
|
||||
page = request.args.get("page", 1, type=int)
|
||||
@@ -38,6 +40,7 @@ def api_test_data():
|
||||
|
||||
|
||||
@bp.route("/api/test-data/chart")
|
||||
@login_required
|
||||
def api_chart_data():
|
||||
"""返回图表所需全部数据(不分页)"""
|
||||
serial = request.args.get("serial", "", type=str)
|
||||
@@ -51,6 +54,7 @@ def api_chart_data():
|
||||
return jsonify({"records": records, "total": len(records)})
|
||||
|
||||
@bp.route("/api/test-data/export")
|
||||
@login_required
|
||||
def api_export():
|
||||
"""导出测试数据为 CSV"""
|
||||
serial = request.args.get("serial", "", type=str)
|
||||
|
||||
Reference in New Issue
Block a user