diff --git a/src/api/project/run.ts b/src/api/project/run.ts index 39d08c4..74c8303 100644 --- a/src/api/project/run.ts +++ b/src/api/project/run.ts @@ -140,3 +140,11 @@ export const queryKeyResultAndTaskInfoApi = (params: any) => { }; +/** + * 查询流程节点列表 + * @param params runId 算例的uuid + * @returns + */ +export const listSimulationFlowNodeApi = (params: any) => { + return post(`${PREFIX}run/listFlowNodes`, params); +}; diff --git a/src/components/common/flow/flowView.vue b/src/components/common/flow/flowView.vue index 46d7515..6351991 100644 --- a/src/components/common/flow/flowView.vue +++ b/src/components/common/flow/flowView.vue @@ -1,7 +1,7 @@ + + + diff --git a/src/views/task/execution/components/runDetailPage/runPagecomponent/flow/registerNode.ts b/src/views/task/execution/components/runDetailPage/runPagecomponent/flow/registerNode.ts new file mode 100644 index 0000000..8649206 --- /dev/null +++ b/src/views/task/execution/components/runDetailPage/runPagecomponent/flow/registerNode.ts @@ -0,0 +1,146 @@ +import { register } from '@antv/x6-vue-shape'; +import AppNode from './registerAppNode.vue'; +import { Graph } from '@antv/x6'; + +export const registerCustomNode = () => { + + const ports = { + groups: { + top: { + position: 'top', + attrs: { + circle: { + r: 4, + magnet: true, + stroke: '#5F95FF', + strokeWidth: 1, + fill: '#fff', + style: { + visibility: 'hidden', + }, + }, + }, + }, + right: { + position: 'right', + attrs: { + circle: { + r: 4, + magnet: true, + stroke: '#5F95FF', + strokeWidth: 1, + fill: '#fff', + style: { + visibility: 'hidden', + }, + }, + }, + }, + bottom: { + position: 'bottom', + attrs: { + circle: { + r: 4, + magnet: true, + stroke: '#5F95FF', + strokeWidth: 1, + fill: '#fff', + style: { + visibility: 'hidden', + }, + }, + }, + }, + left: { + position: 'left', + attrs: { + circle: { + r: 4, + magnet: true, + stroke: '#5F95FF', + strokeWidth: 1, + fill: '#fff', + style: { + visibility: 'hidden', + }, + }, + }, + }, + }, + items: [ + { + group: 'top', + }, + { + group: 'right', + }, + { + group: 'bottom', + }, + { + group: 'left', + }, + ], + }; + + // 自定义的画布中的显示节点 + register({ + shape: 'custom-app-vue-node', + type: 'app', + width: 220, + height: 56, + component: AppNode, + ports: ports, + }); + + // 自定义的左侧拖拽的节点 + Graph.registerNode( + 'custom-stencil-node', + { + inherit: 'rect', + width: 50, + height: 70, + markup: [ + { + tagName: 'rect', + selector: 'body', + attrs: { + fill: '#333', + textAnchor: 'middle', + textVerticalAnchor: 'middle', + }, + }, + { + tagName: 'image', + }, + { + tagName: 'text', + selector: 'label', + }, + ], + attrs: { + body: { + stroke: '#fff', + fill: '#fff', + }, + image: { // 图片布局设置 + width: 50, + height: 50, + fill: '#F0F0F0', + // refX: 5, + // refY: 5, + }, + label: { // 文本布局设置 + dominantBaseline: 'middle', + y: 20, + // textAnchor: 'center', + // textVerticalAnchor: 'bottom', + fontSize: 10, + // fill: '#1F1F1F', + }, + }, + // ports: { ...ports }, + }, + true + ); +}; diff --git a/src/views/task/execution/components/runDetailPage/runPagecomponent/flow/runFlowPage.vue b/src/views/task/execution/components/runDetailPage/runPagecomponent/flow/runFlowPage.vue new file mode 100644 index 0000000..1ba7cda --- /dev/null +++ b/src/views/task/execution/components/runDetailPage/runPagecomponent/flow/runFlowPage.vue @@ -0,0 +1,266 @@ + + + + + diff --git a/src/views/task/execution/components/runDetailPage/runPagecomponent/paramSetting.vue b/src/views/task/execution/components/runDetailPage/runPagecomponent/paramSetting.vue index 6120e4a..86a3b74 100644 --- a/src/views/task/execution/components/runDetailPage/runPagecomponent/paramSetting.vue +++ b/src/views/task/execution/components/runDetailPage/runPagecomponent/paramSetting.vue @@ -1,6 +1,7 @@ @@ -9,21 +10,24 @@ import { ref, watch } from 'vue'; import flowNodeParamTable from '@/components/flow/flowNodeParamTable.vue'; const props = defineProps({ - currentNodeInfo: { + currentRunFlowNode: { type: Object, default: () => { - }, }, + nodeParamData: { + type: Array, + default: () => [], + }, }); -const nodeParamInfo = ref({}); - -watch(() => props.currentNodeInfo, (newVal) => { +watch(() => props.currentRunFlowNode, (newVal) => { if (newVal) { - nodeParamInfo.value = newVal; } +}, { + immediate: true, + deep: true, }); diff --git a/src/views/task/execution/components/runDetailPage/runPagecomponent/runDataPage.vue b/src/views/task/execution/components/runDetailPage/runPagecomponent/runDataPage.vue index 3ab719d..08bc600 100644 --- a/src/views/task/execution/components/runDetailPage/runPagecomponent/runDataPage.vue +++ b/src/views/task/execution/components/runDetailPage/runPagecomponent/runDataPage.vue @@ -7,12 +7,18 @@ showIndex ref="baseTableRef" tableName="RUN_RESULT_FILE_TABLE" + :api="queryRunDirFun" + :params="{ + fileId:fileId, + // uuid:nodeInfo.uuid + }" + :show-checkbox="true" > @@ -21,23 +27,85 @@