Commit 23993250 authored by wuyongsheng's avatar wuyongsheng

feat: 个人模版保存算子接口报错

parent 754b9840
...@@ -15,6 +15,7 @@ interface IProps { ...@@ -15,6 +15,7 @@ interface IProps {
setSaveFormDialog: (val: boolean) => void; setSaveFormDialog: (val: boolean) => void;
operatorList: ITask[]; operatorList: ITask[];
setShowCustomOperator: any; setShowCustomOperator: any;
productId?: string;
} }
const SaveOperator = (props: IProps) => { const SaveOperator = (props: IProps) => {
const { const {
...@@ -22,10 +23,11 @@ const SaveOperator = (props: IProps) => { ...@@ -22,10 +23,11 @@ const SaveOperator = (props: IProps) => {
setSaveFormDialog, setSaveFormDialog,
operatorList, operatorList,
setShowCustomOperator, setShowCustomOperator,
productId: propsProductId
} = props; } = props;
const { currentProjectStore } = useStores(); const { currentProjectStore } = useStores();
const Message = useMessage(); const Message = useMessage();
const productId = toJS(currentProjectStore.currentProductInfo.id); const productId = propsProductId || toJS(currentProjectStore.currentProductInfo.id);
const [title, setTitle] = useState(""); const [title, setTitle] = useState("");
const [version, setVersion] = useState("1.0.0"); const [version, setVersion] = useState("1.0.0");
const [description, setDescription] = useState(""); const [description, setDescription] = useState("");
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com * @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-24 17:32:00 * @Date: 2022-10-24 17:32:00
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-24 19:42:23 * @LastEditTime: 2022-11-03 11:54:52
* @FilePath: /bkunyun/src/views/CustomOperator/index.tsx * @FilePath: /bkunyun/src/views/CustomOperator/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -61,6 +61,7 @@ const CustomOperator = observer((props: IProps) => { ...@@ -61,6 +61,7 @@ const CustomOperator = observer((props: IProps) => {
setSaveFormDialog={setSaveFormDialog} setSaveFormDialog={setSaveFormDialog}
operatorList={operatorList} operatorList={operatorList}
setShowCustomOperator={setShowCustomOperator} setShowCustomOperator={setShowCustomOperator}
productId={productId}
></SaveOperator> ></SaveOperator>
</div> </div>
<div className={styles.coContent} id="customOperatorFlow"> <div className={styles.coContent} id="customOperatorFlow">
......
...@@ -108,7 +108,6 @@ const UserResourcesTemplate = observer(() => { ...@@ -108,7 +108,6 @@ const UserResourcesTemplate = observer(() => {
const deleteConfirm = () => { const deleteConfirm = () => {
deleteWorkflowspecFn({ id: templateId }); deleteWorkflowspecFn({ id: templateId });
}; };
return ( return (
<div className={style.template}> <div className={style.template}>
<div className={style.top}> <div className={style.top}>
......
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