king
2021-10-21 1da6506bf58270bacc2a4345002c6b082835580e
src/templates/modalconfig/settingform/index.jsx
@@ -7,7 +7,6 @@
class SettingForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,     // 字典项
    config: PropTypes.object,   // 表单配置信息
    isSubTab: PropTypes.bool,   // 是否为子标签
    inputSubmit: PropTypes.any  // 回车提交事件
@@ -64,7 +63,7 @@
  }
  render() {
    const { config, dict } = this.props
    const { config } = this.props
    const { fields, appType, display } = this.state
    const { getFieldDecorator } = this.props.form
@@ -115,19 +114,41 @@
            </Form.Item>
          </Col> : null}
          <Col span={12}>
            <Form.Item label="焦点">
            <Form.Item label="初始焦点">
              {getFieldDecorator('focus', {
                initialValue: config.setting.focus || ''
              })(
                <Select
                  showSearch
                  allowClear
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                >
                  <Select.Option value="">
                    {dict['model.empty']}
                  </Select.Option>
                  {fields.map(option =>
                    <Select.Option id={option.uuid} title={option.label} key={option.uuid} value={option.field}>
                      {option.label}
                    </Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="执行失败时需要聚焦的表单。">
                <Icon type="question-circle" />
                失败焦点
              </Tooltip>
            }>
              {getFieldDecorator('errFocus', {
                initialValue: config.setting.errFocus || ''
              })(
                <Select
                  showSearch
                  allowClear
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                >
                  {fields.map(option =>
                    <Select.Option key={option.uuid} value={option.uuid}>
                      {option.label}
                    </Select.Option>
                  )}
@@ -172,7 +193,12 @@
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label="显示方式">
            <Form.Item label={
              <Tooltip placement="topLeft" title="打印按钮中无效。">
                <Icon type="question-circle" />
                显示方式
              </Tooltip>
            }>
              {getFieldDecorator('display', {
                initialValue: display || 'modal'
              })(
@@ -210,6 +236,18 @@
              )}
            </Form.Item>
          </Col> : null}
          {display === 'drawer' && appType !== 'mob' ? <Col span={12}>
            <Form.Item label="表单类型">
              {getFieldDecorator('formType', {
                initialValue: config.setting.formType || 'edit'
              })(
                <Radio.Group style={{whiteSpace: 'nowrap'}}>
                  <Radio value="edit">编辑</Radio>
                  <Radio value="check">查看</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {appType === 'mob' ? <Col span={12}>
            <Form.Item label="左边距">
              {getFieldDecorator('paddingLeft', {