Commit 6f94f6bd authored by chenshouchao's avatar chenshouchao

feat: 新增一个creator字段

parent 6b1d7bda
...@@ -29,6 +29,7 @@ interface IProps { ...@@ -29,6 +29,7 @@ interface IProps {
description: string; description: string;
setDescription: (val: string) => void; setDescription: (val: string) => void;
oldversion: string; oldversion: string;
creator?: string;
templateConfigInfo: ITask[]; templateConfigInfo: ITask[];
id?: string; id?: string;
} }
...@@ -45,6 +46,7 @@ const SaveCustomTemplate = (props: IProps) => { ...@@ -45,6 +46,7 @@ const SaveCustomTemplate = (props: IProps) => {
setDescription, setDescription,
oldversion, oldversion,
templateConfigInfo, templateConfigInfo,
creator,
id, id,
} = props; } = props;
const { currentProjectStore } = useStores(); const { currentProjectStore } = useStores();
...@@ -198,6 +200,7 @@ const SaveCustomTemplate = (props: IProps) => { ...@@ -198,6 +200,7 @@ const SaveCustomTemplate = (props: IProps) => {
tasks: templateConfigInfo, tasks: templateConfigInfo,
productId, productId,
id, id,
creator,
}); });
} else { } else {
saveUserSpecRun({ saveUserSpecRun({
......
...@@ -53,6 +53,7 @@ const WorkFlowEdit = observer((props: IProps) => { ...@@ -53,6 +53,7 @@ const WorkFlowEdit = observer((props: IProps) => {
const [version, setVersion] = useState("1.0.0"); // 自定义模板版本 const [version, setVersion] = useState("1.0.0"); // 自定义模板版本
const [oldversion, setOldersion] = useState(""); // 编辑是自定义模板的老版本 const [oldversion, setOldersion] = useState(""); // 编辑是自定义模板的老版本
const [description, setDescription] = useState(""); // 自定义模板描述 const [description, setDescription] = useState(""); // 自定义模板描述
const [creator, setCreator] = useState(""); // 自定义模板创建人
const [leftContentType, setLeftContentType] = useState("list"); // 页面左侧展示的是算子列表还是参数设置 const [leftContentType, setLeftContentType] = useState("list"); // 页面左侧展示的是算子列表还是参数设置
const [popperTitle, setPopperTitle] = useState( const [popperTitle, setPopperTitle] = useState(
...@@ -85,7 +86,7 @@ const WorkFlowEdit = observer((props: IProps) => { ...@@ -85,7 +86,7 @@ const WorkFlowEdit = observer((props: IProps) => {
} }
} }
setVersion(arr.join(".")); setVersion(arr.join("."));
// setCreator(res.data.creator); setCreator(res.data.creator);
setDescription(res.data.description); setDescription(res.data.description);
} }
}, },
...@@ -240,6 +241,7 @@ const WorkFlowEdit = observer((props: IProps) => { ...@@ -240,6 +241,7 @@ const WorkFlowEdit = observer((props: IProps) => {
setDescription={setDescription} setDescription={setDescription}
version={version} version={version}
setVersion={setVersion} setVersion={setVersion}
creator={creator}
setSaveFormDialog={setSaveFormDialog} setSaveFormDialog={setSaveFormDialog}
saveFormDialog={saveFormDialog} saveFormDialog={saveFormDialog}
onBack={onBack} onBack={onBack}
......
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