|
@@ -598,29 +598,25 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
let me = this, rst = [], vIdx = [];
|
|
|
//只预览第一页的数据
|
|
|
let pageStatus = [true, true, false, true, false, false, false, false];
|
|
|
+ me.pageStatusLst.push(pageStatus);
|
|
|
+ JpcFieldHelper.findAndPutDataFieldIdx(rptTpl, rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT][JV.PROP_FLOW_FIELDS], null, me.disp_fields_idx, false);
|
|
|
JpcBandHelper.setBandArea(bands, rptTpl, pageStatus, true, false);
|
|
|
let maxRowRec = JpcFlowTabHelper.getMaxRowsPerPage(bands, rptTpl, false);
|
|
|
for (let i = 0; i < maxRowRec; i++) {
|
|
|
vIdx.push([-1, JV.DISPLAY_VAL_TYPE_NORMAL, JV.BLANK_VALUE_INDEX]);
|
|
|
}
|
|
|
- let bkdispValueIdxLst = me.dispValueIdxLst;
|
|
|
- me.pageStatusLst = [];
|
|
|
- me.pageStatusLst.push(pageStatus);
|
|
|
- me.dispValueIdxLst = [];
|
|
|
- me.dispValueIdxLst.push(vIdx);
|
|
|
let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
|
|
|
// 2.2 Column tab
|
|
|
- rst.push(me.outputColumn(rptTpl, null, 1, 0, bands, unitFactor, controls, 0));
|
|
|
+ rst = rst.concat(me.outputColumn(rptTpl, null, 1, 0, bands, unitFactor, controls, 0));
|
|
|
// 2.1 Content-Tab
|
|
|
- // rst.push(me.outputContent(rptTpl, null, 1, bands, unitFactor, controls, 0, $CURRENT_RPT));
|
|
|
+ rst = rst.concat(me.outputPreviewContent(rptTpl, bands, unitFactor, controls, pageStatus, maxRowRec));
|
|
|
// 2.3 Sum Seg
|
|
|
- // rst.push(me.outputSegSum(rptTpl, dataObj, 1, 0, bands, unitFactor, controls));
|
|
|
+ // rst = rst.concat(me.outputSegSum(rptTpl, dataObj, 1, 0, bands, unitFactor, controls));
|
|
|
// 2.4 Sum Page
|
|
|
- // rst.push(me.outputPageSum(rptTpl, dataObj, 1, 0, bands, unitFactor, controls));
|
|
|
+ // rst = rst.concat(me.outputPageSum(rptTpl, dataObj, 1, 0, bands, unitFactor, controls));
|
|
|
// 2.5 Group
|
|
|
// 2.6 Discrete
|
|
|
- rst.push(JpcDiscreteHelper.outputPreviewDiscreteInfo(rptTpl[JV.NODE_FLOW_INFO][JV.NODE_DISCRETE_INFO], bands, unitFactor, pageStatus));
|
|
|
- me.dispValueIdxLst = bkdispValueIdxLst;
|
|
|
+ rst = rst.concat(JpcDiscreteHelper.outputPreviewDiscreteInfo(rptTpl[JV.NODE_FLOW_INFO][JV.NODE_DISCRETE_INFO], bands, unitFactor, pageStatus));
|
|
|
return rst;
|
|
|
};
|
|
|
JpcFlowTabResult.outputAsSimpleJSONPage = function (rptTpl, dataObj, page, bands, controls, adHocMergePos, $CURRENT_RPT) {
|
|
@@ -692,6 +688,25 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
return rst;
|
|
|
};
|
|
|
+ JpcFlowTabResult.outputPreviewContent = function(rptTpl, bands, unitFactor, controls, pageStatus, maxRec) {
|
|
|
+ let me = this, rst = [];
|
|
|
+ let tab = rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT];
|
|
|
+ let band = bands[tab[JV.PROP_BAND_NAME]];
|
|
|
+ if (band) {
|
|
|
+ if (pageStatus[band[JV.BAND_PROP_DISPLAY_TYPE]]) {
|
|
|
+ let tab_fields = tab[JV.PROP_FLOW_FIELDS];
|
|
|
+ for (let rowIdx = 0; rowIdx < maxRec; rowIdx++) {
|
|
|
+ for (let i = 0; i < tab_fields.length; i++) {
|
|
|
+ let tab_field = tab_fields[i];
|
|
|
+ if (!(tab_field[JV.PROP_HIDDEN])) {
|
|
|
+ rst.push(me.outputTabField(band, tab_field, null, -1, -1, maxRec, rowIdx, 1, 0, unitFactor, true, controls, 0));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
JpcFlowTabResult.outputContent = function(rptTpl, dataObj, page, bands, unitFactor, controls, multiColIdx, $CURRENT_RPT) {
|
|
|
let me = this, rst = [];
|
|
|
let FLOW_NODE_STR = me.isEx?JV.NODE_FLOW_INFO_EX:JV.NODE_FLOW_INFO;
|
|
@@ -730,7 +745,6 @@ JpcFlowTabSrv.prototype.createNew = function(){
|
|
|
}
|
|
|
if (!(tab_field[JV.PROP_HIDDEN])) {
|
|
|
// rst.push(me.outputTabField(band, tab_field, data_field, contentValuesIdx[rowIdx], -1, contentValuesIdx.length, rowIdx, 1, 0, unitFactor, true, controls, multiColIdx));
|
|
|
- //测试中
|
|
|
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) {
|