| | |
| | | }) |
| | | } |
| | | |
| | | let buttons = [] |
| | | |
| | | if (group.prevButton && group.prevButton.enable === 'true') { |
| | | buttons.push('prevEnable') |
| | | } |
| | | if (!group.subButton.enable || group.subButton.enable === 'true') { |
| | | buttons.push('subEnable') |
| | | } |
| | | if (group.nextButton && group.nextButton.enable === 'true') { |
| | | buttons.push('nextEnable') |
| | | } |
| | | |
| | | const groupForm = [ |
| | | { |
| | | type: 'text', |
| | |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'prevEnable', |
| | | label: '上一步', |
| | | initval: group.prevButton ? group.prevButton.enable || 'false' : 'false', |
| | | tooltip: '第一组不显示。注:除关闭功能外。', |
| | | type: 'checkbox', |
| | | field: 'buttons', |
| | | label: '按钮组', |
| | | initval: buttons, |
| | | tooltip: '上一步在第一组中不显示,跳过在最后一组不显示,注:除关闭功能外。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | {value: 'prevEnable', label: '上一步'}, |
| | | {value: 'subEnable', label: '提交'}, |
| | | {value: 'nextEnable', label: '跳过'}, |
| | | ], |
| | | forbid: !group.prevButton |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'prevEnable', |
| | | // label: '上一步', |
| | | // initval: group.prevButton ? group.prevButton.enable || 'false' : 'false', |
| | | // tooltip: '第一组不显示。注:除关闭功能外。', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'true', label: '显示'}, |
| | | // {value: 'false', label: '隐藏'}, |
| | | // ], |
| | | // forbid: !group.prevButton |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'subEnable', |
| | |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'nextEnable', |
| | | label: '跳过', |
| | | initval: group.nextButton ? group.nextButton.enable || 'false' : 'false', |
| | | tooltip: '最后一组不显示。注:除关闭功能外。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ], |
| | | forbid: !group.nextButton |
| | | forbid: !!group.prevButton |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'nextEnable', |
| | | // label: '跳过', |
| | | // initval: group.nextButton ? group.nextButton.enable || 'false' : 'false', |
| | | // tooltip: '最后一组不显示。注:除关闭功能外。', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'true', label: '显示'}, |
| | | // {value: 'false', label: '隐藏'}, |
| | | // ], |
| | | // forbid: !group.nextButton |
| | | // }, |
| | | ] |
| | | |
| | | return groupForm |