Browse Source

fix 8530 编辑检查项创建分组显示多余信息

master
liujiangyong 2 years ago
parent
commit
89d743c395
  1. 7
      web/client/src/sections/patrolManage/components/checkItemsModal.js

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

@ -49,7 +49,7 @@ const CheckItemsModal = ({ visible, onOk, onCancel, curRecord, dispatch }) => {
name="form_in_modal"
initialValues={{
...curRecord,
group: curRecord?.check_items_group?.id
group: curRecord?.checkItemsGroup?.id
}}
>
<Form.Item
@ -76,6 +76,11 @@ const CheckItemsModal = ({ visible, onOk, onCancel, curRecord, dispatch }) => {
</Form.Item>
</Form>
<Button type='link' onClick={() => {
if (!isNewGroup) {
form.setFieldsValue({ group: null })
} else {
form.setFieldsValue({ group: curRecord?.checkItemsGroup?.id })
}
setIsNewGroup(!isNewGroup);
}}>{isNewGroup ? '选择已有' : '创建分组'}</Button>
</Modal >

Loading…
Cancel
Save