From 7449eee8fa9f8a251e9c4e9162030f1e004bae0f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 15 十月 2020 09:17:04 +0800 Subject: [PATCH] 2020-10-15 --- src/templates/modalconfig/index.jsx | 62 +------------------------------ 1 files changed, 2 insertions(+), 60 deletions(-) diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index a369e07..53313ee 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -33,7 +33,6 @@ class ComModalConfig extends Component { static propTpyes = { menu: PropTypes.any, - optionLibs: PropTypes.any, editTab: PropTypes.any, editSubTab: PropTypes.any, tabConfig: PropTypes.any, @@ -66,7 +65,6 @@ originConfig: null, // 鍘熷鑿滃崟 groupVisible: false, // 鍏ㄥ眬閰嶇疆妯℃�佹 curgroup: null, // 褰撳墠缁勶紝鏂板缓鎴栫紪杈� - optionLibs: null, // 鑷畾涔変笅鎷夐�夐」搴� sources: null, // 琛ㄥ崟绫诲瀷 sqlVerifing: false, // sql楠岃瘉 openEdition: '' // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣� @@ -80,7 +78,7 @@ * 4銆佽缃寜閽熀鏈俊鎭� */ UNSAFE_componentWillMount () { - const {menu, editAction, tabConfig, subTabConfig, subConfig, optionLibs} = this.props + const {menu, editAction, tabConfig, subTabConfig, subConfig} = this.props let _config = '' let _tab = subTabConfig ? subTabConfig : tabConfig @@ -95,42 +93,6 @@ if (subConfig) { _config = subConfig - - if (_config.groups.length > 0) { - _config.groups.forEach(group => { - group.sublist.forEach(item => { - if ( - (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') && - item.resourceType === '0' && - item.options && item.options.length > 0 - ) { - optionLibs.set(editAction.uuid + item.uuid, { - uuid: editAction.uuid + item.uuid, - label: item.label, - parname: editAction.label, - type: 'Modal', - options: item.options - }) - } - }) - }) - } else { - _config.fields.forEach(item => { - if ( - (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') && - item.resourceType === '0' && - item.options && item.options.length > 0 - ) { - optionLibs.set(editAction.uuid + item.uuid, { - uuid: editAction.uuid + item.uuid, - label: item.label, - parname: editAction.label, - type: 'Modal', - options: item.options - }) - } - }) - } } else { _config = JSON.parse(JSON.stringify(BaseConfig)) } @@ -156,7 +118,6 @@ openEdition: editAction.open_edition || '', menu: _menu, source: _source, - optionLibs: optionLibs, config: _config, selectedTables: _config.tables || [], originConfig: JSON.parse(JSON.stringify(_config)), @@ -290,7 +251,6 @@ let param = { editMenu: menu, - optionLibs: this.state.optionLibs, editTab: editTab, tabConfig: tabConfig, editSubTab: editSubTab, @@ -525,25 +485,10 @@ * 3銆侀�氳繃loading鍒锋柊 */ handleSubmit = () => { - const {editAction, optionLibs} = this.props const { card, modalType } = this.state this.formRef.handleConfirm().then(res => { let _config = JSON.parse(JSON.stringify(this.state.config)) - if ( // 鏇存柊涓嬫媺瀛楀吀 - (res.type === 'select' || res.type === 'multiselect' || res.type === 'link') && - res.resourceType === '0' && - res.options && res.options.length > 0 - ) { - optionLibs.set(editAction.uuid + res.uuid, { - uuid: editAction.uuid + res.uuid, - label: res.label, - parname: editAction.label, - type: 'Modal', - options: res.options - }) - } - let fieldrepet = false // 瀛楁閲嶅 let labelrepet = false // 鎻愮ず鏂囧瓧閲嶅 @@ -664,7 +609,6 @@ config: _config, modalType: null, card: null, - optionLibs: optionLibs, visible: false }) } else { @@ -680,7 +624,6 @@ config: _config, modalType: null, card: null, - optionLibs: optionLibs, visible: false }) } @@ -1358,7 +1301,7 @@ <Modal title={this.state.modalType !== 'copy' ? this.state.dict['model.edit'] : this.state.dict['header.modal.form.copy']} visible={this.state.visible} - width={700} + width={800} onCancel={this.editModalCancel} onOk={this.handleSubmit} confirmLoading={this.state.sqlVerifing} @@ -1369,7 +1312,6 @@ card={this.state.card} formlist={this.state.formlist} inputSubmit={this.handleSubmit} - optionLibs={this.state.optionLibs} wrappedComponentRef={(inst) => this.formRef = inst} />} </Modal> -- Gitblit v1.8.0