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

Loading…
Cancel
Save