SmartBI笔录

版权声明: https://blog.csdn.net/qq_32939679/article/details/88221649

后端代码:

@RequestMapping(value = "recordTotView")
public String recordTotView(@RequestParam(value = "reCode", required = false) String reCode, 
      HttpServletRequest request, Model model){
   //显示汇总报表
   String hiddenParamPanel = request.getParameter("hiddenParamPanel");
   
   try {
      // 封装参数
      List<Param> paramList = new ArrayList<Param>();
      paramList.add(new Param("reCode", reCode, ""));
      // 报表地址
      String action = PropertisReadUtil.getProperty("britUrl") + "/vision/openresource.jsp";
      
      model.addAttribute("reCode", reCode);
      model.addAttribute("title", "预警报告");
      model.addAttribute("action", action);
      model.addAttribute("pwd", PropertisReadUtil.getProperty("britPwd"));
      model.addAttribute("user", "admin");
      model.addAttribute("resid", PropertisReadUtil.getProperty("ediis.properties","WN_BI_RES"));
      model.addAttribute("paramList", paramList);
      //model.addAttribute("smartbiCookie", UserUtils.getUser().getCookie());
      if (Tools.isNotEmpty(hiddenParamPanel)) {// 隐藏报表参数面板
         model.addAttribute("hiddenParamPanel", hiddenParamPanel);
      }
   } catch (Exception e) {
      logger.error(e.getMessage(),e);
   }
   
   return "modules/ediis/wnListRe/wnListReForm2";
}

前端代码:

<iframe id="viewShow" class="height-450" style="width:100%;" frameborder="no" border="0"src="${action}?&resid=${resid}&user=${user}&password=${pwd}&param.reCode=${paramList[0].value}&paramDisplay.reCode=${paramList[0].value}"></iframe>

猜你喜欢

转载自blog.csdn.net/qq_32939679/article/details/88221649