king
2020-03-26 a24beb36feaa46f39cbb26ce5277e84f91241ce8
src/templates/subtableconfig/index.jsx
@@ -82,7 +82,8 @@
    optionLibs: null,        // 自定义下拉选项库
    thawBtnVisible: false,   // 解冻按钮弹窗
    thawbtnlist: null,       // 解冻按钮列表
    thawButtons: []          // 已选择要解冻的按钮
    thawButtons: [],         // 已选择要解冻的按钮
    activeKey: '0'           // 默认展开基本信息
  }
  /**
@@ -138,10 +139,13 @@
      })
    }
    let _activeKey =  editSubTab ? editSubTab.activeKey : editTab.activeKey
    this.setState({
      originActions: _oriActions,
      optionLibs: optionLibs,
      config: _config,
      activeKey: _activeKey || '0',
      originConfig: _config,
      selectedTables: _config.tables || [],
      menuformlist: [
@@ -813,10 +817,10 @@
   * @description 创建表格存储过程
   */
  tableCreatFunc = () => {
    let config = JSON.parse(JSON.stringify(this.state.config))
    const { config } = this.state
    this.settingRef.handleConfirm().then(res => {
      const setting = res
    this.settingRef.handleConfirm().then(setting => {
      if (!(setting.interType === 'inner') || !setting.innerFunc) {
        notification.warning({
          top: 92,
@@ -840,13 +844,14 @@
        Api.getLocalConfig(param)
      }
      let newLText = Utils.formatOptions(Utils.getTableFunc(setting, {MenuID: config.uuid, MenuName: config.tabName, MenuNo: config.tabNo}, config)) // 创建存储过程sql
      let _config = {...config, setting: setting}
      let newLText = Utils.formatOptions(Utils.getTableFunc(setting, {MenuID: _config.uuid, MenuName: _config.tabName, MenuNo: _config.tabNo}, _config)) // 创建存储过程sql
      let DelText = Utils.formatOptions(Utils.dropfunc(setting.innerFunc))          // 删除存储过程sql
      
      this.refs.tableCreatFunc.exec(setting.innerFunc, newLText, DelText).then(result => {
        if (result === 'success') {
          this.setState({
            config: {...config, setting: setting}
            config: _config
          })
        }
      })
@@ -1773,7 +1778,7 @@
   */
  setSubConfig = (btn) => {
    const {menu, editTab, tabConfig, editSubTab, btnTab, btnTabConfig} = this.props
    const { config, originConfig } = this.state
    const { config, originConfig, activeKey } = this.state
    if (originConfig.isAdd) {
      notification.warning({
@@ -1805,6 +1810,12 @@
          } else if (btn.OpenType === 'popview') {
            _view = btn.tabType        // 新弹窗标签模板
            _subtab = btn
          }
          if (editSubTab) {
            editSubTab.activeKey = activeKey
          } else {
            editTab.activeKey = activeKey
          }
          let param = {
@@ -2028,7 +2039,7 @@
  }
  render () {
    const { modaltype } = this.state
    const { modaltype, activeKey } = this.state
    const configAction = this.state.config.action.filter(_action =>
      !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview' || _action.OpenType === 'blank' || _action.OpenType === 'tab')
    )
@@ -2038,9 +2049,9 @@
        <DndProvider backend={HTML5Backend}>
          {/* 工具栏 */}
          <div className="tools">
            <Collapse accordion defaultActiveKey="0" bordered={false}>
            <Collapse accordion defaultActiveKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}>
              {/* 基本信息 */}
              <Panel header={'标签基本信息'} key="0" id="common-basedata">
              <Panel forceRender={true} header={'标签基本信息'} key="0" id="common-basedata">
                {/* 菜单信息 */}
                <MenuForm
                  dict={this.state.dict}