Przeglądaj źródła

报表数据相关

MaiXinRong 11 miesięcy temu
rodzic
commit
75e76d23d8
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      app/controller/report_controller.js

+ 2 - 2
app/controller/report_controller.js

@@ -986,9 +986,9 @@ module.exports = app => {
             if (!rptTpl || rptTpl.length !== 1) {
                 throw '获取模板失败';
             }
-            const source_type = params.source_type ? params.source_type : rptTpl[0].source_type;
+            const source_type = rptTpl[0].source_type;
             rptTpl = JSON.parse(rptTpl[0].rpt_content);
-            rptTpl.source_type = source_type || sourceTypeConst.defaultSourceType;
+            rptTpl.source_type = source_type || params.source_type || sourceTypeConst.defaultSourceType;
             rptTpl.id = params.rpt_tpl_id;
             // console.log('get the template!');
             const customSelect = rptTpl[JV.NODE_CUSTOM_DEFINE] && rptTpl[JV.NODE_CUSTOM_DEFINE][JV.NODE_CUS_AUDIT_SELECT].enable