feat:新增物料
This commit is contained in:
+9
-3
@@ -131,9 +131,13 @@ def _result_text(
|
||||
lines.append("$query 已替换为查询结果:")
|
||||
for item in queries:
|
||||
note = "(结果为空,组件会没有数据)" if not item.rows else ""
|
||||
result = (
|
||||
f"取值 {item.value}"
|
||||
if item.value is not None
|
||||
else f"{item.rows} 行{note},列 {'、'.join(item.columns)}"
|
||||
)
|
||||
lines.append(
|
||||
f"- 第 {item.index + 1} 个动作 {item.node_id} 的 {item.path}:"
|
||||
f"{item.rows} 行{note},列 {'、'.join(item.columns)}"
|
||||
f"- 第 {item.index + 1} 个动作 {item.node_id} 的 {item.path}:{result}"
|
||||
)
|
||||
|
||||
old_layouts = {node.id: node.layout for node in before.nodes}
|
||||
@@ -246,7 +250,9 @@ def apply_actions(
|
||||
else ""
|
||||
)
|
||||
try:
|
||||
actions, queries = fill_queries(actions, runtime.context.data)
|
||||
actions, queries = fill_queries(
|
||||
actions, runtime.context.data, runtime.context.catalog, before
|
||||
)
|
||||
completed, after = run_batch(before, runtime.context.catalog, actions)
|
||||
# 这一批改过数据或映射的组件都核对,不论数据来自这一批的 $query、之前的提交还是直接写入
|
||||
problems = encode_problems(after, rebound_nodes(before, after))
|
||||
|
||||
Reference in New Issue
Block a user