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