| | |
| | | usedTemplates: null, |
| | | menuConfig: '', |
| | | tempSearchKey: '', |
| | | loading: false, |
| | | baseTemplates: [{ |
| | | title: '基础表格', |
| | | type: 'CommonTable', |
| | |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: _menu.MenuID |
| | | } |
| | | |
| | | this.setState({ |
| | | loading: true |
| | | }) |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | let _LongParam = res.LongParam && window.decodeURIComponent(window.atob(res.LongParam)) |
| | |
| | | this.setState({ |
| | | type: 'edit', |
| | | editMenu: _menu, |
| | | loading: false, |
| | | tabview: _Template.length > 0 ? _menu.PageParam.Template : 'template' |
| | | }) |
| | | if (_Template.length === 0) { |
| | |
| | | }) |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | |
| | | {!this.state.thawmenulist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />} |
| | | {this.state.thawmenulist && <TransferForm ref="trawmenu" dict={this.state.dict} menulist={this.state.thawmenulist}/>} |
| | | </Modal> |
| | | {this.state.loading && <Spin style={{position: 'fixed', left: 'calc(50vw - 22px)', top: 'calc(50vh - 70px)'}} size="large" />} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | MenuNo={this.props.MenuNo} |
| | | refreshdata={this.refreshbytable} |
| | | columns={this.state.columns} |
| | | actions={this.state.actions} |
| | | data={this.state.data} |
| | | selectable={this.state.selectable} |
| | | total={this.state.total} |
| | |
| | | } |
| | | } |
| | | } |
| | | .datamanage-search + .datamanage-table { |
| | | padding-top: 15px; |
| | | } |
| | | } |
| | | .ant-back-top { |
| | | bottom: 30px; |
| | |
| | | selectable: PropTypes.bool, |
| | | dict: PropTypes.object, // 字典项 |
| | | columns: PropTypes.array, // 表格列 |
| | | data: PropTypes.oneOfType([ |
| | | PropTypes.object, |
| | | PropTypes.array |
| | | ]) |
| | | actions: PropTypes.any, |
| | | data: PropTypes.any |
| | | } |
| | | |
| | | state = { |
| | |
| | | pageSize: 10, |
| | | columns: this.props.columns.map(item => { |
| | | let _width = parseInt(item.Width) || 50 |
| | | // if (/ID$/.test(item.FieldName) || item.FieldName.includes('PassWord')) { |
| | | // _width = _width * 3 |
| | | // } else if (item.FieldName.includes('Date')) { |
| | | // _width = _width * 2 |
| | | // } |
| | | |
| | | return { |
| | | align: item.Align, |
| | | dataIndex: item.FieldName, |
| | |
| | | onChange: this.onSelectChange |
| | | } |
| | | } |
| | | let offset = 48 |
| | | if (this.props.actions && this.props.actions.length > 0) { |
| | | offset = 105 |
| | | } |
| | | return ( |
| | | <div className="datamanage-table"> |
| | | {this.state.fixed && <Affix offsetTop={105} className="fix-header"> |
| | | {this.state.fixed && <Affix offsetTop={offset} className="fix-header"> |
| | | <Table |
| | | bordered={true} |
| | | rowSelection={rowSelection} |