Merge pull request #9343 from dataease/pr@dev@feat_export-source3

Pr@dev@feat export source3
This commit is contained in:
王嘉豪 2024-04-25 15:46:18 +08:00 committed by GitHub
commit 6ebce4d9d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View File

@ -166,15 +166,19 @@ public class PanelGroupController {
@ApiOperation("公共连接导出仪表板视图明细")
@PostMapping("/exportDetails")
@I18n
public void exportDetails(@RequestBody PanelViewDetailsRequest request, HttpServletResponse response) throws IOException {
public void exportDetails(@RequestBody PanelViewDetailsRequest request, HttpServletResponse response) throws Exception {
HttpServletRequest httpServletRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
String linkToken = httpServletRequest.getHeader(F2CLinkFilter.LINK_TOKEN_KEY);
DecodedJWT jwt = JWT.decode(linkToken);
Long userId = jwt.getClaim("userId").asLong();
request.setUserId(userId);
if("dataset".equals(request.getDownloadType())){
panelGroupService.exportDatasetDetails(request, response);
}else {
panelGroupService.exportPanelViewDetails(request, response);
}
}
@ApiOperation("站内导出仪表板视图明细")
@PostMapping("/innerExportDetails")

View File

@ -212,7 +212,7 @@
<svg-icon
icon-class="ds-excel"
class="ds-icon-excel"
/>{{ $t('chart.') }}
/>{{ $t('chart.export_source') }}
</el-button>
</span>
<user-view-dialog
@ -1066,9 +1066,7 @@ export default {
this.view = response.data
this.chart.data = data
this.view.data = data
if (this.chart.type.includes('table')) {
this.$store.commit('setLastViewRequestInfo', { viewId: id, requestInfo: requestInfo })
}
this.buildInnerRefreshTimer(this.chart.refreshViewEnable, this.chart.refreshUnit, this.chart.refreshTime)
this.$emit('fill-chart-2-parent', this.chart)
this.getDataOnly(response.data, dataBroadcast)