This commit is contained in:
@@ -730,31 +730,7 @@ public final class EngineclassDelta {
|
||||
mapOf("label", "指定维度岗位类别负责人", "value", "fixedDimension"),
|
||||
mapOf("label", "所属公司岗位类别", "value", "formSpecifiedDimension"),
|
||||
mapOf("label", "基于项目角色", "value", "projectRoleType")))),
|
||||
inputTableColumn("users", "用户", 280, notifyPicker("users",
|
||||
"76d2f950-ef40-4eff-89ec-98ad9a4976b9"), "${type === 'user'}"),
|
||||
inputTableColumn("departs", "部门", 280, notifyPicker("departs",
|
||||
"138b7ca7-befb-4a0c-bfc6-ed8fb4d4e434"), "${type === 'depart'}"),
|
||||
inputTableColumn("positions", "岗位", 280, notifyPicker("positions",
|
||||
"feeee51d-d41b-410b-b7a4-67d61ec8c4df"), "${type === 'position'}"),
|
||||
inputTableColumn("dimensionId", "维度", 180, mapOf(
|
||||
"type", "select",
|
||||
"name", "dimensionId",
|
||||
"source", "/api/schedulejob/dimensions/options",
|
||||
"clearable", true), "${type === 'fixedDimension'}"),
|
||||
inputTableColumn("positionTypes", "岗位类别", 280, notifyPicker("positionTypes",
|
||||
"8c19a765-047e-4a5c-8657-eb16c013ba65"),
|
||||
"${type === 'fixedDimension' || type === 'formSpecifiedDimension'}"),
|
||||
inputTableColumn("projectRoles", "项目角色", 260, mapOf(
|
||||
"type", "checkboxes",
|
||||
"name", "projectRoles",
|
||||
"source", "/api/schedulejob/project-role-options"), "${type === 'projectRoleType'}"),
|
||||
inputTableColumn("content", "原始内容", 220, mapOf(
|
||||
"type", "input-text",
|
||||
"name", "content",
|
||||
"clearable", true),
|
||||
"${type !== 'user' && type !== 'depart' && type !== 'position' "
|
||||
+ "&& type !== 'fixedDimension' && type !== 'formSpecifiedDimension' "
|
||||
+ "&& type !== 'projectRoleType'}"),
|
||||
inputTableColumn("notifyTarget", "提醒对象", 520, notifyTargetGroup()),
|
||||
inputTableColumn("isSendMessage", "短消息", 80, mapOf(
|
||||
"type", "checkbox",
|
||||
"name", "isSendMessage")),
|
||||
@@ -767,6 +743,47 @@ public final class EngineclassDelta {
|
||||
return table;
|
||||
}
|
||||
|
||||
private static Map<String, Object> notifyTargetGroup() {
|
||||
return mapOf(
|
||||
"type", "group",
|
||||
"name", "notifyTarget",
|
||||
"body", List.of(
|
||||
visibleControl(notifyPicker("users",
|
||||
"76d2f950-ef40-4eff-89ec-98ad9a4976b9"), "${type === 'user'}"),
|
||||
visibleControl(notifyPicker("departs",
|
||||
"138b7ca7-befb-4a0c-bfc6-ed8fb4d4e434"), "${type === 'depart'}"),
|
||||
visibleControl(notifyPicker("positions",
|
||||
"feeee51d-d41b-410b-b7a4-67d61ec8c4df"), "${type === 'position'}"),
|
||||
visibleControl(mapOf(
|
||||
"type", "group",
|
||||
"body", List.of(
|
||||
mapOf("type", "select",
|
||||
"name", "dimensionId",
|
||||
"label", false,
|
||||
"source", "/api/schedulejob/dimensions/options",
|
||||
"clearable", true),
|
||||
notifyPicker("positionTypes",
|
||||
"8c19a765-047e-4a5c-8657-eb16c013ba65"))),
|
||||
"${type === 'fixedDimension'}"),
|
||||
visibleControl(notifyPicker("positionTypes",
|
||||
"8c19a765-047e-4a5c-8657-eb16c013ba65"),
|
||||
"${type === 'formSpecifiedDimension'}"),
|
||||
visibleControl(mapOf(
|
||||
"type", "checkboxes",
|
||||
"name", "projectRoles",
|
||||
"label", false,
|
||||
"source", "/api/schedulejob/project-role-options"),
|
||||
"${type === 'projectRoleType'}"),
|
||||
visibleControl(mapOf(
|
||||
"type", "input-text",
|
||||
"name", "content",
|
||||
"label", false,
|
||||
"clearable", true),
|
||||
"${type !== 'user' && type !== 'depart' && type !== 'position' "
|
||||
+ "&& type !== 'fixedDimension' && type !== 'formSpecifiedDimension' "
|
||||
+ "&& type !== 'projectRoleType'}")));
|
||||
}
|
||||
|
||||
private static Map<String, Object> inputTableColumn(String name, String label, int width,
|
||||
Map<String, Object> quickEdit) {
|
||||
return inputTableColumn(name, label, width, quickEdit, null);
|
||||
@@ -789,6 +806,7 @@ public final class EngineclassDelta {
|
||||
Map<String, Object> picker = new LinkedHashMap<>();
|
||||
picker.put("type", "picker");
|
||||
picker.put("name", name);
|
||||
picker.put("label", false);
|
||||
picker.put("multiple", true);
|
||||
picker.put("joinValues", false);
|
||||
picker.put("extractValue", false);
|
||||
@@ -811,6 +829,12 @@ public final class EngineclassDelta {
|
||||
return picker;
|
||||
}
|
||||
|
||||
private static Map<String, Object> visibleControl(Map<String, Object> control, String visibleOn) {
|
||||
Map<String, Object> copy = new LinkedHashMap<>(control);
|
||||
copy.put("visibleOn", visibleOn);
|
||||
return copy;
|
||||
}
|
||||
|
||||
private static Map<String, Object> downloadButton(String label, String icon, String url) {
|
||||
Map<String, Object> btn = new LinkedHashMap<>();
|
||||
btn.put("type", "button");
|
||||
|
||||
Reference in New Issue
Block a user