Commit b31de9d7 authored by chenshouchao's avatar chenshouchao

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

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