|  | @@ -597,30 +597,26 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |      JpcFlowTabResult.outputAsPreviewPage = function (rptTpl, bands, controls, $CURRENT_RPT) {
 | 
	
		
			
				|  |  |          let me = this, rst = [], vIdx = [];
 | 
	
		
			
				|  |  |          //只预览第一页的数据
 | 
	
		
			
				|  |  | -        let pageStatus = [true, true, false, true, false, false, false, false];
 | 
	
		
			
				|  |  | +        let pageStatus = [true, true, true, true, true, true, true, true];
 | 
	
		
			
				|  |  | +        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 = rst.concat(me.outputColumn(rptTpl, null, 1, 0, bands, unitFactor, controls, 0));
 | 
	
		
			
				|  |  | +        rst = rst.concat(me.outputColumn(rptTpl, null, 1, 0, bands, unitFactor, 0));
 | 
	
		
			
				|  |  |          // 2.1 Content-Tab
 | 
	
		
			
				|  |  | -        // rst = rst.concat(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 = rst.concat(me.outputSegSum(rptTpl, dataObj, 1, 0, bands, unitFactor, controls));
 | 
	
		
			
				|  |  | +        rst = rst.concat(me.outputPreviewSegSum(rptTpl, bands, unitFactor, controls, pageStatus));
 | 
	
		
			
				|  |  |          // 2.4 Sum Page
 | 
	
		
			
				|  |  | -        // rst = rst.concat(me.outputPageSum(rptTpl, dataObj, 1, 0, bands, unitFactor, controls));
 | 
	
		
			
				|  |  | +        rst = rst.concat(me.outputPreviewPageSum(rptTpl, bands, unitFactor, controls, pageStatus));
 | 
	
		
			
				|  |  |          // 2.5 Group
 | 
	
		
			
				|  |  |          // 2.6 Discrete
 | 
	
		
			
				|  |  |          rst = rst.concat(JpcDiscreteHelper.outputPreviewDiscreteInfo(rptTpl[JV.NODE_FLOW_INFO][JV.NODE_DISCRETE_INFO], bands, unitFactor, pageStatus));
 | 
	
		
			
				|  |  | -        me.dispValueIdxLst = bkdispValueIdxLst;
 | 
	
		
			
				|  |  |          return rst;
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      JpcFlowTabResult.outputAsSimpleJSONPage = function (rptTpl, dataObj, page, bands, controls, adHocMergePos, $CURRENT_RPT) {
 | 
	
	
		
			
				|  | @@ -640,7 +636,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |              // 2.1 Content-Tab
 | 
	
		
			
				|  |  |              tabRstLst.push(me.outputContent(rptTpl, dataObj, page, bands, unitFactor, controls, 0, $CURRENT_RPT));
 | 
	
		
			
				|  |  |              // 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, 0));
 | 
	
		
			
				|  |  |              // 2.3 Sum Seg
 | 
	
		
			
				|  |  |              tabRstLst.push(me.outputSegSum(rptTpl, dataObj, page, segIdx, bands, unitFactor, controls));
 | 
	
		
			
				|  |  |              // 2.4 Sum Page
 | 
	
	
		
			
				|  | @@ -674,7 +670,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |                  // 2.1 Content-Tab
 | 
	
		
			
				|  |  |                  tabRstLst.push(me.outputContent(rptTpl, dataObj, actualPage, bands, unitFactor, controls, pi, $CURRENT_RPT));
 | 
	
		
			
				|  |  |                  // 2.2 Column tab
 | 
	
		
			
				|  |  | -                tabRstLst.push(me.outputColumn(rptTpl, dataObj, actualPage, segIdx, bands, unitFactor, controls, pi));
 | 
	
		
			
				|  |  | +                tabRstLst.push(me.outputColumn(rptTpl, dataObj, actualPage, segIdx, bands, unitFactor, pi));
 | 
	
		
			
				|  |  |                  // 2.3 Sum Seg
 | 
	
		
			
				|  |  |                  tabRstLst.push(me.outputSegSum(rptTpl, dataObj, actualPage, segIdx, bands, unitFactor, controls));
 | 
	
		
			
				|  |  |                  // 2.4 Sum Page
 | 
	
	
		
			
				|  | @@ -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) {
 | 
	
	
		
			
				|  | @@ -794,7 +808,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return rst;
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | -    JpcFlowTabResult.outputColumn = function (rptTpl, dataObj, page, segIdx, bands, unitFactor, controls, multiColIdx) {
 | 
	
		
			
				|  |  | +    JpcFlowTabResult.outputColumn = function (rptTpl, dataObj, page, segIdx, bands, unitFactor, multiColIdx) {
 | 
	
		
			
				|  |  |          let me = this, rst = [];
 | 
	
		
			
				|  |  |          let FLOW_NODE_STR = me.isEx?JV.NODE_FLOW_INFO_EX:JV.NODE_FLOW_INFO;
 | 
	
		
			
				|  |  |          let tab = rptTpl[FLOW_NODE_STR][JV.NODE_FLOW_COLUMN];
 | 
	
	
		
			
				|  | @@ -802,17 +816,29 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |          if (band) {
 | 
	
		
			
				|  |  |              let pageStatus = me.pageStatusLst[page - 1];
 | 
	
		
			
				|  |  |              if (pageStatus[band[JV.BAND_PROP_DISPLAY_TYPE]]) {
 | 
	
		
			
				|  |  | -                if (tab[JV.PROP_TEXT]) {
 | 
	
		
			
				|  |  | -                    rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXT], band, unitFactor, 1, 0, 1, 0, me.multiCols, multiColIdx));
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (tab[JV.PROP_TEXTS]) {
 | 
	
		
			
				|  |  | -                    for (let j = 0; j < tab[JV.PROP_TEXTS].length; j++) {
 | 
	
		
			
				|  |  | -                        rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXTS][j], band, unitFactor, 1, 0, 1, 0, me.multiCols, multiColIdx));
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (tab[JV.NODE_DISCRETE_INFO]) {
 | 
	
		
			
				|  |  | -                    rst = rst.concat(JpcDiscreteHelper.outputDiscreteInfo(tab[JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, me.pageStatusLst[page - 1], segIdx, me.multiCols, multiColIdx));
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +                rst = rst.concat(me.commonTabRestOutput(dataObj, page, segIdx, bands, band, unitFactor, tab, multiColIdx));
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return rst;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    JpcFlowTabResult.outputPreviewSegSum = function (rptTpl, bands, unitFactor, controls, pageStatus) {
 | 
	
		
			
				|  |  | +        let rst = [];
 | 
	
		
			
				|  |  | +        let tab = rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_SEG_SUM];
 | 
	
		
			
				|  |  | +        let band = bands[tab[JV.PROP_BAND_NAME]];
 | 
	
		
			
				|  |  | +        if (band) {
 | 
	
		
			
				|  |  | +            if (pageStatus[band[JV.BAND_PROP_DISPLAY_TYPE]]) {
 | 
	
		
			
				|  |  | +                rst = rst.concat(JpcDiscreteHelper.outputPreviewSumInfoOutput(band, unitFactor, tab));
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return rst;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    JpcFlowTabResult.outputPreviewPageSum = function (rptTpl, bands, unitFactor, controls, pageStatus) {
 | 
	
		
			
				|  |  | +        let rst = [];
 | 
	
		
			
				|  |  | +        let tab = rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_PAGE_SUM];
 | 
	
		
			
				|  |  | +        let band = bands[tab[JV.PROP_BAND_NAME]];
 | 
	
		
			
				|  |  | +        if (band) {
 | 
	
		
			
				|  |  | +            if (pageStatus[band[JV.BAND_PROP_DISPLAY_TYPE]]) {
 | 
	
		
			
				|  |  | +                rst = rst.concat(JpcDiscreteHelper.outputPreviewSumInfoOutput(band, unitFactor, tab));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return rst;
 | 
	
	
		
			
				|  | @@ -831,17 +857,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |                      cellItem[JV.PROP_AREA] = JpcAreaHelper.outputArea(tab_fields[i][JV.PROP_AREA], band, unitFactor, 1, 0, 1, 0, me.multiCols, 0, true, false);
 | 
	
		
			
				|  |  |                      rst.push(cellItem);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if (tab[JV.PROP_TEXT]) {
 | 
	
		
			
				|  |  | -                    rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXT], band, unitFactor, 1, 0, 1, 0, me.multiCols, 0));
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (tab[JV.PROP_TEXTS]) {
 | 
	
		
			
				|  |  | -                    for (let j = 0; j < tab[JV.PROP_TEXTS].length; j++) {
 | 
	
		
			
				|  |  | -                        rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXTS][j], band, unitFactor, 1, 0, 1, 0, me.multiCols, 0));
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (tab[JV.NODE_DISCRETE_INFO]) {
 | 
	
		
			
				|  |  | -                    rst = rst.concat(JpcDiscreteHelper.outputDiscreteInfo(tab[JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, me.pageStatusLst[page - 1], segIdx, me.multiCols, 0));
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +                rst = rst.concat(me.commonTabRestOutput(dataObj, page, segIdx, bands, band, unitFactor, tab, 0));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return rst;
 | 
	
	
		
			
				|  | @@ -860,17 +876,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |                      cellItem[JV.PROP_AREA] = JpcAreaHelper.outputArea(tab_fields[i][JV.PROP_AREA], band, unitFactor, 1, 0, 1, 0, me.multiCols, 0, true, false);
 | 
	
		
			
				|  |  |                      rst.push(cellItem);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if (tab[JV.PROP_TEXT]) {
 | 
	
		
			
				|  |  | -                    rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXT], band, unitFactor, 1, 0, 1, 0, me.multiCols, 0));
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (tab[JV.PROP_TEXTS]) {
 | 
	
		
			
				|  |  | -                    for (let j = 0; j < tab[JV.PROP_TEXTS].length; j++) {
 | 
	
		
			
				|  |  | -                        rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXTS][j], band, unitFactor, 1, 0, 1, 0, me.multiCols, 0));
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (tab[JV.NODE_DISCRETE_INFO]) {
 | 
	
		
			
				|  |  | -                    rst = rst.concat(JpcDiscreteHelper.outputDiscreteInfo(tab[JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, me.pageStatusLst[page - 1], segIdx, me.multiCols, 0));
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +                rst = rst.concat(me.commonTabRestOutput(dataObj, page, segIdx, bands, band, unitFactor, tab, 0));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return rst;
 | 
	
	
		
			
				|  | @@ -929,6 +935,21 @@ JpcFlowTabSrv.prototype.createNew = function(){
 | 
	
		
			
				|  |  |          // console.log(rst);
 | 
	
		
			
				|  |  |          return rst;
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | +    JpcFlowTabResult.commonTabRestOutput = function(dataObj, page, segIdx, bands, band, unitFactor, tab, multiColIdx){
 | 
	
		
			
				|  |  | +        let me = this, rst = [];
 | 
	
		
			
				|  |  | +        if (tab[JV.PROP_TEXT]) {
 | 
	
		
			
				|  |  | +            rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXT], band, unitFactor, 1, 0, 1, 0, me.multiCols, multiColIdx));
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (tab[JV.PROP_TEXTS]) {
 | 
	
		
			
				|  |  | +            for (let j = 0; j < tab[JV.PROP_TEXTS].length; j++) {
 | 
	
		
			
				|  |  | +                rst.push(JpcTextHelper.outputText(tab[JV.PROP_TEXTS][j], band, unitFactor, 1, 0, 1, 0, me.multiCols, multiColIdx));
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (tab[JV.NODE_DISCRETE_INFO]) {
 | 
	
		
			
				|  |  | +            rst = rst.concat(JpcDiscreteHelper.outputDiscreteInfo(tab[JV.NODE_DISCRETE_INFO], bands, dataObj, unitFactor, me.pageStatusLst[page - 1], segIdx, 1, 0));
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return rst;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      return JpcFlowTabResult;
 | 
	
		
			
				|  |  |  };
 |