|
@ -23,10 +23,10 @@ const CheckItemsModal = ({ visible, onOk, onCancel, curRecord, dispatch }) => { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function delGroup(id) { |
|
|
function delGroup(id, lastGroup) { |
|
|
dispatch(delCheckItemsGroup(id)).then(res => { |
|
|
dispatch(delCheckItemsGroup(id)).then(res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
form.setFieldValue('group', null) |
|
|
form.setFieldValue('group', lastGroup === id ? null : lastGroup) |
|
|
getGroup(); |
|
|
getGroup(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -92,7 +92,7 @@ const CheckItemsModal = ({ visible, onOk, onCancel, curRecord, dispatch }) => { |
|
|
return <Option key={g.value} value={g.value} label={g.label}> |
|
|
return <Option key={g.value} value={g.value} label={g.label}> |
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}> |
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}> |
|
|
{g.label} |
|
|
{g.label} |
|
|
<DeleteOutlined onClick={() => { delGroup(g.value) }} /> |
|
|
<DeleteOutlined onClick={() => { delGroup(g.value, form.getFieldValue('group')) }} /> |
|
|
</div> |
|
|
</div> |
|
|
</Option> |
|
|
</Option> |
|
|
}) |
|
|
}) |
|
|