king
2020-01-06 db18f67e6a9ec7be3446ebfb1592809b3c3dcb7d
src/templates/subtableconfig/index.jsx
@@ -15,6 +15,7 @@
import ColspanForm from '@/templates/tableshare/colspanform'
import GridBtnForm from '@/templates/tableshare/gridbtnform'
import EditCard from '@/templates/tableshare/editcard'
import VerifyCard from '@/templates/tableshare/verifycard'
import MenuForm from '@/templates/tableshare/menuform'
import SourceElement from '@/templates/tableshare/dragelement/source'
import zhCN from '@/locales/zh-CN/comtable.js'
@@ -65,7 +66,8 @@
    delActions: [],          // 删除按钮列表
    funcLoading: false,      // 存储过程创建中
    showColumnName: false,   // 显示列字段名控制
    tabviews: []             // 所有标签页
    tabviews: [],            // 所有标签页
    profileVisible: false    // 验证信息模态框
  }
  /**
@@ -678,42 +680,6 @@
            text: this.state.dict['header.form.refresh.subgrid']
          }]
        },
        // {
        //   type: 'select',
        //   key: 'errorTip',
        //   label: this.state.dict['header.form.messageTip'],
        //   initVal: card.errorTip || 'E',
        //   tooltip: '该选项为提示效果展示,选择提示类型后,可点击按钮查看,自定义函数中设置 ErrCode 为(S、-1、E、N、F、NM)时,会以对应方式展示提示信息。',
        //   tooltipClass: 'middle',
        //   required: false,
        //   options: [{
        //     value: 'S',
        //     text: 'S(提醒框-0)'
        //   }, {
        //     value: '-1',
        //     text: '-1(不提示)'
        //   }, {
        //     value: 'N',
        //     text: 'N(提醒框-1)'
        //   }, {
        //     value: 'F',
        //     text: 'F(提醒框-2)'
        //   }, {
        //     value: 'E',
        //     text: 'E(确认框)'
        //   }, {
        //     value: 'NM',
        //     text: 'NM(顶部提示)'
        //   }]
        // },
        // {
        //   type: 'number',
        //   key: 'errorTime',
        //   label: this.state.dict['header.form.errorTime'],
        //   initVal: card.errorTime || 15,
        //   tooltip: '执行结果中设置 ErrCode 为 N 或 F 时有效',
        //   required: false
        // },
        {
          type: 'select',
          key: 'icon',
@@ -1649,6 +1615,44 @@
    })
  }
  /**
   * @description 验证信息配置
   */
  profileAction = (element) => {
    this.setState({
      profileVisible: true,
      card: element
    })
  }
  /**
   * @description 验证信息保存
   */
  verifySubmit = () => {
    const { card } = this.state
    let config = JSON.parse(JSON.stringify(this.state.config))
    let _verify = this.verifyRef.state.verify
    config.action = config.action.map(item => {
      if (item.uuid === card.uuid) {
        item.verify = _verify
      }
      return item
    })
    this.setState({
      profileVisible: false,
      config: config,
      card: '',
      actionloading: true
    }, () => {
      this.setState({
        actionloading: false
      })
    })
  }
  // changeTemplate = () => {
  //   this.props.handleConfig('template')
  // }
@@ -2507,6 +2511,7 @@
                    handleMenu={this.handleAction}
                    copyElement={(val) => this.handleAction(val, 'copy')}
                    deleteMenu={this.deleteElement}
                    profileMenu={this.profileAction}
                    placeholder={this.state.dict['header.form.action.placeholder']}
                  /> : null
                }
@@ -2613,6 +2618,19 @@
            <Empty />
          }
        </Modal>
        {/* 按钮使用系统存储过程时,验证信息模态框 */}
        <Modal
          wrapClassName="common-table-fields-modal"
          title={'验证信息'}
          visible={this.state.profileVisible}
          width={'75vw'}
          style={{minWidth: '900px', maxWidth: '1200px'}}
          onOk={this.verifySubmit}
          onCancel={() => { this.setState({ profileVisible: false }) }}
          destroyOnClose
        >
          <VerifyCard card={this.state.card} wrappedComponentRef={(inst) => this.verifyRef = inst} dict={this.state.dict} />
        </Modal>
        {/* 设置全局配置及列表数据源 */}
        <Modal
          title={this.state.dict['header.edit']}