帆软报表获取单元格的值的方式在分页预览,填报预览,新填报预览都是不同的,没有统一的方式,这给使用者带来一定的不便。现在总结一下。
分页预览:
getCellValue: function (cellPositionLabl) {
// cellPositionLabl=A1这样的形式
// 这是分页预览
var columnIndex = cellPositionLabl.charCodeAt(0) - 65;
var rowIndex = parseInt(cellPositionLabl.substr(1, cellPositionLabl.length)) - 1
console.log("rowIndex:" + rowIndex + ",columnIndex:" + columnIndex)
var rowIds = "tr[tridx=" + rowIndex + "]";
var value = $(rowIds, "div.content-container").children().eq(columnIndex).html();
return value
}
填报预览:
getCellValue: function (cellPositionLabl) {
// cellPositionLabl=A1这样的形式
// 填报预览
columnIndex = cellPos