fix(select): 统一选择组件值类型为字符串

- 将 CuteProductLineSelect 组件的 value 类型从 [Number, String] 修改为 String
- 为 CuteProductLineSelectProVo 添加 value 和 label 字段注释说明
- 将 CuteProductLineSelectVo 的 value 字段类型从 Long 修改为 String
- 为 CuteUserSelectVo 添加 deptId、email、phone 字段注释说明
- 在 CuteProductLineSelectService 中将部门 ID 转换为字符串赋值给 value
This commit is contained in:
2026-01-17 09:11:28 +08:00
parent f2898da525
commit d113ebfa2f
5 changed files with 18 additions and 4 deletions
@@ -32,7 +32,7 @@ export default {
name: 'CuteProductLineSelect',
props: {
value: {
type: [Number, String],
type: String,
default: null
},
disabled: {
@@ -23,8 +23,13 @@ import lombok.Setter;
@Getter
@Setter
public class CuteProductLineSelectProVo extends KitObject {
/**
* 部门ID(select的value)
*/
private String value;
/**
* 产品线,如"研发部/华南分部/devops组"
*/
private String label;
private List<CuteProductLineSelectProVo> children;
}
@@ -26,7 +26,7 @@ public class CuteProductLineSelectVo extends KitObject {
/**
* 部门ID(select的value)
*/
private Long value;
private String value;
/**
* 产品线,如"研发部/华南分部/devops组"
*/
@@ -16,7 +16,16 @@ public class CuteUserSelectVo extends KitObject {
* nickname
*/
private String label;
/**
* 部门ID
*/
private String deptId;
/**
* 邮箱
*/
private String email;
/**
* 手机号
*/
private String phone;
}
@@ -36,7 +36,7 @@ public class CuteProductLineSelectService extends CuteBaseService {
// 反转路径,从顶级部门到当前部门
Collections.reverse(pathIds);
CuteProductLineSelectVo dto = new CuteProductLineSelectVo();
dto.setValue(dept.getId());
dto.setValue(Long.toString(dept.getId()));
dto.setIdPath(pathIds.stream().map(String::valueOf).collect(Collectors.joining("-")));
// 保留名称路径用于显示
dto.setLabel(this.buildNamePath(dept, deptMap));