36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
"""报表发布时创建的 API 权限模板"""
|
|
from __future__ import annotations
|
|
|
|
from typing import Any, Dict, List, Tuple
|
|
|
|
REPORT_ACTIONS: List[Tuple[str, str, bool, int, str, str]] = [
|
|
("preview", "预览", True, 1, "POST", "/api/online_dev/report/data/preview-template"),
|
|
("export", "导出", True, 1, "POST", "/api/online_dev/report/data/export-excel/template"),
|
|
("export_pdf", "导出PDF", True, 1, "POST", "/api/online_dev/report/data/export-pdf/template"),
|
|
("design", "设计", True, 1, "POST", "/api/online_dev/report/save"),
|
|
("publish", "发布", True, 1, "POST", "/api/online_dev/report/{template_id}/publish"),
|
|
]
|
|
|
|
REPORT_ADMIN_PERMISSIONS: List[Dict[str, Any]] = [
|
|
{
|
|
"code": "report:admin:list",
|
|
"name": "报表管理-列表",
|
|
"api_path": "/api/online_dev/report/list",
|
|
"http_method": 0,
|
|
},
|
|
{
|
|
"code": "report:admin:save",
|
|
"name": "报表管理-保存",
|
|
"api_path": "/api/online_dev/report/save",
|
|
"http_method": 1,
|
|
},
|
|
{
|
|
"code": "report:admin:import",
|
|
"name": "报表管理-导入",
|
|
"api_path": "/api/online_dev/report/import",
|
|
"http_method": 1,
|
|
},
|
|
]
|