fix: 数据集导出问题
This commit is contained in:
parent
34cccf8642
commit
5772df1142
@ -142,6 +142,10 @@ public class ExportCenterManage {
|
||||
}
|
||||
}
|
||||
|
||||
public String exportLimit() {
|
||||
return String.valueOf(limit);
|
||||
}
|
||||
|
||||
public void download(String id, HttpServletResponse response) throws Exception {
|
||||
CoreExportTask exportTask = exportTaskMapper.selectById(id);
|
||||
OutputStream outputStream = response.getOutputStream();
|
||||
@ -267,6 +271,9 @@ public class ExportCenterManage {
|
||||
if (exportTaskDTO.getExportFromType().equalsIgnoreCase("chart")) {
|
||||
exportTaskDTO.setExportFromName(coreChartViewMapper.selectById(exportTaskDTO.getExportFrom()).getTitle());
|
||||
}
|
||||
if (exportTaskDTO.getExportFromType().equalsIgnoreCase("dataset")) {
|
||||
exportTaskDTO.setExportFromName(coreDatasetGroupMapper.selectById(exportTaskDTO.getExportFrom()).getName());
|
||||
}
|
||||
}
|
||||
|
||||
private String hostName() {
|
||||
|
||||
@ -47,4 +47,8 @@ public class ExportCenterServer implements ExportCenterApi {
|
||||
public void retry(String id) {
|
||||
exportCenterManage.retry(id);
|
||||
}
|
||||
|
||||
public String exportLimit() {
|
||||
return exportCenterManage.exportLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,6 +130,12 @@ export const exportDatasetData = async (data): Promise<IResponse> => {
|
||||
})
|
||||
}
|
||||
|
||||
export const exportLimit = async (): Promise<boolean> => {
|
||||
return request.post({ url: `/exportCenter/exportLimit`, data: {} }).then(res => {
|
||||
return res?.data
|
||||
})
|
||||
}
|
||||
|
||||
export const perDelete = async (id): Promise<boolean> => {
|
||||
return request.post({ url: `/datasetTree/perDelete/${id}`, data: {} }).then(res => {
|
||||
return res?.data
|
||||
|
||||
@ -37,7 +37,8 @@ import {
|
||||
getDatasetPreview,
|
||||
barInfoApi,
|
||||
perDelete,
|
||||
exportDatasetData
|
||||
exportDatasetData,
|
||||
exportLimit
|
||||
} from '@/api/dataset'
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
import DeResourceGroupOpt from '@/views/common/DeResourceGroupOpt.vue'
|
||||
@ -85,6 +86,7 @@ const rootManage = ref(false)
|
||||
const showExport = ref(false)
|
||||
const rowAuth = ref()
|
||||
const exportDatasetLoading = ref(false)
|
||||
const limit = ref('10万')
|
||||
const exportForm = ref({})
|
||||
const table = ref({})
|
||||
const exportFormRef = ref()
|
||||
@ -313,6 +315,7 @@ onBeforeMount(() => {
|
||||
nodeInfo.id = (route.params.id as string) || (route.query.id as string) || ''
|
||||
loadInit()
|
||||
getData()
|
||||
getLimit()
|
||||
})
|
||||
|
||||
const columns = shallowRef([])
|
||||
@ -678,6 +681,12 @@ const loadInit = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const getLimit = () => {
|
||||
exportLimit().then(res => {
|
||||
limit.value = res
|
||||
})
|
||||
}
|
||||
|
||||
const sortTypeTip = computed(() => {
|
||||
return sortList.find(ele => ele.value === state.curSortType).name
|
||||
})
|
||||
@ -916,18 +925,18 @@ const getMenuList = (val: boolean) => {
|
||||
<template #icon> <Icon name="icon_operation-analysis_outlined"></Icon> </template
|
||||
>{{ t('data_set.new_data_screen') }}
|
||||
</el-button>
|
||||
<el-button secondary @click="exportDataset">
|
||||
<template #icon>
|
||||
<Icon name="icon_download_outlined"></Icon>
|
||||
</template>
|
||||
数据集导出
|
||||
</el-button>
|
||||
<el-button type="primary" @click="editorDataset" v-if="nodeInfo.weight >= 7">
|
||||
<template #icon>
|
||||
<Icon name="icon_edit_outlined"></Icon>
|
||||
</template>
|
||||
{{ t('visualization.edit') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="exportDataset">
|
||||
<template #icon>
|
||||
<Icon name="el-icon-download"></Icon>
|
||||
</template>
|
||||
数据集导出
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-border">
|
||||
@ -1063,7 +1072,7 @@ const getMenuList = (val: boolean) => {
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span class="tip">提示:最多支持导出10万条数据</span>
|
||||
<span class="tip">提示:最多支持导出{{ limit }}条数据</span>
|
||||
<template v-slot:footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button secondary @click="closeExport">{{ $t('dataset.cancel') }} </el-button>
|
||||
|
||||
@ -648,8 +648,8 @@ defineExpose({
|
||||
<template #prefix>
|
||||
<el-icon>
|
||||
<Icon
|
||||
:name="`field_${fieldType[scope.row.deType]}`"
|
||||
:className="`field-icon-${fieldType[scope.row.deType]}`"
|
||||
:name="`field_${fieldType[scope.row.deExtractType]}`"
|
||||
:className="`field-icon-${fieldType[scope.row.deExtractType]}`"
|
||||
></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
@ -662,8 +662,8 @@ defineExpose({
|
||||
<span style="float: left">
|
||||
<el-icon>
|
||||
<Icon
|
||||
:name="`field_${fieldType[scope.row.deType]}`"
|
||||
:className="`field-icon-${fieldType[scope.row.deType]}`"
|
||||
:name="`field_${fieldType[item.value]}`"
|
||||
:className="`field-icon-${fieldType[item.value]}`"
|
||||
></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
|
||||
@ -38,4 +38,7 @@ public interface ExportCenterApi {
|
||||
@PostMapping("/retry/{id}")
|
||||
public void retry(@PathVariable String id);
|
||||
|
||||
@PostMapping("/exportLimit")
|
||||
public String exportLimit();
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user