king
2023-04-15 46aa44856bcb0e262d98918e06b4f83d2c11777a
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -108,8 +108,18 @@
  }
  updateDataType = (e) => {
    this.setState({dataType: e.target.value})
    this.props.updateDataType(e.target.value)
    if (e.target.value === 'custom') {
      setTimeout(() => {
        this.setState({
          dataType: e.target.value,
          defaultSql: this.props.setting.defaultSql || 'true'
        })
      }, 10)
    } else {
      this.setState({dataType: e.target.value})
    }
  }
  render() {
@@ -206,13 +216,13 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
            {/* {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="主键">
                {getFieldDecorator('primaryKey', {
                  initialValue: setting.primaryKey || 'ID',
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            </Col> : null} */}
            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="排序方式">
                {getFieldDecorator('order', {
@@ -282,6 +292,22 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {btnType !== 'print' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="Excel内容区是否自动换行。">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  自动换行
                </Tooltip>
              }>
                {getFieldDecorator('wrapText', {
                  initialValue: setting.wrapText || 'false'
                })(
                <Radio.Group>
                  <Radio value="false">否</Radio>
                  <Radio value="true">是</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
          </Row>
        </Form>
      </div>