PageBlueprint 加 RECIPE_MASTER_DETAIL 常量与可空 child 组件(14-arg, 保留 13-arg 兼容构造);新增 PageBlueprintChild record。 PageBlueprintCompiler.masterDetail 复用 maintenance 列表骨架, 新增/编辑表单内联 house-style input-table 子表(name=listColumn, quickEdit 控件),编辑表单 initApi 走 _LOAD 回显主+子行。 validate 接受 master-detail 并要求 child 非空/childTable/listColumn 非空/fields 非空。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
472 lines
14 KiB
JSON
472 lines
14 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "设置定时任务",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/SYS_SCHEDULEJOB_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "NAME",
|
|
"label" : "任务名称",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "FREQUENCY",
|
|
"label" : "频率",
|
|
"type" : "input-number",
|
|
"precision" : 0,
|
|
"step" : 1
|
|
}, {
|
|
"name" : "FREQUENCYUNIT",
|
|
"label" : "频率单位",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/SYS_SCHEDULEJOB_FREQUENCYUNIT"
|
|
}, {
|
|
"name" : "NEXTTIME",
|
|
"label" : "下次执行时间",
|
|
"type" : "input-datetime"
|
|
}, {
|
|
"name" : "ISOPEN",
|
|
"label" : "是否开启",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/YESNO"
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "SYS_SCHEDULEJOB_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "NAME",
|
|
"label" : "任务名称",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "FREQUENCY",
|
|
"label" : "频率",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "FREQUENCYUNIT",
|
|
"label" : "频率单位",
|
|
"width" : 200,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"4" : "月",
|
|
"5" : "周",
|
|
"3" : "天",
|
|
"2" : "小时",
|
|
"1" : "分钟"
|
|
}
|
|
}, {
|
|
"name" : "ISOPEN",
|
|
"label" : "是否开启",
|
|
"width" : 200,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
}
|
|
}, {
|
|
"name" : "NEXTTIME",
|
|
"label" : "下次执行时间",
|
|
"width" : 200,
|
|
"type" : "datetime",
|
|
"format" : "YYYY-MM-DD HH:mm",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
}, {
|
|
"name" : "CREATETIME",
|
|
"label" : "创建时间",
|
|
"width" : 200,
|
|
"type" : "datetime",
|
|
"format" : "YYYY-MM-DD HH:mm",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
}, {
|
|
"name" : "UPDATETIME",
|
|
"label" : "更新时间",
|
|
"width" : 200,
|
|
"type" : "datetime",
|
|
"format" : "YYYY-MM-DD HH:mm",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
} ],
|
|
"headerToolbar" : [ {
|
|
"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/587f7262-e264-4f06-90f5-6fd2f702a3ad?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/SYS_SCHEDULEJOB_LOAD?__egtpl=587f7262-e264-4f06-90f5-6fd2f702a3ad",
|
|
"data" : {
|
|
"SYS_SCHEDULEJOB_ID" : "${SYS_SCHEDULEJOB_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/SYS_SCHEDULEJOB_UPDATE?__egtpl=587f7262-e264-4f06-90f5-6fd2f702a3ad",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "启用",
|
|
"label" : "启用",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/SYS_SCHEDULEJOB_OPEN",
|
|
"data" : {
|
|
"SYS_SCHEDULEJOB_ID" : "${selectedItems[0].SYS_SCHEDULEJOB_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "停用",
|
|
"label" : "停用",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"confirmText" : "确认要停用该任务吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/SYS_SCHEDULEJOB_CLOSE",
|
|
"data" : {
|
|
"SYS_SCHEDULEJOB_ID" : "${selectedItems[0].SYS_SCHEDULEJOB_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "设置提醒人",
|
|
"label" : "设置提醒人",
|
|
"icon" : "fa fa-bell",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length !== 1}",
|
|
"actionType" : "dialog",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "设置提醒人",
|
|
"size" : "xl",
|
|
"body" : {
|
|
"type" : "form",
|
|
"id" : "schedulejob-notify-form",
|
|
"wrapWithPanel" : false,
|
|
"initApi" : {
|
|
"method" : "get",
|
|
"url" : "/api/schedulejob/${selectedItems[0].SYS_SCHEDULEJOB_ID}/notify"
|
|
},
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/schedulejob/${selectedItems[0].SYS_SCHEDULEJOB_ID}/notify",
|
|
"data" : {
|
|
"items" : "${items}"
|
|
}
|
|
},
|
|
"body" : [ {
|
|
"type" : "input-table",
|
|
"name" : "items",
|
|
"label" : false,
|
|
"needConfirm" : false,
|
|
"addable" : true,
|
|
"removable" : true,
|
|
"copyable" : false,
|
|
"columns" : [ {
|
|
"name" : "type",
|
|
"label" : "基于",
|
|
"width" : 140,
|
|
"quickEdit" : {
|
|
"type" : "select",
|
|
"name" : "type",
|
|
"clearable" : false,
|
|
"options" : [ {
|
|
"label" : "用户",
|
|
"value" : "user"
|
|
}, {
|
|
"label" : "部门",
|
|
"value" : "depart"
|
|
}, {
|
|
"label" : "岗位",
|
|
"value" : "position"
|
|
}, {
|
|
"label" : "指定维度岗位类别负责人",
|
|
"value" : "fixedDimension"
|
|
}, {
|
|
"label" : "所属公司岗位类别",
|
|
"value" : "formSpecifiedDimension"
|
|
}, {
|
|
"label" : "基于项目角色",
|
|
"value" : "projectRoleType"
|
|
} ]
|
|
}
|
|
}, {
|
|
"name" : "users",
|
|
"label" : "用户",
|
|
"width" : 280,
|
|
"quickEdit" : {
|
|
"type" : "picker",
|
|
"name" : "users",
|
|
"multiple" : true,
|
|
"joinValues" : false,
|
|
"extractValue" : false,
|
|
"valueField" : "_id",
|
|
"labelField" : "_label",
|
|
"source" : "/api/picker/76d2f950-ef40-4eff-89ec-98ad9a4976b9/list",
|
|
"modalMode" : "dialog",
|
|
"overflowConfig" : {
|
|
"maxTagCount" : 1
|
|
},
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"filter" : {
|
|
"title" : "",
|
|
"body" : [ {
|
|
"type" : "input-text",
|
|
"name" : "q",
|
|
"label" : "关键字",
|
|
"clearable" : true
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "_label",
|
|
"label" : "名称"
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
}
|
|
},
|
|
"visibleOn" : "${type === 'user'}"
|
|
}, {
|
|
"name" : "departs",
|
|
"label" : "部门",
|
|
"width" : 280,
|
|
"quickEdit" : {
|
|
"type" : "picker",
|
|
"name" : "departs",
|
|
"multiple" : true,
|
|
"joinValues" : false,
|
|
"extractValue" : false,
|
|
"valueField" : "_id",
|
|
"labelField" : "_label",
|
|
"source" : "/api/picker/138b7ca7-befb-4a0c-bfc6-ed8fb4d4e434/list",
|
|
"modalMode" : "dialog",
|
|
"overflowConfig" : {
|
|
"maxTagCount" : 1
|
|
},
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"filter" : {
|
|
"title" : "",
|
|
"body" : [ {
|
|
"type" : "input-text",
|
|
"name" : "q",
|
|
"label" : "关键字",
|
|
"clearable" : true
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "_label",
|
|
"label" : "名称"
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
}
|
|
},
|
|
"visibleOn" : "${type === 'depart'}"
|
|
}, {
|
|
"name" : "positions",
|
|
"label" : "岗位",
|
|
"width" : 280,
|
|
"quickEdit" : {
|
|
"type" : "picker",
|
|
"name" : "positions",
|
|
"multiple" : true,
|
|
"joinValues" : false,
|
|
"extractValue" : false,
|
|
"valueField" : "_id",
|
|
"labelField" : "_label",
|
|
"source" : "/api/picker/feeee51d-d41b-410b-b7a4-67d61ec8c4df/list",
|
|
"modalMode" : "dialog",
|
|
"overflowConfig" : {
|
|
"maxTagCount" : 1
|
|
},
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"filter" : {
|
|
"title" : "",
|
|
"body" : [ {
|
|
"type" : "input-text",
|
|
"name" : "q",
|
|
"label" : "关键字",
|
|
"clearable" : true
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "_label",
|
|
"label" : "名称"
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
}
|
|
},
|
|
"visibleOn" : "${type === 'position'}"
|
|
}, {
|
|
"name" : "dimensionId",
|
|
"label" : "维度",
|
|
"width" : 180,
|
|
"quickEdit" : {
|
|
"type" : "select",
|
|
"name" : "dimensionId",
|
|
"source" : "/api/schedulejob/dimensions/options",
|
|
"clearable" : true
|
|
},
|
|
"visibleOn" : "${type === 'fixedDimension'}"
|
|
}, {
|
|
"name" : "positionTypes",
|
|
"label" : "岗位类别",
|
|
"width" : 280,
|
|
"quickEdit" : {
|
|
"type" : "picker",
|
|
"name" : "positionTypes",
|
|
"multiple" : true,
|
|
"joinValues" : false,
|
|
"extractValue" : false,
|
|
"valueField" : "_id",
|
|
"labelField" : "_label",
|
|
"source" : "/api/picker/8c19a765-047e-4a5c-8657-eb16c013ba65/list",
|
|
"modalMode" : "dialog",
|
|
"overflowConfig" : {
|
|
"maxTagCount" : 1
|
|
},
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"filter" : {
|
|
"title" : "",
|
|
"body" : [ {
|
|
"type" : "input-text",
|
|
"name" : "q",
|
|
"label" : "关键字",
|
|
"clearable" : true
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "_label",
|
|
"label" : "名称"
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
}
|
|
},
|
|
"visibleOn" : "${type === 'fixedDimension' || type === 'formSpecifiedDimension'}"
|
|
}, {
|
|
"name" : "projectRoles",
|
|
"label" : "项目角色",
|
|
"width" : 260,
|
|
"quickEdit" : {
|
|
"type" : "checkboxes",
|
|
"name" : "projectRoles",
|
|
"source" : "/api/schedulejob/project-role-options"
|
|
},
|
|
"visibleOn" : "${type === 'projectRoleType'}"
|
|
}, {
|
|
"name" : "content",
|
|
"label" : "原始内容",
|
|
"width" : 220,
|
|
"quickEdit" : {
|
|
"type" : "input-text",
|
|
"name" : "content",
|
|
"clearable" : true
|
|
},
|
|
"visibleOn" : "${type !== 'user' && type !== 'depart' && type !== 'position' && type !== 'fixedDimension' && type !== 'formSpecifiedDimension' && type !== 'projectRoleType'}"
|
|
}, {
|
|
"name" : "isSendMessage",
|
|
"label" : "短消息",
|
|
"width" : 80,
|
|
"quickEdit" : {
|
|
"type" : "checkbox",
|
|
"name" : "isSendMessage"
|
|
}
|
|
}, {
|
|
"name" : "isSendMail",
|
|
"label" : "邮件",
|
|
"width" : 80,
|
|
"quickEdit" : {
|
|
"type" : "checkbox",
|
|
"name" : "isSendMail"
|
|
}
|
|
}, {
|
|
"name" : "isSendPhone",
|
|
"label" : "手机",
|
|
"width" : 80,
|
|
"quickEdit" : {
|
|
"type" : "checkbox",
|
|
"name" : "isSendPhone"
|
|
}
|
|
} ]
|
|
} ]
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "SYS_SCHEDULEJOB_ID",
|
|
"onEvent" : {
|
|
"selectedChange" : {
|
|
"actions" : [ {
|
|
"actionType" : "disabled",
|
|
"componentId" : "启用"
|
|
}, {
|
|
"actionType" : "disabled",
|
|
"componentId" : "停用"
|
|
}, {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${event.data.selectedItems[0]}",
|
|
"templateId" : "70f85b21-42d8-4257-ac14-2f54d9d47d59"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |