| | |
| | | } |
| | | |
| | | let _arrField = [] // 字段集 |
| | | console.log(this.props.param) |
| | | |
| | | if (this.props.param && this.props.param.arr_field) { |
| | | _arrField = this.props.param.arr_field |
| | | } else { |
| | |
| | | } |
| | | }) |
| | | |
| | | let _data = null |
| | | let _isCustomData = false |
| | | |
| | | if (this.props.param && this.props.param.data) { |
| | | _data = this.props.param.data[0] || null |
| | | } |
| | | |
| | | if ((config.setting.interType === 'inner' && config.setting.innerFunc) || (config.setting.interType === 'outer' && config.setting.interface)) { |
| | | _isCustomData = true |
| | | _data = null |
| | | } |
| | | |
| | | |
| | | this.setState({ |
| | | config: config, |
| | | setting: config.setting, |
| | | actions: config.action, |
| | | isLinkMain: _isLinkMain, |
| | | arr_field: _arrField, |
| | | data: _data, |
| | | data: config.setting.datatype === 'query' ? null : (this.props.param.data[0] || null), |
| | | BIDs: { |
| | | mainTable: (!_isCustomData && _data && _data[0] && _data[0][config.setting.primaryKey]) || '', |
| | | mainTabledata: (!_isCustomData && _data && _data[0]) || '' |
| | | mainTable: this.props.param.primaryId || '', |
| | | mainTabledata: config.setting.datatype === 'query' ? '' : (this.props.param.data[0] || '') |
| | | } |
| | | }, () => { |
| | | this.improveSelectOption(config.groups) |
| | | |
| | | if (_isCustomData) { |
| | | if (config.setting.datatype === 'query') { |
| | | this.loadmaindata() |
| | | } |
| | | }) |