报错问题,麻烦看一下是为什么

var books = $.rows;

var table = [];

var column = [];

books.forEach(function(book, index) {

 var row = [];

 column.push("territoryname");

 column.push("territoryCode");

 column.push("oneWater");

 column.push("twoWater");

 column.push("threeWater");

 column.push("fourWater");

 column.push("fiveWater");

 column.push("sixWater");

 column.push("sevenWater")

 column.push("eightWater")

 column.push("nineWater")

 column.push("tenWater")

 column.push("elevenWater")

 column.push("twelveWater")

 column.push("oneEletic");

 column.push("twoEletic");

 column.push("threeEletic");

 column.push("fourEletic");

 column.push("fiveEletic");

 column.push("sixEletic");

 column.push("sevenEletic")

 column.push("eightEletic")

 column.push("nineEletic")

 column.push("tenEletic")

 column.push("elevenEletic")

 column.push("twelveEletic")

 column.push("onefee");

 column.push("twofee");

 column.push("threefee");

 column.push("fourfee");

 column.push("fivefee");

 column.push("sixfee");

 column.push("sevenfee")

 column.push("eightfee")

 column.push("ninefee")

 column.push("tenfee")

 column.push("elevenfee")

 column.push("twelvefee")

 column.push("onehydropowerCoefficient");

 column.push("twohydropowerCoefficient");

 column.push("threehydropowerCoefficient");

 column.push("fourhydropowerCoefficient");

 column.push("fivehydropowerCoefficient");

 column.push("sixhydropowerCoefficient");

 column.push("sevenhydropowerCoefficient")

 column.push("eighthydropowerCoefficient")

 column.push("ninehydropowerCoefficient")

 column.push("tenhydropowerCoefficient")

 column.push("elevenhydropowerCoefficient")

 column.push("twelvehydropowerCoefficient")

 

 row.push(book.territoryname);

 row.push(book.territoryCode);

 if(book.year == ${beforeLast}){

  for (let i = 0; i < book.waterYearList.length; i++) {

  row.push(book.waterYearList[i].waterAll);

  row.push(book.waterYearList[i].fee);

  row.push(book.waterYearList[i].elcAll);

  row.push(book.waterYearList[i].hydropowerCoefficient);

  }

 }

 table.push(row);

});

return merge(table, unique(column));

最后一行报错

图像2022-4-2 17.03.jpg

FineReport 帆软用户7UCjmZEi3U 发布于 2022-4-2 17:25
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
986641838Lv5见习互助
发布于2022-4-2 18:04

特意装了个json数据集插件,贴出来的代码是没问题的,可以正确解析数据

image.png

最佳回答
0
snrtuemcLv8专家互助
发布于2022-4-2 17:37

额, 你把js放到数据集处理了,会不支持的,这边是写s'q'l语句的

  • 3关注人数
  • 372浏览人数
  • 最后回答于:2022-4-2 18:04
    请选择关闭问题的原因
    确定 取消
    返回顶部