| | |
| | | const EditColumn = asyncIconComponent(() => import('./editColumn')) |
| | | const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent')) |
| | | const CardCellComponent = asyncComponent(() => import('@/menu/components/card/cardcellcomponent')) |
| | | const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination')) |
| | | const PasteComponent = asyncIconComponent(() => import('@/components/paste')) |
| | | |
| | | class HeaderCol extends Component { |
| | |
| | | |
| | | return !is(fromJS(column), fromJS(nextProps.column)) || |
| | | !is(fromJS(config.columns), fromJS(nextProps.config.columns)) || |
| | | !is(fromJS(config.action), fromJS(nextProps.config.action)) || |
| | | !is(fromJS(config.search), fromJS(nextProps.config.search)) |
| | | !is(fromJS(config.action), fromJS(nextProps.config.action)) |
| | | } |
| | | |
| | | render() { |
| | |
| | | } |
| | | |
| | | state = { |
| | | appType: sessionStorage.getItem('appType'), |
| | | tableId: '', |
| | | data: [{uuid: Utils.getuuid()}], |
| | | refresh: false, // 强制刷新 |
| | |
| | | |
| | | return !is(fromJS(this.state), fromJS(nextState)) || |
| | | !is(fromJS(config.wrap), fromJS(nextProps.config.wrap)) || |
| | | !is(fromJS(config.search), fromJS(nextProps.config.search)) || |
| | | !is(fromJS(config.action), fromJS(nextProps.config.action)) || |
| | | config.setting.laypage !== nextProps.config.setting.laypage |
| | | } |
| | |
| | | } |
| | | |
| | | deleteCol = (col) => { |
| | | const { appType } = this.state |
| | | let _columns = fromJS(this.state.columns).toJS() |
| | | |
| | | _columns = this.loopDelCol(_columns, col) |
| | |
| | | this.props.updatecolumn({...this.props.config, cols: _columns}) |
| | | }) |
| | | |
| | | if (col.type !== 'action' || appType === 'mob') return |
| | | if (col.type !== 'action') return |
| | | |
| | | let uuids = [] |
| | | col.elements && col.elements.forEach(c => { |
| | | if (appType === 'pc' && c.OpenType !== 'popview') return |
| | | if (c.OpenType !== 'popview') return |
| | | |
| | | uuids.push(c.uuid) |
| | | }) |
| | |
| | | |
| | | render() { |
| | | const { config } = this.props |
| | | const { fields, card, lineMarks, tableId, appType } = this.state |
| | | const { fields, card, lineMarks, tableId } = this.state |
| | | const components = { |
| | | header: { |
| | | cell: DragableHeaderCol |
| | |
| | | dataSource={this.state.data} |
| | | rowSelection={config.wrap.tableType ? { type: 'radio' } : null} |
| | | columns={columns} |
| | | pagination={appType !== 'mob' ? { |
| | | pagination={{ |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '25', '50', '100', '500', '1000'], |
| | | showSizeChanger: true, |
| | | total: 58, |
| | | showTotal: (total, range) => `${range[0]}-${range[1]} 共 ${total} 条` |
| | | } : false} |
| | | }} |
| | | /> |
| | | {appType === 'mob' && config.setting.laypage !== 'fasle' ? <MobPagination /> : null} |
| | | </DndProvider> |
| | | <EditColumn column={card} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> |
| | | </div> |