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

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) => {
if (item.aiFieldStatus != 'SUCCESS') {
messageApi.error('模块未处理完毕不能删除');
return;
}
// if (item.aiFieldStatus != 'SUCCESS') {
// messageApi.error('模块未处理完毕不能删除');
// return;
// }
del<any>({
messageApi,
url: `/api/proj-mod/remove/proj-id/${props.projId}/${projModId}`,

View File

@ -147,33 +147,70 @@ export default function AiHelperMod(props: PropsType) {
return <LoadingOutlined />
}
if (record.aiFieldStatus == 'FAILED') {
return <Button onClick={() => {
props.handleResaveField(index, record.projModId);
}}><RedoOutlined /></Button>
return (
<div style={{
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 (
<div
style={{ whiteSpace: 'nowrap' }}
>
<span
style={{
whiteSpace: 'nowrap' , display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<div
style={{
cursor: 'pointer'
cursor: 'pointer',
width:40,
}}
onClick={() => {
setId(record.projModId)
setEditModal(true)
}}
></span>
<span
></div>
<div
style={{
cursor: 'pointer',
marginLeft: 19,
color: '#FF4040'
color: '#FF4040',
width:40,
}}
onClick={() => {
props.handleRemove(index, record.projModId, record);
}}
></span>
></div>
</div>
// <Dropdown menu={{
@ -383,16 +420,17 @@ 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, color: '#99A5B7' }}>
<div>
@ -402,10 +440,10 @@ export default function AiHelperMod(props: PropsType) {
props.handleGenerate()
}}
></span>
</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>

View File

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