Commit a405ceef08fa89512aa2aa8fd2293808489b2a09
1 parent
7e6a348a
1.处理报表设计新增修改报表,打印下拉的数据源没有实时获取,判断数据源:空数组取report,有数据取reportData
Showing
1 changed file
with
4 additions
and
2 deletions
src/components/Common/ToolBar/ToolBarNew.js
| ... | ... | @@ -173,8 +173,10 @@ class ToolBarComponent extends Component { |
| 173 | 173 | if (menu.sControlName === "BtnPrint") { |
| 174 | 174 | /* 打印的二级菜单集合 */ |
| 175 | 175 | const reportChild = []; |
| 176 | - if (commonUtils.isNotEmptyArr(report)) { | |
| 177 | - for (const each of report) { | |
| 176 | + // 判断数据源:空数组取report,有数据取reportData | |
| 177 | + const targetList = commonUtils.isNotEmptyArr(reportData) ? reportData : report; | |
| 178 | + if (commonUtils.isNotEmptyArr(targetList)) { | |
| 179 | + for (const each of targetList) { | |
| 178 | 180 | reportChild.push({ |
| 179 | 181 | sControlName: `BtnPrint.${each.sId}`, |
| 180 | 182 | showName: each.sReportName, | ... | ... |