| | |
| | | let _formlist = [] |
| | | let rowIndex = 0 |
| | | let colIndex = 0 |
| | | let filtration = {} |
| | | |
| | | // 表单分行,避免排列不整齐 |
| | | formlist.forEach(item => { |
| | | if ((!item.field && item.type !== 'title') || item.hidden === 'true' || item.type === 'funcvar') return |
| | | if (item.supField) { // 多层表单控制 |
| | | let _supVal = this.props.form.getFieldValue(item.supField) |
| | | |
| | | if (item.supField && !item.supvalue.includes(this.props.form.getFieldValue(item.supField))) return |
| | | if (_supVal === undefined && filtration[item.supField]) { |
| | | _supVal = filtration[item.supField] |
| | | } |
| | | |
| | | if (item.supvalue.includes(_supVal)) { |
| | | let _subVal = this.props.form.getFieldValue(item.field) |
| | | filtration[item.field] = _subVal === undefined ? item.initval : _subVal |
| | | } else { |
| | | return |
| | | } |
| | | } |
| | | |
| | | _formlist[rowIndex] = _formlist[rowIndex] || [] |
| | | if (item.type === 'textarea' || item.type === 'title') { |