king
2023-09-07 4b467effbc0e3a9199146573c0ceedf404bd07c5
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,15 +216,25 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="主键">
            {btnType !== 'print' && dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="可自定义主键,空时默认为数据源主键。注:选行导出时使用。">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  主键
                </Tooltip>
              }>
                {getFieldDecorator('primaryKey', {
                  initialValue: setting.primaryKey || 'ID',
                  initialValue: setting.primaryKey || '',
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="排序方式">
              <Form.Item label={
                <Tooltip placement="topLeft" title="如果在自定义脚本中使用了@pageSize@或@orderBy@,请在数据源中单独写排序语句。">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  排序方式
                </Tooltip>
              }>
                {getFieldDecorator('order', {
                  initialValue: setting.order || '',
                  rules: [