mav.addObject("deanClassTypeArray", new ObjectMapper().writeValueAsString(deanClassTypeList)); // java后端向前端传递json字符串
var deanClassTypeStr = '${deanClassTypeArray }'; // 这样用ognl表达式获取数据
var deanCalssTypeMap = JSON.parse(deanClassTypeStr);
function deanCalssTypeFormatter(value, rowData, rowIndex) {
if (value === undefined || value === '' || value === null) {
return '';
}
for (var i = 0; i < deanCalssTypeMap.length; i++) {
if (deanCalssTypeMap[i].typeId === value) {
return deanCalssTypeMap[i].typeName;
}
}
}