|
发表于 2018-11-9 17:30:12
|
显示全部楼层
本帖最后由 jeecg_ty 于 2018-11-9 18:17 编辑
ftl文件不能上传,主要修改代码如下图:
附上代码:- <#list graphList as x>
- <#if (tabList?size > 1)>
- if(tabName || $.trim(tabName)) {
- if("${x['tab_name']!''}" == tabName) {
- <#if x['graph_type'] =='pie'>
- var piearr = [];
- $.map(data, function(n) {
- piearr.push([n["${main['categories']}"],n["${x['field_name']}"] * 1 || 0]);
- });
- series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data:piearr });
- <#else>
- series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data: $.map(data, function(n) {
- return n["${x['field_name']}"] * 1 || 0;
- })});
- </#if>
- }
- }
- <#else>
- <#if x['graph_type'] =='pie'>
- var piearr = [];
- $.map(data, function(n) {
- piearr.push([n["${main['categories']}"],n["${x['field_name']}"] * 1 || 0]);
- });
- series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data:piearr });
- <#else>
- series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data: $.map(data, function(n) {
- return n["${x['field_name']}"] * 1 || 0;
- })});
- </#if>
- </#if>
-
- </#list>
复制代码 效果展示:
|
|