瀏覽代碼

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

MaiXinRong 5 年之前
父節點
當前提交
3660157be5

+ 13 - 1
app/reports/rpt_component/helper/jpc_helper_common.js

@@ -144,7 +144,19 @@ const JpcCommonHelper = {
     },
     },
     getSegPageIdxByPage: function(page, page_seg_map) {
     getSegPageIdxByPage: function(page, page_seg_map) {
         let rst = 0;
         let rst = 0;
-        //
+        for (let pIdx = 0; pIdx < page_seg_map.length; pIdx++) {
+            if (page_seg_map[pIdx][0] === page) {
+                const tmpSeg = page_seg_map[pIdx][1];
+                for (let spIdx = pIdx - 1; spIdx >= 0; spIdx--) {
+                    if (page_seg_map[spIdx][1] === tmpSeg) {
+                        rst++;
+                    } else {
+                        break;
+                    }
+                }
+                break;
+            }
+        }
         return rst;
         return rst;
     },
     },
     getStringLinesInArea: function(area, strVal, chnW, otherW) {
     getStringLinesInArea: function(area, strVal, chnW, otherW) {

+ 1 - 0
app/reports/rpt_component/helper/jpc_helper_discrete.js

@@ -90,6 +90,7 @@ const JpcDiscreteHelper = {
                                                 value = data[0];
                                                 value = data[0];
                                             }
                                             }
                                             value = this._getSegPageValue(value, segPageIdx);
                                             value = this._getSegPageValue(value, segPageIdx);
+                                            // console.log(value);
                                         }
                                         }
                                     } else {
                                     } else {
                                         if (map_data_field[JV.PROP_AD_HOC_DATA] && map_data_field[JV.PROP_AD_HOC_DATA].length > 0) {
                                         if (map_data_field[JV.PROP_AD_HOC_DATA] && map_data_field[JV.PROP_AD_HOC_DATA].length > 0) {