![]() |
há 2 meses atrás | |
---|---|---|
.. | ||
README.md | há 2 meses atrás | |
__init__.py | há 2 meses atrás | |
routes.py | há 2 meses atrás |
本模块提供生产线相关的API接口,用于前端交互与数据展示。
生产线API模块提供了生产线列表查询和图谱绘制的接口,支持数据模型、数据资源和数据指标的展示和关系查询。
/production/line/list
请求参数:
{
"current": 1, // 当前页码,默认为1
"size": 10, // 每页大小,默认为10
"name": "关键词" // 可选,按名称过滤
}
json
{
"code": 200,
"success": true,
"message": "success",
"data": {
"records": [
{
"id": 123,
"name": "样例生产线",
"type": "data_model"
}
// 更多记录...
],
"total": 100,
"size": 10,
"current": 1
}
}
/production/line/graph
请求参数:
{
"id": 123 // 节点ID
}
json
{
"code": 200,
"success": true,
"message": "success",
"data": {
"nodes": [
{"id": "节点ID", "text": "节点名称", "type": "节点类型"},
// 更多节点...
],
"lines": [
{"from": "起始节点ID", "to": "目标节点ID", "text": "关系描述"},
// 更多连线...
],
"rootId": "根节点ID"
}
}
本模块通过Flask框架实现API接口,使用Neo4j图数据库进行数据查询,主要涉及以下技术点:
本模块依赖于core/production_line模块中的核心功能实现:
from app.core.production_line import production_draw_graph