新页面

This commit is contained in:
xixi 2024-05-12 07:45:51 +08:00
parent 2439cfb391
commit 8a25fc7b1a
17 changed files with 1122 additions and 594 deletions

View File

@ -4,7 +4,9 @@ import {IProjJump} from "../../interfaces/card/ICardProj.ts";
export default function CardProjJump(props: IProjJump) {
return (
<div className="card-proj-jump" onClick={() => {
<div className="card-proj-jump"
style={{background:props.title=='预览系统'?'#F5FEFA':'#f3f3f3',boxShadow:props.title=='预览系统'?'0px 3px 0px 0px rgba(55,215,138,0.18)':''}}
onClick={() => {
if(!props.canBtnClick) {
return;
}

View File

@ -4,7 +4,7 @@
box-sizing: border-box;
cursor: pointer;
background-color: #F5FEFA;
box-shadow:0px 3px 0px 0px rgba(55,215,138,0.18) ;
/* box-shadow:0px 3px 0px 0px rgba(55,215,138,0.18) ; */
position: relative;
}

View File

@ -3,9 +3,11 @@
background-color: var(--color-light);
/* padding: 5px 15px; */
height: 230px;
width: calc(100vw - 330px);
/* width: calc(100vw - 330px); */
/* margin-bottom: 20px; */
border-radius: 13px;
}
.card-proj .cp-top {

View File

@ -1,7 +1,7 @@
import './list-proj.css'
import CardProj from "../card/CardProj.tsx";
import { useRef, MutableRefObject, useState, useEffect, useContext } from "react";
import { Pagination, message, Spin, Image } from 'antd';
import { Pagination, message, Spin, Image } from 'antd';
import { get } from "../../util/AjaxUtils.ts";
import { IndexListContext } from "../../context/IndexListContext.ts";
import { IListPage } from "../../interfaces/listpage/IListPage.ts";
@ -17,15 +17,15 @@ import { useLocation } from 'react-router-dom';
export default function ListProj() {
const indexListContext = useContext(IndexListContext);
const {state} = useLocation()
const { state } = useLocation()
// console.log('传递过来的参数',state.keyword);
// if(state){
// console.log('传递过来的参数',state.keyword);
// // setKeywords(state.keyword)
// }
const keywords = state?state.keyword:''
const keywords = state ? state.keyword : ''
// console.log(keywords);
const listProjRef: MutableRefObject<HTMLDivElement | null> = useRef(null);
const listRef: MutableRefObject<HTMLDivElement | null> = useRef(null);
@ -36,7 +36,7 @@ export default function ListProj() {
const [isLoading, setIsLoading] = useState(false);
// const [keywords, setKeywords] = useState('');
const domHeight = window.innerHeight - 280;
// const navigate = useNavigate()
const reqData = (currentPage: number) => {
get<IListPage<IProj>>({
messageApi: messageApi,
@ -45,7 +45,7 @@ export default function ListProj() {
params: {
page: currentPage,
rows: 20,
keywords: keywords,
keywords: keywords,
projCategoryId: indexListContext.category,
status: indexListContext.status ? indexListContext.status : ''
}
@ -54,6 +54,8 @@ export default function ListProj() {
setIsLoading(true);
},
onSuccess({ data }) {
console.log('看看结果', data);
setPage(data.page);
setTotal(data.total);
setProjs(data.rows);
@ -82,20 +84,28 @@ export default function ListProj() {
)
}
return projs.map((item) => {
return <CardProj item={item} key={new Date().getTime() + ':' + item.projId} />;
return (
<div className='projListBox' key={new Date().getTime() + ':' + item.projId}>
<CardProj item={item} />
</div>
)
});
}
const renderCategory = () => {
}
useEffect(() => {
if (indexListContext.categorys) {
reqData(page);
renderCategory();
}
}, [indexListContext.status, indexListContext.categoryChangeCount, indexListContext.category, keywords, page])
useEffect(() => {
}, [indexListContext.status])
// const renderStatus = () => {
// if (indexListContext.status == 'ALL') {
// return <Tag color="blue">项目:全部项目</Tag>
@ -114,12 +124,13 @@ export default function ListProj() {
<div className="body">
<Spin tip="加载中..." spinning={isLoading}>
<div className="list" ref={listRef} style={{ height: `${domHeight}px`}}>
<div className="list" ref={listRef} style={{ height: `${domHeight}px` }}>
{renderList()}
</div>
<div className="page" >
<Pagination defaultCurrent={page} total={total} onChange={(page) => {
setPage(page);
<Pagination defaultCurrent={page} total={total} defaultPageSize={20} onChange={(page) => {
reqData(page);
// setPage(page);
}} />
</div>
</Spin>

View File

@ -4,7 +4,9 @@
/* padding-right: 33px; */
margin-top: 10px;
}
.projListBox{
margin-bottom: 25px;
}
.list-proj .top {
/* padding: 10px 15px; */
box-sizing: border-box;

View File

@ -19,12 +19,12 @@ export default function Home() {
// setListType(state.listType)
// }
// console.log('传递过来的',listType);
console.log(indexListContext);
// console.log(indexListContext);
return (
<div>
<div className="homebox">
{
String(indexListContext.type) == '0' ? <ListProj /> : (
String(indexListContext.type) == '1' ? <ListProjAgent /> : <></>

View File

@ -32,7 +32,7 @@ export default function Index() {
// const [keywords, setKeywords] = useState('');
// const indexListContext = useContext(IndexListContext);
const nav = useNavigate();
@ -131,32 +131,59 @@ export default function Index() {
dispatch({
type: IndexListDataType.AGENT,
value: item.id,
})
}
})
const location = useLocation()
const [now,setNow] = useState<string>('首页')
const [pathArray,setPathArray] = useState([ { title: <Link to={'/home'}></Link> }])
useEffect(()=>{
// const nowname = sessionStorage.getItem('now')
console.log( '路由名字', location.pathname);
if(location.pathname.includes('/home') ){
setNow('首页')
setPathArray([ { title: <Link to={'/home'}></Link> }])
}else if(location.pathname.includes('/proj-create') ){
setNow('创建项目')
setPathArray([ { title: <Link to={'/home'}></Link> },{title: <Link to={'/proj-create'}></Link>}])
//
}else if(location.pathname.includes('/proj-edit')){
setNow('编辑项目')
setPathArray([ { title: <Link to={'/home'}></Link> },{title: <Link to={'/proj-create'}></Link>},{title: <Link to={location.pathname}></Link>}])
}
},[location.pathname])
const [now, setNow] = useState<string>('首页')
// 编辑项目路由名
// const [editname,setEditname] = useState('')
// 新建项目路由名字
// const [newname,setNewname] = useState('')
const [pathArray, setPathArray] = useState<any>([])
useEffect(() => {
sessionStorage.setItem('pathArray', JSON.stringify([ { title: <Link to={'/home'}></Link> }]));
// const nowname = sessionStorage.getItem('now')
console.log('路由名字', location.pathname);
if (location.pathname.includes('/home')) {
setNow('首页')
setPathArray([{ title: '首页' }])
} else if (location.pathname.includes('/proj-create')) {
setNow('创建项目')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: '创建项目' }])
//
} else if (location.pathname.includes('/proj-edit')&&!location.pathname.includes('/step')) {
setNow('编辑项目')
// setEditname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title:'编辑项目'}])
} else if (location.pathname.includes('/proj-new')) {
setNow('新建项目')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: '新建项目' }])
}else if (location.pathname.includes('/proj-efree')) {
setNow('编辑项目')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: '编辑项目' }])
}else if (location.pathname.includes('/proj-eall')) {
setNow('编辑项目')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: '编辑项目' }])
}else if (location.pathname.includes('/proj-edit/step1')) {
setNow('标题简介')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, {title: <a onClick={() => {nav(-1)}}></a>},{title: '标题简介'}])
}else if (location.pathname.includes('/proj-edit/step2')) {
setNow('标题简介')
// setNewname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, {title: <a onClick={() => {nav(-1)}}></a>},{title: '基本信息'}])
}
// /proj-edit/step1
}, [location.pathname])
useEffect(() => {
sessionStorage.setItem('pathArray', JSON.stringify([{ title: <Link to={'/home'}></Link> }]));
sessionStorage.setItem('now', '首页');
if (searchParams.get('type') == 'agent') {
dispatch({
@ -176,9 +203,11 @@ export default function Index() {
const handleSearch = (value: string) => {
console.log(value);
nav('/home',{state:{
keyword:value
}})
nav('/home', {
state: {
keyword: value
}
})
}
return (
<>
@ -210,7 +239,7 @@ export default function Index() {
{/* {renderStatus()} */}
<div className='gps'>
<img src={gpsImg} alt="" />
<div>:{ now}</div>
<div>:{now}</div>
</div>
<div className='line'></div>
<Search placeholder="输入项目名称" onSearch={handleSearch} style={{
@ -236,7 +265,9 @@ export default function Index() {
listData.type == IndexListDataType.AGENT ? <ListProjAgent/> : <></>
)
} */}
<Outlet></Outlet>
<div>
<Outlet></Outlet>
</div>
</div>
</div>
</IndexListDispatchContext.Provider>

View File

@ -79,7 +79,8 @@ export default function ProjEdit() {
btnName: !isGenerateSuccess ? '设置' : '查看',
status: editSteps[1].editStatus,
handleEdit() {
if (generateStatus != GenerateStatus.SUCCESS) {
// if (generateStatus != GenerateStatus.SUCCESS) {
if (!isGenerateSuccess) {
nav(`/proj-edit/step2/${pathParams.projId}`)
} else {
nav(`/proj-edit/step2-show/${pathParams.projId}`)

View File

@ -1,6 +1,6 @@
import './proj-edit.css';
import {Link, useNavigate, useParams} from "react-router-dom";
import {Breadcrumb, Button, message} from "antd";
import { useNavigate, useParams} from "react-router-dom";
import { Button, message} from "antd";
import StepProjEdit from "../../components/step/StepProjEdit.tsx";
import CardProjEdit from "../../components/card/CardProjEdit.tsx";
import {Process} from "../../interfaces/step/IStepProj.ts";
@ -23,7 +23,7 @@ export default function ProjEditAll() {
const [generateStatus, setGenerateStatus] = useState(GenerateStatus.NONE);
const [previewUrl, setPreviewUrl] = useState('');
const height = window.innerHeight - 240;
// const height = window.innerHeight - 240;
const renderEditStep = (editSteps: any[], isEdited: boolean, isGenerateSuccess: boolean) => {
const editStepArray: IProjEdit[] = [];
@ -103,14 +103,14 @@ export default function ProjEditAll() {
return (
<>
{contextHolder}
<Breadcrumb
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
{title: '编辑项目'},
]}
/>
<div className="proj-edit" style={{height: `${height}px`, padding: '15px 175px'}}>
/> */}
<div className="proj-edit" style={{ marginTop:'21px', padding: '15px 175px'}}>
<StepProjEdit step={1} process={isEditStepEdited ? Process.COMPLETE : Process.PROCESSING}
descTitle="完善信息"
descDetail="完善项目的基本信息"
@ -123,6 +123,9 @@ export default function ProjEditAll() {
status={item.status}
btnName={item.btnName}
handleEdit={item.handleEdit}
background={item.status == EditStepEnum.EDITED ? '#F5FAFE' : '#f3f3f3'}
shadow={item.status == EditStepEnum.EDITED ? '0px 3px 0px 0px rgba(55,144,215,0.18)' : ''}
/>
})
}
@ -178,9 +181,11 @@ export default function ProjEditAll() {
<div className="btn-container">
<Button size="large" style={{
width: '200px',
fontSize: '14px',
backgroundColor: 'var(--color-primary)',
color: 'var(--color-light)'
height:'40px',
fontSize: '16px',
backgroundColor: '#e9e7e7',
color: '#A0A0A0',
border:'none',
}} onClick={() => {
nav(-1);
}}></Button>

View File

@ -1,16 +1,16 @@
import './proj-edit.css';
import {Link, useNavigate, useParams} from "react-router-dom";
import {Breadcrumb, Button, message} from "antd";
import { useNavigate, useParams } from "react-router-dom";
import { Button, message } from "antd";
import StepProjEdit from "../../components/step/StepProjEdit.tsx";
import CardProjEdit from "../../components/card/CardProjEdit.tsx";
import {Process} from "../../interfaces/step/IStepProj.ts";
import { Process } from "../../interfaces/step/IStepProj.ts";
import CardProjDownload from "../../components/card/CardProjDownload.tsx";
import CardProjJump from "../../components/card/CardProjJump.tsx";
import {useEffect, useState} from "react";
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 { useEffect, useState } from "react";
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";
export default function ProjEdit() {
const nav = useNavigate();
@ -25,7 +25,7 @@ export default function ProjEdit() {
const [generateStatus, setGenerateStatus] = useState(GenerateStatus.NONE);
const [previewUrl, setPreviewUrl] = useState('');
const height = window.innerHeight - 240;
// const height = window.innerHeight - 240;
const renderEditStep = (editSteps: any[], isEdited: boolean, isGenerateSuccess: boolean) => {
const editStepArray: IProjEdit[] = [];
@ -177,7 +177,7 @@ export default function ProjEdit() {
get<any>({
messageApi: messageApi,
url: `/api/proj/get/${pathParams.projId}`,
onSuccess({data}) {
onSuccess({ data }) {
const isEdited = data.editSteps[0].editStatus == EditStepEnum.EDITED
&& data.editSteps[5].editStatus == EditStepEnum.EDITED;
const isConfig = data.loginpage.loginpageId && data.projModCount > MAX_MOD_SIZE_FREE;
@ -197,73 +197,82 @@ export default function ProjEdit() {
}, [])
return (
<>
<>
{contextHolder}
<Breadcrumb
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
{title: '编辑项目'},
{ title: <Link to={'/'}></Link> },
{ title: <Link to={'/proj-create'}></Link> },
{ title: '编辑项目' },
]}
/>
<div className="proj-edit" style={{height: `${height}px`}}>
/> */}
<div className="proj-edit" style={{ marginTop:'21px' }}>
<StepProjEdit step={1} process={isEditStepEdited ? Process.COMPLETE : Process.PROCESSING}
descTitle="完善信息"
descDetail="完善项目的基本信息"
hasNext={true}>
descTitle="完善信息"
descDetail="完善项目的基本信息"
hasNext={true}>
{
editStepArray.map((item, index) => {
return <CardProjEdit key={`editStep-${index}`}
title={item.title}
desc={item.desc}
status={item.status}
btnName={item.btnName}
canBtnClick={item.canBtnClick}
handleEdit={item.handleEdit}
title={item.title}
desc={item.desc}
status={item.status}
btnName={item.btnName}
canBtnClick={item.canBtnClick}
handleEdit={item.handleEdit}
background={item.status == EditStepEnum.EDITED ? '#F5FAFE' : '#f3f3f3'}
shadow={item.status == EditStepEnum.EDITED ? '0px 3px 0px 0px rgba(55,144,215,0.18)' : ''}
/>
})
}
</StepProjEdit>
<StepProjEdit step={2}
process={!isEditStepEdited ? Process.PENDING : (isConfigEdited ? Process.COMPLETE : Process.PROCESSING)}
descTitle="功能设置"
descDetail="设置系统的菜单功能" hasNext={true}>
process={!isEditStepEdited ? Process.PENDING : (isConfigEdited ? Process.COMPLETE : Process.PROCESSING)}
descTitle="功能设置"
descDetail="设置系统的菜单功能" hasNext={true}>
{
configArray.map((item, index) => {
return <CardProjEdit key={`config-${index}`}
title={item.title}
desc={item.desc}
btnName={item.btnName}
canBtnClick={isEditStepEdited}
status={item.status}
handleEdit={item.handleEdit}
title={item.title}
desc={item.desc}
btnName={item.btnName}
canBtnClick={isEditStepEdited}
status={item.status}
handleEdit={item.handleEdit}
background={item.status == EditStepEnum.EDITED ? '#F5FEFA' : '#f3f3f3'}
shadow={item.status == EditStepEnum.EDITED ? ' 0px 3px 0px 0px rgba(55,215,138,0.18)' : ''}
/>
})
}
{
isEditStepEdited && isConfigEdited ? (
<CardProjJump title="预览系统"
desc="点击查看预览系统"
handleJump={() => {
window.open(`${Axios.defaults?.baseURL}/${previewUrl}`, '_blank')
}}
desc="点击查看预览系统"
handleJump={() => {
window.open(`${Axios.defaults?.baseURL}/${previewUrl}`, '_blank')
}}
/>
) : <></>
}
</StepProjEdit>
<StepProjEdit step={3}
process={generateStatus == GenerateStatus.SUCCESS ? Process.COMPLETE : (canGenerate ? Process.PROCESSING : Process.PENDING)}
descTitle="资料生成"
hasNext={true}>
process={generateStatus == GenerateStatus.SUCCESS ? Process.COMPLETE : (canGenerate ? Process.PROCESSING : Process.PENDING)}
descTitle="资料生成"
hasNext={true}>
{
generateStatus == GenerateStatus.NONE || generateStatus == GenerateStatus.FAILED ? (
<CardProjEdit title="资料生成"
desc="生成软著所需要的资料,此操作后项目无法再次编辑"
btnName="生成"
status={EditStepEnum.UN_EDIT}
canBtnClick={false}
handleEdit={() => {}}
desc="生成软著所需要的资料,此操作后项目无法再次编辑"
btnName="生成"
status={EditStepEnum.UN_EDIT}
canBtnClick={false}
handleEdit={() => { }}
background='#f3f3f3'
/>
) : <></>
}
@ -271,41 +280,43 @@ export default function ProjEdit() {
</StepProjEdit>
<StepProjEdit step={4}
process={generateStatus == GenerateStatus.SUCCESS ? Process.PROCESSING : Process.PENDING}
descTitle="资料下载">
process={generateStatus == GenerateStatus.SUCCESS ? Process.PROCESSING : Process.PENDING}
descTitle="资料下载">
<CardProjDownload title="申请表"
desc="点击下载申请表"
canBtnClick={false}
handleDownload={() => {}}
desc="点击下载申请表"
canBtnClick={false}
handleDownload={() => { }}
/>
<CardProjDownload title="操作手册"
desc="点击下载操作手册"
canBtnClick={false}
handleDownload={() => {}}
desc="点击下载操作手册"
canBtnClick={false}
handleDownload={() => { }}
/>
<CardProjDownload title="代码压缩包"
desc="点击下载代码压缩包"
canBtnClick={false}
handleDownload={() => {}}
desc="点击下载代码压缩包"
canBtnClick={false}
handleDownload={() => { }}
/>
<CardProjDownload title="代码文档"
desc="点击下载代码文档"
canBtnClick={false}
handleDownload={() => {}}
desc="点击下载代码文档"
canBtnClick={false}
handleDownload={() => { }}
/>
<CardProjJump title="找代理"
desc="到软著代理完成软著申请"
canBtnClick={false}
handleJump={() => {}}
desc="到软著代理完成软著申请"
canBtnClick={false}
handleJump={() => { }}
/>
</StepProjEdit>
</div>
<div className="btn-container">
<Button size="large" style={{
width: '200px',
fontSize: '14px',
backgroundColor: 'var(--color-primary)',
color: 'var(--color-light)'
height:'40px',
fontSize: '16px',
backgroundColor: '#e9e7e7',
color: '#A0A0A0',
border:'none',
}} onClick={() => {
nav(-1);
}}></Button>

View File

@ -1,11 +1,11 @@
import './proj-new.css';
import {Link, useNavigate, useParams, useSearchParams} from "react-router-dom";
import {Breadcrumb, Button, Flex, Form, Input, message, Modal, Spin} from "antd";
import {useContext, useEffect, useState} from "react";
import {get, post} from "../../util/AjaxUtils.ts";
import {IProjCharge, ProjAdditionalType, ProjChargeType} from "../../interfaces/proj/IProj.ts";
import {GlobalDispatchContext, reloadUser} from "../../context/GlobalContext.ts";
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
import { Button, Flex, Form, Input, message, Modal, Spin } from "antd";
import { useContext, useEffect, useState } from "react";
import { get, post } from "../../util/AjaxUtils.ts";
import { IProjCharge, ProjAdditionalType, ProjChargeType } from "../../interfaces/proj/IProj.ts";
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
const { TextArea } = Input;
type ProjInfo = {
projName: string;
projIntroduction: string;
@ -19,7 +19,7 @@ export default function ProjNew() {
const [messageApi, contextHolder] = message.useMessage();
const [loading, setLoading] = useState<boolean>(false);
const height = window.innerHeight - 150;
// const height = window.innerHeight - 150;
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
const [chargePrice, setChargePrice] = useState(0);
@ -34,18 +34,18 @@ export default function ProjNew() {
get({
messageApi: messageApi,
url: '/api/proj/charge/get',
onSuccess({data}) {
onSuccess({ data }) {
const charge = data as IProjCharge;
// console.log('创建页price',charge.proj.materialAgent);
let price = 0;
switch (pathParams.projChargeType) {
case ProjChargeType.ALL:
price = charge.proj.all;
break;
case ProjChargeType.MATERIAL_AGENT:
price = charge.proj.materialAgent;
price = charge.proj.materialAgent;
break;
case ProjChargeType.MATERIAL_AGENT_URGENT:
price = charge.proj.materialAgentUrgent;
@ -62,8 +62,8 @@ export default function ProjNew() {
content: '价格类型错误',
})
}
const pkg = queryParams.get('pkg') == 'true'?true:false
const videoDemo = queryParams.get('videoDemo') == 'true'?true:false
const pkg = queryParams.get('pkg') == 'true' ? true : false
const videoDemo = queryParams.get('videoDemo') == 'true' ? true : false
if (pkg) {
price += charge.additional.pkg;
listProjChargeAdditional.push(ProjAdditionalType.PKG);
@ -73,10 +73,10 @@ export default function ProjNew() {
listProjChargeAdditional.push(ProjAdditionalType.VIDEO_DEMO);
}
setChargePrice(price);
console.log('传递信息pkg:',pkg,'videoDemo:',videoDemo);
console.log('显示价格',price);
// console.log('传递信息pkg:',pkg,'videoDemo:',videoDemo);
// console.log('显示价格',price);
}
})
}, []);
@ -84,23 +84,23 @@ export default function ProjNew() {
return (
<>
{contextHolder}
<Breadcrumb
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
{title: '新建项目'},
]}
/>
<div style={{height: `${height}px`, overflow: 'auto'}}>
/> */}
<div className='projNew'>
<div className="proj-new">
<div className="proj-title"></div>
{/* <div className="proj-title">请完善项目的基本信息</div> */}
<div className="proj-form">
<Form
name="basic"
layout={'vertical'}
labelCol={{span: 24}}
wrapperCol={{span: 24}}
style={{width: 500}}
labelCol={{ span: 24 }}
wrapperCol={{ span: 24 }}
style={{ width: 500 }}
onFinish={(formData) => {
setIsCreateModalOpen(true);
setProjInfo({
@ -110,83 +110,104 @@ export default function ProjNew() {
}}
autoComplete="off"
>
<Form.Item<ProjInfo>
name="projName"
rules={[{required: true, message: '请输入系统标题'}]}
>
<Input placeholder="请输入系统标题"/>
</Form.Item>
<div className='formItemOne'>
<div className='formItem-title oneTitle'>*</div>
<Form.Item<ProjInfo>
name="projName"
rules={[{ required: true, message: '请输入系统标题' }]}
>
<Input style={{ background: '#eeeeee', width: '328px', height: '50px' ,fontSize:'16px'}} placeholder="请输入系统标题" />
</Form.Item>
</div>
<div className='formItemTwo'>
<div className='formItem-title '></div>
<Form.Item<ProjInfo>
name="projIntroduction"
// rules={[{required: true, message: '请输入系统标题'}]}
>
<TextArea rows={10} style={{ background: '#eeeeee', resize: 'none',width:"328px",height:'220px',fontSize:'16px' }} placeholder="请对系统作出简单的描述,以使可准确生成资料..." />
{/* <Input placeholder="请对系统作出简单的描述,以使可准确生成资料..."/> */}
</Form.Item>
</div>
<div style={{ marginTop: '156px' }}>
<Form.Item>
<Flex align="center" justify="center" gap="large">
<Button style={{
backgroundColor: '#F5F5F5', width: '216px',
height: '50px', color: '#AFAFAF', fontSize: '16px'
}} type="default" htmlType="button" onClick={() => {
nav(-1);
}}>
</Button>
<Button type="primary" htmlType="submit"
style={{
backgroundColor: 'var(--color-primary)', width: '216px',
height: '50px', fontSize: '16px', marginLeft: '53px'
}}>
</Button>
<Form.Item>
<Flex align="center" justify="center" gap="large">
<Button type="primary" htmlType="submit"
style={{backgroundColor: 'var(--color-primary)'}}>
</Button>
<Button type="default" htmlType="button" onClick={() => {
nav(-1);
}}>
</Button>
</Flex>
</Form.Item>
</Flex>
</Form.Item>
</div>
</Form>
</div>
</div>
</div>
<Modal title="提示"
okText="确定"
cancelText="取消"
open={isCreateModalOpen}
onOk={() => {
setIsCreateModalOpen(false);
post<any>({
messageApi,
url: '/api/proj/create',
body: {
projName: projInfo.projName,
projChargeType: pathParams.projChargeType,
listProjChargeAdditional: listProjChargeAdditional
},
onBefore() {
setLoading(true);
},
onSuccess({data}) {
setIsEditModalOpen(true);
setCreateProjId(data.data);
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('扣款成功');
});
},
onFinally() {
setLoading(false);
}
})
}}
onCancel={() => {
setIsCreateModalOpen(false);
}}>
okText="确定"
cancelText="取消"
open={isCreateModalOpen}
onOk={() => {
setIsCreateModalOpen(false);
post<any>({
messageApi,
url: '/api/proj/create',
body: {
projName: projInfo.projName,
projChargeType: pathParams.projChargeType,
listProjChargeAdditional: listProjChargeAdditional
},
onBefore() {
setLoading(true);
},
onSuccess({ data }) {
setIsEditModalOpen(true);
setCreateProjId(data.data);
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('扣款成功');
});
},
onFinally() {
setLoading(false);
}
})
}}
onCancel={() => {
setIsCreateModalOpen(false);
}}>
<div> {chargePrice / 100} </div>
</Modal>
<Modal title="提示"
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
if(pathParams.projChargeType == ProjChargeType.ALL) {
nav(`/proj-eall/${createProjId}`);
} else if(pathParams.projChargeType == ProjChargeType.FREE) {
nav(`/proj-efree/${createProjId}`);
} else {
nav(`/proj-edit/${createProjId}`);
}
}}
onCancel={() => {
setIsEditModalOpen(false);
}}>
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
if (pathParams.projChargeType == ProjChargeType.ALL) {
nav(`/proj-eall/${createProjId}`);
} else if (pathParams.projChargeType == ProjChargeType.FREE) {
nav(`/proj-efree/${createProjId}`);
} else {
nav(`/proj-edit/${createProjId}`);
}
}}
onCancel={() => {
setIsEditModalOpen(false);
}}>
<div></div>
</Modal>
<Spin tip="正在提交..." spinning={loading} fullscreen/>
<Spin tip="正在提交..." spinning={loading} fullscreen />
</>
)
}

View File

@ -1,12 +1,12 @@
import './proj-edit-step.css';
import {Breadcrumb, Col, Flex, message, Modal, Row, Select, Spin} from "antd";
import {Link, useNavigate, useParams} from "react-router-dom";
import {useEffect, useState} from "react";
import {get, put} from "../../../util/AjaxUtils.ts";
import {Button, Form, Input} from 'antd';
import {AxiosResponse} from "axios";
import { Col, Flex, message, Modal, Row, Select, Spin } from "antd";
import { useNavigate, useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { get, put } from "../../../util/AjaxUtils.ts";
import { Button, Form, Input } from 'antd';
import { AxiosResponse } from "axios";
const {TextArea} = Input;
const { TextArea } = Input;
type FieldType = {
projName: string;
@ -23,13 +23,13 @@ export default function ProjEditStep1() {
const [form] = Form.useForm<FieldType>();
const [loading, setLoading] = useState<boolean>(false);
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
const height = window.innerHeight - 180;
const height = window.innerHeight - 150
useEffect(() => {
get({
messageApi,
url: `/api/proj/get/edit-step1/${pathParams.projId}`,
onSuccess({data}: AxiosResponse) {
onSuccess({ data }: AxiosResponse) {
form.setFieldsValue({
projName: data.projName,
projIntroduction: data.projIntroduction,
@ -42,158 +42,197 @@ export default function ProjEditStep1() {
}, [])
return (
<>
<div style={{ height: `${height}px`, overflow: 'auto' }}>
{contextHolder}
<Breadcrumb
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
{title: <a onClick={() => {nav(-1)}}></a>},
{title: '标题简介'},
]}
/>
<div className="form-container" style={{height: `${height}px`}}>
<div className="form-body">
<Form
name="basic"
form={form}
layout="vertical"
labelCol={{span: 8}}
wrapperCol={{span: 24}}
style={{width: '600px'}}
onFinish={() => {
setIsEditModalOpen(true);
}}
autoComplete="off"
>
<Row gutter={15}>
<Col span={24}>
<Form.Item<FieldType>
label="项目名称"
name="projName"
rules={[{required: true, message: '请输入项目名称'}]}
>
<Input/>
</Form.Item>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<Form.Item<FieldType>
label="项目简介"
name="projIntroduction"
rules={[{required: true, message: '请输入项目简介'}]}
>
<TextArea rows={3} placeholder="请用一段话简单描述系统"/>
</Form.Item>
</Col>
</Row>
<Row gutter={15}>
<Col span={12}>
<Form.Item<FieldType>
label="样式类型"
name="projStyleType"
rules={[{required: true, message: '请选择样式类型'}]}
>
<Select
placeholder="请选择样式类型"
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{value: 'DEFAULT', label: '默认(WEB)'},
]}
/>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item<FieldType>
label="代码类型"
name="projCodeType"
rules={[{required: true, message: '请选择代码类型'}]}
>
<Select
placeholder="请选择代码类型"
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{value: 'code1', label: '默认类型'},
]}
/>
</Form.Item>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<Form.Item<FieldType>
label="项目详细介绍"
name="projDesc"
extra="请对项目做出详细介绍,此内容在操作手册中引用"
rules={[{required: true, message: '请输入项目详细介绍'}]}
>
<TextArea rows={8} placeholder="请输入项目详细介绍"/>
</Form.Item>
/> */}
{/* <div className="form-container" style={{ height: `${height}px` }}> */}
<div style={{ marginTop: '26px', height: '842px', marginBottom: '40px' }}>
<div className="form-container" >
</Col>
</Row>
<div className='Step-title'>
<div className='Step-titlel'></div>
<div className='Step-titler'></div>
</div>
<div className="form-body">
<Form
name="basic"
form={form}
layout="vertical"
labelCol={{ span: 8 }}
wrapperCol={{ span: 24 }}
// style={{ width: '600px' }}
onFinish={() => {
setIsEditModalOpen(true);
}}
autoComplete="off"
>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="项目名称"
name="projName"
rules={[{ required: true, message: '请输入项目名称' }]}
>
<Input
style={{ height: '50px', width: '411px', fontSize: '16px' }}
/>
</Form.Item>
</div>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="项目简介"
name="projIntroduction"
rules={[{ required: true, message: '请输入项目简介' }]}
>
<TextArea
style={{ resize: 'none', width: "411px", height: '105px', fontSize: '14px' }}
rows={3} placeholder="请用一段话简单描述系统"
/>
</Form.Item>
</div>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="样式类型"
name="projStyleType"
rules={[{ required: true, message: '请选择样式类型' }]}
>
<Select
style={{ height: '50px', width: '411px', fontSize: '16px' }}
placeholder="请选择样式类型"
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{ value: 'DEFAULT', label: '默认(WEB)' },
]}
/>
</Form.Item>
</div>
</Col>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="代码类型"
name="projCodeType"
rules={[{ required: true, message: '请选择代码类型' }]}
>
<Select
style={{ height: '50px', width: '411px', fontSize: '16px' }}
placeholder="请选择代码类型"
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{ value: 'code1', label: '默认类型' },
]}
/>
</Form.Item>
</div>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="项目详细介绍"
name="projDesc"
extra="请对项目做出详细介绍,此内容在操作手册中引用"
rules={[{ required: true, message: '请输入项目详细介绍' }]}
>
<TextArea
style={{ resize: 'none', width: "411px", height: '125px', fontSize: '14px' }}
rows={8} placeholder="请输入项目详细介绍" />
</Form.Item>
</div>
<Form.Item wrapperCol={{span: 24}}>
<Flex align="center" justify="center" gap="large">
<Button type="primary"
htmlType="submit"
style={{backgroundColor: 'var(--color-primary)'}}
>
</Button>
<Button type="default" htmlType="button" onClick={() => {
nav(-1);
}}>
</Button>
</Flex>
</Form.Item>
</Form>
</Col>
</Row>
<div className='setProBtn'>
<Form.Item wrapperCol={{ span: 24 }}>
<Flex align="center" justify="center" gap="large">
<Button type="default" htmlType="button"
style={{ width: '262px', height: '58px', fontSize: '16px', color: '#4B4B4B', background: '#EEEEEE' }}
onClick={() => {
nav(-1);
}}>
</Button>
<Button type="primary"
htmlType="submit"
style={{ width: '262px', height: '58px', fontSize: '16px', color: '#FDFDF2', backgroundColor: 'var(--color-primary)' }}
>
</Button>
</Flex>
</Form.Item>
</div>
</Form>
</div>
</div>
</div>
<Modal title="提示"
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
setIsEditModalOpen(false);
put({
messageApi,
url: `/api/proj/update/edit-step1/${pathParams.projId}`,
body: {
projName: form.getFieldValue('projName'),
projIntroduction: form.getFieldValue('projIntroduction'),
projStyleType: form.getFieldValue('projStyleType'),
projCodeType: form.getFieldValue('projCodeType'),
projDesc: form.getFieldValue('projDesc'),
},
onBefore() {
setLoading(true);
},
onSuccess() {
messageApi.open({
type: 'success',
content: '编辑成功'
})
},
onFinally() {
setLoading(false);
}
})
}}
onCancel={() => {
setIsEditModalOpen(false);
}}>
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
setIsEditModalOpen(false);
put({
messageApi,
url: `/api/proj/update/edit-step1/${pathParams.projId}`,
body: {
projName: form.getFieldValue('projName'),
projIntroduction: form.getFieldValue('projIntroduction'),
projStyleType: form.getFieldValue('projStyleType'),
projCodeType: form.getFieldValue('projCodeType'),
projDesc: form.getFieldValue('projDesc'),
},
onBefore() {
setLoading(true);
},
onSuccess() {
messageApi.open({
type: 'success',
content: '编辑成功'
})
},
onFinally() {
setLoading(false);
}
})
}}
onCancel={() => {
setIsEditModalOpen(false);
}}>
<div></div>
</Modal>
<Spin tip="正在提交..." spinning={loading} fullscreen/>
</>
<Spin tip="正在提交..." spinning={loading} fullscreen />
</div>
)
}

View File

@ -1,12 +1,12 @@
import './proj-edit-step.css';
import {Breadcrumb, Col, message, Row, Select} from "antd";
import {Link, useNavigate, useParams} from "react-router-dom";
import {useEffect} from "react";
import {get} from "../../../util/AjaxUtils.ts";
import {Form, Input} from 'antd';
import {AxiosResponse} from "axios";
import { Col, message, Row, Select } from "antd";
import { useParams } from "react-router-dom";
import { useEffect } from "react";
import { get } from "../../../util/AjaxUtils.ts";
import { Form, Input } from 'antd';
import { AxiosResponse } from "axios";
const {TextArea} = Input;
const { TextArea } = Input;
type FieldType = {
projName: string;
@ -17,7 +17,7 @@ type FieldType = {
};
export default function ProjEditStep1Show() {
const nav = useNavigate();
// const nav = useNavigate();
const pathParams = useParams();
const [messageApi, contextHolder] = message.useMessage();
const [form] = Form.useForm<FieldType>();
@ -27,7 +27,7 @@ export default function ProjEditStep1Show() {
get({
messageApi,
url: `/api/proj/get/edit-step1/${pathParams.projId}`,
onSuccess({data}: AxiosResponse) {
onSuccess({ data }: AxiosResponse) {
form.setFieldsValue({
projName: data.projName,
projIntroduction: data.projIntroduction,
@ -40,103 +40,146 @@ export default function ProjEditStep1Show() {
}, [])
return (
<>
<div style={{ height: `${height}px`, overflow: 'auto' }}>
{contextHolder}
<Breadcrumb
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
{title: <a onClick={() => {nav(-1)}}></a>},
{title: '标题简介'},
]}
/>
<div className="form-container" style={{height: `${height}px`}}>
<div className="form-body">
<Form
name="basic"
form={form}
layout="vertical"
labelCol={{span: 8}}
disabled={true}
wrapperCol={{span: 24}}
style={{width: '600px'}}
autoComplete="off"
>
<Row gutter={15}>
<Col span={24}>
<Form.Item<FieldType>
label="项目名称"
name="projName"
rules={[{required: true, message: '请输入项目名称'}]}
>
<Input/>
</Form.Item>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<Form.Item<FieldType>
label="项目简介"
name="projIntroduction"
rules={[{required: true, message: '请输入项目简介'}]}
>
<TextArea rows={3} placeholder="请用一段话简单描述系统"/>
</Form.Item>
</Col>
</Row>
<Row gutter={15}>
<Col span={12}>
<Form.Item<FieldType>
label="样式类型"
name="projStyleType"
rules={[{required: true, message: '请选择样式类型'}]}
>
<Select
placeholder="请选择样式类型"
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{value: 'DEFAULT', label: '默认(WEB)'},
]}
/>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item<FieldType>
label="代码类型"
name="projCodeType"
rules={[{required: true, message: '请选择代码类型'}]}
>
<Select
placeholder="请选择代码类型"
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{value: 'code1', label: '默认类型'},
]}
/>
</Form.Item>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<Form.Item<FieldType>
label="项目详细介绍"
name="projDesc"
extra="请对项目做出详细介绍,此内容在操作手册中引用"
rules={[{required: true, message: '请输入项目详细介绍'}]}
>
<TextArea rows={8} placeholder="请输入项目详细介绍"/>
</Form.Item>
/> */}
<div style={{ marginTop: '26px', marginBottom: '40px' }}>
</Col>
</Row>
</Form>
<div className="form-container">
<div className='Step-title'>
<div className='Step-titlel'></div>
<div className='Step-titler'></div>
</div>
<div className="form-body">
<Form
name="basic"
form={form}
layout="vertical"
labelCol={{ span: 8 }}
disabled={true}
wrapperCol={{ span: 24 }}
style={{ width: '600px' }}
autoComplete="off"
>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="项目名称"
name="projName"
rules={[{ required: true, message: '请输入项目名称' }]}
>
<Input
style={{ height: '50px', width: '411px', fontSize: '16px' }}
/>
</Form.Item>
</div>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="项目简介"
name="projIntroduction"
rules={[{ required: true, message: '请输入项目简介' }]}
>
<TextArea
style={{ resize: 'none', width: "411px", minHeight: '105px', fontSize: '14px' }}
rows={3} placeholder="请用一段话简单描述系统" />
</Form.Item>
</div>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="样式类型"
name="projStyleType"
rules={[{ required: true, message: '请选择样式类型' }]}
>
<Select
placeholder="请选择样式类型"
style={{ height: '50px', width: '411px', fontSize: '16px' }}
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{ value: 'DEFAULT', label: '默认(WEB)' },
]}
/>
</Form.Item>
</div>
</Col>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="代码类型"
name="projCodeType"
rules={[{ required: true, message: '请选择代码类型' }]}
>
<Select
placeholder="请选择代码类型"
style={{ height: '50px', width: '411px', fontSize: '16px' }}
onChange={(value: string) => {
console.log(`selected ${value}`);
}}
options={[
{ value: 'code1', label: '默认类型' },
]}
/>
</Form.Item>
</div>
</Col>
</Row>
<Row gutter={15}>
<Col span={24}>
<div className='projNameInt'>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="项目详细介绍"
name="projDesc"
extra="请对项目做出详细介绍,此内容在操作手册中引用"
rules={[{ required: true, message: '请输入项目详细介绍' }]}
>
<TextArea
style={{ resize: 'none', width: "411px", minHeight: '125px',fontSize: '14px' }}
rows={8} placeholder="请输入项目详细介绍" />
</Form.Item>
</div>
</Col>
</Row>
</Form>
</div>
</div>
</div>
</>
</div>
)
}

View File

@ -1,13 +1,17 @@
import './proj-edit-step.css';
import {Breadcrumb, Col, DatePicker, Flex, message, Modal, Row, Spin} from "antd";
import { Breadcrumb, Col, DatePicker, Flex, message, Modal, Row, Spin, Select, Table, Space } from "antd";
import { FolderAddOutlined } from '@ant-design/icons';
import locale from 'antd/es/date-picker/locale/zh_CN';
import {Link, useNavigate, useParams} from "react-router-dom";
import {useEffect, useState} from "react";
import {get, put} from "../../../util/AjaxUtils.ts";
import {Button, Form, Input} from 'antd';
import {AxiosResponse} from "axios";
import dayjs, {Dayjs} from 'dayjs';
import { Link, useNavigate, useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { get, put } from "../../../util/AjaxUtils.ts";
import { Button, Form, Input } from 'antd';
import { AxiosResponse } from "axios";
import dayjs, { Dayjs } from 'dayjs';
import type { SearchProps } from 'antd/es/input/Search';
import type { TableColumnsType } from 'antd';
const { Search } = Input;
const { Column } = Table;
type FieldType = {
projSubName: string;
projVersion: string;
@ -15,6 +19,12 @@ type FieldType = {
companyName: string;
companyNameEn: string;
};
interface DataType {
key: React.Key;
name: string;
age: number;
address: string;
}
export default function ProjEditStep2() {
const nav = useNavigate();
@ -26,11 +36,64 @@ export default function ProjEditStep2() {
const height = window.innerHeight - 180;
const dateFormat = 'YYYY年MM月DD日';
// 表格第几行数据
const [clom,setClom] = useState('')
// 著作人搜索
const belongPeopleSearch: SearchProps['onSearch'] = (value, _e, info) => (
console.log(info?.source, value),
alert(value)
);
// 申请人信息搜索 applicantPeopleSearch
const applicantPeopleSearch: SearchProps['onSearch'] = (value, _e, info) => (
console.log(info?.source, value),
alert(value)
);
// 表格相关
// rowSelection object indicates the need for row selection
const rowSelection = {
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setClom(String(selectedRowKeys))
},
};
// 表格数据
const data: DataType[] = [
{
key: '1',
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park',
},
{
key: '2',
name: 'Jim Green',
age: 42,
address: 'London No. 1 Lake Park',
},
{
key: '3',
name: 'Joe Black',
age: 32,
address: 'Sydney No. 1 Lake Park',
},
{
key: '4',
name: 'Disabled User',
age: 99,
address: 'Sydney No. 1 Lake Park',
},
];
useEffect(() => {
get({
messageApi,
url: `/api/proj/get/edit-step2/${pathParams.projId}`,
onSuccess({data}: AxiosResponse) {
onSuccess({ data }: AxiosResponse) {
form.setFieldsValue({
projSubName: data.projSubName,
projVersion: data.projVersion,
@ -44,143 +107,319 @@ export default function ProjEditStep2() {
return (
<>
{contextHolder}
<Breadcrumb
<div style={{ height: `${height}px`, overflow: 'auto' }}>
{contextHolder}
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
{title: <a onClick={() => {nav(-1)}}></a>},
{title: '基本信息'},
]}
/>
<div className="form-container" style={{height: `${height}px`}}>
<div className="form-body">
<Form
name="basic"
form={form}
layout="vertical"
labelCol={{span: 8}}
wrapperCol={{span: 24}}
style={{width: '800px'}}
onFinish={() => {
setIsEditModalOpen(true);
}}
autoComplete="off"
>
<Row gutter={15}>
<Col span={24}>
<Form.Item<FieldType>
label="项目简称"
name="projSubName"
rules={[{required: false, message: '请输入项目简称'}]}
>
<Input placeholder="请输入项目简称"/>
</Form.Item>
</Col>
/> */}
<div style={{ marginTop: '26px', height: '1500px', marginBottom: '40px', background: 'var(--color-light)' }}>
<div className="form-container" >
<div className='Step-title'>
<div className='Step-titlel'></div>
<div className='Step-titler'></div>
</div>
<div className="form-body">
<Form
name="basic"
form={form}
layout="vertical"
labelCol={{ span: 8 }}
wrapperCol={{ span: 24 }}
style={{}}
onFinish={() => {
setIsEditModalOpen(true);
}}
autoComplete="off"
</Row>
<Row gutter={15}>
<Col span={12}>
<Form.Item<FieldType>
label="项目版本"
name="projVersion"
rules={[{required: true, message: '请输入项目版本'}]}
>
<Input placeholder="请输入项目版本"/>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item<FieldType>
label="开发完成时间"
name="projDevCompleteDate"
rules={[{required: true, message: '请输入开发完成时间'}]}
>
<DatePicker placeholder="请选择开发完成日期"
>
<Row gutter={15}>
<div className='projNameInt'>
<div style={{ display: 'flex' }}>
<div className='projTitle '> :</div>
<Form.Item<FieldType>
// label="项目简称"
name="projSubName"
rules={[{ required: false, message: '请输入项目简称' }]}
>
<Input
style={{ height: '50px', width: '411px', fontSize: '16px' }}
placeholder="请输入项目简称" />
</Form.Item>
</div>
<div style={{ display: 'flex' }}>
<div className='projTitle ' style={{ marginLeft: '112px' }}><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="开发完成时间"
name="projDevCompleteDate"
rules={[{ required: true, message: '请输入开发完成时间' }]}
>
<DatePicker placeholder="请选择开发完成日期"
format={dateFormat}
locale={locale}
// style={{ width: '100%' }}
style={{ height: '50px', width: '411px', fontSize: '16px' }}
/>
</Form.Item>
</div>
</div>
</Row>
<Row gutter={15}>
<div style={{ display: 'flex' }}>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="项目版本"
name="projVersion"
rules={[{ required: true, message: '请输入项目版本' }]}
>
<Input
style={{ height: '50px', width: '411px', fontSize: '16px' }}
placeholder="请输入项目版本" />
</Form.Item>
</div>
{/* <Col span={12}>
<Form.Item<FieldType>
label="开发完成时间"
name="projDevCompleteDate"
rules={[{ required: true, message: '请输入开发完成时间' }]}
>
<DatePicker placeholder="请选择开发完成日期"
format={dateFormat}
locale={locale}
style={{width: '100%'}}
/>
</Form.Item>
</Col>
</Row>
style={{ width: '100%' }}
/>
</Form.Item>
</Col> */}
<div style={{ display: 'flex' }}>
<div className='projTitle ' style={{ marginLeft: '112px' }}><span className='redicon'>*</span> :</div>
<Row gutter={15}>
<Col span={12}>
<Form.Item<FieldType>
label="公司名称"
name="companyName"
extra="公司名称在操作手册中引用"
rules={[{required: true, message: '请输入公司名称'}]}
>
<Input placeholder="请输入公司名称"/>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item<FieldType>
label="公司英文名称"
name="companyNameEn"
extra="公司英文名称在操作手册中引用"
rules={[{required: true, message: '请输入公司英文名称'}]}
>
<Input placeholder="请输入公司英文名称"/>
</Form.Item>
</Col>
</Row>
<Form.Item<FieldType>
// label="公司名称"
name="companyName"
// extra="公司名称在操作手册中引用"
rules={[{ required: true, message: '请输入公司名称' }]}
>
<Input
<Form.Item wrapperCol={{span: 24}}>
<Flex align="center" justify="center" gap="large">
<Button type="primary"
htmlType="submit"
style={{backgroundColor: 'var(--color-primary)'}}>
</Button>
<Button type="default" htmlType="button" onClick={() => {
nav(-1);
}}>
</Button>
</Flex>
</Form.Item>
</Form>
style={{ height: '50px', width: '411px', fontSize: '16px' }}
placeholder="请输入公司名称" />
</Form.Item>
</div>
</Row>
<Row gutter={15}>
{/* <Col span={12}>
<Form.Item<FieldType>
label="公司名称"
name="companyName"
extra="公司名称在操作手册中引用"
rules={[{ required: true, message: '请输入公司名称' }]}
>
<Input placeholder="请输入公司名称" />
</Form.Item>
</Col> */}
<div style={{ display: 'flex' }}>
<div className='projTitle '><span className='redicon'>*</span> :</div>
<Form.Item<FieldType>
// label="公司英文名称"
name="companyNameEn"
// extra="公司英文名称在操作手册中引用"
rules={[{ required: true, message: '请输入公司英文名称' }]}
>
<Input
style={{ height: '50px', width: '411px', fontSize: '16px' }}
placeholder="请输入公司英文名称" />
</Form.Item>
</div>
</Row>
<div className='Step-title' style={{ marginTop: '86px' }}>
<div className='Step-titlel'></div>
<div className='Step-titler'></div>
</div>
<div style={{ padding: '22px 15px' }}>
<div style={{ padding: '14px 19px', background: '#F3F3F3', color: '#A3A3A3', fontSize: '14px' }}>
<span style={{ color: '#FDB33E' }}></span>
</div>
<div className='belongPeople-center'>
<Button onClick={() => {
alert(' 创建所属者')
}} type="primary" icon={<FolderAddOutlined style={{ fontSize: '18px' }} />} style={{ width: "160px", height: '43px', fontSize: '14px' }}>
</Button>
<div className='belongPeople-search'>
<Search placeholder="请输入持有者名称搜索对应信息模板" onSearch={belongPeopleSearch} style={{ width: '353px', height: '43px' }} />
</div>
<div className='belongPeople-select'>
<Select
style={{ height: '43px', width: '183px', fontSize: '16px' }}
onChange={(value: string) => {
console.log(`selected ${value}`);
alert(`selected ${value}`)
}}
options={[
{ value: 'code1', label: '全部类型' },
{ value: 'code2', label: '呵呵' },
{ value: 'code3', label: '哈哈' },
]}
defaultValue="code1"
/>
</div>
<div className='belongPeople-select'>
<Select
style={{ height: '43px', width: '183px', fontSize: '16px' }}
onChange={(value: string) => {
console.log(`selected ${value}`);
alert(`selected ${value}`)
}}
options={[
{ value: 'code1', label: '全部状态' },
{ value: 'code2', label: '嘿嘿' },
{ value: 'code3', label: '嘻嘻' },
]}
defaultValue="code1"
/>
</div>
</div>
<div className='belongPeople-bot'>
{/* 表格 */}
<Table
rowSelection={{
type: 'radio',
...rowSelection,
}}
// columns={columns}
dataSource={data}
>
<Column title="所属者名称" dataIndex="name" key="key" />
<Column title="所属类型" dataIndex="name" key="key" />
<Column title="所属证件类型" dataIndex="address" key="key" />
<Column title="所属者身份证号" dataIndex="address" key="key" />
<Column title="实名认证状态" dataIndex="address" key="key" />
<Column
title="Action"
key="action"
render={() => (
<Space size="middle">
<a onClick={() => { alert(`编辑第${clom}行数据`)}}> </a>
<span style={ {color:'red'}}>|</span>
<a onClick={() => { alert(`查看第${clom}行数据`)}}></a>
</Space>
)}
/>
</Table>
</div>
</div>
<div className='Step-title' style={{ marginTop: '86px' }}>
<div className='Step-titlel'></div>
<div className='Step-titler'></div>
</div>
<div style={{ padding: '22px 15px' }}>
<div style={{ padding: '14px 19px', background: '#F3F3F3', color: '#A3A3A3', fontSize: '14px' }}>
线
</div>
<div className='belongPeople-center'>
<Button onClick={() => {
alert(' 创建联系人')
}} type="primary" icon={<FolderAddOutlined style={{ fontSize: '18px' }} />} style={{ width: "160px", height: '43px', fontSize: '14px' }}>
</Button>
<div className='belongPeople-search'>
<Search placeholder="请输入持有者名称搜索对应信息" onSearch={applicantPeopleSearch} style={{ width: '353px', height: '43px' }} />
</div>
</div>
<div className='belongPeople-bot'>
{/* 表格 */}
</div>
</div>
<div style={{ marginTop: '107px' }}>
<Form.Item wrapperCol={{ span: 24 }}>
<Flex align="center" justify="center" gap="large">
<Button type="primary"
htmlType="submit"
style={{ backgroundColor: 'var(--color-primary)' }}>
</Button>
<Button type="default" htmlType="button" onClick={() => {
nav(-1);
}}>
</Button>
</Flex>
</Form.Item>
</div>
</Form>
</div>
</div>
</div>
<Modal title="提示"
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
setIsEditModalOpen(false);
put({
messageApi,
url: `/api/proj/update/edit-step2/${pathParams.projId}`,
body: {
projSubName: form.getFieldValue('projSubName'),
projVersion: form.getFieldValue('projVersion'),
projDevCompleteDate: dayjs(form.getFieldValue('projDevCompleteDate')).format(dateFormat),
companyName: form.getFieldValue('companyName'),
companyNameEn: form.getFieldValue('companyNameEn'),
},
onBefore() {
setLoading(true);
},
onSuccess() {
messageApi.open({
type: 'success',
content: '编辑成功'
})
},
onFinally() {
setLoading(false);
}
})
}}
onCancel={() => {
setIsEditModalOpen(false);
}}>
<div></div>
</Modal>
<Spin tip="正在提交..." spinning={loading} fullscreen />
</div>
<Modal title="提示"
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
setIsEditModalOpen(false);
put({
messageApi,
url: `/api/proj/update/edit-step2/${pathParams.projId}`,
body: {
projSubName: form.getFieldValue('projSubName'),
projVersion: form.getFieldValue('projVersion'),
projDevCompleteDate: dayjs(form.getFieldValue('projDevCompleteDate')).format(dateFormat),
companyName: form.getFieldValue('companyName'),
companyNameEn: form.getFieldValue('companyNameEn'),
},
onBefore() {
setLoading(true);
},
onSuccess() {
messageApi.open({
type: 'success',
content: '编辑成功'
})
},
onFinally() {
setLoading(false);
}
})
}}
onCancel={() => {
setIsEditModalOpen(false);
}}>
<div></div>
</Modal>
<Spin tip="正在提交..." spinning={loading} fullscreen/>
</>
)

View File

@ -43,14 +43,14 @@ export default function ProjEditStep2Show() {
return (
<>
{contextHolder}
<Breadcrumb
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
{title: <a onClick={() => {nav(-1)}}></a>},
{title: '基本信息'},
]}
/>
/> */}
<div className="form-container" style={{height: `${height}px`}}>
<div className="form-body">
<Form

View File

@ -1,12 +1,95 @@
.Step-title {
display: flex;
/* background-color: pink; */
align-items: center;
}
.Step-titlel {
width: 8px;
height: 17px;
background: #FF8400;
border-radius: 4px;
}
.Step-titler {
font-family: Microsoft YaHei UI;
font-weight: 700;
font-size: 16px;
color: #555555;
margin-left: 12px;
}
.form-container {
background-color: var(--color-light);
padding: 30px 15px;
overflow: auto;
padding-top: 30px;
padding-left: 30px;
box-sizing: border-box;
/* overflow: auto; */
height: 842px;
}
.form-container .form-body {
min-height: 100%;
/* display: flex; */
/* justify-content: center; */
/* align-items: center; */
margin-top: 27px;
/* background-color: aqua; */
}
.projNameInt {
display: flex;
justify-content: center;
}
.projTitle {
width: 120px;
height: 50px;
display: flex;
justify-content: flex-end;
align-items: center;
/* background-color: pink; */
font-family: PingFang SC;
font-weight: 600;
font-size: 16px;
color: #707070;
margin-right: 40px;
}
.redicon {
font-family: PingFang SC;
font-weight: 400;
font-size: 16px;
color: #CC0000;
margin-right: 8px;
}
.setProBtn {
margin-top: 30px;
/* background-color: pink; */
/* width: 100%; */
}
.belongPeople-center{
display: flex;
margin-top: 11px;
}
.belongPeople-search {
margin-left: 14px;
}
.belongPeople-select{
margin-left: 27px;
}
.belongPeople-search .css-dev-only-do-not-override-1ae8k9u.ant-input-group >.ant-input{
height: 43px;
}
.belongPeople-search .css-dev-only-do-not-override-1ae8k9u.ant-input-search >.ant-input-group >.ant-input-group-addon:last-child .ant-input-search-button{
height: 43px;
width: 43px;
}
.belongPeople-bot {
margin-top: 13px;
}
.belongPeople-bot .css-dev-only-do-not-override-1ae8k9u.ant-table-wrapper .ant-table-thead >tr>th, .css-dev-only-do-not-override-1ae8k9u.ant-table-wrapper .ant-table-thead >tr>td{
background-color: #E6E6E6;
/* text-align: center; */
height: 41px;
}

View File

@ -1,3 +1,9 @@
.projNew {
height: calc(100vh - 220px);
margin-top: 26px;
overflow: auto;
}
.proj-new {
min-height: 100%;
background-color: var(--color-light);
@ -12,10 +18,42 @@
font-size: 30px;
}
.proj-new .proj-form {
}
.proj-new .proj-form {}
.proj-new .proj-form .btn-group {
display: flex;
justify-content: center;
}
.formItemOne {
/* background-color: red; */
display: flex;
/* align-items: center; */
line-height: 50px;
height: 50px;
}
.formItem-title {
font-family: Microsoft YaHei UI;
font-weight: bold;
font-size: 18px;
color: #474747;
/* color: #eeeeee; */
width: 83px;
margin-right: 33px;
}
.oneTitle {
}
.formItemTwo {
margin-top: 31px;
display: flex;
/* align-items: center; */
line-height: 50px;
/* background-color: red; */
/* width: 410px */
}