当前位置:网站首页>ruoyi集成积木报表(nice)
ruoyi集成积木报表(nice)
2022-06-28 10:02:00 【周周写不完的代码】
介绍
项目中经常有报表,可视化大屏,打印这块的需求,这些手动处理会很麻烦,这次尝试用 积木报表这个组件解决
集成到若依
引入依赖,我们首先在 主Pom中做版本声明,后面我们把这个依赖放到 common 中
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
<version>1.5.0</version>
</dependency>
<repository>
<id>jeecg</id>
<name>jeecg Repository</name>
<url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
需要把 admin 模块中的 spring-boot-devtools 注释掉,可能会出现 aop 报错
security 中排除
.antMatchers("/jmreport/**").anonymous()
RuoYiApplication添加积木扫描目录
@SpringBootApplication(scanBasePackages = {
"org.jeecg.modules.jmreport","com.ruoyi"})
前端控制器
# 项目相关配置
ruoyi:
# 积木报表访问地址
reporturl: http://x.x.x.x:8090
配置
@RestController
@RequestMapping("/report/jimu")
public class JimuController {
@Autowired
Environment environment;
@GetMapping("/index")
@PreAuthorize("@ss.hasPermi('report:jimu:index')")
public String index(){
// String hostIp = IpUtils.getHostIp();
return environment.getProperty("ruoyi.reporturl")+"/jmreport/list";
}
@GetMapping("/view")
@PreAuthorize("@ss.hasPermi('report:jimu:view')")
public String view(){
return environment.getProperty("ruoyi.reporturl")+"/jmreport/view";
}
}
前端配置
import request from "@/utils/request";
// api 配置
// 首页
export function indexUrl(query) {
return request({
url: "/report/jimu/index",
method: "get"
});
}
// 预览
export function view(query) {
return request({
url: "/report/jimu/view",
method: "get"
});
}
// 报表设计页面 jimu.vue
<template>
</template>
<script>
// import { getToken } from '@/utils/auth'
import { indexUrl } from '@/api/tool/jimu'
export default {
name: "Jimu",
created() {
indexUrl().then(res => {
var open = window.open();
// open.location = res + "?token=" + getToken();
open.location = res
})
}
}
</script>
<style scoped>
</style>
我们这边不需要 token 校验,后续再加上
添加菜单

点击后会跳转到一个新的页面,就是我们的积木报表主页了

边栏推荐
- Idea failed to connect to SQL Sever
- Realization of a springboard machine
- Unity loads AssetBundle resources from the server and writes them to local memory, and loads the downloaded and saved AB resources from local memory to the scene
- How to use dataant to monitor Apache apisex
- 学习机器学习的最佳路径是什么
- Chapter 5 trees and binary trees
- As shown in the figure, the SQL row is used to convert the original table of Figure 1. Figure 2 wants to convert it
- [unity][ecs] learning notes (I)
- Install using snap in opencloudos NET 6
- 装饰模式(Decorator)
猜你喜欢
![[Unity]EBUSY: resource busy or locked](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[Unity]EBUSY: resource busy or locked

如何使用 DataAnt 监控 Apache APISIX
![[happy Lantern Festival] guessing lantern riddles eating lantern festival full of vitality ~ (with lantern riddle guessing games)](/img/04/454bede0944f56ba69cddf6b237392.jpg)
[happy Lantern Festival] guessing lantern riddles eating lantern festival full of vitality ~ (with lantern riddle guessing games)

As shown in the figure, the SQL row is used to convert the original table of Figure 1. Figure 2 wants to convert it
![[unity][ecs] learning notes (I)](/img/eb/1f0ad817bbc441fd8c14d046b82dd0.png)
[unity][ecs] learning notes (I)

Function sub file writing

如何查看谷歌浏览器保存的网页密码

dotnet 使用 Crossgen2 对 DLL 进行 ReadyToRun 提升启动性能

Ideal interface automation project

增强 Jupyter Notebook 的功能,这里有四个妙招
随机推荐
增量快照 必须要求mysql表有主键的吗?
ECS MySQL query is slow
Is it safe to open an account with the QR code of CICC securities? Tell me what you know
idea连接sql sever失败
PyGame game: "Changsha version" millionaire started, dare you ask? (multiple game source codes attached)
Django database operation and problem solving
[Unity][ECS]学习笔记(三)
装饰模式(Decorator)
如何使用 DataAnt 监控 Apache APISIX
To enhance the function of jupyter notebook, here are four tips
Cisco * VRF (virtual route forwarding table)
纵观jBPM从jBPM3到jBPM5以及Activiti
Dbeaver installation and use tutorial (super detailed installation and use tutorial)
Ideal interface automation project
R language plot visualization: plot to visualize overlapping histograms, and use geom at the bottom edge of the histogram_ The rugfunction adds marginal rugplots
Application of X6 in data stack index management
Dear leaders, ask me if MySQL does not support early_ Offset mode? Unsupported star
Realization of a springboard machine
PHP curl forged IP address and header information code instance - Alibaba cloud
Solve the problem that the value of the action attribute of the form is null when transferring parameters