{ "type" : "page", "title" : "培训签到", "body" : { "type" : "crud", "api" : "/api/flow/HR_TRAIN_SIGN_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "TRAINPLANID", "label" : "计划名称", "type" : "picker", "clearable" : true, "source" : "/api/picker/093cd444-7bff-4f47-ad30-3b9187ce8c4a/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] } }, { "name" : "TRAINDATE", "label" : "培训日期", "type" : "input-date-range" }, { "name" : "TRAININTERVAL", "label" : "培训时段", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_TRAIN_INTERVAL" }, { "name" : "COURSETYPE", "label" : "培训课程", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_TRIAN_COURSETYPE" }, { "name" : "DEPART_ID", "label" : "计划部门", "type" : "tree-select", "clearable" : true, "source" : "/api/template/6135bd7d-ba6e-4b46-a2f5-1d5e5190e3bd/tree", "searchable" : true, "onlyLeaf" : true }, { "name" : "DO_STATUS", "label" : "执行状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_PLAN_DOSTATUS" } ] }, "columns" : [ { "name" : "HR_TRAIN_SIGN_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "TRAINPLANID_DISPLAY__", "label" : "计划名称", "width" : 180 }, { "name" : "TRAINDATE", "label" : "培训日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "TRAININTERVAL", "label" : "培训时段", "width" : 80, "type" : "mapping", "map" : { "1" : "全天", "2" : "上午", "3" : "下午", "4" : "晚上" } }, { "name" : "COURSETYPE", "label" : "培训课程", "width" : 120, "type" : "mapping", "map" : { "1" : "建造师注册证", "3" : "ABC三类人员证", "4" : "技术工人证", "5" : "十大员", "6" : "职称", "100" : "其他" } }, { "name" : "DEPART_ID_DISPLAY__", "label" : "计划部门", "width" : 220 }, { "name" : "PRINCIPAL_DISPLAY__", "label" : "负责人", "width" : 80 }, { "name" : "PERSON_COUNT", "label" : "应到人数", "width" : 70 }, { "name" : "ACTUALCOUNT", "label" : "实到人数", "width" : 70 }, { "name" : "DO_STATUS", "label" : "执行状态", "width" : 80, "type" : "mapping", "map" : { "1" : "执行中", "2" : "已执行", "3" : "未执行" } } ], "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/86e93328-ef1a-4c28-9e2f-13d767a22110?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_TRAIN_SIGN/defaults?templateId=86e93328-ef1a-4c28-9e2f-13d767a22110" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_TRAIN_SIGN_ADD?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110", "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/86e93328-ef1a-4c28-9e2f-13d767a22110?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_TRAIN_SIGN_LOAD?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110", "data" : { "HR_TRAIN_SIGN_ID" : "${HR_TRAIN_SIGN_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "75fb9a46-b874-46b4-a6e5-c12c14ec54b6" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_TRAIN_SIGN_UPDATE?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110", "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/HR_TRAIN_SIGN_DELETE", "data" : { "ids" : "${selectedItems|pick:HR_TRAIN_SIGN_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/86e93328-ef1a-4c28-9e2f-13d767a22110?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_TRAIN_SIGN_LOAD?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110", "data" : { "HR_TRAIN_SIGN_ID" : "${HR_TRAIN_SIGN_ID}" }, "responseData" : { "&" : "${result}" } } } } }, "pagination" ], "primaryField" : "HR_TRAIN_SIGN_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${event.data.selectedItems[0]}", "templateId" : "75fb9a46-b874-46b4-a6e5-c12c14ec54b6" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] }, "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "75fb9a46-b874-46b4-a6e5-c12c14ec54b6" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }