{
  "type": "page",
  "body": [{
      "type": "wrapper",
      "visibleOn": "${AND(display != 'split', ${window:innerWidth > 768},!!!_inDrawer)}",
      "className": "bg-white m-0 p-0 flex-shrink-0 min-w-[240px] lg:order-first lg:flex lg:flex-col border-r border-gray-300",
      "body": [{
        "type": "service",
        "className": "w-full h-full",
        "onEvent": {
          "@data.changed.steedos_keyvalues": {
            "actions": [
              {
                "actionType": "setValue",
                "args": {
                    "value": {
                      "workflowNavApiCacheKey": "${_|now|date:'x'}"
                    }
                }
              }
            ]
          }
        },
        "body": [{
          "type": "input-tree",
          "treeContainerClassName": "h-full",
          "name": "tree",
          "className": "instance-box-tree bg-white w-full",
          "id": "u:9f3dd961ca12",
          "stacked": true,
          "multiple": false,
          "enableNodePath": false,
          "hideRoot": true,
          "showIcon": true,
          "initiallyOpen": false,
          "virtualThreshold": 100000,
          "value": "/app/${appId}/${objectName}/grid/${listName}",
          "size": "md",
          "onEvent": {
            "change": {
              "actions": [{
                "args": {
                  "link": "${event.data.value}",
                  "blank": false
                },
                "actionType": "link"
              }]
            }
          },
          "menuTpl": {
            "type": "wrapper",
            "className": "flex flex-row  p-0 m-0",
            "body": [{
                "type": "tpl",
                "className": "flex-1 w-6/12",
                "tpl": "${label}",
                "id": "u:8147616a7b50"
              },
              {
                "type": "tpl",
                "className": "-mx-11 ",
                "tpl": "",
                "badge": {
                  "className": "h-0",
                  "offset": [
                    -20,
                    12
                  ],
                  "mode": "text",
                  "text": "${tag | toInt}",
                  "overflowCount": 999
                },
                "id": "u:94f078e62361"
              }
            ],
            "id": "u:decad07ad26b"
          },
          "unfoldedLevel": 2,
          "source": "${options}"
        }],
        "id": "u:workflow_nav_service",
        "api": {
          "method": "get",
          "url": "${context.rootUrl}/api/${appId}/workflow/nav?cacheKey=${workflowNavApiCacheKey}",
          "cache": 1800000,
          "headers": {
            "Authorization": "Bearer ${context.tenantId},${context.authToken}"
          }
        },
        "dsType": "api"
      }],
      "id": "u:3723a0a5ded0",
      "mobile": {
        "visibleOn": "false"
      }
    },
    {
      "type": "wrapper",
      "className": "steedos-instance-detail-wrapper m-0 p-0 flex-1 focus:outline-none lg:order-last sm:pt-3 sm:px-3",
      "body": [{
        "type": "service",
        "id": "u:d6db0c84f150",
        "body": [{
            "type": "wrapper",
            "className": "p-0 h-full",
            "body": [{
              "type": "steedos-instance-detail",
              "id": "u:40052b3812c1",
              "label": "Instance Detail",
              "instanceId": "\\${recordId}",
              "boxName": "${side_listview_id}",
              "hiddenOn": "!!!this.recordId"
            }],
            "visibleOn": "${window:InstanceDetailEnabledAmisRender != false}",
            "id": "u:829a40757f0a"
          },
          {
            "type": "wrapper",
            "className": "workflow-main flex w-full h-full no-columns instance-show instance-detail-service-wrapper",
            "visibleOn": "${window:InstanceDetailEnabledAmisRender == false}",
            "body": [{
              "type": "custom",
              "html": "<div className='workflow-main flex w-full h-full no-columns instance-show instance-detail-service-wrapper'></div>",
              "onMount": "try {\n    Session.set(\"instance_change\", false);\n\n    Session.set(\"instance_loading\", true);\n    Session.set(\"judge\", null);\n    Session.set(\"next_step_id\", null);\n    Session.set(\"next_step_multiple\", null);\n    Session.set(\"next_user_multiple\", null);\n    let box;\n    let recordId;\n    if (props.data._inDrawer) {\n        // 主表记录详细页面审批相关列表中点击名称字段右侧弹出drawer时，box写死，recordId取作用域中值\n        box = \"outbox\";\n        recordId = props.data.recordId;\n    }\n    else {\n        box = props.data.side_listview_id;\n        recordId = Session.get(\"record_id\");\n    }\n    Session.set(\"box\", box);\n    Session.set(\"instanceId\", recordId);\n    Session.set(\"instanceTaskId\", null);\n    window.instanceDetailBlazeRenderView = Blaze.render(Blaze._getTemplate('instance_view_wrapper'), document.getElementsByClassName('instance-detail-service-wrapper')[0])\n} catch (error) {\n    console.error(error)\n};\nif (window.instanceDetailBlazeRenderView) {\n    window.instanceDetailBlazeRenderView.autorun(() => {\n        if (FlowRouter.current().params.object_name == \"instances\") {\n            console.debug('====onMount=', props);\n            Session.set(\"instanceId\", Session.get(\"record_id\"));\n            Session.set(\"instanceTaskId\", null)\n        }\n    }\n    )\n};",
              "id": "u:a6e0685d1da3",
              "onUnmount": "if(window.instanceDetailBlazeRenderView){console.log('Blaze.remove===>instanceDetailBlazeRenderView');Blaze.remove(window.instanceDetailBlazeRenderView); window.instanceDetailBlazeRenderView = null;}"
            }],
            "id": "u:16cf880c925a",
            "style": {
              "position": "static",
              "display": "block"
            },
            "isFixedHeight": false,
            "isFixedWidth": false
          }
        ],
        "className": "h-full",
        "dsType": "api"
      }],
      "id": "u:f101829e8710"
    }
  ],
  "regions": [
    "body"
  ],
  "data": {},
  "id": "u:d37465183f56",
  "className": "steedos-instance-wrapper",
  "bodyClassName": "p-0 flex flex-1 overflow-hidden h-full",
  "name": "amis-root-workflow",
  "initApi": null,
  "initFetch": null,
  "asideResizor": false,
  "pullRefresh": {
    "disabled": true
  },
  "editorState": "default"
}