update:任务详情界面,双击算例版本跳转到对应的算例

This commit is contained in:
2026-03-04 15:27:12 +08:00
parent 2c54ab77f4
commit 3a5843c99e
2 changed files with 32 additions and 1 deletions

View File

@@ -411,7 +411,7 @@ const initPreview = () => {
defaultCurrentNodeInfo(props.currentNodeIndex);
// 给形状添加 mousemove 事件监听器
// graph.value.on('box-title:dblclick', skipRun);
graph.value.on('box-title:dblclick', skipRun);
// graph.value.on('version-title:dblclick', skipRun);
graph.value.on('box-title:click', emitGetCurrentNodeInfo);

View File

@@ -205,6 +205,7 @@
<runVersionTree
v-if="activeTab === 'version'"
:current-task-info="currentTaskInfo"
@skip-to-new-run="skipRunFun"
></runVersionTree>
</el-tab-pane>
@@ -301,6 +302,8 @@ import videoFile from '@/components/taskDetail/videoFile.vue';
import reviewData from '@/components/taskDetail/reviewData.vue';
import ReportInputDialog from '@/components/common/report/reportInputDialog.vue';
import { isSimManagerOrExecutor } from '@/utils/task';
import { getNodeDetailApi } from '@/api/project/node';
import { jumpPage } from '@/utils/common';
const emits = defineEmits(['closeFn', 'updateFn']);
const props = defineProps({
@@ -465,6 +468,34 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
templateList.value = [];
}
};
const skipRunFun = async (data: any) => {
let projectType = 'self_develop';
try {
const res: any = await getNodeDetailApi({ projectNodeId: props.currentTaskInfo.newTag1 });
if (res && res.code === 200 && res.data?.nodeSubType) {
projectType = res.data.nodeSubType;
}
} catch (error) {
console.error('获取项目详情失败', error);
}
const obj = {
ProjectType: projectType,
projectName: props.currentTaskInfo.newTag1,
projectCodeName: '',
phaseName: props.currentTaskInfo.newTag2,
phaseCodeName: '',
discipline: 'discipline',
attribution: 'personal',
taskType: 'all',
expendType: 'all',
};
localStorage.setItem('CURRENT_FILTER_RUN_TASK_TREE_PARAM', JSON.stringify(obj));
localStorage.setItem('CURRENT_TASK_RUN_INFO', JSON.stringify({ ...data, nodeType: 'task' }));
closeFun();
jumpPage({ path: '/task/execution' });
};
onMounted(async () => {
await systemApproveQueryApproveFlowTempalteFun();
});