feat: 数据指标谱系

This commit is contained in:
JiangSheng
2026-01-30 09:34:51 +08:00
parent 9e6dd4b3d8
commit afa0982f5c
2 changed files with 33 additions and 4 deletions

View File

@@ -62,7 +62,7 @@
<div v-else-if="currentNode === 'keyResult'" class="detail-content">
<div class="key-result-tabs">
<el-radio-group v-model="keyResultType" @change="keyResultTypeChangeFun">
<el-radio-group v-model="keyResultType" @change="refreshKeyResultTableFun">
<el-radio-button value="1">{{ $t('数据谱系.云图结果') }}</el-radio-button>
<el-radio-button value="2">{{ $t('数据谱系.曲线结果') }}</el-radio-button>
<el-radio-button value="3">{{ $t('数据谱系.数值指标') }}</el-radio-button>
@@ -287,10 +287,20 @@ const getFileListApiFun = async (params: any) => {
return res;
};
const keyResultTypeChangeFun = () => {
const cloudImageTableRef = ref();
const curveTableRef = ref();
const performanceTableRef = ref();
const refreshKeyResultTableFun = () => {
const tableRefMap: Record<string, any> = {
'1': cloudImageTableRef,
'2': curveTableRef,
'3': performanceTableRef,
};
if (keyResultType.value === '3') {
fetchPerformanceListFun();
}
tableRefMap[keyResultType.value]?.value?.resetFun(true);
};
const flowNodeRadioChangeFun = (uuid: string) => {
@@ -314,6 +324,9 @@ watch(
if (newVal === 'simParams') {
currentFlowNodeId.value = '';
fetchFlowNodesFun();
} else if (newVal === 'keyResult' && props.defaultKeyResultType) {
keyResultType.value = props.defaultKeyResultType;
refreshKeyResultTableFun();
}
}
);
@@ -321,7 +334,21 @@ watch(
watch(
() => props.defaultKeyResultType,
(newVal) => {
keyResultType.value = newVal;
if (props.currentNode === 'keyResult' && newVal) {
keyResultType.value = newVal;
refreshKeyResultTableFun();
}
},
{ immediate: true }
);
watch(
() => props.runId,
(newVal, oldVal) => {
if (newVal && newVal !== oldVal && props.currentNode === 'keyResult') {
keyResultType.value = props.defaultKeyResultType || '1';
refreshKeyResultTableFun();
}
}
);

View File

@@ -592,7 +592,9 @@ const modeChangeFun = () => {
}
if (
item.id === 5 &&
['模型文件', '仿真报告', '计算文件', '结果曲线', '结果云图'].includes(currentModel.value)
['数据指标', '模型文件', '仿真报告', '计算文件', '结果曲线', '结果云图'].includes(
currentModel.value
)
) {
build.push(item);
}