|
@@ -795,7 +795,6 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
if (contentValuesIdx[rowIdx][0] !== JV.TYPE_FOLLOW_MODE && contentValuesIdx[rowIdx][1] === JV.DISPLAY_VAL_TYPE_NORMAL) {
|
|
|
rst.push(me.outputTabField(band, tab_field, data_field, contentValuesIdx[rowIdx][2], -1, contentValuesIdx.length, rowIdx, 1, 0, unitFactor, true, controls, multiColIdx));
|
|
|
} else if (contentValuesIdx[rowIdx][1] === JV.DISPLAY_VAL_TYPE_AUTO_HEIGHT) {
|
|
|
- //vIdx.push([followMode, JV.DISPLAY_VAL_TYPE_AUTO_HEIGHT, sortedSequence[startRecIdx + vi]], subValIdx, ttlValAmt);
|
|
|
if (contentValuesIdx[rowIdx][4] === 1) {
|
|
|
//等效于普通输出
|
|
|
rst.push(me.outputTabField(band, tab_field, data_field, contentValuesIdx[rowIdx][2], -1, contentValuesIdx.length, rowIdx, 1, 0, unitFactor, true, controls, multiColIdx));
|
|
@@ -871,12 +870,9 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
}
|
|
|
let eliminateCells = combineAutoHeightCells(prepareObj, page, controls);
|
|
|
- // console.log("rst.length: " + rst.length);
|
|
|
- // console.log("eliminateCells.length: " + eliminateCells.length);
|
|
|
for (let idIdx = eliminateCells.length - 1; idIdx >= 0; idIdx--) {
|
|
|
rst.splice(eliminateCells[idIdx], 1);
|
|
|
}
|
|
|
- console.log("rst.length: " + rst.length);
|
|
|
return rst;
|
|
|
};
|
|
|
JpcFlowTabResult.outputColumn = function (rptTpl, dataObj, page, segIdx, bands, unitFactor, multiColIdx) {
|
|
@@ -1026,10 +1022,11 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
};
|
|
|
|
|
|
function push_cell(pageCellObj, cell, cellIdx) {
|
|
|
- if (!pageCellObj[cell[JV.PROP_AREA][JV.PROP_LEFT] + '_' + cell[JV.PROP_AREA][JV.PROP_RIGHT]]) {
|
|
|
- pageCellObj[cell[JV.PROP_AREA][JV.PROP_LEFT] + '_' + cell[JV.PROP_AREA][JV.PROP_RIGHT]] = [];
|
|
|
+ let key = cell[JV.PROP_AREA][JV.PROP_LEFT] + '_' + cell[JV.PROP_AREA][JV.PROP_RIGHT];
|
|
|
+ if (!pageCellObj[key]) {
|
|
|
+ pageCellObj[key] = [];
|
|
|
}
|
|
|
- let cellArr = pageCellObj[cell[JV.PROP_AREA][JV.PROP_LEFT] + '_' + cell[JV.PROP_AREA][JV.PROP_RIGHT]];
|
|
|
+ let cellArr = pageCellObj[key];
|
|
|
cellArr.push({"cellIdx": cellIdx, "cell": cell});
|
|
|
}
|
|
|
|
|
@@ -1052,12 +1049,14 @@ function setupControl(mergeCell, controls) {
|
|
|
"ShowZero": orgCtrl.ShowZero,
|
|
|
"Horizon": orgCtrl.Horizon,
|
|
|
"Vertical": "top",
|
|
|
- "Wrap": "T"
|
|
|
+ "Wrap": "T",
|
|
|
+ "VerticalForExcel": "justify"
|
|
|
};
|
|
|
} else {
|
|
|
mergeCell[JV.PROP_CONTROL].Shrink = "T";
|
|
|
mergeCell[JV.PROP_CONTROL].Vertical = "top";
|
|
|
mergeCell[JV.PROP_CONTROL].Wrap = "T";
|
|
|
+ mergeCell[JV.PROP_CONTROL].VerticalForExcel = "justify";
|
|
|
orgCtrl = mergeCell[JV.PROP_CONTROL];
|
|
|
}
|
|
|
return orgCtrl;
|
|
@@ -1067,6 +1066,7 @@ function combineAutoHeightCells(prepareObj, page, controls) {
|
|
|
let rst = [];
|
|
|
if (prepareObj.cellsArr) {
|
|
|
//merge cells' value and area
|
|
|
+ //备注: 系统逻辑已经把Cell的顺序放好,无需再做排序。
|
|
|
for (let mergeKey in prepareObj.pageCellObj) {
|
|
|
if (prepareObj.pageCellObj[mergeKey].length > 1) {
|
|
|
let firstMergeCell = prepareObj.pageCellObj[mergeKey][0].cell;
|
|
@@ -1084,11 +1084,13 @@ function combineAutoHeightCells(prepareObj, page, controls) {
|
|
|
if (i === prepareObj.pageCellObj[mergeKey].length - 1 && validValueAmt === 0) {
|
|
|
firstMergeCell[JV.PROP_CONTROL].Shrink = orgCtrl.Shrink;
|
|
|
firstMergeCell[JV.PROP_CONTROL].Wrap = "F";
|
|
|
+ firstMergeCell[JV.PROP_CONTROL].VerticalForExcel = null;
|
|
|
}
|
|
|
} else {
|
|
|
if (validValueAmt === 0) {
|
|
|
firstMergeCell[JV.PROP_CONTROL].Shrink = orgCtrl.Shrink;
|
|
|
firstMergeCell[JV.PROP_CONTROL].Wrap = "F";
|
|
|
+ firstMergeCell[JV.PROP_CONTROL].VerticalForExcel = null;
|
|
|
}
|
|
|
firstMergeCell = prepareObj.pageCellObj[mergeKey][i].cell;
|
|
|
firstMergeCell[JV.PROP_STYLE] = firstMergeCell[JV.PROP_STYLE].slice(0, firstMergeCell[JV.PROP_STYLE].indexOf("_AutoHeightMerge"));
|