>以一级循环表头为例,为大家讲解一下动态列分组(循环表头)的配置方法(多级表头的配置跟此配置一致); > 要想通过实现图1.11中,“1月、2月、3月、4月、5月、6月”循环展示,而不是写死数据,需要进行如下配置 ![](https://img.kancloud.cn/41/5b/415b3cd0d0bc7c14877bd994a96b99b6_1542x784.png) :-: 图1.31 ![](https://img.kancloud.cn/85/04/85047f6d3e52df94d2febe4529397379_812x20.png) 预览地址:https://bootapi.jeecg.com/jmreport/view/1351426064915763200 ![](https://img.kancloud.cn/ef/87/ef87f4cc4690888a1119f40061cb818a_804x51.png) ### **以配置图1.31为例,配置方法如下:** ``` 备注: 1、目前支持多级表头 ,最多支持3级动态的表头 2、动态列数据之前的列必须设置成分组(这个后期会优化) 3、动态列数据必须设置成“动态属性” ``` #### **1、按图1.32将表格样式设计好;并把要使用的数据源添加上;** ![](https://img.kancloud.cn/8d/9a/8d9a9c58e05903c7cba9a613385103de_999x425.png) :-: 图1.32 ### **2、拖动相应字段,到表格中** ![](https://img.kancloud.cn/7e/20/7e20a593c383627caa27ab1e684b187b_1089x422.png) :-: 图1.33 ### **3、设置字段的渲染方式:** * ##### 设置月份循环:将字段设置成横向分组; ![](https://img.kancloud.cn/81/9c/819c72c9bee4b9a52314ff3c7f199ea2_847x414.png) :-: 图1.34 * ##### 设置分组:将“区域”、“省份”设置成纵向分组; ![](https://img.kancloud.cn/68/3d/683d625e58a917441f31f315bd4031ae_844x419.png) :-: 图1.35 * ##### 设置数据:将销售额、捐赠、比例值设置成“动态属性”; ![](https://img.kancloud.cn/a6/b4/a6b4f8dc59b8f0e963f05acfe093857b_840x419.png) :-: 图1.36 ### **4、数据源格式可参考如下:** ``` { "data": [ { "region": "华南", "province": "广东省", "moth":"1月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"2月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"3月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"4月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"5月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"6月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"1月", "sales_1": "10000", "gift_1": "1000", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"2月", "sales_1": "10000", "gift_1": "1000", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"3月", "sales_1": "48887", "gift_1": "3960", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"4月", "sales_1": "51484", "gift_1": "7440", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"5月", "sales_1": "10000", "gift_1": "1000", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"6月", "sales_1": "46388", "gift_1": "4000", "proportion_1": "10%" }] } ```