- ToolParam / FormField 新增控件能力: radio(单选按钮组)、switch(勾选框+开关值映射)、quickPeriods(快捷时段)、 dailyExpand(按天展开)、autoPickFirst(默认选中第一项)、 hideIfSingleOption(单选项隐藏)、placeholder(照搬模块页原文案) - LeaveTools: * leave.submit / leave.register 的 leaveType 改单选按钮组并默认选中第一个 * 请假时间补齐快捷时段与「连续请假」勾选框(勾上展开连续天数 + 逐天时段) * 事由 / 附件对齐模块页文案;学生端 classId 单班隐藏、教师端恒显示 - ToolExecutor.expandDailyArgs 认前端显式发来的 continuousLeaveTime (用户在逐天时段里做过微调就以他改的为准,不再按基准覆盖) - 只读查询因下游 302 失败时也回传 landingPath,让「去业务系统查看」按钮有着落
This commit is contained in:
@@ -18,7 +18,7 @@ public class FormField {
|
||||
/** 中文标签,如「开始时间」 */
|
||||
private String label;
|
||||
|
||||
/** 控件类型:text / textarea / number / date / datetime / select / multiselect / file */
|
||||
/** 控件类型:text / textarea / number / date / datetime / select / multiselect / file / scopes / flow / radio / switch */
|
||||
private String widget;
|
||||
|
||||
/** 数据类型:string / integer / number / boolean / array */
|
||||
@@ -86,6 +86,38 @@ public class FormField {
|
||||
*/
|
||||
private boolean fileAsObject;
|
||||
|
||||
/**
|
||||
* 单选控件({@code widget=radio})在选项就绪后自动选中第一项。
|
||||
* <p>对齐模块页:{@code LeaveApply.vue} 的「请假类型」一进页面就已选中第一个类型。
|
||||
*/
|
||||
private boolean autoPickFirst;
|
||||
|
||||
/**
|
||||
* 选项只有一个时自动填入并隐藏本字段。
|
||||
* <p>对齐模块页:{@code LeaveApply.vue} 的「班级」用 {@code v-if="myClasses.length > 1"}`,
|
||||
* 单班时不渲染、值直接带上。
|
||||
*/
|
||||
private boolean hideWhenSingleOption;
|
||||
|
||||
/**
|
||||
* 快捷时段按钮组:{@code {start: 开始字段名, end: 结束字段名,
|
||||
* items: [{label, start, end}]}};{@code start/end} 为时刻({@code HH:mm:ss})。
|
||||
* <p>对齐模块页 {@code LeaveTimeSection.quickSet()}:沿用已选日期,只换时分秒。
|
||||
*/
|
||||
private Map<String, Object> quickPeriods;
|
||||
|
||||
/** {@code widget=switch} 勾选时提交的值 */
|
||||
private String switchOn;
|
||||
|
||||
/** {@code widget=switch} 未勾选时提交的值 */
|
||||
private String switchOff;
|
||||
|
||||
/** 多行文本框显示行数 */
|
||||
private Integer rows;
|
||||
|
||||
/** 文本最大长度(前端显示字数统计) */
|
||||
private Integer maxLength;
|
||||
|
||||
private boolean required;
|
||||
|
||||
/** 说明(来自工具定义,写清格式与含义) */
|
||||
@@ -94,6 +126,13 @@ public class FormField {
|
||||
/** 格式示例,前端用作 placeholder,如 2026-10-11 08:00:00 */
|
||||
private String example;
|
||||
|
||||
/**
|
||||
* 显式的占位提示(优先于 {@link #example})。
|
||||
* <p>用于对齐业务模块页的原文案,如请假事由的「请输入请假原因.....」——
|
||||
* 这里不该塞它的示例值(「发烧就医,需在家休息」),那是给模型看的参考,不是给用户看的提示。
|
||||
*/
|
||||
private String placeholder;
|
||||
|
||||
private String defaultValue;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user