fix: 修复数据导出中心没有所属组织

This commit is contained in:
taojinlong 2024-06-26 19:18:27 +08:00
parent 689f4949d3
commit 46953c144a
2 changed files with 13 additions and 10 deletions

View File

@ -12,6 +12,7 @@ import io.dataease.chart.server.ChartDataServer;
import io.dataease.exception.DEException;
import io.dataease.exportCenter.dao.auto.entity.CoreExportTask;
import io.dataease.exportCenter.dao.auto.mapper.CoreExportTaskMapper;
import io.dataease.license.config.XpackInteract;
import io.dataease.system.manage.SysParameterManage;
import io.dataease.utils.*;
import io.dataease.visualization.server.DataVisualizationServer;
@ -177,14 +178,11 @@ public class ExportCenterManage {
exportTasks.forEach(exportTask -> {
ExportTaskDTO exportTaskDTO = new ExportTaskDTO();
BeanUtils.copyBean(exportTaskDTO, exportTask);
if (status.equalsIgnoreCase("ALL")) {
if (status.equalsIgnoreCase("ALL") || status.equalsIgnoreCase(exportTaskDTO.getExportStatus())) {
setExportFromAbsName(exportTaskDTO);
}
if (status.equalsIgnoreCase(exportTaskDTO.getExportStatus())) {
setExportFromAbsName(exportTaskDTO);
}
if (status.equalsIgnoreCase(exportTaskDTO.getExportStatus())) {
setOrgName(exportTaskDTO);
if (status.equalsIgnoreCase("ALL") || status.equalsIgnoreCase(exportTaskDTO.getExportStatus())) {
proxy().setOrg(exportTaskDTO);
}
result.add(exportTaskDTO);
});
@ -192,10 +190,11 @@ public class ExportCenterManage {
return result;
}
private void setOrgName(ExportTaskDTO exportTaskDTO) {
if (exportTaskDTO.getExportFromType().equalsIgnoreCase("chart")) {
exportTaskDTO.setOrgName(dataVisualizationServer.getAbsPath(exportTaskDTO.getExportFrom()));
}
@XpackInteract(value = "exportCenter", before = false)
public void setOrg(ExportTaskDTO exportTaskDTO) {}
private ExportCenterManage proxy() {
return CommonBeanFactory.getBean(ExportCenterManage.class);
}
private void setExportFromAbsName(ExportTaskDTO exportTaskDTO) {

View File

@ -14,6 +14,7 @@ import {
import { useI18n } from '@/hooks/web/useI18n'
import { useEmitt } from '@/hooks/web/useEmitt'
import Icon from '@/components/icon-custom/src/Icon.vue'
import { useCache } from '@/hooks/web/useCache'
const { t } = useI18n()
const tableData = ref([])
@ -52,6 +53,8 @@ const handleClose = () => {
drawer.value = false
clearInterval(timer)
}
const { wsCache } = useCache()
const xpack = wsCache.get('xpack-model-distributed')
onUnmounted(() => {
clearInterval(timer)
@ -428,6 +431,7 @@ defineExpose({
<span v-if="scope.row.exportFromType === 'chart'">视图</span>
</template>
</el-table-column>
<el-table-column v-show="xpack" prop="orgName" label="所属组织" width="200" />
<el-table-column prop="exportTime" width="180" :label="$t('data_export.export_time')">
<template #default="scope">
<span>{{ timestampFormatDate(scope.row.exportTime) }}</span>