Browse Source

fixed 9388 检查项设定-删除分组信息后分组显示优化

master
liujiangyong 2 years ago
parent
commit
5b6cdde9e9
  1. 6
      web/client/src/sections/patrolManage/components/checkItemsModal.js

6
web/client/src/sections/patrolManage/components/checkItemsModal.js

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

Loading…
Cancel
Save