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:
@@ -32,7 +32,7 @@ export default {
|
|||||||
name: 'CuteProductLineSelect',
|
name: 'CuteProductLineSelect',
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: [Number, String],
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
|
|||||||
+6
-1
@@ -23,8 +23,13 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class CuteProductLineSelectProVo extends KitObject {
|
public class CuteProductLineSelectProVo extends KitObject {
|
||||||
|
/**
|
||||||
|
* 部门ID(select的value)
|
||||||
|
*/
|
||||||
private String value;
|
private String value;
|
||||||
|
/**
|
||||||
|
* 产品线,如"研发部/华南分部/devops组"
|
||||||
|
*/
|
||||||
private String label;
|
private String label;
|
||||||
private List<CuteProductLineSelectProVo> children;
|
private List<CuteProductLineSelectProVo> children;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ public class CuteProductLineSelectVo extends KitObject {
|
|||||||
/**
|
/**
|
||||||
* 部门ID(select的value)
|
* 部门ID(select的value)
|
||||||
*/
|
*/
|
||||||
private Long value;
|
private String value;
|
||||||
/**
|
/**
|
||||||
* 产品线,如"研发部/华南分部/devops组"
|
* 产品线,如"研发部/华南分部/devops组"
|
||||||
*/
|
*/
|
||||||
|
|||||||
+9
@@ -16,7 +16,16 @@ public class CuteUserSelectVo extends KitObject {
|
|||||||
* nickname
|
* nickname
|
||||||
*/
|
*/
|
||||||
private String label;
|
private String label;
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
private String deptId;
|
private String deptId;
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
private String email;
|
private String email;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
private String phone;
|
private String phone;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ public class CuteProductLineSelectService extends CuteBaseService {
|
|||||||
// 反转路径,从顶级部门到当前部门
|
// 反转路径,从顶级部门到当前部门
|
||||||
Collections.reverse(pathIds);
|
Collections.reverse(pathIds);
|
||||||
CuteProductLineSelectVo dto = new CuteProductLineSelectVo();
|
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.setIdPath(pathIds.stream().map(String::valueOf).collect(Collectors.joining("-")));
|
||||||
// 保留名称路径用于显示
|
// 保留名称路径用于显示
|
||||||
dto.setLabel(this.buildNamePath(dept, deptMap));
|
dto.setLabel(this.buildNamePath(dept, deptMap));
|
||||||
|
|||||||
Reference in New Issue
Block a user