fix: 配置功能调整完毕;分为管理员配置,和普通用户配置

master
Lxy 3 months ago
parent 05604c9d71
commit 41ad243443

@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { Card, Row, Col, Form, Input, Button, Select, Switch, InputNumber, Alert, Divider, Tabs } from 'antd';
import { Card, Row, Col, Form, Input, Button, Select, Switch, InputNumber, Alert, Divider, Tabs, Table, Modal } from 'antd';
import { message } from 'antd';
import { DatabaseOutlined, KeyOutlined, SettingOutlined, SaveOutlined, ToolOutlined } from '@ant-design/icons';
import { DatabaseOutlined, KeyOutlined, SettingOutlined, SaveOutlined, ToolOutlined, RobotOutlined, EditOutlined } from '@ant-design/icons';
import './AdminConfig.css';
const { Option } = Select;
@ -11,6 +11,9 @@ const { TabPane } = Tabs;
const AdminConfig = () => {
const [form] = Form.useForm();
const [messageApi, contextHolder] = message.useMessage();
const [aiModelModalVisible, setAiModelModalVisible] = useState(false);
const [currentAiModel, setCurrentAiModel] = useState(null);
const [aiModelForm] = Form.useForm();
//
useEffect(() => {
@ -384,6 +387,45 @@ const AdminConfig = () => {
}
};
// AI
const openAiModelConfig = (model) => {
setCurrentAiModel(model);
//
aiModelForm.setFieldsValue({
modelName: model.name,
apiKey: '',
apiBaseUrl: '',
temperature: 0.3,
maxTokens: 1000,
timeout: 30000,
retries: 3,
predictionPeriods: ['1H', '4H', '1D'],
confidenceThreshold: 70,
historyDataDays: 90,
technicalIndicators: {
enabled: true,
indicators: ['MACD', 'RSI', 'KDJ', 'MA', 'BOLL']
},
fundamentalAnalysis: {
enabled: true,
factors: ['资金流向', '持仓分析', '现货价格', '库存变化']
},
riskAssessment: {
enabled: true,
riskLevel: 'medium'
}
});
setAiModelModalVisible(true);
};
// AI
const saveAiModelConfig = (values) => {
console.log('AI模型配置保存:', values);
//
setAiModelModalVisible(false);
messageApi.success('AI模型配置已保存');
};
return (
<>
{contextHolder}
@ -1224,6 +1266,91 @@ const AdminConfig = () => {
</Card>
</>
)
},
{
label: <span><RobotOutlined /> AI模型配置</span>,
key: 'aiModel',
children: (
<>
{/* AI模型配置 */}
<Card title="AI模型配置" className="admin-config-card" style={{ marginBottom: 24 }}>
<Table
dataSource={[
{ id: 1, name: 'DeepSeek', accuracy: '85%', responseTime: '250ms', enabled: true },
{ id: 2, name: 'GPT-4', accuracy: '88%', responseTime: '350ms', enabled: false },
{ id: 3, name: 'Claude', accuracy: '82%', responseTime: '200ms', enabled: false },
{ id: 4, name: '自定义模型', accuracy: '78%', responseTime: '150ms', enabled: false }
]}
columns={[
{
title: '模型名称',
dataIndex: 'name',
key: 'name'
},
{
title: '准确率',
dataIndex: 'accuracy',
key: 'accuracy'
},
{
title: '响应时间',
dataIndex: 'responseTime',
key: 'responseTime'
},
{
title: '默认模型',
dataIndex: 'enabled',
key: 'enabled',
render: (enabled) => (
<Switch checked={enabled} onChange={() => {}} />
)
},
{
title: '操作',
key: 'action',
render: (_, record) => (
<Button type="link" icon={<EditOutlined />} onClick={() => openAiModelConfig(record)}>
配置
</Button>
)
}
]}
rowKey="id"
/>
</Card>
{/* 模型参数调优 */}
<Card title="模型参数调优" className="admin-config-card" style={{ marginBottom: 24 }}>
<Form layout="vertical">
<Row gutter={[16, 16]}>
<Col span={8}>
<Item label="预测周期">
<Select defaultValue="1D">
<Option value="1H">1小时</Option>
<Option value="4H">4小时</Option>
<Option value="1D">1</Option>
<Option value="1W">1</Option>
</Select>
</Item>
</Col>
<Col span={8}>
<Item label="置信度阈值">
<Input addonAfter="%" type="number" defaultValue={70} min={50} max={95} />
</Item>
</Col>
<Col span={8}>
<Item label="历史数据长度">
<Input addonAfter="天" type="number" defaultValue={90} min={30} max={365} />
</Item>
</Col>
</Row>
<Button type="primary" style={{ marginTop: 8 }}>
应用参数
</Button>
</Form>
</Card>
</>
)
}
]}
/>
@ -1239,6 +1366,168 @@ const AdminConfig = () => {
</Button>
</div>
</Form>
{/* AI模型详细配置模态框 */}
<Modal
title={`${currentAiModel?.name || 'AI模型'}详细配置`}
open={aiModelModalVisible}
onCancel={() => setAiModelModalVisible(false)}
width={900}
footer={[
<Button key="cancel" onClick={() => setAiModelModalVisible(false)}>
取消
</Button>,
<Button key="save" type="primary" onClick={() => aiModelForm.submit()}>
保存配置
</Button>
]}
>
<Form
form={aiModelForm}
layout="vertical"
onFinish={saveAiModelConfig}
>
{/* 基本配置 */}
<Card title="基本配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="模型名称" name="modelName">
<Input disabled />
</Item>
</Col>
<Col span={12}>
<Item label="API密钥" name="apiKey">
<Input.Password placeholder="请输入API密钥" />
</Item>
</Col>
<Col span={24}>
<Item label="API基础URL" name="apiBaseUrl">
<Input placeholder="请输入API基础URL" />
</Item>
</Col>
</Row>
</Card>
{/* 模型参数 */}
<Card title="模型参数" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={6}>
<Item label="温度" name="temperature">
<InputNumber min={0} max={1} step={0.1} />
</Item>
</Col>
<Col span={6}>
<Item label="最大Tokens" name="maxTokens">
<InputNumber min={100} max={4000} step={100} />
</Item>
</Col>
<Col span={6}>
<Item label="超时时间(ms)" name="timeout">
<InputNumber min={5000} max={60000} step={5000} />
</Item>
</Col>
<Col span={6}>
<Item label="重试次数" name="retries">
<InputNumber min={1} max={5} step={1} />
</Item>
</Col>
</Row>
</Card>
{/* 预测配置 */}
<Card title="预测配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="预测周期" name="predictionPeriods">
<Select mode="multiple" placeholder="请选择预测周期">
<Option value="1H">1小时</Option>
<Option value="4H">4小时</Option>
<Option value="1D">1</Option>
<Option value="1W">1</Option>
</Select>
</Item>
</Col>
<Col span={6}>
<Item label="置信度阈值(%)" name="confidenceThreshold">
<InputNumber min={50} max={95} step={5} />
</Item>
</Col>
<Col span={6}>
<Item label="历史数据长度(天)" name="historyDataDays">
<InputNumber min={30} max={365} step={30} />
</Item>
</Col>
</Row>
</Card>
{/* 技术指标配置 */}
<Card title="技术指标配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={24}>
<Item label="启用技术指标" name="technicalIndicators.enabled">
<Switch />
</Item>
</Col>
<Col span={24}>
<Item label="选择技术指标" name="technicalIndicators.indicators">
<Select mode="multiple" placeholder="请选择技术指标">
<Option value="MACD">MACD</Option>
<Option value="RSI">RSI</Option>
<Option value="KDJ">KDJ</Option>
<Option value="MA">MA</Option>
<Option value="BOLL">BOLL</Option>
<Option value="ATR">ATR</Option>
<Option value="ADX">ADX</Option>
</Select>
</Item>
</Col>
</Row>
</Card>
{/* 基本面分析配置 */}
<Card title="基本面分析配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={24}>
<Item label="启用基本面分析" name="fundamentalAnalysis.enabled">
<Switch />
</Item>
</Col>
<Col span={24}>
<Item label="选择分析因素" name="fundamentalAnalysis.factors">
<Select mode="multiple" placeholder="请选择分析因素">
<Option value="资金流向">资金流向</Option>
<Option value="持仓分析">持仓分析</Option>
<Option value="现货价格">现货价格</Option>
<Option value="库存变化">库存变化</Option>
<Option value="政策影响">政策影响</Option>
<Option value="行业动态">行业动态</Option>
</Select>
</Item>
</Col>
</Row>
</Card>
{/* 风险评估配置 */}
<Card title="风险评估配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="启用风险评估" name="riskAssessment.enabled">
<Switch />
</Item>
</Col>
<Col span={12}>
<Item label="风险等级" name="riskAssessment.riskLevel">
<Select>
<Option value="low">低风险</Option>
<Option value="medium">中等风险</Option>
<Option value="high">高风险</Option>
</Select>
</Item>
</Col>
</Row>
</Card>
</Form>
</Modal>
</div>
</>
);

@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { Card, Row, Col, Form, Input, Button, Select, Switch, Slider, Tag, Alert, Table, Modal, InputNumber, Radio, Space, Divider } from 'antd';
import { SettingOutlined, DatabaseOutlined, RobotOutlined, SlidersOutlined, EditOutlined, SaveOutlined, CloseOutlined } from '@ant-design/icons';
import { Card, Row, Col, Form, Input, Button, Select, Switch, Slider, Tag, Alert, InputNumber, Radio, Space, Divider } from 'antd';
import { SettingOutlined, SlidersOutlined, SaveOutlined, CloseOutlined } from '@ant-design/icons';
import './Config.css';
const { Option } = Select;
@ -8,73 +8,6 @@ const { Item } = Form;
const Config = () => {
const [form] = Form.useForm();
const [aiModelModalVisible, setAiModelModalVisible] = useState(false);
const [currentAiModel, setCurrentAiModel] = useState(null);
const [aiModelForm] = Form.useForm();
const [dataSourceModalVisible, setDataSourceModalVisible] = useState(false);
const [currentDataSource, setCurrentDataSource] = useState(null);
const [dataSourceForm] = Form.useForm();
//
const dataSources = [
{ id: 1, name: 'Wind', status: 'online', responseTime: '120ms', priority: 1, enabled: true },
{ id: 2, name: '同花顺', status: 'online', responseTime: '150ms', priority: 2, enabled: true },
{ id: 3, name: '东方财富', status: 'online', responseTime: '180ms', priority: 3, enabled: true },
{ id: 4, name: '新浪财经', status: 'offline', responseTime: '-', priority: 4, enabled: false },
{ id: 5, name: 'TQSDK', status: 'online', responseTime: '90ms', priority: 5, enabled: true },
{ id: 6, name: 'RQData', status: 'online', responseTime: '110ms', priority: 6, enabled: true }
];
// AI
const aiModels = [
{ id: 1, name: 'DeepSeek', accuracy: '85%', responseTime: '250ms', enabled: true },
{ id: 2, name: 'GPT-4', accuracy: '88%', responseTime: '350ms', enabled: false },
{ id: 3, name: 'Claude', accuracy: '82%', responseTime: '200ms', enabled: false },
{ id: 4, name: '自定义模型', accuracy: '78%', responseTime: '150ms', enabled: false }
];
// AI
const aiModelConfig = {
modelName: 'DeepSeek',
apiKey: 'sk-xxxxxxxxxxxxxxxxxxxxxxxx',
apiBaseUrl: 'https://api.deepseek.com',
temperature: 0.3,
maxTokens: 1000,
timeout: 30000,
retries: 3,
predictionPeriods: ['1H', '4H', '1D'],
confidenceThreshold: 70,
historyDataDays: 90,
technicalIndicators: {
enabled: true,
indicators: ['MACD', 'RSI', 'KDJ', 'MA', 'BOLL']
},
fundamentalAnalysis: {
enabled: true,
factors: ['资金流向', '持仓分析', '现货价格', '库存变化']
},
riskAssessment: {
enabled: true,
riskLevel: 'medium'
}
};
//
const dataSourceConfig = {
name: 'Wind',
apiKey: 'your-api-key',
apiSecret: 'your-api-secret',
apiUrl: 'https://api.example.com',
username: '',
password: '',
refreshInterval: 60, //
timeout: 10000, //
retries: 3,
priority: 1,
enabled: true,
dataTypes: ['price', 'volume', 'openInterest', 'funding'],
rateLimit: 100 //
};
//
const systemParams = {
@ -98,207 +31,10 @@ const Config = () => {
Alert.success('配置已保存');
};
// AI
const openAiModelConfig = (model) => {
setCurrentAiModel(model);
//
aiModelForm.setFieldsValue({
...aiModelConfig,
modelName: model.name
});
setAiModelModalVisible(true);
};
// AI
const saveAiModelConfig = (values) => {
console.log('AI模型配置保存:', values);
//
setAiModelModalVisible(false);
Alert.success('AI模型配置已保存');
};
//
const openDataSourceConfig = (dataSource) => {
setCurrentDataSource(dataSource);
//
dataSourceForm.setFieldsValue({
...dataSourceConfig,
name: dataSource.name,
priority: dataSource.priority,
enabled: dataSource.enabled
});
setDataSourceModalVisible(true);
};
//
const saveDataSourceConfig = (values) => {
console.log('数据源配置保存:', values);
//
setDataSourceModalVisible(false);
Alert.success('数据源配置已保存');
};
//
const getDataSourceStatusColor = (status) => {
return status === 'online' ? 'green' : 'red';
};
//
const getDataSourceStatusText = (status) => {
return status === 'online' ? '在线' : '离线';
};
return (
<div className="config">
<h2>配置管理</h2>
{/* 数据源配置 */}
<Card
title={<span><DatabaseOutlined /> 数据源配置</span>}
className="config-card"
style={{ marginBottom: 24 }}
>
<Table
dataSource={dataSources}
columns={[
{
title: '数据源',
dataIndex: 'name',
key: 'name'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (status) => (
<Tag color={getDataSourceStatusColor(status)}>
{getDataSourceStatusText(status)}
</Tag>
)
},
{
title: '响应时间',
dataIndex: 'responseTime',
key: 'responseTime'
},
{
title: '优先级',
dataIndex: 'priority',
key: 'priority',
render: (priority) => (
<Select
defaultValue={priority}
style={{ width: 80 }}
onChange={() => {}}
>
{[1, 2, 3, 4, 5].map(p => (
<Option key={p} value={p}>{p}</Option>
))}
</Select>
)
},
{
title: '启用',
dataIndex: 'enabled',
key: 'enabled',
render: (enabled) => (
<Switch checked={enabled} onChange={() => {}} />
)
},
{
title: '操作',
key: 'action',
render: (_, record) => (
<Button type="link" icon={<EditOutlined />} onClick={() => openDataSourceConfig(record)}>
编辑
</Button>
)
}
]}
rowKey="id"
/>
<Button type="primary" style={{ marginTop: 16 }}>
添加数据源
</Button>
</Card>
{/* AI模型配置 */}
<Card
title={<span><RobotOutlined /> AI模型配置</span>}
className="config-card"
style={{ marginBottom: 24 }}
>
<Table
dataSource={aiModels}
columns={[
{
title: '模型名称',
dataIndex: 'name',
key: 'name'
},
{
title: '准确率',
dataIndex: 'accuracy',
key: 'accuracy'
},
{
title: '响应时间',
dataIndex: 'responseTime',
key: 'responseTime'
},
{
title: '默认模型',
dataIndex: 'enabled',
key: 'enabled',
render: (enabled) => (
<Switch checked={enabled} onChange={() => {}} />
)
},
{
title: '操作',
key: 'action',
render: (_, record) => (
<Button type="link" icon={<EditOutlined />} onClick={() => openAiModelConfig(record)}>
配置
</Button>
)
}
]}
rowKey="id"
/>
{/* 模型参数调优 */}
<Card title="模型参数调优" style={{ marginTop: 24 }}>
<Form layout="vertical">
<Row gutter={[16, 16]}>
<Col span={8}>
<Item label="预测周期">
<Select defaultValue="1D">
<Option value="1H">1小时</Option>
<Option value="4H">4小时</Option>
<Option value="1D">1</Option>
<Option value="1W">1</Option>
</Select>
</Item>
</Col>
<Col span={8}>
<Item label="置信度阈值">
<Input addonAfter="%" type="number" defaultValue={70} min={50} max={95} />
</Item>
</Col>
<Col span={8}>
<Item label="历史数据长度">
<Input addonAfter="天" type="number" defaultValue={90} min={30} max={365} />
</Item>
</Col>
</Row>
<Button type="primary" style={{ marginTop: 8 }}>
应用参数
</Button>
</Form>
</Card>
</Card>
{/* 系统配置 */}
<Card
title={<span><SlidersOutlined /> 系统配置</span>}
@ -498,296 +234,7 @@ const Config = () => {
</Form>
</Card>
{/* AI模型详细配置模态框 */}
<Modal
title={`${currentAiModel?.name || 'AI模型'}详细配置`}
open={aiModelModalVisible}
onCancel={() => setAiModelModalVisible(false)}
width={900}
footer={[
<Button key="cancel" onClick={() => setAiModelModalVisible(false)}>
取消
</Button>,
<Button key="save" type="primary" onClick={() => aiModelForm.submit()}>
保存配置
</Button>
]}
>
<Form
form={aiModelForm}
layout="vertical"
onFinish={saveAiModelConfig}
>
{/* 基本配置 */}
<Card title="基本配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="模型名称" name="modelName">
<Input disabled />
</Item>
</Col>
<Col span={12}>
<Item label="API密钥" name="apiKey">
<Input.Password placeholder="请输入API密钥" />
</Item>
</Col>
<Col span={24}>
<Item label="API基础URL" name="apiBaseUrl">
<Input placeholder="请输入API基础URL" />
</Item>
</Col>
</Row>
</Card>
{/* 模型参数 */}
<Card title="模型参数" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={6}>
<Item label="温度" name="temperature">
<InputNumber min={0} max={1} step={0.1} />
</Item>
</Col>
<Col span={6}>
<Item label="最大Tokens" name="maxTokens">
<InputNumber min={100} max={4000} step={100} />
</Item>
</Col>
<Col span={6}>
<Item label="超时时间(ms)" name="timeout">
<InputNumber min={5000} max={60000} step={5000} />
</Item>
</Col>
<Col span={6}>
<Item label="重试次数" name="retries">
<InputNumber min={1} max={5} step={1} />
</Item>
</Col>
</Row>
</Card>
{/* 预测配置 */}
<Card title="预测配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="预测周期" name="predictionPeriods">
<Select mode="multiple" placeholder="请选择预测周期">
<Option value="1H">1小时</Option>
<Option value="4H">4小时</Option>
<Option value="1D">1</Option>
<Option value="1W">1</Option>
</Select>
</Item>
</Col>
<Col span={6}>
<Item label="置信度阈值(%)" name="confidenceThreshold">
<InputNumber min={50} max={95} step={5} />
</Item>
</Col>
<Col span={6}>
<Item label="历史数据长度(天)" name="historyDataDays">
<InputNumber min={30} max={365} step={30} />
</Item>
</Col>
</Row>
</Card>
{/* 技术指标配置 */}
<Card title="技术指标配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={24}>
<Item label="启用技术指标" name="technicalIndicators.enabled">
<Switch />
</Item>
</Col>
<Col span={24}>
<Item label="选择技术指标" name="technicalIndicators.indicators">
<Select mode="multiple" placeholder="请选择技术指标">
<Option value="MACD">MACD</Option>
<Option value="RSI">RSI</Option>
<Option value="KDJ">KDJ</Option>
<Option value="MA">MA</Option>
<Option value="BOLL">BOLL</Option>
<Option value="ATR">ATR</Option>
<Option value="ADX">ADX</Option>
</Select>
</Item>
</Col>
</Row>
</Card>
{/* 基本面分析配置 */}
<Card title="基本面分析配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={24}>
<Item label="启用基本面分析" name="fundamentalAnalysis.enabled">
<Switch />
</Item>
</Col>
<Col span={24}>
<Item label="选择分析因素" name="fundamentalAnalysis.factors">
<Select mode="multiple" placeholder="请选择分析因素">
<Option value="资金流向">资金流向</Option>
<Option value="持仓分析">持仓分析</Option>
<Option value="现货价格">现货价格</Option>
<Option value="库存变化">库存变化</Option>
<Option value="政策影响">政策影响</Option>
<Option value="行业动态">行业动态</Option>
</Select>
</Item>
</Col>
</Row>
</Card>
{/* 风险评估配置 */}
<Card title="风险评估配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="启用风险评估" name="riskAssessment.enabled">
<Switch />
</Item>
</Col>
<Col span={12}>
<Item label="风险等级" name="riskAssessment.riskLevel">
<Select>
<Option value="low">低风险</Option>
<Option value="medium">中等风险</Option>
<Option value="high">高风险</Option>
</Select>
</Item>
</Col>
</Row>
</Card>
</Form>
</Modal>
{/* 数据源详细配置模态框 */}
<Modal
title={`${currentDataSource?.name || '数据源'}详细配置`}
open={dataSourceModalVisible}
onCancel={() => setDataSourceModalVisible(false)}
width={900}
footer={[
<Button key="cancel" onClick={() => setDataSourceModalVisible(false)}>
取消
</Button>,
<Button key="save" type="primary" onClick={() => dataSourceForm.submit()}>
保存配置
</Button>
]}
>
<Form
form={dataSourceForm}
layout="vertical"
onFinish={saveDataSourceConfig}
>
{/* 基本配置 */}
<Card title="基本配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="数据源名称" name="name">
<Input disabled />
</Item>
</Col>
<Col span={12}>
<Item label="优先级" name="priority">
<InputNumber min={1} max={10} step={1} />
</Item>
</Col>
<Col span={24}>
<Item label="API URL" name="apiUrl">
<Input placeholder="请输入API URL" />
</Item>
</Col>
</Row>
</Card>
{/* 认证配置 */}
<Card title="认证配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<Item label="API Key" name="apiKey">
<Input.Password placeholder="请输入API Key" />
</Item>
</Col>
<Col span={12}>
<Item label="API Secret" name="apiSecret">
<Input.Password placeholder="请输入API Secret" />
</Item>
</Col>
<Col span={12}>
<Item label="用户名" name="username">
<Input placeholder="请输入用户名" />
</Item>
</Col>
<Col span={12}>
<Item label="密码" name="password">
<Input.Password placeholder="请输入密码" />
</Item>
</Col>
</Row>
</Card>
{/* 连接配置 */}
<Card title="连接配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={6}>
<Item label="刷新间隔(秒)" name="refreshInterval">
<InputNumber min={10} max={300} step={10} />
</Item>
</Col>
<Col span={6}>
<Item label="超时时间(ms)" name="timeout">
<InputNumber min={1000} max={30000} step={1000} />
</Item>
</Col>
<Col span={6}>
<Item label="重试次数" name="retries">
<InputNumber min={1} max={5} step={1} />
</Item>
</Col>
<Col span={6}>
<Item label="启用" name="enabled">
<Switch />
</Item>
</Col>
</Row>
</Card>
{/* 数据配置 */}
<Card title="数据配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={6}>
<Item label="速率限制(次/分钟)" name="rateLimit">
<InputNumber min={10} max={1000} step={10} />
</Item>
</Col>
<Col span={18}>
<Item label="数据类型" name="dataTypes">
<Select mode="multiple" placeholder="请选择数据类型">
<Option value="price">价格数据</Option>
<Option value="volume">成交量</Option>
<Option value="openInterest">持仓量</Option>
<Option value="funding">资金流向</Option>
<Option value="position">持仓分析</Option>
<Option value="basis">基差数据</Option>
</Select>
</Item>
</Col>
</Row>
</Card>
{/* 高级配置 */}
<Card title="高级配置" style={{ marginBottom: 16 }}>
<Row gutter={[16, 16]}>
<Col span={24}>
<Item label="备注">
<Input.TextArea rows={3} placeholder="请输入备注信息" />
</Item>
</Col>
</Row>
</Card>
</Form>
</Modal>
</div>
);
};

Loading…
Cancel
Save