Skip to content

Commit

Permalink
Merge pull request edp963#1782 from bogeli5/dev-0.3
Browse files Browse the repository at this point in the history
bug fix: ScriptUtils.formatHeader
  • Loading branch information
AndyFong authored Jun 2, 2020
2 parents 6f4b548 + e46a4c2 commit 7995f6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

package edp.davinci.common.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import edp.davinci.core.common.Constants;
Expand Down Expand Up @@ -67,8 +68,9 @@ public static synchronized ViewExecuteParam getViewExecuteParam(String dashboard
public static synchronized List<ExcelHeader> formatHeader(String json, List<Param> params) {

Value js = ScriptEnum.INSTANCE.tableFormatJs;
Value result = js.execute(json, params);
Value result = js.execute(json, JSON.toJSONString(params));
List<ExcelHeader> excelHeaders = JSONArray.parseArray(result.toString(), ExcelHeader.class);
return excelHeaders;
}

}
3 changes: 2 additions & 1 deletion server/src/main/resources/templates/js/formatCellValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -5510,7 +5510,8 @@ function parseTableHeader(headerConfig, fields, queryVars) {
return headerCells
}

function getFieldsHeader(widgetConfigJson, queryVars) {
function getFieldsHeader(widgetConfigJson, queryVarsJson) {
var queryVars = JSON.parse(queryVarsJson || '[]')
if (!widgetConfigJson) {
return []
}
Expand Down

0 comments on commit 7995f6d

Please sign in to comment.