| | |
| | | * @description 表单编辑 |
| | | */ |
| | | handleForm = (_card) => { |
| | | const { group } = this.state |
| | | let card = fromJS(_card).toJS() |
| | | let linkableFields = [] |
| | | |
| | | group.fields.forEach(item => { |
| | | if (item.uuid === card.uuid) return |
| | | if (!['select', 'link', 'checkcard'].includes(item.type)) return |
| | | if (item.type === 'checkcard' && item.multiple === 'true') return |
| | | |
| | | linkableFields.push({ |
| | | value: item.field, |
| | | text: item.label |
| | | }) |
| | | }) |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | card: card, |
| | | formlist: getSearchForm(card, []) |
| | | formlist: getSearchForm(card, linkableFields) |
| | | }) |
| | | } |
| | | |