From cf7721fd8a04e64263aced7935ee4787e2763c8d Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Fri, 10 Sep 2021 14:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=AF=BC=E5=85=A5=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=9D=83=E9=99=90=E7=BB=86=E5=8C=96=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ReportDashboardController.java | 4 +-- .../db/migration/V1.0.12__create_excel.sql | 27 +++++++++++++++++++ .../views/report/bigscreen/designer/index.vue | 4 +-- 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 report-core/src/main/resources/db/migration/V1.0.12__create_excel.sql diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java index d34dbf62..4c8925db 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java @@ -74,7 +74,7 @@ public class ReportDashboardController { * @return */ @GetMapping("/export") - @Permission(code = "view", name = "导出大屏") + @Permission(code = "export", name = "导出大屏") public ResponseEntity exportDashboard(HttpServletRequest request, HttpServletResponse response, @RequestParam("reportCode") String reportCode, @RequestParam(value = "showDataSet",required = false, defaultValue = "1") Integer showDataSet) { return reportDashboardService.exportDashboard(request, response, reportCode, showDataSet); @@ -87,7 +87,7 @@ public class ReportDashboardController { * @return */ @PostMapping("/import/{reportCode}") - @Permission(code = "design", name = "导入大屏") + @Permission(code = "import", name = "导入大屏") public ResponseBean importDashboard(@RequestParam("file") MultipartFile file, @PathVariable("reportCode") String reportCode) { reportDashboardService.importDashboard(file, reportCode); return ResponseBean.builder().build(); diff --git a/report-core/src/main/resources/db/migration/V1.0.12__create_excel.sql b/report-core/src/main/resources/db/migration/V1.0.12__create_excel.sql new file mode 100644 index 00000000..771d9e0c --- /dev/null +++ b/report-core/src/main/resources/db/migration/V1.0.12__create_excel.sql @@ -0,0 +1,27 @@ +use +aj_report; + + +CREATE TABLE `gaea_report_excel` +( + `id` bigint(11) NOT NULL AUTO_INCREMENT, + `report_code` varchar(100) DEFAULT NULL COMMENT '报表编码', + `set_codes` varchar(255) DEFAULT NULL COMMENT '数据集编码,以|分割', + `set_param` varchar(1024) DEFAULT NULL COMMENT '数据集查询参数', + `json_str` text COMMENT '报表json串', + `enable_flag` int(1) DEFAULT '1' COMMENT '0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG', + `delete_flag` int(1) DEFAULT '0' COMMENT '0--未删除 1--已删除 DIC_NAME=DELETE_FLAG', + `create_by` varchar(255) DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(255) DEFAULT NULL COMMENT '更新人', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `version` int(8) DEFAULT NULL COMMENT '版本号', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `UNIQUE_REPORT_CODE` (`report_code`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=215 DEFAULT CHARSET=utf8; + + +UPDATE `aj_report`.`access_authority` SET `parent_target` = 'report', `target` = 'bigScreenManage', `target_name` = '大屏报表', `action` = 'export', `action_name` = '导出大屏', `sort` = 234, `enable_flag` = 1, `delete_flag` = 0, `create_by` = 'admin', `create_time` = '2019-07-23 15:59:40', `update_by` = 'admin', `update_time` = '2019-07-23 15:59:40', `version` = 1 WHERE `id` = 234; + +INSERT INTO `aj_report`.`access_authority`(`id`, `parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES (235, 'report', 'bigScreenManage', '大屏报表', 'import', '导入大屏', 235, 1, 0, 'admin', '2019-07-23 15:59:40', 'admin', '2019-07-23 15:59:40', 1); +INSERT INTO `aj_report`.`access_authority`(`id`, `parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES (236, 'report', 'excelManage', '表格报表', 'query', '查询报表', 234, 1, 0, 'admin', '2019-07-23 15:59:40', 'admin', '2019-07-23 15:59:40', 1); diff --git a/report-ui/src/views/report/bigscreen/designer/index.vue b/report-ui/src/views/report/bigscreen/designer/index.vue index 1ca306ae..bdc5415e 100644 --- a/report-ui/src/views/report/bigscreen/designer/index.vue +++ b/report-ui/src/views/report/bigscreen/designer/index.vue @@ -87,7 +87,7 @@ - + - +