生成模块提示
This commit is contained in:
parent
4e31ab1f55
commit
1c18be4d47
@ -4,7 +4,7 @@ import { GlobalContext } from "../../context/GlobalContext.ts";
|
||||
import { del, get, post, put, websocketUrl, Axios } from "../../util/AjaxUtils.ts";
|
||||
import {
|
||||
// Col, Divider, Row,
|
||||
Spin, Image, Pagination,Modal
|
||||
Spin, Image, Pagination
|
||||
} from "antd";
|
||||
import { AxiosResponse } from "axios";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
@ -74,7 +74,7 @@ export default function AiHelper(props: PropsType) {
|
||||
|
||||
const height = window.innerHeight - 265;
|
||||
// 提示是否可以生成模块
|
||||
const [modal, setModal] = useState(false)
|
||||
// const [modal, setModal] = useState(false)
|
||||
// const pathParams = useParams();
|
||||
// const [openModal ,setOpenModal] = useState(false) //是提示替换弹框
|
||||
// const height = window.innerHeight - 280;
|
||||
@ -231,21 +231,21 @@ export default function AiHelper(props: PropsType) {
|
||||
}
|
||||
})
|
||||
}
|
||||
const getProjDesc = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: `/api/proj/get/${props.projId}`,
|
||||
onSuccess({ data }) {
|
||||
console.log(data.projDesc);
|
||||
if(data.projDesc) {
|
||||
generateProjModArray();
|
||||
}else{
|
||||
setModal(true)
|
||||
}
|
||||
// const getProjDesc = () => {
|
||||
// get<any>({
|
||||
// messageApi: messageApi,
|
||||
// url: `/api/proj/get/${props.projId}`,
|
||||
// onSuccess({ data }) {
|
||||
// console.log(data.projDesc);
|
||||
// if(data.projDesc) {
|
||||
// generateProjModArray();
|
||||
// }else{
|
||||
// // setModal(true)
|
||||
// }
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
const generateProjIntroduction = () => {
|
||||
|
||||
ws.current?.send(JSON.stringify({
|
||||
@ -548,8 +548,8 @@ export default function AiHelper(props: PropsType) {
|
||||
<AiHelperMod mods={projModArray}
|
||||
newMods={newProjModArray}
|
||||
handleGenerate={() => {
|
||||
getProjDesc()
|
||||
// generateProjModArray();
|
||||
// getProjDesc()
|
||||
generateProjModArray();
|
||||
}}
|
||||
handleSave={(index, mod) => {
|
||||
if (projModArray.length > MAX_MOD_SIZE) {
|
||||
@ -764,7 +764,7 @@ export default function AiHelper(props: PropsType) {
|
||||
项目详情
|
||||
</div> */}
|
||||
|
||||
<Modal
|
||||
{/* <Modal
|
||||
title={'提示'}
|
||||
destroyOnClose={true}
|
||||
open={modal}
|
||||
@ -788,7 +788,7 @@ export default function AiHelper(props: PropsType) {
|
||||
<div style={{ }}>
|
||||
为了合理生成功能列表,请在项目详情生成完成后再生成功能列表
|
||||
</div>
|
||||
</Modal>
|
||||
</Modal> */}
|
||||
</div>
|
||||
|
||||
)
|
||||
|
@ -91,7 +91,8 @@ export default function AiHelperMod(props: PropsType) {
|
||||
return index + 1
|
||||
}
|
||||
},
|
||||
{ title: '模块名称', dataIndex: 'modName', key: 'name', width: 200, align: 'center',
|
||||
{
|
||||
title: '模块名称', dataIndex: 'modName', key: 'name', width: 200, align: 'center',
|
||||
render: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@ -380,15 +381,20 @@ export default function AiHelperMod(props: PropsType) {
|
||||
:
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
fontSize: '14px',
|
||||
|
||||
}}
|
||||
>
|
||||
<div style={{ width: 300, height: 300, marginTop: 10, position: 'relative' }}>
|
||||
<div style={{ width: 300, height: 300, marginTop: 10, position: 'relative' ,
|
||||
// backgroundColor:'pink'
|
||||
}}>
|
||||
<img src={noTextImg} alt="" width={'100%'} />
|
||||
<div style={{ position: 'absolute', left: 90, bottom: 100 }}>
|
||||
暂无内容点击
|
||||
<div style={{ position: 'absolute', left: 90, bottom: 100, color: '#99A5B7' }}>
|
||||
<div>
|
||||
暂无内容,点击
|
||||
<span style={{ color: '#FF9D00', cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
props.handleGenerate()
|
||||
@ -396,6 +402,11 @@ export default function AiHelperMod(props: PropsType) {
|
||||
>自动生成</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{color:'red',position: 'absolute', bottom: 70,textAlign:'center',width:600 , left: -140}}>为了合理生成功能列表,建议在项目详情生成完成后再生成功能列表</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user