fix(platform): complete picker parity and message detail
Some checks failed
ci / build-test-parity (push) Has been cancelled
Some checks failed
ci / build-test-parity (push) Has been cancelled
This commit is contained in:
@@ -77,6 +77,13 @@ public final class EngineclassDelta {
|
||||
EngineclassDelta::taskTodoDataSource);
|
||||
registerMutator("com.dsasp.client.wf.task.component.FinishTaskComponentNew",
|
||||
EngineclassDelta::taskDoneDataSource);
|
||||
|
||||
// 消息查看:MessageReceiveView/MessageSendView 在默认 GridTemplateComponent 之上加「查看」按钮。
|
||||
// 收到消息按 SYS_MESSAGEUSER_ID 打开并置已读;已发送消息按 SYS_MESSAGE_ID 打开只读详情。
|
||||
register("com.dsasp.client.tools.message.MessageReceiveView",
|
||||
EngineclassDelta::receivedMessageDetailButton);
|
||||
register("com.dsasp.client.tools.message.MessageSendView",
|
||||
EngineclassDelta::sentMessageDetailButton);
|
||||
}
|
||||
|
||||
private EngineclassDelta() {
|
||||
@@ -309,6 +316,39 @@ public final class EngineclassDelta {
|
||||
return "${selectedItems[0]." + field + "}";
|
||||
}
|
||||
|
||||
// ── 消息 · 查看详情 / 打开即已读 ───────────────────────────────────────
|
||||
/** 收到消息「查看」:选 1 条 SYS_MESSAGEUSER → 打开详情并置已读,关闭后刷新列表。 */
|
||||
private static Map<String, Object> receivedMessageDetailButton(String pkField) {
|
||||
Map<String, Object> args = mapOf(
|
||||
"kind", "received",
|
||||
"receiveId", selectedSingleFieldExpr(pkField),
|
||||
"title", "${selectedItems[0].SYS_MESSAGE_ID_DISPLAY__ || selectedItems[0].TITLE || ''}");
|
||||
return messageDetailButton(args);
|
||||
}
|
||||
|
||||
/** 已发送消息「查看」:选 1 条 SYS_MESSAGE → 只读详情。 */
|
||||
private static Map<String, Object> sentMessageDetailButton(String pkField) {
|
||||
Map<String, Object> args = mapOf(
|
||||
"kind", "sent",
|
||||
"messageId", selectedSingleFieldExpr(pkField),
|
||||
"title", "${selectedItems[0].TITLE || ''}");
|
||||
return messageDetailButton(args);
|
||||
}
|
||||
|
||||
private static Map<String, Object> messageDetailButton(Map<String, Object> args) {
|
||||
Map<String, Object> action = mapOf(
|
||||
"actionType", "openMessageDetail",
|
||||
"args", args);
|
||||
Map<String, Object> btn = new LinkedHashMap<>();
|
||||
btn.put("type", "button");
|
||||
btn.put("id", "查看");
|
||||
btn.put("label", "查看");
|
||||
btn.put("icon", "fa fa-search");
|
||||
btn.put("disabledOn", "${!selectedItems || selectedItems.length !== 1}");
|
||||
btn.put("onEvent", mapOf("click", mapOf("actions", List.of(action))));
|
||||
return btn;
|
||||
}
|
||||
|
||||
// ── 用户管理 · 设置主岗位 ──────────────────────────────────────────────
|
||||
/**
|
||||
* 「设置主岗位」按钮:选 1 用户 → 弹窗 form。initApi 拉该用户岗位(SYS_POSITIONUSER_SEARCH by USERID),
|
||||
|
||||
@@ -405,6 +405,10 @@ final class UiTypeMapper {
|
||||
item.put("clearable", true);
|
||||
if (multiple) {
|
||||
item.put("multiple", true);
|
||||
item.put("overflowConfig", Map.of(
|
||||
"maxTagCount", 1,
|
||||
"displayPosition", List.of("select")
|
||||
));
|
||||
}
|
||||
item.put("source", "/api/picker/" + dialogId + "/list");
|
||||
item.put("labelField", "_label");
|
||||
|
||||
Reference in New Issue
Block a user