浏览代码

报表数据相关

MaiXinRong 11 月之前
父节点
当前提交
75e76d23d8
共有 1 个文件被更改,包括 2 次插入2 次删除
  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