feat(douyu): 增加供给目标管理界面
This commit is contained in:
@@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
更新时间:2026-11-21
|
更新时间:2026-11-21
|
||||||
|
|
||||||
整体完成度约 **72%**。
|
整体完成度约 **73%**。
|
||||||
|
|
||||||
| 阶段 | 完成度 | 已落地 | 主要缺口 |
|
| 阶段 | 完成度 | 已落地 | 主要缺口 |
|
||||||
| --- | ---: | --- | --- |
|
| --- | ---: | --- | --- |
|
||||||
| 阶段 0:止乱 | 100% | 登录批次上限、任务槽隔离、连接及时释放 | 无 |
|
| 阶段 0:止乱 | 100% | 登录批次上限、任务槽隔离、连接及时释放 | 无 |
|
||||||
| 阶段 1:同步基础 | 95% | 新表、迁移、storehome 网关、全量快照、同步运行记录、内部工作队列执行器、session/points/gold/elite/esports/role/exchange 同步状态 | 少量旁路查询仍需继续收口 |
|
| 阶段 1:同步基础 | 95% | 新表、迁移、storehome 网关、全量快照、同步运行记录、内部工作队列执行器、session/points/gold/elite/esports/role/exchange 同步状态 | 少量旁路查询仍需继续收口 |
|
||||||
| 阶段 2:账号与 CK | 90% | CK 周期字段、invalid 分流、登录流水、日/小时/分类/单账号预算、login_relogin 队列真实消费与退避回队、预算配置 API | 更精细的动态预算计算 |
|
| 阶段 2:账号与 CK | 90% | CK 周期字段、invalid 分流、登录流水、日/小时/分类/单账号预算、login_relogin 队列真实消费与退避回队、预算配置 API | 更精细的动态预算计算 |
|
||||||
| 阶段 3:商品与供给 | 90% | 全量商品能力、限时窗口、原始响应、供给库存和目标缺口、定向补货入队、供给目标配置 API、默认目标、统一平台状态快照、供给看板、阈值告警 | 供给目标管理 UI、趋势统计 |
|
| 阶段 3:商品与供给 | 95% | 全量商品能力、限时窗口、原始响应、供给库存和目标缺口、定向补货入队、供给目标配置 API 与管理 UI、默认目标、统一平台状态快照、供给看板、阈值告警 | 趋势统计 |
|
||||||
| 阶段 4:安全恢复自动化 | 50% | account_sync_queue 与供给补货作业默认小批量开启,自动重登消费工作队列,硬失败率熔断,登录预算在线配置且熔断阈值实时生效 | 灰度批次自动扩缩和长期趋势告警 |
|
| 阶段 4:安全恢复自动化 | 50% | account_sync_queue 与供给补货作业默认小批量开启,自动重登消费工作队列,硬失败率熔断,登录预算在线配置且熔断阈值实时生效 | 灰度批次自动扩缩和长期趋势告警 |
|
||||||
| 阶段 5:清理旧逻辑 | 20% | 履约补货不再直接发官网请求 | 旧资料刷新、旁路查询和旧候选兜底仍需逐步下线 |
|
| 阶段 5:清理旧逻辑 | 20% | 履约补货不再直接发官网请求 | 旧资料刷新、旁路查询和旧候选兜底仍需逐步下线 |
|
||||||
|
|
||||||
@@ -610,3 +610,4 @@ Runner 启动前必须有预算 token;没有 token 时留在工作队列。
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| 2026-11-21 | 建立斗鱼账号平台最终实施蓝图 |
|
| 2026-11-21 | 建立斗鱼账号平台最终实施蓝图 |
|
||||||
| 2026-11-21 | 增加保守默认供给目标、账号平台供给看板和库存/CK/工作队列阈值告警 |
|
| 2026-11-21 | 增加保守默认供给目标、账号平台供给看板和库存/CK/工作队列阈值告警 |
|
||||||
|
| 2026-11-21 | 增加供给目标管理 UI,支持新增、编辑、启停和调整安全库存 |
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ import type {
|
|||||||
DouyuExchangeResultImage,
|
DouyuExchangeResultImage,
|
||||||
DouyuGoodsItem,
|
DouyuGoodsItem,
|
||||||
DouyuRechargeChannel,
|
DouyuRechargeChannel,
|
||||||
|
DouyuSupplyTarget,
|
||||||
|
DouyuSupplyTargetUpdate,
|
||||||
|
DouyuSupplyTargetUpsert,
|
||||||
DouyuTaskAccountItem,
|
DouyuTaskAccountItem,
|
||||||
DouyuTaskBatchRequest,
|
DouyuTaskBatchRequest,
|
||||||
DouyuTaskBatchResult,
|
DouyuTaskBatchResult,
|
||||||
@@ -19,6 +22,12 @@ export const douyuApi = {
|
|||||||
taskTypes: () => api.get<Record<string, string>, Record<string, string>>('/douyu/task-types'),
|
taskTypes: () => api.get<Record<string, string>, Record<string, string>>('/douyu/task-types'),
|
||||||
getAccountPlatformStatus: () =>
|
getAccountPlatformStatus: () =>
|
||||||
api.get<DouyuAccountPlatformStatus, DouyuAccountPlatformStatus>('/douyu/account-platform-status'),
|
api.get<DouyuAccountPlatformStatus, DouyuAccountPlatformStatus>('/douyu/account-platform-status'),
|
||||||
|
listSupplyTargets: () =>
|
||||||
|
api.get<DouyuSupplyTarget[], DouyuSupplyTarget[]>('/douyu/supply-targets'),
|
||||||
|
createSupplyTarget: (data: DouyuSupplyTargetUpsert) =>
|
||||||
|
api.post<DouyuSupplyTarget, DouyuSupplyTarget>('/douyu/supply-targets', data),
|
||||||
|
updateSupplyTarget: (targetId: number, data: DouyuSupplyTargetUpdate) =>
|
||||||
|
api.put<DouyuSupplyTarget, DouyuSupplyTarget>(`/douyu/supply-targets/${targetId}`, data),
|
||||||
listAccounts: (params?: { search?: string; tag?: string; ids?: string }) =>
|
listAccounts: (params?: { search?: string; tag?: string; ids?: string }) =>
|
||||||
api.get<DouyuTaskAccountItem[], DouyuTaskAccountItem[]>('/douyu/accounts', { params }),
|
api.get<DouyuTaskAccountItem[], DouyuTaskAccountItem[]>('/douyu/accounts', { params }),
|
||||||
listAccountsPaged: (params: PageParams & { ids?: string; tag?: string }) =>
|
listAccountsPaged: (params: PageParams & { ids?: string; tag?: string }) =>
|
||||||
|
|||||||
@@ -745,6 +745,33 @@ export interface DouyuSupplyTargetStatus {
|
|||||||
needs_replenishment: boolean;
|
needs_replenishment: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface DouyuSupplyTarget extends DouyuSupplyTargetStatus {
|
||||||
|
platform: string;
|
||||||
|
enabled: boolean;
|
||||||
|
updated_by: number | null;
|
||||||
|
updated_at: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DouyuSupplyTargetUpsert {
|
||||||
|
platform?: 'douyu';
|
||||||
|
scope: string;
|
||||||
|
commodity_id: string;
|
||||||
|
value_class: 'high_value' | 'ordinary';
|
||||||
|
target_covered: number;
|
||||||
|
target_available: number;
|
||||||
|
target_allocatable: number;
|
||||||
|
safety_buffer: number;
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DouyuSupplyTargetUpdate {
|
||||||
|
target_covered: number;
|
||||||
|
target_available: number;
|
||||||
|
target_allocatable: number;
|
||||||
|
safety_buffer: number;
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface DouyuPlatformAlert {
|
export interface DouyuPlatformAlert {
|
||||||
code: string;
|
code: string;
|
||||||
severity: 'critical' | 'warning' | 'info';
|
severity: 'critical' | 'warning' | 'info';
|
||||||
|
|||||||
@@ -5,20 +5,28 @@ import {
|
|||||||
Card,
|
Card,
|
||||||
Col,
|
Col,
|
||||||
Empty,
|
Empty,
|
||||||
|
Form,
|
||||||
|
Input,
|
||||||
|
InputNumber,
|
||||||
|
Modal,
|
||||||
Row,
|
Row,
|
||||||
|
Select,
|
||||||
Space,
|
Space,
|
||||||
Statistic,
|
Statistic,
|
||||||
|
Switch,
|
||||||
Table,
|
Table,
|
||||||
Tag,
|
Tag,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import type { TableProps } from 'antd';
|
import type { TableProps } from 'antd';
|
||||||
import { ReloadOutlined } from '@ant-design/icons';
|
import { EditOutlined, PlusOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||||
import {
|
import {
|
||||||
douyuApi,
|
douyuApi,
|
||||||
type DouyuAccountPlatformStatus,
|
type DouyuAccountPlatformStatus,
|
||||||
type DouyuSupplyTargetStatus,
|
type DouyuSupplyTarget,
|
||||||
} from '../../api/modules';
|
} from '../../api/modules';
|
||||||
|
import { usePermissions } from '../../hooks/usePermissions';
|
||||||
|
import { message } from '../../utils/antdMessage';
|
||||||
import { getErrorMessage } from '../../utils/error';
|
import { getErrorMessage } from '../../utils/error';
|
||||||
import { formatTime } from '../../utils/time';
|
import { formatTime } from '../../utils/time';
|
||||||
|
|
||||||
@@ -34,22 +42,52 @@ function targetTotal(actual: number, target: number, buffer: number) {
|
|||||||
return `${actual}/${effectiveTarget || '-'}`;
|
return `${actual}/${effectiveTarget || '-'}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface TargetFormValues {
|
||||||
|
scope: string;
|
||||||
|
commodity_id?: string;
|
||||||
|
value_class: 'high_value' | 'ordinary';
|
||||||
|
target_covered: number;
|
||||||
|
target_available: number;
|
||||||
|
target_allocatable: number;
|
||||||
|
safety_buffer: number;
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export default function AccountPlatformStatusPanel() {
|
export default function AccountPlatformStatusPanel() {
|
||||||
|
const { can } = usePermissions();
|
||||||
|
const canManage = can('douyu:config');
|
||||||
|
const [form] = Form.useForm<TargetFormValues>();
|
||||||
const [status, setStatus] = useState<DouyuAccountPlatformStatus | null>(null);
|
const [status, setStatus] = useState<DouyuAccountPlatformStatus | null>(null);
|
||||||
|
const [targets, setTargets] = useState<DouyuSupplyTarget[]>([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState('');
|
||||||
|
const [modalOpen, setModalOpen] = useState(false);
|
||||||
|
const [saving, setSaving] = useState(false);
|
||||||
|
const [editing, setEditing] = useState<DouyuSupplyTarget | null>(null);
|
||||||
|
|
||||||
const load = useCallback(async () => {
|
const load = useCallback(async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError('');
|
setError('');
|
||||||
try {
|
try {
|
||||||
setStatus(await douyuApi.getAccountPlatformStatus());
|
const platformStatus = await douyuApi.getAccountPlatformStatus();
|
||||||
|
if (canManage) {
|
||||||
|
setTargets(await douyuApi.listSupplyTargets());
|
||||||
|
} else {
|
||||||
|
setTargets(platformStatus.supply_targets.map((row) => ({
|
||||||
|
...row,
|
||||||
|
platform: 'douyu',
|
||||||
|
enabled: true,
|
||||||
|
updated_by: null,
|
||||||
|
updated_at: null,
|
||||||
|
})));
|
||||||
|
}
|
||||||
|
setStatus(platformStatus);
|
||||||
} catch (loadError: unknown) {
|
} catch (loadError: unknown) {
|
||||||
setError(getErrorMessage(loadError));
|
setError(getErrorMessage(loadError));
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, []);
|
}, [canManage]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
void load();
|
void load();
|
||||||
@@ -63,7 +101,69 @@ export default function AccountPlatformStatusPanel() {
|
|||||||
[status?.work_queue],
|
[status?.work_queue],
|
||||||
);
|
);
|
||||||
|
|
||||||
const columns: TableProps<DouyuSupplyTargetStatus>['columns'] = [
|
const openCreate = () => {
|
||||||
|
setEditing(null);
|
||||||
|
form.setFieldsValue({
|
||||||
|
scope: 'elite',
|
||||||
|
commodity_id: '',
|
||||||
|
value_class: 'high_value',
|
||||||
|
target_covered: 30,
|
||||||
|
target_available: 20,
|
||||||
|
target_allocatable: 10,
|
||||||
|
safety_buffer: 3,
|
||||||
|
enabled: true,
|
||||||
|
});
|
||||||
|
setModalOpen(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const openEdit = (target: DouyuSupplyTarget) => {
|
||||||
|
setEditing(target);
|
||||||
|
form.setFieldsValue({
|
||||||
|
scope: target.scope,
|
||||||
|
commodity_id: target.commodity_id,
|
||||||
|
value_class: target.value_class,
|
||||||
|
target_covered: target.target_covered,
|
||||||
|
target_available: target.target_available,
|
||||||
|
target_allocatable: target.target_allocatable,
|
||||||
|
safety_buffer: target.safety_buffer,
|
||||||
|
enabled: target.enabled,
|
||||||
|
});
|
||||||
|
setModalOpen(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const saveTarget = async () => {
|
||||||
|
const values = await form.validateFields();
|
||||||
|
setSaving(true);
|
||||||
|
try {
|
||||||
|
const payload = {
|
||||||
|
target_covered: Number(values.target_covered || 0),
|
||||||
|
target_available: Number(values.target_available || 0),
|
||||||
|
target_allocatable: Number(values.target_allocatable || 0),
|
||||||
|
safety_buffer: Number(values.safety_buffer || 0),
|
||||||
|
enabled: Boolean(values.enabled),
|
||||||
|
};
|
||||||
|
if (editing) {
|
||||||
|
await douyuApi.updateSupplyTarget(editing.target_id, payload);
|
||||||
|
} else {
|
||||||
|
await douyuApi.createSupplyTarget({
|
||||||
|
platform: 'douyu',
|
||||||
|
scope: values.scope,
|
||||||
|
commodity_id: (values.commodity_id || '').trim(),
|
||||||
|
value_class: values.value_class,
|
||||||
|
...payload,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
message.success(editing ? '供给目标已更新' : '供给目标已创建');
|
||||||
|
setModalOpen(false);
|
||||||
|
await load();
|
||||||
|
} catch (saveError: unknown) {
|
||||||
|
message.error(getErrorMessage(saveError));
|
||||||
|
} finally {
|
||||||
|
setSaving(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns: TableProps<DouyuSupplyTarget>['columns'] = [
|
||||||
{
|
{
|
||||||
title: '分类',
|
title: '分类',
|
||||||
width: 130,
|
width: 130,
|
||||||
@@ -100,69 +200,163 @@ export default function AccountPlatformStatusPanel() {
|
|||||||
row.available_shortage,
|
row.available_shortage,
|
||||||
row.allocatable_shortage,
|
row.allocatable_shortage,
|
||||||
);
|
);
|
||||||
return shortage > 0 ? <Text type="danger">{shortage}</Text> : <Text type="success">0</Text>;
|
return shortage > 0
|
||||||
|
? <Text type="danger">{shortage}</Text>
|
||||||
|
: <Text type="success">0</Text>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
width: 100,
|
width: 110,
|
||||||
render: (_, row) => (
|
render: (_, row) => (
|
||||||
row.needs_replenishment
|
!row.enabled
|
||||||
? <Tag color="warning">需补货</Tag>
|
? <Tag>已停用</Tag>
|
||||||
: <Tag color="success">达标</Tag>
|
: row.needs_replenishment
|
||||||
|
? <Tag color="warning">需补货</Tag>
|
||||||
|
: <Tag color="success">达标</Tag>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
...(canManage ? [{
|
||||||
|
title: '操作',
|
||||||
|
width: 80,
|
||||||
|
render: (_: unknown, row: DouyuSupplyTarget) => (
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
icon={<EditOutlined />}
|
||||||
|
onClick={() => openEdit(row)}
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
),
|
||||||
|
}] : []),
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<>
|
||||||
title="账号平台状态"
|
<Card
|
||||||
extra={(
|
title="账号平台状态"
|
||||||
<Space size={8}>
|
extra={(
|
||||||
<Text type="secondary">
|
<Space size={8}>
|
||||||
{status?.checked_at ? formatTime(status.checked_at) : '-'}
|
<Text type="secondary">
|
||||||
</Text>
|
{status?.checked_at ? formatTime(status.checked_at) : '-'}
|
||||||
<Button icon={<ReloadOutlined />} loading={loading} onClick={() => void load()}>
|
</Text>
|
||||||
刷新
|
{canManage ? (
|
||||||
</Button>
|
<Button icon={<PlusOutlined />} onClick={openCreate}>
|
||||||
</Space>
|
新增目标
|
||||||
)}
|
</Button>
|
||||||
>
|
) : null}
|
||||||
{error ? <Alert type="error" showIcon message={error} style={{ marginBottom: 16 }} /> : null}
|
<Button icon={<ReloadOutlined />} loading={loading} onClick={() => void load()}>
|
||||||
<Row gutter={[16, 16]}>
|
刷新
|
||||||
<Col xs={12} md={6}><Statistic title="CK 有效" value={status?.accounts.ck_valid || 0} /></Col>
|
</Button>
|
||||||
<Col xs={12} md={6}><Statistic title="24h 预计到期" value={status?.accounts.ck_expiring_24h || 0} /></Col>
|
</Space>
|
||||||
<Col xs={12} md={6}><Statistic title="新鲜可兑换商品" value={status?.commodities.fresh_available || 0} /></Col>
|
)}
|
||||||
<Col xs={12} md={6}><Statistic title="待处理账号工作" value={pendingWork} /></Col>
|
>
|
||||||
</Row>
|
{error ? <Alert type="error" showIcon message={error} style={{ marginBottom: 16 }} /> : null}
|
||||||
|
<Row gutter={[16, 16]}>
|
||||||
|
<Col xs={12} md={6}><Statistic title="CK 有效" value={status?.accounts.ck_valid || 0} /></Col>
|
||||||
|
<Col xs={12} md={6}><Statistic title="24h 预计到期" value={status?.accounts.ck_expiring_24h || 0} /></Col>
|
||||||
|
<Col xs={12} md={6}><Statistic title="新鲜可兑换商品" value={status?.commodities.fresh_available || 0} /></Col>
|
||||||
|
<Col xs={12} md={6}><Statistic title="待处理账号工作" value={pendingWork} /></Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
{status?.alerts.length ? (
|
{status?.alerts.length ? (
|
||||||
<Space orientation="vertical" size={8} style={{ width: '100%', marginTop: 16 }}>
|
<Space orientation="vertical" size={8} style={{ width: '100%', marginTop: 16 }}>
|
||||||
{status.alerts.map((alert) => (
|
{status.alerts.map((alert) => (
|
||||||
<Alert
|
<Alert
|
||||||
key={`${alert.code}-${alert.scope || ''}-${alert.value_class || ''}-${alert.message}`}
|
key={`${alert.code}-${alert.scope || ''}-${alert.value_class || ''}-${alert.message}`}
|
||||||
type={alert.severity === 'critical' ? 'error' : alert.severity === 'warning' ? 'warning' : 'info'}
|
type={alert.severity === 'critical' ? 'error' : alert.severity === 'warning' ? 'warning' : 'info'}
|
||||||
showIcon
|
showIcon
|
||||||
message={alert.message}
|
message={alert.message}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Space>
|
</Space>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
rowKey="target_id"
|
rowKey="target_id"
|
||||||
size="small"
|
size="small"
|
||||||
style={{ marginTop: 16 }}
|
style={{ marginTop: 16 }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={status?.supply_targets || []}
|
dataSource={targets}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
scroll={{ x: 650 }}
|
scroll={{ x: 750 }}
|
||||||
locale={{
|
locale={{
|
||||||
emptyText: (
|
emptyText: (
|
||||||
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无供给目标" />
|
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无供给目标" />
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
title={editing ? '编辑供给目标' : '新增供给目标'}
|
||||||
|
open={modalOpen}
|
||||||
|
confirmLoading={saving}
|
||||||
|
onOk={() => void saveTarget()}
|
||||||
|
onCancel={() => setModalOpen(false)}
|
||||||
|
okText="保存"
|
||||||
|
cancelText="取消"
|
||||||
|
destroyOnHidden
|
||||||
|
>
|
||||||
|
<Form form={form} layout="vertical">
|
||||||
|
<Row gutter={12}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="scope" label="作用域" rules={[{ required: true }]}>
|
||||||
|
<Select
|
||||||
|
disabled={Boolean(editing)}
|
||||||
|
options={[
|
||||||
|
{ value: 'elite', label: '精英宝典' },
|
||||||
|
{ value: 'esports', label: '电竞手册' },
|
||||||
|
{ value: 'peace', label: '和平小店' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="value_class" label="账号价值" rules={[{ required: true }]}>
|
||||||
|
<Select
|
||||||
|
disabled={Boolean(editing)}
|
||||||
|
options={[
|
||||||
|
{ value: 'high_value', label: '高价值' },
|
||||||
|
{ value: 'ordinary', label: '普通' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Form.Item name="commodity_id" label="商品 ID">
|
||||||
|
<Input disabled={Boolean(editing)} placeholder="留空表示该作用域全部商品" />
|
||||||
|
</Form.Item>
|
||||||
|
<Row gutter={12}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="target_covered" label="覆盖目标">
|
||||||
|
<InputNumber min={0} precision={0} style={{ width: '100%' }} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="target_available" label="可兑换目标">
|
||||||
|
<InputNumber min={0} precision={0} style={{ width: '100%' }} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row gutter={12}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="target_allocatable" label="可分配目标">
|
||||||
|
<InputNumber min={0} precision={0} style={{ width: '100%' }} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="safety_buffer" label="安全缓冲">
|
||||||
|
<InputNumber min={0} precision={0} style={{ width: '100%' }} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Form.Item name="enabled" label="启用" valuePropName="checked">
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user