feat: 数据指标谱系
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user