| | |
| | | |
| | | class CustomSetting extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典表 |
| | | config: PropTypes.object, // 页面配置信息 |
| | | shortcuts: PropTypes.any, // 自定义设置 |
| | | } |
| | |
| | | }) |
| | | }) |
| | | } else if (item.type === 'table') { |
| | | item.cols && item.cols.forEach(col => { |
| | | if (col.type !== 'action') return |
| | | col.elements && col.elements.forEach(cell => { |
| | | let loopCol = (cols) => { |
| | | cols.forEach(col => { |
| | | if (col.type === 'colspan') { |
| | | loopCol(col.subcols) |
| | | } else if (col.type === 'custom') { |
| | | col.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') return |
| | | cell.$expanded = false |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print') { |
| | | |
| | |
| | | |
| | | _comp.action.push({...cell, $line: true, ...(userConfig[cell.uuid] || {})}) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | loopCol(item.cols) |
| | | } |
| | | |
| | | if (_comp.action.length > 0) { |
| | |
| | | visible={visible} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | footer={[ |
| | | <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>{this.props.dict['main.revert.default']}</Button>, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>{this.props.dict['main.cancel']}</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>{this.props.dict['main.submit']}</Button> |
| | | <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>恢复默认设置</Button>, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>取消</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>提交</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |