弹窗
This commit is contained in:
parent
9289522415
commit
f89d818bc9
@ -1,6 +1,6 @@
|
||||
import './proj-edit.css';
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { Button, message} from "antd";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import StepProjEdit from "../../components/step/StepProjEdit.tsx";
|
||||
import CardProjEdit from "../../components/card/CardProjEdit.tsx";
|
||||
import { Process } from "../../interfaces/step/IStepProj.ts";
|
||||
@ -11,8 +11,17 @@ import {Axios, get} from "../../util/AjaxUtils.ts";
|
||||
import { EditStepEnum, IProjEdit } from "../../interfaces/card/ICardProj.ts";
|
||||
import { MAX_MOD_SIZE } from "./edit/ProjConfigModList.tsx";
|
||||
import { GenerateStatus } from "../../interfaces/proj/IProj.ts";
|
||||
|
||||
import TitleIntroduction from '../../route/proj/edit/ProjEditStep1.tsx'
|
||||
import TitleIntroductionShow from '../../route/proj/edit/ProjEditStep1Show.tsx'
|
||||
import SoftwareInfo from '../../route/proj/edit/ProjEditStep2.tsx'
|
||||
import SoftwareInfoShow from '../../route/proj/edit/ProjEditStep2Show.tsx'
|
||||
export default function ProjEditAll() {
|
||||
//第一步 标题简介弹窗
|
||||
const [titleIntroductionOpen, setTitleIntroductionOpen] = useState(false)
|
||||
const [titleIntroductionShowOpen, setTitleIntroductionShowOpen] = useState(false)
|
||||
//第二步 软件基本信息弹窗
|
||||
const [softwareInfoOpen, setSoftwareOpen] = useState(false)
|
||||
const [softwareInfoShowOpen, setSoftwareShowOpen] = useState(false)
|
||||
const nav = useNavigate();
|
||||
const pathParams = useParams();
|
||||
|
||||
@ -26,6 +35,7 @@ export default function ProjEditAll() {
|
||||
// const height = window.innerHeight - 240;
|
||||
|
||||
const renderEditStep = (data: any, isEdited: boolean, isGenerateSuccess: boolean) => {
|
||||
|
||||
const editStepArray: IProjEdit[] = [];
|
||||
editStepArray.push(
|
||||
{
|
||||
@ -36,9 +46,11 @@ export default function ProjEditAll() {
|
||||
status: data.projIntroduction ? EditStepEnum.EDITED : EditStepEnum.UN_EDIT,
|
||||
handleEdit() {
|
||||
if (!isGenerateSuccess) {
|
||||
nav(`/proj-edit/step1/${pathParams.projId}`)
|
||||
// nav(`/proj-edit/step1/${pathParams.projId}`)
|
||||
setTitleIntroductionOpen(true)
|
||||
} else {
|
||||
nav(`/proj-edit/step1-show/${pathParams.projId}`)
|
||||
// nav(`/proj-edit/step1-show/${pathParams.projId}`)
|
||||
setTitleIntroductionShowOpen(true)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -51,9 +63,13 @@ export default function ProjEditAll() {
|
||||
canBtnClick: false,
|
||||
handleEdit() {
|
||||
if (generateStatus != GenerateStatus.SUCCESS) {
|
||||
nav(`/proj-edit/step2/${pathParams.projId}`)
|
||||
// nav(`/proj-edit/step2/${pathParams.projId}`)
|
||||
setSoftwareOpen(true)
|
||||
|
||||
} else {
|
||||
nav(`/proj-edit/step2-show/${pathParams.projId}`)
|
||||
// nav(`/proj-edit/step2-show/${pathParams.projId}`)
|
||||
setSoftwareShowOpen(true)
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -200,6 +216,68 @@ export default function ProjEditAll() {
|
||||
nav(-1);
|
||||
}}>返回</Button>
|
||||
</div>
|
||||
{/* 第1步设置 */}
|
||||
<Modal open={titleIntroductionOpen}
|
||||
title="软件简介确认"
|
||||
width={1500}
|
||||
destroyOnClose={true}
|
||||
|
||||
onCancel={() => {
|
||||
|
||||
setTitleIntroductionOpen(false);
|
||||
// setTimeout(() => {
|
||||
// window.location.reload()
|
||||
// }, 500)
|
||||
|
||||
}}
|
||||
footer={null}
|
||||
>
|
||||
<TitleIntroduction closeModal={() => { setTitleIntroductionOpen(false) }}></TitleIntroduction>
|
||||
</Modal>
|
||||
{/* 第1步查看 */}
|
||||
<Modal open={titleIntroductionShowOpen}
|
||||
destroyOnClose={true}
|
||||
|
||||
title="软件简介查看"
|
||||
width={1500}
|
||||
onCancel={() => {
|
||||
setTitleIntroductionShowOpen(false);
|
||||
}}
|
||||
footer={null}
|
||||
>
|
||||
<TitleIntroductionShow></TitleIntroductionShow>
|
||||
</Modal>
|
||||
{/* 第二步设置 */}
|
||||
<Modal open={softwareInfoOpen}
|
||||
title="软件基本信息填写"
|
||||
width={1500}
|
||||
destroyOnClose={true}
|
||||
onCancel={() => {
|
||||
setSoftwareOpen(false);
|
||||
// setTimeout(() => {
|
||||
// props.closeModal()
|
||||
// window.location.reload(); // 刷新页面
|
||||
// }, 1000);
|
||||
// setTimeout(() => {
|
||||
// window.location.reload()
|
||||
// }, 500)
|
||||
}}
|
||||
footer={null}
|
||||
>
|
||||
<SoftwareInfo closeModal={() => { setSoftwareOpen(false) }}></SoftwareInfo>
|
||||
</Modal>
|
||||
{/* 第二步查看 */}
|
||||
<Modal open={softwareInfoShowOpen}
|
||||
title="软件基本信息查看"
|
||||
width={1500}
|
||||
destroyOnClose={true}
|
||||
onCancel={() => {
|
||||
setSoftwareShowOpen(false);
|
||||
}}
|
||||
footer={null}
|
||||
>
|
||||
<SoftwareInfoShow></SoftwareInfoShow>
|
||||
</Modal>
|
||||
</>
|
||||
)
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import './proj-edit.css';
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { Button, message } from "antd";
|
||||
import { Button, message,Modal } from "antd";
|
||||
import StepProjEdit from "../../components/step/StepProjEdit.tsx";
|
||||
import CardProjEdit from "../../components/card/CardProjEdit.tsx";
|
||||
import { Process } from "../../interfaces/step/IStepProj.ts";
|
||||
@ -11,8 +11,12 @@ import { Axios, get } from "../../util/AjaxUtils.ts";
|
||||
import { EditStepEnum, IProjEdit } from "../../interfaces/card/ICardProj.ts";
|
||||
import { MAX_MOD_SIZE_FREE } from "./edit/ProjConfigModList.tsx";
|
||||
import { GenerateStatus } from "../../interfaces/proj/IProj.ts";
|
||||
|
||||
import TitleIntroduction from '../../route/proj/edit/ProjEditStep1.tsx'
|
||||
import TitleIntroductionShow from '../../route/proj/edit/ProjEditStep1Show.tsx'
|
||||
export default function ProjEdit() {
|
||||
//第一步 标题简介弹窗
|
||||
const [titleIntroductionOpen, setTitleIntroductionOpen] = useState(false)
|
||||
const [titleIntroductionShowOpen, setTitleIntroductionShowOpen] = useState(false)
|
||||
const nav = useNavigate();
|
||||
const pathParams = useParams();
|
||||
|
||||
@ -38,9 +42,11 @@ export default function ProjEdit() {
|
||||
status: data.projIntroduction?EditStepEnum.EDITED:EditStepEnum.UN_EDIT,
|
||||
handleEdit() {
|
||||
if (!isGenerateSuccess) {
|
||||
nav(`/proj-edit/step1/${pathParams.projId}`)
|
||||
// nav(`/proj-edit/step1/${pathParams.projId}`)
|
||||
setTitleIntroductionOpen(true)
|
||||
} else {
|
||||
nav(`/proj-edit/step1-show/${pathParams.projId}`)
|
||||
setTitleIntroductionShowOpen(true)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -341,6 +347,37 @@ export default function ProjEdit() {
|
||||
nav(-1);
|
||||
}}>返回</Button>
|
||||
</div>
|
||||
{/* 第1步设置 */}
|
||||
<Modal open={titleIntroductionOpen}
|
||||
title="软件简介确认"
|
||||
width={1500}
|
||||
destroyOnClose={true}
|
||||
|
||||
onCancel={() => {
|
||||
|
||||
setTitleIntroductionOpen(false);
|
||||
// setTimeout(() => {
|
||||
// window.location.reload()
|
||||
// }, 500)
|
||||
|
||||
}}
|
||||
footer={null}
|
||||
>
|
||||
<TitleIntroduction closeModal={() => { setTitleIntroductionOpen(false) }}></TitleIntroduction>
|
||||
</Modal>
|
||||
{/* 第1步查看 */}
|
||||
<Modal open={titleIntroductionShowOpen}
|
||||
destroyOnClose={true}
|
||||
|
||||
title="软件简介查看"
|
||||
width={1500}
|
||||
onCancel={() => {
|
||||
setTitleIntroductionShowOpen(false);
|
||||
}}
|
||||
footer={null}
|
||||
>
|
||||
<TitleIntroductionShow></TitleIntroductionShow>
|
||||
</Modal>
|
||||
</>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user