| | |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | let _config = values.config |
| | | |
| | | try { |
| | | _config = JSON.parse(window.decodeURIComponent(window.atob(_config))) |
| | | |
| | | if (typeof(_config) === 'object' && _config.$srcId) { |
| | | let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId') |
| | | if (srcid && _config.$srcId !== srcid) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '当前系统无权限使用此项配置!', |
| | | duration: 5 |
| | | }) |
| | | |
| | | _config = '' |
| | | } else { |
| | | delete _config.$srcId |
| | | } |
| | | } |
| | | } catch (e) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | submit = () => { |
| | | if (this.props.inputSubmit) { |
| | | setTimeout(() => { |
| | | this.props.inputSubmit() |
| | | }, 10) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | |
| | | message: '请输入配置信息!' |
| | | } |
| | | ] |
| | | })(<TextArea autoSize={{ minRows: 6, maxRows: 6 }} onPressEnter={this.submit}/>)} |
| | | })(<TextArea autoSize={{ minRows: 6, maxRows: 6 }}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |