update:导出参数优化

This commit is contained in:
2026-01-22 15:01:29 +08:00
parent a5a301e186
commit 3fbc4a8d13
13 changed files with 12 additions and 78 deletions

View File

@@ -210,7 +210,6 @@ interface Props {
api?: (params: ApiParams) => Promise<any> | undefined;
exportApi?: any;
exportFileName?: string;
exportDict?: any;
exportParams?: any;
render?: (data: any, cb: (cbData: any) => void) => void | undefined;
params?: any;
@@ -240,7 +239,6 @@ const props = withDefaults(defineProps<Props>(), {
api: undefined,
exportApi: undefined,
exportFileName: '',
exportDict: {},
exportParams: {},
render: undefined,
params: () => {},
@@ -537,13 +535,10 @@ const actionClickFun = (row: any, action: any, index: number) => {
};
const exportFun = () => {
exportFile(
props.exportApi,
props.tableName,
props.exportFileName,
{ ...searchData.value, ...props.exportParams },
props.exportDict
);
exportFile(props.exportApi, props.tableName, props.exportFileName, {
...searchData.value,
...props.exportParams,
});
};
watch(

View File

@@ -238,7 +238,6 @@ interface Props {
tableName: string;
exportApi?: any;
exportFileName?: string;
exportDict?: any;
exportParams?: any;
params?: any;
head?: any;
@@ -259,7 +258,6 @@ const props = withDefaults(defineProps<Props>(), {
tableName: '',
exportApi: undefined,
exportFileName: '',
exportDict: {},
exportParams: {},
params: () => {},
head: null,
@@ -600,13 +598,7 @@ const actionClickFun = (row: any, action: any, index: number) => {
};
const exportFun = () => {
exportFile(
props.exportApi,
props.tableName,
props.exportFileName,
props.exportParams,
props.exportDict
);
exportFile(props.exportApi, props.tableName, props.exportFileName, props.exportParams);
};
watch(

View File

@@ -58,9 +58,6 @@
:exportApi="dataExportKnowledgeListApi"
fullHeight
:exportFileName="$t('知识库.知识库列表')"
:exportDict="{
approvalStatus: 'KNOWLEDGE_APPROVE_STATUS',
}"
:exportParams="{
...searchParams,
parentDirId: currentFolder?.id || '',

View File

@@ -185,13 +185,7 @@ export class FileUtil {
}
// 导出文件
export const exportFile = (
api: any,
tableName: string,
fileName: string,
params: any,
dict: any
) => {
export const exportFile = (api: any, tableName: string, fileName: string, params: any) => {
getFormConfigureApi({ formName: tableName }).then((res: any) => {
if (res.code === 200) {
const formConfig = JSON.parse(res.data.formConfig);
@@ -202,9 +196,12 @@ export const exportFile = (
key: item.key,
title: item.title,
};
if (dict[item.key] && CommonStore().getDictData(dict[item.key])) {
val.dictCode = dict[item.key];
val.dictData = CommonStore().getDictData(dict[item.key]).O;
if (
['select', 'multipleSelect', 'radio', 'checkbox'].includes(item.inputMode) &&
CommonStore().getDictData(item.formOptions)
) {
val.dictCode = item.formOptions;
val.dictData = CommonStore().getDictData(item.formOptions).O;
}
return val;
});

View File

@@ -189,11 +189,6 @@
poolName: currentPoolBriefVersion ? currentPoolBriefVersion.poolName : '',
version: currentPoolBriefVersion ? currentPoolBriefVersion.poolVersion : '',
}"
:exportDict="{
performanceType: 'PERFORMANCE_TYPE',
method: 'COMPLIANCE_METHOD',
unit: 'PERFORMANCE_UNIT',
}"
>
</loadCaseTable>
</div>

View File

@@ -71,9 +71,6 @@
:showExport="parsePermission(currentFolder?.permissionValue).export"
fullHeight
:exportFileName="$t('知识库.知识库列表')"
:exportDict="{
approvalStatus: 'KNOWLEDGE_APPROVE_STATUS',
}"
:exportParams="{
...searchParams,
parentDirId: currentFolder?.id || '',

View File

@@ -7,7 +7,6 @@
:api="modelData[currentModel].api"
:exportApi="modelData[currentModel].exportApi"
:exportFileName="modelData[currentModel].exportFileName"
:exportDict="modelData[currentModel].exportDict"
:exportParams="modelData[currentModel].exportParams"
showIndex
showCheckbox
@@ -447,11 +446,6 @@ const modelData = ref<any>({
exportApi: exportPerformanceByScriptApi,
exportFileName: '数据指标',
exportParams: { model: '数据指标' },
exportDict: {
performanceType: 'PERFORMANCE_TYPE',
method: 'COMPLIANCE_METHOD',
unit: 'PERFORMANCE_UNIT',
},
},
模型文件: {
tableName: 'RESULT_MODEL',

View File

@@ -11,10 +11,6 @@
:exportApi="exportTrainingListApi"
:exportFileName="$t('数据训练.数据训练列表')"
fullHeight
:exportDict="{
trainingStatus: 'TRAINING_STATUS',
algorithmUsed: 'TRAINING_ALGORITHM',
}"
>
<template #leftOptions>
<el-button icon="plus" type="primary" @click="addModelFun">{{

View File

@@ -7,9 +7,6 @@
:api="tenantListApi"
:exportApi="tenantExportApi"
exportFileName="租户列表"
:exportDict="{
status: 'TENANT_STATUS',
}"
:actionList="actionList"
>
<template #leftOptions>

View File

@@ -37,17 +37,6 @@
]"
:exportApi="exportTaskTreeApi"
exportFileName="任务列表"
:exportDict="{
exeStatus: 'TASK_ACHIEVE_STATUS',
achieveStatus: 'RESULT_ACHIEVE_STATUS',
analyseSoftware: 'ANALYSIS_SOFTWARE',
performanceType: 'PERFORMANCE_TYPE',
unit: 'PERFORMANCE_UNIT',
bCapacity: 'SIMULATION_CAPACITY',
department: 'DEPARTMENT_LIST',
section: 'SECTION_LIST',
group: 'GROUP_LIST',
}"
:exportParams="exportParams"
showNodeCompleteNum
>

View File

@@ -14,10 +14,6 @@
:exportApi="exportProjectApi"
exportFileName="项目列表"
fullHeight
:exportDict="{
nodeSubType: 'PROJECT_TYPE',
exeStatus: 'PROJECT_EXE_STATUS',
}"
>
<template #cardTemplate="{ tableData }">
<div class="project-card-box">

View File

@@ -13,12 +13,6 @@
:exportFileName="exportFileName"
:exportParams="{ ...params, sortOrder: 1 }"
fullHeight
:exportDict="{
demandType: 'DEMAND_TYPE',
simType: 'DEMAND_TYPE1',
achieveStatus: 'RESULT_ACHIEVE_STATUS',
demandStatus: 'DEMAND_EXE_STATUS',
}"
:action-list="actionList"
>
<template #leftOptions>

View File

@@ -17,11 +17,6 @@
idMap: tagIdMap,
tagMap: getTagMapList(),
}"
:exportDict="{
achieveStatus: 'RESULT_ACHIEVE_STATUS',
exeStatus: 'TASK_EXE_STATUS',
approvalStatus: 'TASK_APPROVE_STATUS',
}"
:actionList="actionList"
fullHeight
@search="searchFun"