diff --git a/src/api/project/run.ts b/src/api/project/run.ts index 042a4ff6..09a16bcf 100644 --- a/src/api/project/run.ts +++ b/src/api/project/run.ts @@ -98,7 +98,7 @@ export const addSimulationKeyResultApi = (params: any) => { * @param params runId keyResultType size current * @returns */ -export const listSimulationKeyResult = (params: any) => { +export const listSimulationKeyResultApi = (params: any) => { return post(`${PREFIX}run/listSimulationKeyResult`, params); }; @@ -112,3 +112,12 @@ export const deleteSimulationKeyResultApi = (params: any) => { return post(`${PREFIX}run/deleteSimulationKeyResult`, params); }; + +/** + * 生成自动化报告 + * @param params imageFileIdList 图片文件id列表 performanceList 性能指标列表 parentNodeInfoList + * @returns + */ +export const generateReportApi = (params: any) => { + return post(`${PREFIX}run/generateReport`, params); +}; diff --git a/src/components/taskDetail/taskPerformance.vue b/src/components/taskDetail/taskPerformance.vue index fc45416f..6b604ea5 100644 --- a/src/components/taskDetail/taskPerformance.vue +++ b/src/components/taskDetail/taskPerformance.vue @@ -436,6 +436,7 @@ const exportFileFn = () => { defineExpose({ saveFn, + baseTableRef, }); const actionList = ref([ diff --git a/src/views/data/analysis/index.vue b/src/views/data/analysis/index.vue index 5b44464d..822b61f7 100644 --- a/src/views/data/analysis/index.vue +++ b/src/views/data/analysis/index.vue @@ -5,7 +5,7 @@ ref="tableRef" :searchItems="searchItems" :searchParams="{model:'仿真工况'}" - :api="getTaskListApi" + :api="getTaskListFn" :searchLimitNum="3" tableName="SIMULATION_TASK_ANALYSIS" showIndex @@ -31,7 +31,7 @@ ref="tableRef" :searchItems="searchItems" :searchParams="{model:'仿真算例'}" - :api="getRunListApi" + :api="getRunListFn" :searchLimitNum="3" tableName="SIMULATION_RUN_ANALYSIS" showIndex @@ -57,7 +57,7 @@ ref="tableRef" :searchItems="searchItems" :searchParams="{model:'数据指标'}" - :api="getPerformanceListApi" + :api="getPerformanceListFn" :searchLimitNum="3" tableName="SIMULATION_PERFORMANCE_ANALYSIS" showIndex @@ -819,6 +819,12 @@ const getSimulationTaskFileFn = async (param:any) => { })?.uuid; } + // if (params?.dateRange) { + // params.beginTime = params?.dateRange[0]; + // params.endTime = params?.dateRange[1]; + // delete params?.dateRange; + // } + const res:any = await getSimulationTaskFileApi(params); if (res && res.code === 200) { return res; @@ -826,6 +832,59 @@ const getSimulationTaskFileFn = async (param:any) => { }; +const getTaskListFn = async (param:any) => { + + console.log(param, 'param'); + + const params:any = { + ...param, + }; + setParamFn(params); + const res:any = await getTaskListApi(params); + return res; + +}; + +const getRunListFn = async (param:any) => { + const params:any = { + ...param, + }; + setParamFn(params); + const res:any = await getRunListApi(params); + return res; + +}; + +const getPerformanceListFn = async (param:any) => { + const params:any = { + ...param, + }; + setParamFn(params); + const res:any = await getPerformanceListApi(params); + return res; + +}; + +const setParamFn = (params:any) => { + if (params?.project) { + params.projectNodeId = params?.project; + delete params.project; + } + if (params?.phase) { + params.phaseNodeId = params?.phase; + delete params.phase; + } + if (params?.discipline) { + params.disciplineNodeId = params?.discipline; + delete params.discipline; + } + if (params?.dateRange) { + params.beginTime = params?.dateRange[0]; + params.endTime = params?.dateRange[1]; + delete params?.dateRange; + } +}; + onMounted(() => { getProjectOptionsFun(); }); diff --git a/src/views/task/execution/components/leftTaskTree/index.vue b/src/views/task/execution/components/leftTaskTree/index.vue index 27118d92..6adf1093 100644 --- a/src/views/task/execution/components/leftTaskTree/index.vue +++ b/src/views/task/execution/components/leftTaskTree/index.vue @@ -1,6 +1,5 @@