| | |
| | | } else if (item.key === 'icon') { |
| | | item.options = btnIcons |
| | | } else if (item.key === 'Ot') { |
| | | if (card.position === 'grid') { |
| | | if (card.position === 'grid' || card.pageTemplate === 'pay') { // 行级按钮、支付按钮,只能选单行 |
| | | item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value)) |
| | | } else if (['innerpage', 'blank', 'tab', 'popview', 'excelIn'].includes(_opentype)) { |
| | | item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | |
| | | }) |
| | | } else if (key === 'pageTemplate') { |
| | | let _options = null |
| | | let _fieldval = {} |
| | | if (value === 'custom') { |
| | | _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'url', 'icon', 'class', 'position'] |
| | | _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'url', 'joint', 'icon', 'class', 'position'] |
| | | } else { |
| | | _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'] |
| | | } |
| | |
| | | formlist: this.state.formlist.map(item => { |
| | | item.hidden = !_options.includes(item.key) |
| | | |
| | | if (item.key === 'Ot') { |
| | | if (value === 'pay') { |
| | | item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value)) |
| | | _fieldval.Ot = 'requiredSgl' |
| | | } else { |
| | | item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | | } |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | }, () => { |
| | | this.props.form.setFieldsValue(_fieldval) |
| | | }) |
| | | } else if (key === 'tabTemplate') { |
| | | let _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabTemplate'] |