| | |
| | | config.subcards = config.subcards.map(group => { |
| | | group.subButton.uuid = group.uuid |
| | | group.subButton.$menuId = group.uuid |
| | | group.subButton.Ot = 'requiredSgl' |
| | | group.subButton.Ot = config.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl' |
| | | group.subButton.$forbid = true |
| | | group.subButton.OpenType = 'formSubmit' |
| | | group.subButton.execError = 'never' |
| | | |
| | | group.subButton.syncComponentId = group.subButton.syncComponent ? group.subButton.syncComponent.pop() : '' |
| | | |
| | | if (group.subButton.syncComponentId === config.uuid) { |
| | | group.subButton.syncComponentId = '' |
| | | } |
| | | |
| | | if (group.subButton.enable === 'false') { |
| | | group.subButton.style.display = 'none' |
| | |
| | | |
| | | if (group.uuid !== menuId) return |
| | | |
| | | if (btn.syncComponentId && btn.syncComponentId !== config.setting.supModule) { |
| | | MKEmitter.emit('reloadData', btn.syncComponentId) // 同级标签刷新 |
| | | btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) |
| | | |
| | | if (!btn.syncComponentId || btn.syncComponentId !== config.setting.supModule) { |
| | | if (config.wrap.datatype !== 'static' && config.setting) { |
| | | this.loadData() |
| | | } |
| | | } |
| | | |
| | | if (id) { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, id, '') |
| | | } |
| | | |
| | | if (config.wrap.datatype !== 'static' && config.setting) { |
| | | this.loadData() |
| | | } |
| | | |
| | | this.execSuccess(btn, id) |
| | |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { config, arr_field, BID, group } = this.state |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { |
| | | this.setState({ |
| | |
| | | if (result.status) { |
| | | let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true} |
| | | |
| | | let _group = group |
| | | |
| | | this.setState({ |
| | | group: null, |
| | | data: _data || {$$empty: true}, |
| | | data: null, |
| | | loading: false |
| | | }, () => { |
| | | this.setState({group: _group}) |
| | | this.setState({data: _data}) |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | |
| | | const { config, loading, BID, data, group, dict } = this.state |
| | | |
| | | return ( |
| | | <div className="custom-tab-form-box" style={{...config.style}}> |
| | | <div className="custom-tab-form-box" id={'anchor' + config.uuid} style={{...config.style}}> |
| | | {loading ? |
| | | <div className="loading-mask"> |
| | | <div className="ant-spin-blur"></div> |
| | |
| | | {group && data ? <div className={'mk-form-action ' + (group.$button || '')}> |
| | | <NormalButton |
| | | BID={BID} |
| | | position="form" |
| | | btn={group.subButton} |
| | | setting={config.setting} |
| | | columns={config.columns} |