大屏导入导出权限细化分

Raod 3 years ago
parent 8bb912fcd8
commit cf7721fd8a

@ -74,7 +74,7 @@ public class ReportDashboardController {
* @return * @return
*/ */
@GetMapping("/export") @GetMapping("/export")
@Permission(code = "view", name = "导出大屏") @Permission(code = "export", name = "导出大屏")
public ResponseEntity<byte[]> exportDashboard(HttpServletRequest request, HttpServletResponse response, public ResponseEntity<byte[]> exportDashboard(HttpServletRequest request, HttpServletResponse response,
@RequestParam("reportCode") String reportCode, @RequestParam(value = "showDataSet",required = false, defaultValue = "1") Integer showDataSet) { @RequestParam("reportCode") String reportCode, @RequestParam(value = "showDataSet",required = false, defaultValue = "1") Integer showDataSet) {
return reportDashboardService.exportDashboard(request, response, reportCode, showDataSet); return reportDashboardService.exportDashboard(request, response, reportCode, showDataSet);
@ -87,7 +87,7 @@ public class ReportDashboardController {
* @return * @return
*/ */
@PostMapping("/import/{reportCode}") @PostMapping("/import/{reportCode}")
@Permission(code = "design", name = "导入大屏") @Permission(code = "import", name = "导入大屏")
public ResponseBean importDashboard(@RequestParam("file") MultipartFile file, @PathVariable("reportCode") String reportCode) { public ResponseBean importDashboard(@RequestParam("file") MultipartFile file, @PathVariable("reportCode") String reportCode) {
reportDashboardService.importDashboard(file, reportCode); reportDashboardService.importDashboard(file, reportCode);
return ResponseBean.builder().build(); return ResponseBean.builder().build();

@ -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);

@ -87,7 +87,7 @@
<i class="iconfont iconyulan" @click="viewScreen"></i> <i class="iconfont iconyulan" @click="viewScreen"></i>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="btn"> <span class="btn" v-permission="'bigScreenManage:export'">
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
@ -109,7 +109,7 @@
</el-upload> </el-upload>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="btn border-left"> <span class="btn border-left" v-permission="'bigScreenManage:import'">
<ul class="nav"> <ul class="nav">
<li> <li>
<i class="iconfont icondaochu"></i <i class="iconfont icondaochu"></i

Loading…
Cancel
Save