forked from github/dataease
fix(仪表板): 修复站内分享导出明细表部分存在无权限问题 #4697
This commit is contained in:
parent
fc87e12e96
commit
0977598cb6
@ -146,6 +146,7 @@ public class PanelGroupController {
|
||||
|
||||
@ApiOperation("站内导出仪表板视图明细")
|
||||
@PostMapping("/innerExportDetails")
|
||||
@DePermissionProxy(value = "proxy")
|
||||
@I18n
|
||||
public void innerExportDetails(@RequestBody PanelViewDetailsRequest request, HttpServletResponse response) throws IOException {
|
||||
panelGroupService.exportPanelViewDetails(request, response);
|
||||
|
@ -1,6 +1,8 @@
|
||||
package io.dataease.controller.request.panel;
|
||||
|
||||
import io.dataease.controller.request.chart.ChartExtRequest;
|
||||
import io.dataease.dto.PermissionProxy;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@ -35,4 +37,7 @@ public class PanelViewDetailsRequest {
|
||||
|
||||
private List<String> excelHeaderKeys;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
private PermissionProxy proxy;
|
||||
|
||||
}
|
||||
|
@ -124,6 +124,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
panelInfo() {
|
||||
return this.$store.state.panel.panelInfo
|
||||
},
|
||||
isAbsoluteContainer() {
|
||||
return this.showChartCanvas && this.chart.type === 'symbol-map'
|
||||
},
|
||||
@ -288,6 +291,7 @@ export default {
|
||||
})
|
||||
}
|
||||
const request = {
|
||||
proxy:null,
|
||||
viewId: this.chart.id,
|
||||
viewName: excelName,
|
||||
header: excelHeader,
|
||||
@ -306,6 +310,10 @@ export default {
|
||||
if (!token && linkToken) {
|
||||
method = exportDetails
|
||||
}
|
||||
|
||||
if (this.panelInfo.proxy) {
|
||||
request.proxy = { userId: this.panelInfo.proxy }
|
||||
}
|
||||
method(request).then((res) => {
|
||||
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const link = document.createElement('a')
|
||||
|
Loading…
Reference in New Issue
Block a user