!85 update 0.9.8.1

Merge pull request !85 from Foming/dev
V0.9.8.1
Foming 2 years ago committed by Gitee
commit 2bbf636c56
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -101,6 +101,7 @@ public class ReportDashboardController {
@PostMapping("/share") @PostMapping("/share")
@GaeaAuditLog(pageTitle = "分享") @GaeaAuditLog(pageTitle = "分享")
@Permission(code = "bigScreenManage", name = "分享报表")
public ResponseBean share(@Validated @RequestBody ReportShareDto dto) { public ResponseBean share(@Validated @RequestBody ReportShareDto dto) {
return ResponseBean.builder().data(reportShareService.insertShare(dto)).build(); return ResponseBean.builder().data(reportShareService.insertShare(dto)).build();
} }

@ -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.controller.param.ReportExcelParam;
import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel; 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.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 io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
/** /**
@ -27,6 +30,9 @@ public class ReportExcelController extends GaeaBaseController<ReportExcelParam,
@Autowired @Autowired
private ReportExcelService reportExcelService; private ReportExcelService reportExcelService;
@Autowired
private ReportShareService reportShareService;
@Override @Override
public GaeaBaseService<ReportExcelParam, ReportExcel> getService() { public GaeaBaseService<ReportExcelParam, ReportExcel> getService() {
return reportExcelService; return reportExcelService;
@ -75,4 +81,11 @@ public class ReportExcelController extends GaeaBaseController<ReportExcelParam,
// return ResponseBean.builder().code(ResponseCode.SUCCESS_CODE) // return ResponseBean.builder().code(ResponseCode.SUCCESS_CODE)
// .build(); // .build();
// } // }
@PostMapping("/share")
@GaeaAuditLog(pageTitle = "excel分享")
@Permission(code = "reportExcel", name = "分享报表")
public ResponseBean share(@Validated @RequestBody ReportShareDto dto) {
return ResponseBean.builder().data(reportShareService.insertShare(dto)).build();
}
} }

@ -0,0 +1,3 @@
INSERT INTO `aj_report`.`access_authority`(`parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES ('report', 'excelManage', '表格报表', 'share', '分享报表', 231, 1, 0, 'admin', now(), 'admin', now(), 1);
INSERT INTO `aj_report`.`access_role_authority`(`role_code`, `target`, `action`) VALUES ('root', 'excelManage', 'share');

@ -16,6 +16,14 @@ export function reportShareAdd(data) {
}) })
} }
export function excelShareAdd(data) {
return request({
url: 'reportExcel/share',
method: 'post',
data
})
}
export function reportShareDelay(data) { export function reportShareDelay(data) {
return request({ return request({
url: 'reportShare/shareDelay', url: 'reportShare/shareDelay',

@ -269,8 +269,9 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="option.rowButtons.length <= 2"> <div v-if="option.rowButtons.length <= 2">
<template v-for="(item, index) in option.rowButtons">
<el-button <el-button
v-for="(item, index) in option.rowButtons" v-if="isHide(item, scope.row)"
:key="index" :key="index"
v-permission="item.permission" v-permission="item.permission"
:disabled="isDisabledButton(item, scope.row)" :disabled="isDisabledButton(item, scope.row)"
@ -279,6 +280,8 @@
@click="item.click(scope.row)" @click="item.click(scope.row)"
>{{ handlegetLable(scope.row, item.label) }}</el-button >{{ handlegetLable(scope.row, item.label) }}</el-button
> >
</template>
</div> </div>
<div v-else> <div v-else>
<el-button <el-button
@ -299,10 +302,11 @@
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item class="clearfix"> <el-dropdown-item class="clearfix">
<el-button <template v-for="(item, index) in option.rowButtons.filter(
v-for="(item, index) in option.rowButtons.filter(
(el, index) => index > 0 (el, index) => index > 0
)" )">
<el-button
v-if="isHide(item, scope.row)"
:key="index" :key="index"
v-permission="item.permission" v-permission="item.permission"
:type="item.type || 'text'" :type="item.type || 'text'"
@ -313,6 +317,7 @@
handlegetLable(scope.row, item.label) handlegetLable(scope.row, item.label)
}}</el-button }}</el-button
> >
</template>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -665,6 +670,14 @@ export default {
return !!item.disabled; return !!item.disabled;
} }
}, },
//
isHide(item, row) {
if (typeof item.isHide === "function") {
return item.isHide(row);
} else {
return !item.isHide;
}
},
// //
editDialogClosedEvent(value) { editDialogClosedEvent(value) {
// //

@ -90,7 +90,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { reportShareAdd } from "@/api/reportShare"; import { excelShareAdd } from "@/api/reportShare";
import { getDictList } from "@/api/dict-data"; // import { getDictList } from "@/api/dict-data"; //
import Dictionary from "@/components/Dictionary/index"; import Dictionary from "@/components/Dictionary/index";
export default { export default {
@ -175,8 +175,7 @@ export default {
this.dialogForm.reportType = this.reportType; this.dialogForm.reportType = this.reportType;
this.dialogForm.reportCode = this.reportCode; this.dialogForm.reportCode = this.reportCode;
this.dialogForm.shareUrl = window.location.href; this.dialogForm.shareUrl = window.location.href;
console.log(this.dialogForm) const { code, data } = await excelShareAdd(this.dialogForm);
const { code, data } = await reportShareAdd(this.dialogForm);
if (code != "200") return; if (code != "200") return;
this.shareLinkFlag1 = false; this.shareLinkFlag1 = false;
this.$message({ this.$message({

@ -64,7 +64,7 @@
class="view" class="view"
type="text" type="text"
@click="share(item)" @click="share(item)"
v-permission="'bigScreenManage:share'" v-permission="'excelManage:share'"
/> />
<el-button <el-button
icon="el-icon-view" icon="el-icon-view"

@ -3,7 +3,7 @@
<div class="admin-title" @click="goBigScreen"> <div class="admin-title" @click="goBigScreen">
<div class="con"> <div class="con">
<img src="../../../../../static/logo-dp.png" width="50" /> <img src="../../../../../static/logo-dp.png" width="50" />
<span class="version">V0.9.8</span> <span class="version">V0.9.8.1</span>
</div> </div>
</div> </div>
<el-menu <el-menu

@ -91,6 +91,7 @@
</template> </template>
<script> <script>
import { reportShareAdd } from "@/api/reportShare"; import { reportShareAdd } from "@/api/reportShare";
import { excelShareAdd } from "@/api/reportShare";
import { getDictList } from "@/api/dict-data"; // import { getDictList } from "@/api/dict-data"; //
import Dictionary from "@/components/Dictionary/index"; import Dictionary from "@/components/Dictionary/index";
export default { export default {
@ -175,7 +176,8 @@ export default {
this.dialogForm.reportType = this.reportType; this.dialogForm.reportType = this.reportType;
this.dialogForm.reportCode = this.reportCode; this.dialogForm.reportCode = this.reportCode;
this.dialogForm.shareUrl = window.location.href; this.dialogForm.shareUrl = window.location.href;
const { code, data } = await reportShareAdd(this.dialogForm); const urlType = this.reportType == 'report_screen' ? reportShareAdd(this.dialogForm) : excelShareAdd(this.dialogForm)
const { code, data } = await urlType
if (code != "200") return; if (code != "200") return;
this.shareLinkFlag1 = false; this.shareLinkFlag1 = false;
this.$message({ this.$message({

@ -123,6 +123,17 @@ export default {
{ {
label: "分享", label: "分享",
permission: "bigScreenManage:share", permission: "bigScreenManage:share",
isHide: (row) => {
return row.reportType == 'report_screen'
},
click: this.shareReport
},
{
label: "分享",
permission: "excelManage:share",
isHide: (row) => {
return row.reportType == 'report_excel'
},
click: this.shareReport click: this.shareReport
}, },
{ {
@ -361,6 +372,20 @@ export default {
this.reportTypeForShareDialog = val.reportType; this.reportTypeForShareDialog = val.reportType;
this.visibleForShareDialog = true; this.visibleForShareDialog = true;
}, },
checkReport(val) {
if ("report_screen" == val.reportType) {
return true;
}else {
return false;
}
},
checkExcel(val) {
if ("report_excel" == val.reportType) {
return true;
}else {
return false;
}
},
// //
async copyReport(val) { async copyReport(val) {
this.copyVisible = true; this.copyVisible = true;

Loading…
Cancel
Save