king
2021-08-01 55a1b8402fd258da084df9b8a3935eef8450247c
src/menu/components/form/normal-form/groupform/index.jsx
@@ -18,13 +18,22 @@
  UNSAFE_componentWillMount () {
    const { group } = this.props
    const { appType } = this.state
    let fields = []
    group.fields.forEach(f => {
      if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
        fields.push(f)
      }
    })
    if (appType === 'mob') {
      group.fields.forEach(f => {
        if (f.field && ['text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
          fields.push(f)
        }
      })
    } else {
      group.fields.forEach(f => {
        if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
          fields.push(f)
        }
      })
    }
    this.setState({
      fields: fields
@@ -135,6 +144,52 @@
              )}
            </Form.Item>
          </Col> : null}
          <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="第一组不显示。">
                <Icon type="question-circle" />
                上一步
              </Tooltip>
            }>
              {getFieldDecorator('prevEnable', {
                initialValue: group.prevButton.enable
              })(
                <Radio.Group>
                  <Radio value="true">显示</Radio>
                  <Radio value="false">隐藏</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label="提交">
              {getFieldDecorator('subEnable', {
                initialValue: group.subButton.enable
              })(
                <Radio.Group>
                  <Radio value="true">显示</Radio>
                  <Radio value="false">隐藏</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="最后一组不显示。">
                <Icon type="question-circle" />
                跳过
              </Tooltip>
            }>
              {getFieldDecorator('nextEnable', {
                initialValue: group.nextButton.enable
              })(
                <Radio.Group>
                  <Radio value="true">显示</Radio>
                  <Radio value="false">隐藏</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )