{ "type" : "page", "title" : "功能编辑列表", "body" : { "type" : "crud", "api" : "/api/flow/VIEW_TEMPLATE_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "TYPE", "label" : "模板类型", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/TEMPLATETYPE" }, { "name" : "ENTITYS", "label" : "实体", "hidden" : true, "type" : "select", "multiple" : true, "clearable" : true, "searchable" : true, "source" : "/api/picker//list?q=${term}&page=${page}&perPage=${perPage}" }, { "name" : "XML", "label" : "模板XML", "hidden" : true, "type" : "input-text" }, { "name" : "NAME", "label" : "功能名称", "type" : "input-text" }, { "name" : "ENGINECLASS", "label" : "模板解析类", "type" : "input-text" }, { "name" : "CANDOMENU", "label" : "可作为菜单", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO" } ] }, "columns" : [ { "name" : "NAME", "label" : "功能名称", "width" : 200 }, { "name" : "TYPE", "label" : "模板类型", "width" : 50, "type" : "mapping", "map" : { "1" : "列表模板", "3" : "树模板", "4" : "树和列表模板", "5" : "日历模板", "6" : "组合模板", "7" : "表单模板", "100" : "列表窗口模板", "101" : "树窗口模板", "200" : "报表模板" } }, { "name" : "ENTITYS", "label" : "实体", "width" : 80, "toggled" : false }, { "name" : "XML", "label" : "模板XML", "width" : 200, "toggled" : false }, { "name" : "VIEW_TEMPLATE_ID", "label" : "ID", "width" : 200 }, { "name" : "CANDOMENU", "label" : "可作为菜单", "width" : 35, "type" : "mapping", "map" : { "0" : "否", "1" : "是", "false" : "否", "true" : "是" } }, { "name" : "ENGINECLASS", "label" : "模板解析类", "width" : 240 } ], "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/f8fcab7b-751f-423e-ab2f-bc05eba39bd4?format=amis", "api" : { "method" : "get", "url" : "/api/form/VIEW_TEMPLATE/defaults?templateId=f8fcab7b-751f-423e-ab2f-bc05eba39bd4" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/VIEW_TEMPLATE_ADD?__egtpl=f8fcab7b-751f-423e-ab2f-bc05eba39bd4", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "修改", "label" : "修改", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "修改", "size" : "lg", "data" : { "&" : "${selectedItems[0]}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/f8fcab7b-751f-423e-ab2f-bc05eba39bd4?format=amis", "api" : { "method" : "post", "url" : "/api/flow/VIEW_TEMPLATE_LOAD?__egtpl=f8fcab7b-751f-423e-ab2f-bc05eba39bd4", "data" : { "VIEW_TEMPLATE_ID" : "${VIEW_TEMPLATE_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "a1002c5c-7496-4227-98a9-8aebd2cdeb91" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/VIEW_TEMPLATE_UPDATE?__egtpl=f8fcab7b-751f-423e-ab2f-bc05eba39bd4", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "删除", "label" : "删除", "level" : "danger", "actionType" : "ajax", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "confirmText" : "确认要删除此记录吗?", "api" : { "method" : "post", "url" : "/api/flow/VIEW_TEMPLATE_DELETE", "data" : { "ids" : "${selectedItems|pick:VIEW_TEMPLATE_ID|join:','}" } } }, { "type" : "button", "id" : "查看", "label" : "查看", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "查看", "size" : "lg", "data" : { "&" : "${selectedItems[0]}", "__readonly" : true }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/f8fcab7b-751f-423e-ab2f-bc05eba39bd4?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/VIEW_TEMPLATE_LOAD?__egtpl=f8fcab7b-751f-423e-ab2f-bc05eba39bd4", "data" : { "VIEW_TEMPLATE_ID" : "${VIEW_TEMPLATE_ID}" }, "responseData" : { "&" : "${result}" } } } } }, "pagination" ], "primaryField" : "VIEW_TEMPLATE_ID", "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "a1002c5c-7496-4227-98a9-8aebd2cdeb91" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }