king
2021-05-26 f66e19dd13af07ee466306632ad43c72f1f16ae7
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -8,18 +8,18 @@
const { TextArea } = Input
const actionTypeOptions = {
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'],
  excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width'],
  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'],
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width']
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'controlField', 'controlVal'],
  excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width', 'controlField', 'controlVal'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'controlField', 'controlVal'],
  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width', 'controlField', 'controlVal'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open', 'controlField', 'controlVal'],
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width', 'controlField', 'controlVal']
}
class MainSearch extends Component {
class ActionForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,      // 字典项
    type: PropTypes.any,         // type为"card"时,只可选单行或不选行
@@ -138,7 +138,7 @@
  }
  getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode) => {
    let _options = fromJS(actionTypeOptions[_opentype]).toJS() // 选项列表
    let _options = actionTypeOptions[_opentype] ? fromJS(actionTypeOptions[_opentype]).toJS() : [] // 选项列表
    
    if (_opentype === 'innerpage') {         // 新页面,可选模板(自定义时,可填入外部链接)
      if (_pageTemplate === 'custom') {
@@ -171,7 +171,7 @@
      }
    } else if (_opentype !== 'popview' && _opentype !== 'tab') {
      if (_intertype === 'custom') {
        _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method')
        _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method', 'cross')
        if (_procMode === 'system') {
          _options.push('sql', 'sqlType')
        } else {
@@ -474,6 +474,14 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'tip') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.label}>
              {item}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'number') {
        fields.push(
          <Col span={12} key={index}>
@@ -520,8 +528,8 @@
                  getPopupContainer={() => document.getElementById('winter')}
                >
                  {item.options.map((option, index) =>
                    <Select.Option id={`${index}`} title={option.text} key={`${index}`} value={option.value}>
                      {item.key === 'icon' && option.value && <Icon type={option.value} />} {option.text}
                    <Select.Option id={index} key={option.value || option.field} value={option.value || option.field}>
                      {item.key === 'icon' && option.value ? <Icon type={option.value} /> : ''} {option.text || option.label}
                    </Select.Option>
                  )}
                </Select>
@@ -532,7 +540,12 @@
      } else if (item.type === 'radio') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.label}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal,
                rules: [
@@ -614,6 +627,7 @@
        if (!err) {
          values.uuid = card.uuid
          values.verify = card.verify || null
          values.modal = card.modal || null
          if (values.show === 'icon' && !values.icon) {
            notification.warning({
@@ -673,4 +687,4 @@
  }
}
export default Form.create()(MainSearch)
export default Form.create()(ActionForm)