{ "type" : "page", "title" : "机械信息库", "body" : { "type" : "grid", "columns" : [ { "md" : 3, "body" : { "type" : "input-tree", "name" : "tree", "showOutline" : true, "initiallyOpen" : true, "virtualThreshold" : 100000, "className" : "eip4-treegrid-tree", "id" : "treegrid_tree", "source" : "/api/template/814d3da1-b354-4cd7-9ca5-e54e74849358/tree" } }, { "md" : 9, "body" : { "type" : "crud", "id" : "treegrid_crud", "syncLocation" : false, "api" : "/api/template/treegrid?treeRef=814d3da1-b354-4cd7-9ca5-e54e74849358&gridTable=PM_MACHINEREPOSITORY&rcol=RESOURCETYPEID&node=${tree}&page=${page}&perPage=${perPage}", "selectable" : true, "checkOnItemClick" : true, "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/16a9adef-24dc-4d48-8264-9477e523ebce?format=amis", "api" : { "method" : "get", "url" : "/api/form/PM_MACHINEREPOSITORY/defaults?templateId=16a9adef-24dc-4d48-8264-9477e523ebce" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_MACHINEREPOSITORY_ADD?__egtpl=16a9adef-24dc-4d48-8264-9477e523ebce", "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/16a9adef-24dc-4d48-8264-9477e523ebce?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_MACHINEREPOSITORY_LOAD?__egtpl=16a9adef-24dc-4d48-8264-9477e523ebce", "data" : { "PM_MACHINEREPOSITORY_ID" : "${PM_MACHINEREPOSITORY_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_MACHINEREPOSITORY_UPDATE?__egtpl=16a9adef-24dc-4d48-8264-9477e523ebce", "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/PM_MACHINEREPOSITORY_DELETE", "data" : { "ids" : "${selectedItems|pick:PM_MACHINEREPOSITORY_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/16a9adef-24dc-4d48-8264-9477e523ebce?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_MACHINEREPOSITORY_LOAD?__egtpl=16a9adef-24dc-4d48-8264-9477e523ebce", "data" : { "PM_MACHINEREPOSITORY_ID" : "${PM_MACHINEREPOSITORY_ID}" }, "responseData" : { "&" : "${result}" } } } } }, "pagination" ], "primaryField" : "PM_MACHINEREPOSITORY_ID", "filter" : { "title" : "查询", "body" : [ { "name" : "MACHINECODE", "label" : "机械编码", "type" : "input-text" }, { "name" : "MACHINENAME", "label" : "机械名称", "type" : "input-text" }, { "name" : "SPECIFICATIONS", "label" : "规格", "type" : "input-text" }, { "name" : "RESOURCETYPEID", "label" : "机械分类", "type" : "tree-select", "clearable" : true, "source" : "/api/template/814d3da1-b354-4cd7-9ca5-e54e74849358/tree", "searchable" : true } ] }, "columns" : [ { "name" : "PM_MACHINEREPOSITORY_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "MACHINECODE", "label" : "机械编码", "width" : 200 }, { "name" : "MACHINENAME", "label" : "机械名称", "width" : 200 }, { "name" : "SPECIFICATIONS", "label" : "规格", "width" : 200 }, { "name" : "UNIT_DISPLAY__", "label" : "计量单位", "width" : 200 }, { "name" : "RESOURCETYPEID_DISPLAY__", "label" : "机械分类", "width" : 200 } ] } } ] } }