king
2022-05-09 28ebe609e47b28794450cefc72d3e0f62fd904e7
src/templates/sharecomponent/settingcomponent/index.jsx
@@ -28,7 +28,9 @@
    search: null,        // 搜索条件,包括主表搜索
    formlist: null,      // 表单信息
    visible: false,      // 模态框控制
    loading: false       // 设置信息验证保存中
    loading: false,      // 设置信息验证保存中
    record: null
  }
  /**
@@ -84,17 +86,13 @@
    const { config } = this.props
    const { menu } = this.state
    this.settingRef.handleConfirm('func').then(setting => {
    this.settingRef.handleConfirm('loading').then(setting => {
      let res = this.resetSetting(setting)
      let _config = {...config, setting: res}
      let newLText = Utils.formatOptions(FuncUtils.getTableFunc(setting, menu, _config)) // 创建存储过程sql
      let DelText = Utils.formatOptions(FuncUtils.dropfunc(setting.innerFunc))          // 删除存储过程sql
      this.refs.funcCreatComponent.exec(setting.innerFunc, newLText, DelText).then(result => {
        if (result === 'success') {
          this.props.updatesetting(_config)
        }
      })
      this.refs.funcCreatComponent.exec(setting.innerFunc, newLText, DelText)
    })
  }
@@ -105,7 +103,7 @@
    const { config } = this.props
    const { menu } = this.state
    this.settingRef.handleConfirm('interface').then(setting => {
    this.settingRef.handleConfirm('loading').then(setting => {
      let res = this.resetSetting(setting)
      let _config = {...config, setting: res}
      let _menu = {
@@ -169,7 +167,7 @@
  render() {
    const { config } = this.props
    const { dict, visible, search, menu } = this.state
    const { dict, visible, search, menu, record } = this.state
    return (
      <div className="model-menu-setting">
@@ -183,8 +181,8 @@
          maskClosable={false}
          onCancel={() => { this.setState({ visible: false, loading: false })}}
          footer={[
            <CreateInterface key="interface" loading={this.state.interloading} dict={dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/>,
            <CreateFunc key="create" dict={dict} ref="funcCreatComponent" trigger={this.tableCreatFunc}/>,
            record && record.interType === 'system' ? <CreateInterface key="interface" loading={this.state.interloading} dict={dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/> : null,
            record && record.interType === 'inner' ? <CreateFunc key="create" dict={dict} ref="funcCreatComponent" trigger={this.tableCreatFunc}/> : null,
            <Button key="cancel" onClick={() => { this.setState({ visible: false, loading: false }) }}>{this.state.dict['model.cancel']}</Button>,
            <Button key="confirm" type="primary" loading={this.state.loading} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button>
          ]}
@@ -195,6 +193,7 @@
            menu={menu}
            config={config}
            search={search}
            updRecord={(record) => this.setState({record: fromJS(record).toJS()})}
            wrappedComponentRef={(inst) => this.settingRef = inst}
          />
        </Modal>