king
2022-10-20 6de5ea0a0c6f06e0321ae41846473118fb85de48
src/menu/components/table/base-table/columns/index.jsx
@@ -15,7 +15,6 @@
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 {
@@ -138,8 +137,7 @@
    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() {
@@ -192,7 +190,6 @@
  }
  state = {
    appType: sessionStorage.getItem('appType'),
    tableId: '',
    data: [{uuid: Utils.getuuid()}],
    refresh: false,    // 强制刷新
@@ -252,7 +249,6 @@
    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
  }
@@ -404,7 +400,6 @@
  }
  deleteCol = (col) => {
    const { appType } = this.state
    let _columns = fromJS(this.state.columns).toJS()
    _columns = this.loopDelCol(_columns, col)
@@ -415,11 +410,11 @@
      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)
    })
@@ -509,7 +504,7 @@
  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
@@ -537,16 +532,15 @@
            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>