Commit b31de9d7 authored by chenshouchao's avatar chenshouchao

feat: 新增算子流程图显示版本信息

parent c79013ca
......@@ -169,6 +169,7 @@ const CustomOperator = observer((props: IProps) => {
onFlowNodeClick={handleNodeClick}
flowNodeDraggable={true}
// ListenState={!saveFormDialog}
showVersion={true}
showControls={false}
/>
</div>
......
......@@ -35,6 +35,7 @@ interface IProps extends ReactFlowProps {
flowNodeDraggable?: boolean;
// 是否显示Controls(放大缩小全屏等按钮)
showControls?: boolean;
showVersion?: boolean; // 在流程图中是否显示算子版本
}
const BatchOperatorFlow = (props: IProps) => {
......@@ -46,6 +47,7 @@ const BatchOperatorFlow = (props: IProps) => {
ListenState = true,
flowNodeDraggable = false,
showControls = true,
showVersion = false,
...other
} = props;
/** 自定义的节点类型 */
......@@ -157,6 +159,7 @@ const BatchOperatorFlow = (props: IProps) => {
style: {
padding: "20px",
},
showVersion,
},
/** 坐标 */
position: {
......
......@@ -43,7 +43,8 @@ const FlowNode = (props: any) => {
inStyle = { background: "#C2C6CC ", left: 12 }, // 样式
outStyle = { background: "#C2C6CC ", left: 12 }, // 样式
flowType,
info: { title, isCheck, executionStatus, parameters },
info: { title, isCheck, executionStatus, parameters, version },
showVersion,
} = data;
/** 获取输入参数数组 */
......@@ -98,9 +99,13 @@ const FlowNode = (props: any) => {
})
: null}
<div>
{title || ""}
{flowType !== 'edit' && isCheck ? <span className={styles.successDot}></span>: null}
{flowType === 'edit' && isCheck === false ? <span className={styles.errorDot}></span>: null}
{title || ""} {showVersion && version}
{flowType !== "edit" && isCheck ? (
<span className={styles.successDot}></span>
) : null}
{flowType === "edit" && isCheck === false ? (
<span className={styles.errorDot}></span>
) : null}
{getImgUrl(executionStatus) && (
<img
style={{ marginLeft: "6px" }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment