hiprint,hiprint打印

极速赛车买前5名的方法

hiprint.bundle.js 源码1740行代码,TableExcelHelper.getOrderdColumns方法修复

TableExcelHelper.getOrderdColumns = function (t) { var maxRow = t.totalLayer; var ret = []; // 查找下层节点数据 var rowColStartMap = {}; var findLeafCol = function(nextRow, colspan){ var matchCols = []; var start = rowColStartMap[nextRow]?rowColStartMap[nextRow]+1:0; for(var i=start;i<t[nextRow].length;i++){ if(i – start >= colspan){ break; } if(t[nextRow][i].colspan > 1){ var dRet = findLeafCol(nextRow+1, t[nextRow][i].colspan); dRet.forEach(function(dt){ matchCols.push(dt); }); }else{ matchCols.push(t[nextRow][i]); } rowColStartMap[nextRow] = i; } return matchCols; } // 从顶部迭代 var startRow = 0; t[startRow].forEach(function (t) { if(maxRow == t.rowspan || 1 == t.colspan){ // 行到底层或者只占1列的数据 ret.push(t); }else{ // 从next row取数据 var matchCols = findLeafCol(startRow+1, t.colspan); matchCols.forEach(function(mt){ ret.push(mt); }); } }); return ret; }

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注