模块生成失败时添加删除操作

This commit is contained in:
lyp 2024-12-30 17:57:10 +08:00
parent 3800d46d1f
commit 81073fd6af
3 changed files with 62 additions and 22 deletions

View File

@ -618,10 +618,10 @@ export default function AiHelper(props: PropsType) {
} }
}} }}
handleRemove={(_index, projModId, item) => { handleRemove={(_index, projModId, item) => {
if (item.aiFieldStatus != 'SUCCESS') { // if (item.aiFieldStatus != 'SUCCESS') {
messageApi.error('模块未处理完毕不能删除'); // messageApi.error('模块未处理完毕不能删除');
return; // return;
} // }
del<any>({ del<any>({
messageApi, messageApi,
url: `/api/proj-mod/remove/proj-id/${props.projId}/${projModId}`, url: `/api/proj-mod/remove/proj-id/${props.projId}/${projModId}`,

View File

@ -147,33 +147,70 @@ export default function AiHelperMod(props: PropsType) {
return <LoadingOutlined /> return <LoadingOutlined />
} }
if (record.aiFieldStatus == 'FAILED') { if (record.aiFieldStatus == 'FAILED') {
return <Button onClick={() => { return (
props.handleResaveField(index, record.projModId); <div style={{
}}><RedoOutlined /></Button> display: 'flex',
alignItems: 'center',
justifyContent: 'center',
// 禁止换行
whiteSpace: 'nowrap',
}}>
<div
style={{
cursor: 'pointer',
// background: 'pink',
width:40,
}}
onClick={() => {
props.handleResaveField(index, record.projModId);
}}><RedoOutlined /></div>
<div
style={{
cursor: 'pointer',
marginLeft: 19,
color: '#FF4040',
width:40,
}}
onClick={() => {
props.handleRemove(index, record.projModId, record);
}}
></div>
</div>
)
} }
return ( return (
<div <div
style={{ whiteSpace: 'nowrap' }} style={{
> whiteSpace: 'nowrap' , display: 'flex',
<span alignItems: 'center',
justifyContent: 'center',
}}
>
<div
style={{ style={{
cursor: 'pointer' cursor: 'pointer',
width:40,
}} }}
onClick={() => { onClick={() => {
setId(record.projModId) setId(record.projModId)
setEditModal(true) setEditModal(true)
}} }}
></span> ></div>
<span <div
style={{ style={{
cursor: 'pointer', cursor: 'pointer',
marginLeft: 19, marginLeft: 19,
color: '#FF4040' color: '#FF4040',
width:40,
}} }}
onClick={() => { onClick={() => {
props.handleRemove(index, record.projModId, record); props.handleRemove(index, record.projModId, record);
}} }}
></span> ></div>
</div> </div>
// <Dropdown menu={{ // <Dropdown menu={{
@ -390,9 +427,10 @@ export default function AiHelperMod(props: PropsType) {
}} }}
> >
<div style={{ width: 300, height: 300, marginTop: 10, position: 'relative' , <div style={{
width: 300, height: 300, marginTop: 10, position: 'relative',
// backgroundColor:'pink' // backgroundColor:'pink'
}}> }}>
<img src={noTextImg} alt="" width={'100%'} /> <img src={noTextImg} alt="" width={'100%'} />
<div style={{ position: 'absolute', left: 90, bottom: 100, color: '#99A5B7' }}> <div style={{ position: 'absolute', left: 90, bottom: 100, color: '#99A5B7' }}>
<div> <div>
@ -405,7 +443,7 @@ export default function AiHelperMod(props: PropsType) {
</div> </div>
</div> </div>
<div style={{color:'red',position: 'absolute', bottom: 70,textAlign:'center',width:600 , left: -140}}></div> <div style={{ color: 'red', position: 'absolute', bottom: 70, textAlign: 'center', width: 600, left: -140 }}></div>
</div> </div>

View File

@ -836,6 +836,7 @@ export default function Correction() {
}, [newCorrection]) }, [newCorrection])
return ( return (
<div> <div>
{contextHolder} {contextHolder}
@ -924,7 +925,7 @@ export default function Correction() {
), ),
})); }));
return ( return (
<div className='projBox' key={item.projRefundApplyId}> <div className='projBox' key={item.projCorrectionApplyId}>
{/* <div className='numImg'> {/* <div className='numImg'>
<div style={{ marginTop: 15 }}>{(page - 1) * 20 + index + 1}</div> <div style={{ marginTop: 15 }}>{(page - 1) * 20 + index + 1}</div>
</div> */} </div> */}
@ -988,6 +989,7 @@ export default function Correction() {
</div> </div>
<div className='projStatus'> <div className='projStatus'>
{/* <div>{item.isSubmitAudit}</div> */}
<div className='projStatusTop'> <div className='projStatusTop'>
<img className='projStatusImg' src={item.applyStatus == 'PENDING' ? blue : item.applyStatus == 'CANCELED' ? black : item.applyStatus == 'APPROVED' ? green : item.applyStatus == 'REJECTED' ? red : ''} alt="" /> <img className='projStatusImg' src={item.applyStatus == 'PENDING' ? blue : item.applyStatus == 'CANCELED' ? black : item.applyStatus == 'APPROVED' ? green : item.applyStatus == 'REJECTED' ? red : ''} alt="" />