king
2021-12-22 120a1ca7042212630dbe9a0cb6aa208ebf1b1e3d
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -4,10 +4,12 @@
import { Form, Row, Col, Input, Select, Radio, notification, Tooltip, InputNumber, Cascader } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import { btnIcons, btnClasses, formRule } from '@/utils/option.js'
import MkIcon from '@/components/mk-icon'
import { btnClasses, formRule } from '@/utils/option.js'
import asyncComponent from '@/utils/asyncComponent'
import Utils from '@/utils/utils.js'
import './index.scss'
const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
const { TextArea } = Input
const actionTypeOptions = {
@@ -125,8 +127,6 @@
          item.options = btnClasses
        } else if (item.key === 'innerFunc' && _procMode === 'inner') {
          item.required = true
        } else if (item.key === 'icon') {
          item.options = btnIcons
        } else if (item.key === 'intertype') {
          let iscustom = ['pop', 'prompt', 'exec'].includes(_opentype)
          item.options = this.state.interTypeOptions.filter(op => (iscustom || op.value !== 'custom'))
@@ -605,12 +605,11 @@
                  showSearch
                  filterOption={(input, option) => option.props.children[2].toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  onChange={(value) => {this.optionChange(item.key, value)}}
                  allowClear={item.key === 'icon'}
                  getPopupContainer={() => document.getElementById('winter')}
                >
                  {item.options.map((option, index) =>
                    <Select.Option id={`${index}`} title={option.text} key={`${index}`} value={option.value || option.field}>
                      {item.key === 'icon' && option.value ? <MkIcon type={option.value} /> : null} {option.text || option.label}
                      {option.text || option.label}
                    </Select.Option>
                  )}
                </Select>
@@ -618,6 +617,29 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'icon') { // 下拉搜索
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}>
                <QuestionCircleOutlined className="mk-form-tip" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || '',
                rules: [
                  {
                    required: !!item.required,
                    message: this.props.dict['form.required.select'] + item.label + '!'
                  }
                ]
              })(
                <MkEditIcon options={['edit', 'direction', 'normal', 'data', 'hint']} allowClear/>
              )}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'radio') {
        fields.push(
          <Col span={12} key={index}>