2024-03-14 23:34:40 +08:00
|
|
|
|
import './proj-edit.css';
|
2024-03-21 22:22:35 +08:00
|
|
|
|
import {Link, useNavigate, useParams} from "react-router-dom";
|
2024-03-25 19:25:57 +08:00
|
|
|
|
import {Breadcrumb, Button, message, Modal} from "antd";
|
2024-03-14 23:34:40 +08:00
|
|
|
|
import StepProjEdit from "../../components/step/StepProjEdit.tsx";
|
|
|
|
|
import CardProjEdit from "../../components/card/CardProjEdit.tsx";
|
2024-03-15 18:18:29 +08:00
|
|
|
|
import {Process} from "../../interfaces/step/IStepProj.ts";
|
|
|
|
|
import CardProjLoading from "../../components/card/CardProjLoading.tsx";
|
|
|
|
|
import CardProjResult from "../../components/card/CardProjResult.tsx";
|
|
|
|
|
import CardProjDownload from "../../components/card/CardProjDownload.tsx";
|
|
|
|
|
import CardProjJump from "../../components/card/CardProjJump.tsx";
|
2024-03-21 22:22:35 +08:00
|
|
|
|
import {useEffect, useState} from "react";
|
2024-03-25 19:25:57 +08:00
|
|
|
|
import {Axios, get, post} from "../../util/AjaxUtils.ts";
|
2024-03-21 22:22:35 +08:00
|
|
|
|
import {EditStepEnum, IProjEdit} from "../../interfaces/card/ICardProj.ts";
|
2024-03-24 12:15:40 +08:00
|
|
|
|
import {MAX_MOD_SIZE} from "./edit/ProjConfigModList.tsx";
|
2024-03-25 19:25:57 +08:00
|
|
|
|
import {GenerateStatus} from "../../interfaces/proj/IProj.ts";
|
2024-03-14 23:34:40 +08:00
|
|
|
|
|
|
|
|
|
export default function ProjEdit() {
|
2024-03-15 18:18:29 +08:00
|
|
|
|
const nav = useNavigate();
|
2024-03-21 22:22:35 +08:00
|
|
|
|
const pathParams = useParams();
|
|
|
|
|
|
|
|
|
|
const [messageApi, contextHolder] = message.useMessage();
|
|
|
|
|
const [editStepArray, setEditStepArray] = useState<IProjEdit[]>([]);
|
|
|
|
|
const [configArray, setConfigArray] = useState<IProjEdit[]>([]);
|
2024-03-22 21:22:12 +08:00
|
|
|
|
const [isEditStepEdited, setIsEditStepEdited] = useState(false);
|
|
|
|
|
const [isConfigEdited, setIsConfigEdited] = useState(false);
|
|
|
|
|
// const [isAllStepEdited, setIsAllStepEdited] = useState(false);
|
2024-03-21 22:22:35 +08:00
|
|
|
|
const [canGenerate, setCanGenerate] = useState(false);
|
2024-03-25 19:25:57 +08:00
|
|
|
|
const [generateStatus, setGenerateStatus] = useState(GenerateStatus.NONE);
|
2024-03-26 11:54:30 +08:00
|
|
|
|
const [generateEmainingTime, setGenerateEmainingTime] = useState(0);
|
2024-03-25 19:25:57 +08:00
|
|
|
|
const [isGenerateModalOpen, setIsGenerateModalOpen] = useState(false);
|
|
|
|
|
const [previewUrl, setPreviewUrl] = useState('');
|
2024-03-26 11:54:30 +08:00
|
|
|
|
|
2024-03-15 18:18:29 +08:00
|
|
|
|
const height = window.innerHeight - 240;
|
2024-03-21 22:22:35 +08:00
|
|
|
|
|
2024-03-26 11:54:30 +08:00
|
|
|
|
const renderEditStep = (editSteps: any[], isEdited: boolean, isGenerateSuccess: boolean) => {
|
2024-03-21 22:22:35 +08:00
|
|
|
|
const editStepArray: IProjEdit[] = [];
|
|
|
|
|
editStepArray.push(
|
|
|
|
|
{
|
|
|
|
|
title: '标题简介',
|
|
|
|
|
desc: '完善代码、样式类型和详细介绍等内容',
|
|
|
|
|
step: 1,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-21 22:22:35 +08:00
|
|
|
|
status: editSteps[0].editStatus,
|
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/step1/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/step1-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '基本信息',
|
|
|
|
|
desc: '完善项目简介、编程语言、版本、公司等内容',
|
|
|
|
|
step: 2,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-21 22:22:35 +08:00
|
|
|
|
status: editSteps[1].editStatus,
|
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (generateStatus != GenerateStatus.SUCCESS) {
|
|
|
|
|
nav(`/proj-edit/step2/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/step2-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '软件功能特点',
|
|
|
|
|
desc: '请完善软件功能特点',
|
|
|
|
|
step: 3,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-21 22:22:35 +08:00
|
|
|
|
status: editSteps[2].editStatus,
|
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/step3/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/step3-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '著作人信息',
|
|
|
|
|
desc: '请完善著作人相关信息',
|
|
|
|
|
step: 4,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-21 22:22:35 +08:00
|
|
|
|
status: editSteps[3].editStatus,
|
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/step4/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/step4-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '申请人信息',
|
|
|
|
|
desc: '请完善申请人信息',
|
|
|
|
|
step: 5,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-21 22:22:35 +08:00
|
|
|
|
status: editSteps[4].editStatus,
|
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/step5/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/step5-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '选择登录页面',
|
|
|
|
|
desc: '选择软件的登录页面模板',
|
|
|
|
|
step: 6,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-21 22:22:35 +08:00
|
|
|
|
status: editSteps[5].editStatus,
|
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/step6/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/step6-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
setEditStepArray(editStepArray);
|
2024-03-25 19:25:57 +08:00
|
|
|
|
setIsEditStepEdited(isEdited);
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-03-26 11:54:30 +08:00
|
|
|
|
const renderSetting = (data: any, isConfig: boolean, isGenerateSuccess: boolean) => {
|
2024-03-21 22:22:35 +08:00
|
|
|
|
const configArray: IProjEdit[] = [];
|
|
|
|
|
configArray.push(
|
|
|
|
|
{
|
|
|
|
|
title: '登录界面设置',
|
|
|
|
|
desc: '请对登录界面完成个性化设置',
|
|
|
|
|
step: 1,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-22 21:22:12 +08:00
|
|
|
|
status: data.loginpage.loginpageId ? EditStepEnum.EDITED : EditStepEnum.UN_EDIT,
|
2024-03-21 22:22:35 +08:00
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/config-loginpage/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/config-loginpage-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '系统菜单管理',
|
|
|
|
|
desc: '请对系统菜单进行设置',
|
|
|
|
|
step: 2,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-24 12:15:40 +08:00
|
|
|
|
status: data.projModCount > MAX_MOD_SIZE ? EditStepEnum.EDITED : EditStepEnum.UN_EDIT,
|
2024-03-21 22:22:35 +08:00
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/config-mod-list/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/config-mod-list-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '菜单顺序',
|
|
|
|
|
desc: '调整菜单顺序',
|
|
|
|
|
step: 3,
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName: !isGenerateSuccess ? '设置' : '查看',
|
2024-03-25 19:25:57 +08:00
|
|
|
|
status: data.projModCount > MAX_MOD_SIZE ? EditStepEnum.EDITED : EditStepEnum.UN_EDIT,
|
2024-03-21 22:22:35 +08:00
|
|
|
|
handleEdit() {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
if (!isGenerateSuccess) {
|
|
|
|
|
nav(`/proj-edit/config-menu-list/${pathParams.projId}`)
|
|
|
|
|
} else {
|
|
|
|
|
nav(`/proj-edit/config-menu-list-show/${pathParams.projId}`)
|
|
|
|
|
}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
setConfigArray(configArray);
|
2024-03-25 19:25:57 +08:00
|
|
|
|
setIsConfigEdited(isConfig);
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-03-25 19:25:57 +08:00
|
|
|
|
const renderData = () => {
|
2024-03-21 22:22:35 +08:00
|
|
|
|
get({
|
|
|
|
|
messageApi: messageApi,
|
|
|
|
|
url: `/api/proj/get/${pathParams.projId}`,
|
|
|
|
|
onSuccess({data}) {
|
2024-03-25 19:25:57 +08:00
|
|
|
|
const isEdited = data.editSteps[0].editStatus == EditStepEnum.EDITED
|
|
|
|
|
&& data.editSteps[1].editStatus == EditStepEnum.EDITED
|
|
|
|
|
&& data.editSteps[2].editStatus == EditStepEnum.EDITED
|
|
|
|
|
&& data.editSteps[3].editStatus == EditStepEnum.EDITED
|
|
|
|
|
&& data.editSteps[4].editStatus == EditStepEnum.EDITED
|
|
|
|
|
&& data.editSteps[5].editStatus == EditStepEnum.EDITED;
|
|
|
|
|
const isConfig = data.loginpage.loginpageId && MAX_MOD_SIZE > 0;
|
|
|
|
|
const isGenerate = isEdited && isConfig;
|
2024-03-26 11:54:30 +08:00
|
|
|
|
const isGenerateSuccess: boolean = data.generate.generateStatus == GenerateStatus.SUCCESS;
|
|
|
|
|
renderEditStep(data.editSteps, isEdited, isGenerateSuccess);
|
|
|
|
|
renderSetting(data, isConfig, isGenerateSuccess);
|
2024-03-25 19:25:57 +08:00
|
|
|
|
setCanGenerate(isGenerate);
|
|
|
|
|
setGenerateStatus(data.generate.generateStatus);
|
|
|
|
|
setPreviewUrl(data.previewUrl);
|
2024-03-26 11:54:30 +08:00
|
|
|
|
setGenerateEmainingTime(data.generate.emainingTime);
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
2024-03-25 19:25:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
renderData();
|
2024-03-21 22:22:35 +08:00
|
|
|
|
}, [])
|
|
|
|
|
|
2024-03-14 23:34:40 +08:00
|
|
|
|
return (
|
|
|
|
|
<>
|
2024-03-21 22:22:35 +08:00
|
|
|
|
{contextHolder}
|
2024-03-14 23:34:40 +08:00
|
|
|
|
<Breadcrumb
|
|
|
|
|
items={[
|
|
|
|
|
{title: <Link to={'/'}>首页</Link>},
|
|
|
|
|
{title: <Link to={'/proj-create'}>创建项目</Link>},
|
|
|
|
|
{title: '编辑项目'},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
2024-03-15 18:18:29 +08:00
|
|
|
|
<div className="proj-edit" style={{height: `${height}px`}}>
|
2024-03-22 21:22:12 +08:00
|
|
|
|
<StepProjEdit step={1} process={isEditStepEdited ? Process.COMPLETE : Process.PROCESSING}
|
|
|
|
|
descTitle="完善信息"
|
2024-03-21 22:22:35 +08:00
|
|
|
|
descDetail="完善项目的基本信息"
|
2024-03-15 18:18:29 +08:00
|
|
|
|
hasNext={true}>
|
2024-03-21 22:22:35 +08:00
|
|
|
|
{
|
|
|
|
|
editStepArray.map((item, index) => {
|
|
|
|
|
return <CardProjEdit key={`editStep-${index}`}
|
|
|
|
|
title={item.title}
|
|
|
|
|
desc={item.desc}
|
|
|
|
|
status={item.status}
|
2024-03-26 11:54:30 +08:00
|
|
|
|
btnName={item.btnName}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
handleEdit={item.handleEdit}
|
|
|
|
|
/>
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-03-15 18:18:29 +08:00
|
|
|
|
|
|
|
|
|
</StepProjEdit>
|
2024-03-22 21:22:12 +08:00
|
|
|
|
<StepProjEdit step={2}
|
|
|
|
|
process={!isEditStepEdited ? Process.PENDING : (isConfigEdited ? Process.COMPLETE : Process.PROCESSING)}
|
|
|
|
|
descTitle="功能设置"
|
2024-03-21 22:22:35 +08:00
|
|
|
|
descDetail="设置系统的菜单功能" hasNext={true}>
|
|
|
|
|
{
|
|
|
|
|
configArray.map((item, index) => {
|
|
|
|
|
return <CardProjEdit key={`config-${index}`}
|
|
|
|
|
title={item.title}
|
|
|
|
|
desc={item.desc}
|
|
|
|
|
btnName={item.btnName}
|
2024-03-22 21:22:12 +08:00
|
|
|
|
canBtnClick={isEditStepEdited}
|
2024-03-21 22:22:35 +08:00
|
|
|
|
status={item.status}
|
|
|
|
|
handleEdit={item.handleEdit}
|
|
|
|
|
/>
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-03-22 21:22:12 +08:00
|
|
|
|
{
|
|
|
|
|
isEditStepEdited && isConfigEdited ? (
|
|
|
|
|
<CardProjJump title="预览系统"
|
|
|
|
|
desc="点击查看预览系统"
|
|
|
|
|
handleJump={() => {
|
2024-03-25 19:25:57 +08:00
|
|
|
|
window.open(`${Axios.defaults?.baseURL}/${previewUrl}`, '_blank')
|
2024-03-22 21:22:12 +08:00
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
2024-03-15 18:18:29 +08:00
|
|
|
|
</StepProjEdit>
|
2024-03-26 11:54:30 +08:00
|
|
|
|
<StepProjEdit step={3}
|
|
|
|
|
process={generateStatus == GenerateStatus.SUCCESS ? Process.COMPLETE : (canGenerate ? Process.PROCESSING : Process.PENDING)}
|
|
|
|
|
descTitle="资料生成"
|
2024-03-25 19:25:57 +08:00
|
|
|
|
hasNext={true}>
|
|
|
|
|
{
|
|
|
|
|
generateStatus == GenerateStatus.NONE || generateStatus == GenerateStatus.FAILED ? (
|
|
|
|
|
<CardProjEdit title="资料生成"
|
|
|
|
|
desc="生成软著所需要的资料,此操作后项目无法再次编辑"
|
|
|
|
|
btnName="生成"
|
|
|
|
|
status={EditStepEnum.UN_EDIT}
|
|
|
|
|
canBtnClick={canGenerate}
|
|
|
|
|
handleEdit={() => {
|
|
|
|
|
setIsGenerateModalOpen(true);
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
generateStatus == GenerateStatus.PENDING ? (
|
|
|
|
|
<CardProjLoading title="正在排队"
|
|
|
|
|
desc="资料正在排队"
|
2024-03-26 11:54:30 +08:00
|
|
|
|
duration={generateEmainingTime}
|
2024-03-25 19:25:57 +08:00
|
|
|
|
handleCountDownOver={() => {
|
|
|
|
|
renderData();
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
generateStatus == GenerateStatus.GENERATING ? (
|
|
|
|
|
<CardProjLoading title="正在生成"
|
|
|
|
|
desc="资料正在生成"
|
2024-03-26 11:54:30 +08:00
|
|
|
|
duration={generateEmainingTime}
|
2024-03-25 19:25:57 +08:00
|
|
|
|
handleCountDownOver={() => {
|
|
|
|
|
renderData();
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
generateStatus == GenerateStatus.SUCCESS ? (
|
|
|
|
|
<CardProjResult title="生成成功"
|
|
|
|
|
isSuccess={true}
|
|
|
|
|
/>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
generateStatus == GenerateStatus.FAILED ? (
|
|
|
|
|
<CardProjResult title="生成失败"
|
|
|
|
|
isSuccess={false}
|
|
|
|
|
handleFeedback={() => {
|
|
|
|
|
console.log('反馈')
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
2024-03-15 18:18:29 +08:00
|
|
|
|
</StepProjEdit>
|
2024-03-26 11:54:30 +08:00
|
|
|
|
<StepProjEdit step={4}
|
|
|
|
|
process={generateStatus == GenerateStatus.SUCCESS ? Process.PROCESSING : Process.PENDING}
|
|
|
|
|
descTitle="资料下载">
|
|
|
|
|
<CardProjDownload title="申请表"
|
|
|
|
|
desc="点击下载申请表"
|
2024-03-26 21:09:41 +08:00
|
|
|
|
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
2024-03-26 11:54:30 +08:00
|
|
|
|
handleDownload={() => {
|
|
|
|
|
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/${pathParams.projId}`)
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<CardProjDownload title="操作手册"
|
|
|
|
|
desc="点击下载操作手册"
|
2024-03-26 21:09:41 +08:00
|
|
|
|
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
2024-03-26 11:54:30 +08:00
|
|
|
|
handleDownload={() => {
|
|
|
|
|
window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/${pathParams.projId}`)
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<CardProjDownload title="代码压缩包"
|
|
|
|
|
desc="点击下载代码压缩包"
|
2024-03-26 21:09:41 +08:00
|
|
|
|
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
2024-03-26 11:54:30 +08:00
|
|
|
|
handleDownload={() => {
|
|
|
|
|
window.open(`${Axios.defaults?.baseURL}/route/proj/download/code-zip/${pathParams.projId}`)
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<CardProjDownload title="代码文档"
|
|
|
|
|
desc="点击下载代码文档"
|
2024-03-26 21:09:41 +08:00
|
|
|
|
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
2024-03-15 18:18:29 +08:00
|
|
|
|
handleDownload={() => {
|
2024-03-26 11:54:30 +08:00
|
|
|
|
window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/${pathParams.projId}`)
|
2024-03-15 18:18:29 +08:00
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<CardProjJump title="跳转"
|
|
|
|
|
desc="请完善软件的介绍,详细介绍等基本信息"
|
|
|
|
|
handleJump={() => {
|
2024-03-17 18:36:00 +08:00
|
|
|
|
nav('/agent-select/2');
|
2024-03-15 18:18:29 +08:00
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</StepProjEdit>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="btn-container">
|
2024-03-21 22:22:35 +08:00
|
|
|
|
<Button size="large" style={{
|
|
|
|
|
width: '200px',
|
|
|
|
|
fontSize: '14px',
|
|
|
|
|
backgroundColor: 'var(--color-primary)',
|
|
|
|
|
color: 'var(--color-light)'
|
|
|
|
|
}} onClick={() => {
|
2024-03-15 18:18:29 +08:00
|
|
|
|
nav(-1);
|
|
|
|
|
}}>返回</Button>
|
2024-03-14 23:34:40 +08:00
|
|
|
|
</div>
|
2024-03-25 19:25:57 +08:00
|
|
|
|
<Modal title="提示"
|
|
|
|
|
okText="确定"
|
|
|
|
|
cancelText="取消"
|
|
|
|
|
open={isGenerateModalOpen}
|
|
|
|
|
onOk={() => {
|
|
|
|
|
post({
|
|
|
|
|
messageApi,
|
|
|
|
|
url: `/api/proj/generate/proj-id/${pathParams.projId}`,
|
|
|
|
|
body: {},
|
|
|
|
|
onSuccess() {
|
|
|
|
|
messageApi.success('提交成功');
|
|
|
|
|
setIsGenerateModalOpen(false);
|
|
|
|
|
renderData();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}}
|
|
|
|
|
onCancel={() => {
|
|
|
|
|
setIsGenerateModalOpen(false);
|
|
|
|
|
}}>
|
|
|
|
|
<div>点击“确定按钮”后,项目便无法再次修改,建议通过预览查看系统,确认无误后点击“确定按钮”。</div>
|
|
|
|
|
</Modal>
|
2024-03-14 23:34:40 +08:00
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|