Преглед изворни кода

变更令批量归档问题

Tony Kang пре 1 година
родитељ
комит
3a90007e49
1 измењених фајлова са 11 додато и 7 уклоњено
  1. 11 7
      app/public/report/js/rpt_indexDb.js

+ 11 - 7
app/public/report/js/rpt_indexDb.js

@@ -84,12 +84,16 @@ const indexDbOprObj = {
                 let datas = [];
                 for (let node of rptNodes) {
                     let keyStr = `_${stage_id}_${node.refId}`;
-                    const gather_select = customSelects.gather_select.find(function (x) {
-                        return x.id === node.refId;
-                    });
-                    const stage_select = customSelects.stage_select.find(function (x) {
-                        return x.id === node.refId;
-                    });
+                    let gather_select = null;
+                    let stage_select = null;
+                    if (customSelects) {
+                        gather_select = customSelects.gather_select.find(function (x) {
+                            return x.id === node.refId;
+                        });
+                        stage_select = customSelects.stage_select.find(function (x) {
+                            return x.id === node.refId;
+                        });
+                    }
                     let data = {id: keyStr, name: node.name, rpt_id: node.refId, stage_id, gather_select, stage_select, pageSize: rptControlObj.getCurrentPageSize(), CFG: CUST_CFG};
                     datas.push(data);
                 }
@@ -138,7 +142,7 @@ const indexDbOprObj = {
             }
             let params = rptControlObj.creatCommonExportParam(refRptTplIds);
             params.splitArchives = splitArchives;
-            await rptCustomObj.getCustomSelect(params);
+            if (customSelects) await rptCustomObj.getCustomSelect(params);
             // params.customSelect = [];
             params.needWaterMark = needWaterMark;
             indexDbOprObj._getRptDataForDb(params, rpt_names, stage_id, (records, rstRoleRel)=>{