king
2021-10-13 5a995a24857abb0a1dac5e4c67c600e54db01539
2021-10-13
17个文件已修改
281 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/elementform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulesource/option.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modulesource/option.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/modulesource/option.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/unattended/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/unattended/settingform/index.jsx 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -24,7 +24,7 @@
  barcode: ['eleType', 'datatype', 'width', 'barHeight', 'displayValue', 'interval', 'noValue'],
  qrcode: ['eleType', 'datatype', 'width', 'qrWidth', 'color', 'url', 'noValue'],
  currentDate: ['eleType', 'width', 'dateFormat', 'prefix', 'postfix'],
  formula: ['eleType', 'width', 'height', 'prefix', 'postfix', 'formula'],
  formula: ['eleType', 'width', 'height', 'prefix', 'postfix', 'eval', 'formula'],
}
class MainSearch extends Component {
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -397,11 +397,26 @@
      }]
    },
    {
      type: 'radio',
      key: 'eval',
      label: '解析',
      initVal: card.eval || 'true',
      tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。',
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'textarea',
      key: 'formula',
      label: '公式',
      initVal: card.formula || '',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等',
      placeholder: '例如:@price@ * @number@',
      required: true
    },
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -39,6 +39,9 @@
    value: 'action',
    text: '操作'
  }, {
    value: 'formula',
    text: '公式'
  }, {
    value: 'index',
    text: '序号'
  }]
@@ -290,6 +293,27 @@
      readonly: false
    },
    {
      type: 'radio',
      key: 'eval',
      label: '解析',
      initVal: card.eval || 'true',
      tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。',
      required: false,
      options: [
        { value: 'true', text: '是' },
        { value: 'false', text: '否' }
      ]
    },
    {
      type: 'textarea',
      key: 'formula',
      label: '公式',
      initVal: card.formula || '',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等',
      placeholder: '例如:@price@ * @number@',
      required: true
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -7,12 +7,14 @@
import { formRule } from '@/utils/option.js'
import './index.scss'
const { TextArea } = Input
const columnTypeOptions = {
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'editable', 'initval', 'blacklist'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'editable', 'initval', 'sum', 'blacklist'],
  textarea: ['label', 'field', 'type', 'Align', 'Hide', 'Width', 'prefix', 'initval', 'postfix', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'],
  action: ['label', 'type', 'Align', 'Width'],
  formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
  index: ['label', 'type', 'Align', 'Width']
}
@@ -304,6 +306,27 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'textarea') { // 文本搜索
        fields.push(
          <Col span={24} key={index} className="textarea">
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || '',
                rules: [
                  {
                    required: !!item.required,
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''} />)}
            </Form.Item>
          </Col>
        )
      }
    })
    return fields
src/menu/components/table/edit-table/columns/index.jsx
@@ -55,14 +55,14 @@
    return connectDragSource(
      connectDropTarget(<th {...restProps} index={index} style={{ cursor: 'move', textAlign: align }} onDoubleClick={() => column && this.props.editColumn(column)}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
          <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}>
            {column && ['custom', 'action'].includes(column.type) ?
              <Icon className="plus" title="添加" type="plus" onClick={() => this.props.addElement(column)} /> : null
            }
            <Icon className="edit" title="编辑" type="edit" onClick={() => this.props.editColumn(column)} />
            {column && column.type === 'custom' ? <Icon className="style" title="调整样式" onClick={() => this.props.changeStyle(column)} type="font-colors" /> : null}
            <Icon className="close" title="删除" type="delete" onClick={this.deleteCol} />
            {column && ['text', 'number'].includes(column.type) ? <MarkColumn columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
            {column && ['text', 'number', 'formula'].includes(column.type) ? <MarkColumn columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
          </div>
        } trigger="hover">
          {children}
@@ -135,9 +135,19 @@
        </td>
      )
    } else if (column) {
      let val = column.field || ''
      if (column.type === 'index') {
        val = '$Index'
      } else if (column.type === 'formula') {
        val = column.formula
        if (column.eval === 'false') {
          val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
          val = <span dangerouslySetInnerHTML={{__html: val}}></span>
        }
      }
      return (
        <td style={{...style, minWidth: column.Width || 100}} className={className}>
          {column.field || (column.type === 'index' ? '$Index' : '')}
          {val}
          {column.Hide === 'true' ? <Icon style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}} type="close-circle" /> : null}
          {column.marks && column.marks.length ? <Icon className="profile" type="ant-design"/> : null}
        </td>
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -60,6 +60,9 @@
    value: 'colspan',
    text: '合并列'
  }, {
    value: 'formula',
    text: '公式'
  }, {
    value: 'index',
    text: '序号'
  }]
@@ -383,6 +386,27 @@
      ]
    },
    {
      type: 'radio',
      key: 'eval',
      label: '解析',
      initVal: card.eval || 'true',
      tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。',
      required: false,
      options: [
        { value: 'true', text: '是' },
        { value: 'false', text: '否' }
      ]
    },
    {
      type: 'textarea',
      key: 'formula',
      label: '公式',
      initVal: card.formula || '',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等',
      placeholder: '例如:@price@ * @number@',
      required: true
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -17,6 +17,7 @@
  colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'],
  action: ['label', 'type', 'Align', 'Width'],
  formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
  index: ['label', 'type', 'Align', 'Width']
}
@@ -327,7 +328,7 @@
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<TextArea rows={2} disabled={item.readonly} onPressEnter={this.handleSubmit} />)}
              })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''}/>)}
            </Form.Item>
          </Col>
        )
src/menu/components/table/normal-table/columns/index.jsx
@@ -55,14 +55,14 @@
      return connectDragSource(
        connectDropTarget(<th {...restProps} index={index} style={{ cursor: 'move', textAlign: align }} onDoubleClick={() => column && this.props.editColumn(column)}>
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
            <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}>
              {column && ['custom', 'colspan', 'action'].includes(column.type) ?
                <Icon className="plus" title="添加" type="plus" onClick={() => this.props.addElement(column)} /> : null
              }
              <Icon className="edit" title="编辑" type="edit" onClick={() => this.props.editColumn(column)} />
              {column && column.type === 'custom' ? <Icon className="style" title="调整样式" onClick={() => this.props.changeStyle(column)} type="font-colors" /> : null}
              <Icon className="close" title="删除" type="delete" onClick={this.deleteCol} />
              {column && ['text', 'number'].includes(column.type) ? <MarkColumn columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
              {column && ['text', 'number', 'formula'].includes(column.type) ? <MarkColumn columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
            </div>
          } trigger="hover">
            {children}
@@ -73,13 +73,13 @@
      return (
        <th {...restProps} key={column.uuid} onDoubleClick={() => this.props.editColumn(column)}>
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
            <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}>
              {column && ['custom', 'colspan'].includes(column.type) ?
                <Icon className="plus" title="添加" type="plus" onClick={() => this.props.addElement(column)} /> : null
              }
              <Icon className="edit" title="编辑" type="edit" onClick={() => this.props.editColumn(column)} />
              <Icon className="close" title="删除" type="delete" onClick={this.deleteCol} />
              {column && ['text', 'number'].includes(column.type) ? <MarkColumn columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
              {column && ['text', 'number', 'formula'].includes(column.type) ? <MarkColumn columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
            </div>
          } trigger="hover">
            {children}
@@ -155,9 +155,19 @@
        </td>
      )
    } else if (column) {
      let val = column.field || ''
      if (column.type === 'index') {
        val = '$Index'
      } else if (column.type === 'formula') {
        val = column.formula
        if (column.eval === 'false') {
          val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
          val = <span dangerouslySetInnerHTML={{__html: val}}></span>
        }
      }
      return (
        <td style={{...style, minWidth: column.Width || 100}} className={className}>
          {column.field || (column.type === 'index' ? '$Index' : '')}
          {val}
          {column.Hide === 'true' ? <Icon style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}} type="close-circle" /> : null}
          {column.marks && column.marks.length ? <Icon className="profile" type="ant-design"/> : null}
        </td>
src/menu/modulesource/option.jsx
@@ -30,7 +30,7 @@
  { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '搜索条件', width: 24, forbid: ['billPrint'] },
  { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '数据卡', width: 24 },
  { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', width: 24 },
  { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '可浮动卡', width: 24 },
  { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '浮动卡', width: 24 },
  { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '表单(分步)', width: 24 },
  { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 },
  { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24, forbid: ['billPrint'] },
src/mob/modulesource/option.jsx
@@ -34,7 +34,7 @@
  // { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '搜索条件', width: 24 },
  { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '数据卡', width: 24 },
  { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', width: 24 },
  { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '可浮动卡', width: 24 },
  { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '浮动卡', width: 24 },
  { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '表单(分步)', width: 24 },
  { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 },
  { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24 },
src/pc/modulesource/option.jsx
@@ -33,7 +33,7 @@
  { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '搜索条件', width: 24 },
  { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '数据卡', width: 24 },
  { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', width: 24 },
  { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '可浮动卡', width: 24 },
  { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '浮动卡', width: 24 },
  { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '表单(分步)', width: 24 },
  { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 },
  { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24 },
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -590,18 +590,25 @@
      let _style = card.style ? {...card.style} : {}
      if (card.$sync) {
        if (card.eval === 'false') {
          val = ''
        }
        this.props.syncData.forEach(item => {
          let _val = card.formula
          Object.keys(item).forEach(key => {
            let reg = new RegExp('@' + key + '@', 'ig')
            _val = _val.replace(reg, item[key])
          })
          try {
            // eslint-disable-next-line
            _val = eval(_val)
          } catch (e) {
            _val = 0
          if (card.eval !== 'false') {
            try {
              // eslint-disable-next-line
              _val = eval(_val)
            } catch (e) {
              _val = 0
            }
          }
          if (!val) return
          val += _val
        })
@@ -612,18 +619,24 @@
          _val = _val.replace(reg, data[key])
        })
        try {
          // eslint-disable-next-line
          _val = eval(_val)
        } catch (e) {
          _val = 0
        if (card.eval !== 'false') {
          try {
            // eslint-disable-next-line
            _val = eval(_val)
          } catch (e) {
            _val = ''
          }
        }
        val = _val
        val = _val === undefined ? '' : _val
      }
      if (val !== '') {
        val = `${card.prefix || ''}${val}${card.postfix || ''}`
        if (card.eval === 'false' && /\s/ig.test(val)) {
          val = val.replace(/\s/ig, '&nbsp;')
          val = <span dangerouslySetInnerHTML={{__html: val}}></span>
        }
      }
      if (card.marks) {
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -351,6 +351,39 @@
          {content && _href ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null }
        </div>
      )
    } else if (col.type === 'formula') {
      let content = col.formula
      Object.keys(record).forEach(key => {
        let reg = new RegExp('@' + key + '@', 'ig')
        content = content.replace(reg, record[key])
      })
      if (col.eval !== 'false') {
        try {
          // eslint-disable-next-line
          content = eval(content)
        } catch (e) {
          content = ''
        }
      }
      content = content === undefined ? '' : content
      if (content !== '') {
        content = `${col.prefix || ''}${content}${col.postfix || ''}`
        if (col.eval === 'false') {
          content = content.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
          content = <span dangerouslySetInnerHTML={{__html: content}}></span>
        }
      }
      if (col.marks) {
        style = style || {}
        content = this.getMark(record, col.marks, style, content)
      }
      resProps.children = content
    } else if (col.type === 'custom') {
      style.padding = '0px'
      if (col.style) {
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -202,11 +202,13 @@
    const { value } = this.state
    this.setState({editing: false})
    if (col.enter === '$next') {
      MKEmitter.emit('nextLine', col, record.$Index)
    } else {
      MKEmitter.emit('tdFocus', col.enter + record.$Index)
    }
    setTimeout(() => {
      if (col.enter === '$next') {
        MKEmitter.emit('nextLine', col, record.$Index)
      } else {
        MKEmitter.emit('tdFocus', col.enter + record.$Index)
      }
    }, 50)
    if (value !== record[col.field]) {
      MKEmitter.emit('changeRecord', col.tableId, {...record, [col.field]: value})
@@ -368,6 +370,39 @@
          {content ? <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph> : null }
        </div>
      )
    } else if (col.type === 'formula') {
      let content = col.formula
      Object.keys(record).forEach(key => {
        let reg = new RegExp('@' + key + '@', 'ig')
        content = content.replace(reg, record[key])
      })
      if (col.eval !== 'false') {
        try {
          // eslint-disable-next-line
          content = eval(content)
        } catch (e) {
          content = ''
        }
      }
      content = content === undefined ? '' : content
      if (content !== '') {
        content = `${col.prefix || ''}${content}${col.postfix || ''}`
        if (col.eval === 'false') {
          content = content.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
          content = <span dangerouslySetInnerHTML={{__html: content}}></span>
        }
      }
      if (col.marks) {
        style = style || {}
        content = this.getMark(record, col.marks, style, content)
      }
      children = content
    } else if (col.type === 'custom') {
      style.padding = '0px'
      if (col.style) {
src/templates/comtableconfig/index.jsx
@@ -29,7 +29,7 @@
const Versions = asyncComponent(() => import('@/menu/versions'))
const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const Unattended = asyncComponent(() => import('@/templates/zshare/unattended'))
// const Unattended = asyncComponent(() => import('@/templates/zshare/unattended'))
const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent'))
const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
@@ -1261,7 +1261,7 @@
              </div>
            } bordered={false} extra={
              <div>
                <Unattended config={config} updateConfig={this.updateconfig}/>
                {/* <Unattended config={config} updateConfig={this.updateconfig}/> */}
                <Versions MenuId={menu.MenuID} open_edition={openEdition} updateConfig={this.refreshConfig}/>
                <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/>
                <EditComponent dict={this.state.dict} type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/>
src/templates/zshare/unattended/index.jsx
@@ -35,7 +35,7 @@
    this.setState({
      actions,
      autoMatic: config.autoMatic || {enable: 'false'},
      autoMatic: config.autoMatic || {enable: 'false', onFail: 'stop', action: ''},
      visible: true
    })
  }
src/templates/zshare/unattended/settingform/index.jsx
@@ -10,7 +10,9 @@
    actions: PropTypes.array
  }
  state = {}
  state = {
    enable: this.props.autoMatic.enable
  }
  handleConfirm = () => {
    // 表单提交时检查输入值是否正确
@@ -28,6 +30,7 @@
  render() {
    const { actions, autoMatic } = this.props
    const { getFieldDecorator } = this.props.form
    const { enable } = this.state
    const formItemLayout = {
      labelCol: {
@@ -48,7 +51,7 @@
              {getFieldDecorator('enable', {
                initialValue: autoMatic.enable,
              })(
                <Radio.Group>
                <Radio.Group onChange={(e) => this.setState({enable: e.target.value})}>
                  <Radio value="true">是</Radio>
                  <Radio value="false">否</Radio>
                </Radio.Group>
@@ -65,7 +68,7 @@
              {getFieldDecorator('action', {
                initialValue: autoMatic.action || '',
                rules: [{
                  required: true,
                  required: enable === 'true',
                  message: '请选择执行按钮!'
                }]
              })(
@@ -77,6 +80,24 @@
              )}
            </Form.Item>
          </Col>
          <Col span={20}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="按钮执行失败时,后续的处理方式。">
                <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}} />
                报错时
              </Tooltip>
            }>
              {getFieldDecorator('onFail', {
                initialValue: autoMatic.onFail,
              })(
                <Radio.Group onChange={(e) => this.setState({enable: e.target.value})}>
                  <Radio value="stop">停止</Radio>
                  <Radio value="skip">跳过</Radio>
                  <Radio value="again">重新执行</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )