🎉 2.8.0.RELEASE 新增在线报表模块

This commit is contained in:
smallchill 2020-11-14 20:43:52 +08:00
parent 2ed50e820d
commit 6b1a822184
6 changed files with 252 additions and 8 deletions

View File

@ -1,9 +1,9 @@
<p align="center"> <p align="center">
<img src="https://img.shields.io/badge/Release-V2.7.2-green.svg" alt="Downloads"> <img src="https://img.shields.io/badge/Release-V2.8.0-green.svg" alt="Downloads">
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status"> <img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status"> <img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status">
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR7-blue.svg" alt="Coverage Status"> <img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR8-blue.svg" alt="Coverage Status">
<img src="https://img.shields.io/badge/Spring%20Boot-2.2.9.RELEASE-blue.svg" alt="Downloads"> <img src="https://img.shields.io/badge/Spring%20Boot-2.2.11.RELEASE-blue.svg" alt="Downloads">
<a target="_blank" href="https://bladex.vip"> <a target="_blank" href="https://bladex.vip">
<img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads"> <img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads">
</a> </a>

View File

@ -1,6 +1,6 @@
{ {
"name": "saber-admin", "name": "saber-admin",
"version": "2.7.3", "version": "2.8.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

22
src/api/report/report.js Normal file
View File

@ -0,0 +1,22 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/blade-report/report/rest/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const remove = (ids) => {
return request({
url: '/api/blade-report/report/rest/remove',
method: 'post',
params: {
ids,
}
})
}

View File

@ -38,5 +38,7 @@ export default {
} }
}, },
// 授权地址 // 授权地址
authUrl: 'http://localhost/blade-auth/oauth/render' authUrl: 'http://localhost/blade-auth/oauth/render',
// 报表设计器地址(cloud端口为8108,boot端口为80)
reportUrl: 'http://localhost:8108/ureport',
} }

View File

@ -0,0 +1,202 @@
<template>
<basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
ref="crud"
v-model="form"
:page.sync="page"
:permission="permissionList"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template slot="menuLeft">
<el-button type="danger"
size="small"
icon="el-icon-delete"
plain
@click="handleDelete">
</el-button>
</template>
<template slot-scope="scope" slot="menu">
<el-button
type="text"
icon="el-icon-edit-outline"
size="small"
@click.stop="handleDesign(scope.row.name)"
>设计
</el-button>
<el-button
type="text"
icon="el-icon-view"
size="small"
@click.stop="handlePreview(scope.row.name)"
>预览
</el-button>
</template>
<template slot-scope="{row}" slot="name">
<el-tag style="cursor:pointer" @click="handlePreview(row.name)">{{ row.name }}</el-tag>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, remove} from "@/api/report/report";
import {mapGetters} from "vuex";
import website from '@/config/website';
export default {
data() {
return {
form: {},
selectionList: [],
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
height: 'auto',
calcHeight: 210,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
selection: true,
viewBtn: true,
dialogClickModal: false,
column: [
{
label: "文件名",
prop: "name",
search: true,
slot: true,
},
{
label: "创建时间",
prop: "createTime",
},
{
label: "更新时间",
prop: "updateTime",
}
]
},
data: []
};
},
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: true,
editBtn: false
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
handlePreview(name) {
this.$router.push({path: `/myiframe/urlPath?name=preview-${name}&src=${website.reportUrl}/preview?_u=blade-${name}`});
},
handleDesign(name) {
this.$router.push({path: `/myiframe/urlPath?name=designer-${name}&src=${website.reportUrl}/designer?_u=blade-${name}`});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@ -3,10 +3,10 @@
<basic-container> <basic-container>
<third-register></third-register> <third-register></third-register>
<p style="text-align: center;"> <p style="text-align: center;">
<img src="https://img.shields.io/badge/Release-V2.7.3-green.svg" alt="Downloads"/> <img src="https://img.shields.io/badge/Release-V2.8.0-green.svg" alt="Downloads"/>
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status"/> <img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status"/>
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR8-blue.svg" alt="Coverage Status"/> <img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR8-blue.svg" alt="Coverage Status"/>
<img src="https://img.shields.io/badge/Spring%20Boot-2.2.9.RELEASE-blue.svg" alt="Downloads"/> <img src="https://img.shields.io/badge/Spring%20Boot-2.2.11.RELEASE-blue.svg" alt="Downloads"/>
<a target="_blank" href="https://bladex.vip"> <a target="_blank" href="https://bladex.vip">
<img src="https://img.shields.io/badge/Saber%20Author-Small%20Chill-ff69b4.svg" alt="Downloads"/> <img src="https://img.shields.io/badge/Saber%20Author-Small%20Chill-ff69b4.svg" alt="Downloads"/>
</a> </a>
@ -125,6 +125,24 @@
<el-row> <el-row>
<basic-container> <basic-container>
<el-collapse v-model="logActiveNames" @change="handleChange"> <el-collapse v-model="logActiveNames" @change="handleChange">
<el-collapse-item title="2.8.0发布 增加在线报表模块" name="21">
<div>1.升级 SpringBoot 2.2.11.RELEASE</div>
<div>2.升级 SpringCloud Hoxton.SR8</div>
<div>3.升级 AlibabaCloud 2.2.3.RELEASE</div>
<div>4.升级 Knife4j 2.0.6</div>
<div>5.升级 Swagger 2.10.5</div>
<div>6.升级 SwaggerModel 1.6.2</div>
<div>7.升级 SpringPlugin 2.2.0.RELEASE</div>
<div>8.升级 JustAuth 1.15.8</div>
<div>9.升级 FastJson 1.2.74</div>
<div>10.升级 Guava 30.0-jre</div>
<div>11.升级 JJWT 0.11.2</div>
<div>12.集成UReport2新增在线报表模块</div>
<div>13.优化Swagger封装以支持Knife4j最新API</div>
<div>14.引入Knife4j增强配置,生产环境将完全隔离文档访问</div>
<div>15.优化架构适配最新版本API</div>
<div>16.优化部署脚本</div>
</el-collapse-item>
<el-collapse-item title="2.7.3发布 增强多租户功能" name="20"> <el-collapse-item title="2.7.3发布 增强多租户功能" name="20">
<div>1.升级至 SpringCloud Hoxton.SR8</div> <div>1.升级至 SpringCloud Hoxton.SR8</div>
<div>2.升级至 Mybatis-Plus 3.4.0</div> <div>2.升级至 Mybatis-Plus 3.4.0</div>
@ -327,7 +345,7 @@
data() { data() {
return { return {
activeNames: ['1', '2', '3', '5'], activeNames: ['1', '2', '3', '5'],
logActiveNames: ['20'] logActiveNames: ['21']
}; };
}, },
computed: { computed: {