diff --git a/src/components/Common/ToolBar/ToolBarNew.js b/src/components/Common/ToolBar/ToolBarNew.js index 474a5e9..cf4f0d9 100644 --- a/src/components/Common/ToolBar/ToolBarNew.js +++ b/src/components/Common/ToolBar/ToolBarNew.js @@ -173,8 +173,10 @@ class ToolBarComponent extends Component { if (menu.sControlName === "BtnPrint") { /* 打印的二级菜单集合 */ const reportChild = []; - if (commonUtils.isNotEmptyArr(report)) { - for (const each of report) { + // 判断数据源:空数组取report,有数据取reportData + const targetList = commonUtils.isNotEmptyArr(reportData) ? reportData : report; + if (commonUtils.isNotEmptyArr(targetList)) { + for (const each of targetList) { reportChild.push({ sControlName: `BtnPrint.${each.sId}`, showName: each.sReportName,