| | |
| | | |
| | | if (r.custompage && setting.laypage === 'true' && _columns.findIndex(col => col.field === 'mk_total') === -1) { |
| | | if (config.subtype !== 'basetable') { |
| | | Modal.warning({ |
| | | title: `数据源或自定义脚本中使用自定义分页排序时,请在字段集中添加 mk_total。`, |
| | | const that = this |
| | | Modal.confirm({ |
| | | title: `数据源或自定义脚本中使用自定义分页排序时,字段集中需要添加 mk_total。`, |
| | | okText: '知道了', |
| | | cancelText: '添加', |
| | | onOk: () => { |
| | | reject() |
| | | }, |
| | | onCancel() { |
| | | let item = { |
| | | field: 'mk_total', |
| | | label: 'mk_total', |
| | | datatype: 'Int', |
| | | uuid: Utils.getuuid() |
| | | } |
| | | |
| | | that.setState({ columns: [item, ...columns] }) |
| | | reject() |
| | | } |
| | | }) |
| | | return |