perf: usages list;perf: move components (#3654)

* perf: usages list

* team sub plan load

* perf: usage dashboard code

* perf: dashboard ui

* perf: move components
This commit is contained in:
Archer
2025-01-23 17:29:39 +08:00
committed by archer
parent e4b85ffada
commit 5a04d015f9
271 changed files with 9981 additions and 4025 deletions

View File

@@ -1,7 +1,8 @@
import { POST } from '@/web/common/api/request';
import {
CreateTrainingUsageProps,
GetTotalPointsProps,
GetUsageDashboardProps,
GetUsageDashboardResponseItem,
GetUsageProps
} from '@fastgpt/global/support/wallet/usage/api.d';
import type { UsageItemType } from '@fastgpt/global/support/wallet/usage/type';
@@ -10,11 +11,8 @@ import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/t
export const getUserUsages = (data: PaginationProps<GetUsageProps>) =>
POST<PaginationResponse<UsageItemType>>(`/proApi/support/wallet/usage/getUsage`, data);
export const getTotalPoints = (data: GetTotalPointsProps) =>
POST<{ totalPoints: number; date: string }[]>(
`/proApi/support/wallet/usage/getTotalPoints`,
data
);
export const getDashboardData = (data: GetUsageDashboardProps) =>
POST<GetUsageDashboardResponseItem[]>(`/proApi/support/wallet/usage/getDashboardData`, data);
export const postCreateTrainingUsage = (data: CreateTrainingUsageProps) =>
POST<string>(`/support/wallet/usage/createTrainingUsage`, data);