| | |
| | | }, i * 10) |
| | | }) |
| | | } else { |
| | | if (position === 'line') { |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | this.loadLinedata(lines[0].$$uuid) |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.loadData(id) |
| | | } |
| | |
| | | } else { |
| | | let supModule = config.setting.supModule |
| | | |
| | | if (position === 'line') { |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | this.loadLinedata(lines[0].$$uuid) |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.loadData(id) |
| | | } |
| | |
| | | /** |
| | | * @description 获取单行数据 |
| | | */ |
| | | async loadLinedata (id) { |
| | | async loadLinedata (id, position) { |
| | | const { config, pageIndex, pageSize, search, BID, BData, orderBy } = this.state |
| | | |
| | | if (config.forbidLine) { |
| | |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | | if (position === 'line_grid' && (!result.data || !result.data[0])) { |
| | | this.loadData() |
| | | return |
| | | } |
| | | |
| | | let data = fromJS(this.state.data).toJS() |
| | | let selectedData = fromJS(this.state.selectedData).toJS() |
| | | let selectKeys = fromJS(this.state.selectKeys).toJS() |