Skip to content

关于下拉列表省市区三级联动的问题 #438

@ayang079

Description

@ayang079

Bug描述
描述Bug产生的现象(A clear and concise description of what the bug is.)
实体类配置
@ExcelColumn(title = "省",dropdownList = @DropdownList(name = "sheng"))
private List sheng;
@ExcelColumn(title = "市",dropdownList = @DropdownList(name = "shi",parent="sheng"))
private List shi;
@ExcelColumn(title = "县",dropdownList = @DropdownList(name = "xian",parent="shi"))
private List xian;

public static void main(String[] args) throws IOException {
List shengList = ListUtil.of("北京", "天津", "河北", "山西");
List shiList = ListUtil.of("北京", "石家庄", "唐山");
List quList = ListUtil.of("北京", "西城区", "崇文区", "宣武区");
List dataList = IntStream.range(1, 10).mapToObj(i -> {
TestVOs vOs = new TestVOs();
vOs.setSheng(shengList);
vOs.setShi(shiList);
vOs.setXian(quList);
vOs.setStuName(IdUtil.fastUUID());
vOs.setAddr(IdUtil.getSnowflakeNextIdStr());
return vOs;
}).collect(Collectors.toList());

  Workbook workbook = DefaultExcelBuilder.of(TestVOs.class).build(dataList);
  FileExportUtil.export(workbook, FileUtil.file(String.format("D:\\DaBaiCai\\xxx_%s.xlsx", IdUtil.fastUUID())));

}
Bug复现
按如下步骤复现(Steps to reproduce the behavior):

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

期望的结果
期望的结果是什么(A clear and concise description of what you expected to happen.)
不知道是否是我数据提供的问题
期望能实现下拉框的三级联动,选中 省 时, 市这列自动索引省对应的数据

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions