king
2020-01-03 862b6cf69dc925a6138a7ebf79b782a5d7791202
src/templates/modalconfig/index.jsx
@@ -356,6 +356,9 @@
            value: 'link',
            text: this.state.dict['header.form.link']
          }, {
            value: 'fileupload',
            text: '文件上传'
          }, {
            value: 'date',
            text: this.state.dict['header.form.dateday']
          }, {
@@ -507,24 +510,6 @@
  handleSubmit = () => {
    this.formRef.handleConfirm().then(res => {
      let _config = JSON.parse(JSON.stringify(this.state.config))
      if ((res.type === 'multiselect' || res.type === 'select' || res.type === 'link') && res.resourceType === '1') {
        let _datasource = res.dataSource
        if (/\s/.test(_datasource)) {
          _datasource = '(' + _datasource + ') tb'
        }
        let sql = 'select ' + res.valueField + ',' + res.valueText + ' from ' + _datasource
        if (res.type === 'link') {
          sql = 'select ' + res.valueField + ',' + res.valueText + ',' + res.linkField + ' from ' + _datasource
        }
        if (res.orderBy) {
          sql = sql + ' order by ' + res.orderBy + ' ' + res.orderType
        }
        res.dataSourceSql = Utils.formatOptions(sql)
      }
      if (_config.groups.length > 0) {
        _config.groups.forEach(group => {
@@ -805,7 +790,7 @@
          orderBy: '',
          orderType: 'asc',
          readonly: 'false',
          required: 'false'
          required: 'true'
        }
      })
      _config.groups[_config.groups.length - 1].sublist = [..._config.groups[_config.groups.length - 1].sublist, ..._additems]