Commit 24b9ce7c authored by chenshouchao's avatar chenshouchao

feat: 修改WorkFlowEdit组件引用位置

parent 9b9cdbe0
......@@ -11,15 +11,12 @@ import Checkbox from "@mui/material/Checkbox";
import useMyRequest from "@/hooks/useMyRequest";
import AddIcon from "@mui/icons-material/Add";
import { useStores } from "@/store";
import WorkFlowEdit from "@/views/WorkFlowEdit";
import _ from "lodash";
import { observer } from "mobx-react-lite";
import noData from "../../../../../../assets/project/noTemplate.svg";
import {
getWorkbenchTemplate,
deleteWorkbenchTemplate,
getAddWorkbenchTemplate,
addWorkbenchTemplate,
} from "@/api/workbench_api";
import { ICustomTemplate } from "../../interface";
import { getAddWorkbenchTemplate } from "@/api/workbench_api";
import { toJS } from "mobx";
type IAddTemplateProps = {
......@@ -72,6 +69,13 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
},
});
/** 是否显示自定义模版编辑并带有参数 */
const [customTemplateInfo, setCustomTemplateInfo] = useState<ICustomTemplate>(
{
show: true,
}
);
useEffect(() => {
getAddTemplateList({
projectId: projectId as string,
......@@ -245,6 +249,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
})}
</div>
</div>
{customTemplateInfo?.show ? <WorkFlowEdit /> : null}
</div>
);
});
......
......@@ -29,9 +29,7 @@ import {
addWorkbenchTemplate,
} from "@/api/workbench_api";
import usePass from "@/hooks/usePass";
import WorkFlowEdit from "@/views/WorkFlowEdit";
import { useStores } from "@/store";
import { ICustomTemplate } from "./interface";
import styles from "./index.module.css";
......@@ -56,13 +54,6 @@ const ProjectMembers = observer(() => {
/** 已选择增加的模板列表 */
const [selectTemplateData, setSelectTemplateData] = useState<string[]>([]);
/** 是否显示自定义模版编辑并带有参数 */
const [customTemplateInfo, setCustomTemplateInfo] = useState<ICustomTemplate>(
{
show: false,
}
);
const [showAddTemplate, setShowAddTemplate] = useState(false);
// 获取模板列表
......@@ -280,8 +271,6 @@ const ProjectMembers = observer(() => {
<AddTemplate setShowAddTemplate={setShowAddTemplate} />
)}
{customTemplateInfo?.show ? <WorkFlowEdit /> : null}
<SimpleDialog
text={"确认移除该模板吗?"}
title={"删除模板"}
......
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