| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Modal, Button, notification } from 'antd' |
| | | import { Icon, Modal, Button } from 'antd' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import DevUtils from '@/utils/devutils.js' |
| | |
| | | const { config } = this.props |
| | | const { menu } = this.state |
| | | |
| | | this.settingRef.handleConfirm(true).then(setting => { |
| | | if (setting.interType !== 'inner' || !setting.innerFunc) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '使用内部接口,且存在内部函数时,才可以创建存储过程!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.settingRef.handleConfirm('func').then(setting => { |
| | | let _config = {...config, setting: setting} |
| | | |
| | | let newLText = Utils.formatOptions(DevUtils.getTableFunc(setting, menu, _config)) // 创建存储过程sql |
| | | let DelText = Utils.formatOptions(DevUtils.dropfunc(setting.innerFunc)) // 删除存储过程sql |
| | | |
| | |
| | | const { config } = this.props |
| | | const { menu } = this.state |
| | | |
| | | this.settingRef.handleConfirm(true).then(setting => { |
| | | if (setting.interType !== 'system') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '使用系统接口时,才可以创建接口!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.settingRef.handleConfirm('interface').then(setting => { |
| | | let _config = {...config, setting: setting} |
| | | let _menu = { |
| | | type: config.Template === 'CommonTable' ? 'main' : 'subtable', |
| | |
| | | destroyOnClose |
| | | > |
| | | <SettingForm |
| | | type={config.Template === 'CommonTable' ? 'main' : 'subtable'} |
| | | dict={dict} |
| | | menu={menu} |
| | | config={config} |
| | | search={search} |
| | | permFuncField={permFuncField} |
| | | inputSubmit={this.settingSave} |
| | | wrappedComponentRef={(inst) => this.settingRef = inst} |
| | | /> |
| | | </Modal> |