|
@@ -134,7 +134,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
me.pagesAmt = rst;
|
|
me.pagesAmt = rst;
|
|
return rst;
|
|
return rst;
|
|
};
|
|
};
|
|
- JpcFlowTabResult.outputAsSimpleJSONPage = function (rptTpl, dataObj, page, bands, controls, $CURRENT_RPT) {
|
|
|
|
|
|
+ JpcFlowTabResult.outputAsSimpleJSONPage = function (rptTpl, dataObj, page, bands, controls, adHocMergePos, $CURRENT_RPT) {
|
|
let me = this, rst = [], tabRstLst = [];
|
|
let me = this, rst = [], tabRstLst = [];
|
|
let FLOW_NODE_STR = me.isEx?JV.NODE_FLOW_INFO_EX:JV.NODE_FLOW_INFO;
|
|
let FLOW_NODE_STR = me.isEx?JV.NODE_FLOW_INFO_EX:JV.NODE_FLOW_INFO;
|
|
let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
|
|
let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
|
|
@@ -150,13 +150,29 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
JpcBandHelper.resetBandPos(rptTpl[JV.NODE_BAND_COLLECTION], bands, flowContentBand, offsetY);
|
|
JpcBandHelper.resetBandPos(rptTpl[JV.NODE_BAND_COLLECTION], bands, flowContentBand, offsetY);
|
|
|
|
|
|
tabRstLst.push(me.outputContent(rptTpl, dataObj, page, bands, unitFactor, controls, 0, $CURRENT_RPT));
|
|
tabRstLst.push(me.outputContent(rptTpl, dataObj, page, bands, unitFactor, controls, 0, $CURRENT_RPT));
|
|
- //2.2 Column tab
|
|
|
|
|
|
+ // 2.2 Column tab
|
|
tabRstLst.push(me.outputColumn(rptTpl, dataObj, page, segIdx, bands, unitFactor, controls, 0));
|
|
tabRstLst.push(me.outputColumn(rptTpl, dataObj, page, segIdx, bands, unitFactor, controls, 0));
|
|
- //2.3 Sum Seg
|
|
|
|
|
|
+ // 2.3 Sum Seg
|
|
tabRstLst.push(me.outputSegSum(rptTpl, dataObj, page, segIdx, bands, unitFactor, controls));
|
|
tabRstLst.push(me.outputSegSum(rptTpl, dataObj, page, segIdx, bands, unitFactor, controls));
|
|
- //2.4 Sum Page
|
|
|
|
- //2.5 Discrete
|
|
|
|
|
|
+ // 2.4 Sum Page
|
|
|
|
+ // 2.5 Discrete
|
|
tabRstLst.push(JpcDiscreteHelper.outputDiscreteInfo(rptTpl[FLOW_NODE_STR][JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, me.pageStatusLst[page - 1], segIdx, 1, 0, $CURRENT_RPT));
|
|
tabRstLst.push(JpcDiscreteHelper.outputDiscreteInfo(rptTpl[FLOW_NODE_STR][JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, me.pageStatusLst[page - 1], segIdx, 1, 0, $CURRENT_RPT));
|
|
|
|
+ //3. reset merge band position
|
|
|
|
+ if (bands[JV.BAND_PROP_MERGE_BAND] && adHocMergePos) {
|
|
|
|
+ let mergedBand = bands[JV.BAND_PROP_MERGE_BAND];
|
|
|
|
+ let arr = [];
|
|
|
|
+ arr.push(parseInt(mergedBand[JV.PROP_LEFT].toFixed(0)));
|
|
|
|
+ adHocMergePos[JV.PROP_LEFT] = arr;
|
|
|
|
+ arr = [];
|
|
|
|
+ arr.push(parseInt(mergedBand[JV.PROP_RIGHT].toFixed(0)));
|
|
|
|
+ adHocMergePos[JV.PROP_RIGHT] = arr;
|
|
|
|
+ arr = [];
|
|
|
|
+ arr.push(parseInt(mergedBand[JV.PROP_TOP].toFixed(0)));
|
|
|
|
+ adHocMergePos[JV.PROP_TOP] = arr;
|
|
|
|
+ arr = [];
|
|
|
|
+ arr.push(parseInt((mergedBand[JV.PROP_BOTTOM] + offsetY).toFixed(0)));
|
|
|
|
+ adHocMergePos[JV.PROP_BOTTOM] = arr;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
let segIdx = JpcCommonHelper.getSegIdxByPageIdx(page, me.page_seg_map);
|
|
let segIdx = JpcCommonHelper.getSegIdxByPageIdx(page, me.page_seg_map);
|
|
//1 calculate the band position
|
|
//1 calculate the band position
|