From 1f206bd2203bfe157047eee08b5b1a914c99089d Mon Sep 17 00:00:00 2001 From: qianming Date: Fri, 5 Aug 2022 13:31:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82--=E5=88=86=E4=BA=AB=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ReportDashboardController.java | 1 + .../controller/ReportExcelController.java | 13 +++++ .../V1.0.23__add_excelshare_authority.sql | 3 + report-ui/src/api/reportShare.js | 8 +++ .../AnjiPlus/anji-crud/anji-crud.vue | 55 ++++++++++++------- .../views/excelreport/components/share.vue | 5 +- report-ui/src/views/excelreport/index.vue | 2 +- .../views/reportManage/components/share.vue | 4 +- report-ui/src/views/reportManage/index.vue | 25 +++++++++ 9 files changed, 90 insertions(+), 26 deletions(-) create mode 100644 report-core/src/main/resources/db/migration/V1.0.23__add_excelshare_authority.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 06e73ba2..69037cf1 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 @@ -101,6 +101,7 @@ public class ReportDashboardController { @PostMapping("/share") @GaeaAuditLog(pageTitle = "分享") + @Permission(code = "bigScreenManage", name = "分享报表") public ResponseBean share(@Validated @RequestBody ReportShareDto dto) { return ResponseBean.builder().data(reportShareService.insertShare(dto)).build(); } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java index 21273693..9e5594b1 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java @@ -10,8 +10,11 @@ import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.Re import com.anjiplus.template.gaea.business.modules.reportexcel.controller.param.ReportExcelParam; import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel; import com.anjiplus.template.gaea.business.modules.reportexcel.service.ReportExcelService; +import com.anjiplus.template.gaea.business.modules.reportshare.controller.dto.ReportShareDto; +import com.anjiplus.template.gaea.business.modules.reportshare.service.ReportShareService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** @@ -27,6 +30,9 @@ public class ReportExcelController extends GaeaBaseController getService() { return reportExcelService; @@ -75,4 +81,11 @@ public class ReportExcelController extends GaeaBaseController +
- index > 0 - )" - :key="index" - v-permission="item.permission" - :type="item.type || 'text'" - :disabled="isDisabledButton(item, scope.row)" - size="small" - @click="item.click(scope.row)" + )"> + {{ - handlegetLable(scope.row, item.label) - }} + handlegetLable(scope.row, item.label) + }} + @@ -665,6 +670,14 @@ export default { return !!item.disabled; } }, + // 是否显示 + isHide(item, row) { + if (typeof item.isHide === "function") { + return item.isHide(row); + } else { + return !item.isHide; + } + }, // 弹框被关闭时的回调事件 editDialogClosedEvent(value) { // 把列表页中弹框打开标记改成已关闭 diff --git a/report-ui/src/views/excelreport/components/share.vue b/report-ui/src/views/excelreport/components/share.vue index 2fd596c6..c9e0ed38 100644 --- a/report-ui/src/views/excelreport/components/share.vue +++ b/report-ui/src/views/excelreport/components/share.vue @@ -90,7 +90,7 @@