update:更新仿真执行流程

This commit is contained in:
2026-04-16 17:48:32 +08:00
parent 2d83bd60ea
commit db7870b14e

View File

@@ -338,6 +338,7 @@
:current-run-ifno="runInfo"
></resultData>
<jobList
ref="jobListRef"
v-if="taskActiveName === 'job-list'"
:current-run-info="runInfo"
></jobList>
@@ -461,6 +462,7 @@ const executeMode = ref('MANUAL');
const visible = ref(false);
const nodeActiveName = ref('info');
const taskActiveName = ref('job-list');
const jobListRef = ref();
const leftFullScreen = ref(false);
const rightFullScreen = ref(false);
@@ -583,6 +585,9 @@ const currentRunNodeInfo = ref<any>({});
// 更新执行流程节点信息
const refreshFlowPage = async () => {
await runFlowPageRef.value.updateDataJsonInfoFun();
if (jobListRef.value) {
jobListRef.value.refrehFun();
}
};
// 开始执行任务
@@ -1052,7 +1057,7 @@ const getSubmitParamFun = async (appPath: any) => {
};
const getNodeFileIdAndNames = async () => {
const dirId = flowNodeData.value.userParams.inputDirId;
const dirId = flowNodeData.value.inputDirId;
let nodeExeCommand = flowNodeParamData.value.nodeExeCommand;
const params = nodeExeCommand.split(' ').filter((item: any) => {
return item.startsWith('$');
@@ -1062,11 +1067,11 @@ const getNodeFileIdAndNames = async () => {
for (const key in flowNodeData.value.userParams) {
if (params[i].includes(key)) {
// 1.字符串
if (flowNodeData.value.userParams[key] instanceof String) {
if (flowNodeData.value?.userParams[key] instanceof String) {
nodeExeCommand = nodeExeCommand.replace(params[i], flowNodeData.value.userParams[key]);
} else if (flowNodeData.value.userParams[key] instanceof Array) {
} else if (flowNodeData.value?.userParams[key] instanceof Array) {
// 2.数组
const names = flowNodeData.value.userParams[key]
const names = flowNodeData.value?.userParams[key]
.map((item: any) => {
const name = item.split('/').at(-1);
return name;
@@ -1381,6 +1386,15 @@ watch(
const timer = ref<any>(null);
emitter.on('WS_RECEICE_MSG', (msgData: any) => {
const { scene, data } = msgData;
if (scene === 'FLOW_NODE_STATUS_CHANGED') {
if (data?.statusCode) {
refreshFlowPage();
}
}
});
onMounted(async () => {
await getDictionaryDataFun();
emitter.on('UPLOAD_FINISHED', uploadFinishedFun);
@@ -1392,6 +1406,14 @@ onMounted(async () => {
onBeforeUnmount(() => {
emitter.off('UPLOAD_FINISHED', uploadFinishedFun);
emitter.off('WS_RECEICE_MSG', (msgData: any) => {
const { scene, data } = msgData;
if (scene === 'FLOW_NODE_STATUS_CHANGED') {
if (data?.statusCode) {
refreshFlowPage();
}
}
});
clearInterval(timer.value);
});