{% set node_data = get_step_node_data(request) %} {% set task_id = params_kw.get('task_id', '') %} {% set step_name = params_kw.get('step_name', '') %} {% set mode = params_kw.get('mode', 'view') %} { "widgettype": "VBox", "options": {"width": "100%", "padding": "16px"}, "subwidgets": [ { "widgettype": "HBox", "options": {"width": "100%", "marginBottom": "16px", "gap": "12px", "alignItems": "center"}, "subwidgets": [ { "widgettype": "Button", "options": {"label": "← 返回任务详情"}, "binds": [{ "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.pipeline_task_content", "options": {"url": "{{entire_url('task_detail.ui')}}?task_id={{task_id}}"}, "mode": "replace" }] }, {"widgettype": "Title", "options": {"text": "步骤产物: {{step_name}}", "cfontsize": 18}} ] }, {% if node_data.success %} { "widgettype": "VBox", "options": {"width": "100%"}, "subwidgets": [ {% if node_data.input %} { "widgettype": "VBox", "options": {"width": "100%", "bgcolor": "var(--card-bg)", "padding": "16px", "marginBottom": "12px"}, "subwidgets": [ {"widgettype": "Text", "options": {"text": "📥 输入产物", "cfontsize": 15}}, {"widgettype": "Text", "options": {"text": "{{json.dumps(node_data.input, ensure_ascii=False)}}"}} ] }, {% endif %} {% if node_data.output %} { "widgettype": "VBox", "options": {"width": "100%", "bgcolor": "var(--card-bg)", "padding": "16px", "marginBottom": "12px"}, "subwidgets": [ {"widgettype": "Text", "options": {"text": "📤 输出产物", "cfontsize": 15}}, {"widgettype": "Text", "options": {"text": "{{json.dumps(node_data.output, ensure_ascii=False)}}"}} ] }, {% endif %} {% if not node_data.input and not node_data.output %} {"widgettype": "Text", "options": {"text": "该步骤暂无产物数据"}}, {% endif %} { "widgettype": "Filler" } ] }, {% else %} { "widgettype": "Text", "options": {"text": "加载失败: {{node_data.message or '未知错误'}}"} }, {% endif %} {% if mode == 'edit' %} { "widgettype": "VBox", "options": {"width": "100%", "bgcolor": "var(--card-bg)", "padding": "16px", "marginTop": "16px"}, "subwidgets": [ {"widgettype": "Text", "options": {"text": "修改产物并级联重跑", "cfontsize": 15}}, { "widgettype": "Form", "options": { "name": "modify_form", "submit_url": "{{entire_url('api/task_modify.dspy')}}", "fields": [ {"name": "task_id", "uitype": "hide", "value": "{{task_id}}"}, {"name": "step_name", "uitype": "hide", "value": "{{step_name}}"}, {"name": "rerun_from", "uitype": "hide", "value": "node"}, {"name": "content", "uitype": "text", "label": "修改后的JSON产物", "placeholder": "留空则直接重跑此步骤及下游"} ] }, "binds": [ { "wid": "self", "event": "submited", "actiontype": "script", "target": "self", "script": "var tid='{{task_id}}';alert('修改成功,产线继续执行');location.href='{{entire_url('task_detail.ui')}}?task_id='+tid" } ] } ] }, {% else %} { "widgettype": "HBox", "options": {"width": "100%", "marginTop": "16px", "gap": "8px"}, "subwidgets": [ { "widgettype": "Button", "options": {"label": "修改产物"}, "binds": [{ "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.pipeline_task_content", "options": {"url": "{{entire_url('step_panel.ui')}}?task_id={{task_id}}&step_name={{step_name}}&mode=edit"}, "mode": "replace" }] }, {"widgettype": "Filler"} ] }, {% endif %} {"widgettype": "Filler"} ] }