fix: timezone count (#4604)

* fix: timezone count

* fix: ts

* fix: test llm
This commit is contained in:
Archer
2025-04-20 22:24:03 +08:00
committed by GitHub
parent 61aa91b3aa
commit 4ac2a2f43e
10 changed files with 73 additions and 50 deletions

View File

@@ -70,11 +70,11 @@ const UsageDashboard = ({
() =>
getDashboardData({
dateStart: dateRange.from
? new Date(dateRange.from.setHours(0, 0, 0, 0))
: new Date(new Date().setHours(0, 0, 0, 0)),
? dayjs(dateRange.from.setHours(0, 0, 0, 0)).format()
: dayjs(new Date().setHours(0, 0, 0, 0)).format(),
dateEnd: dateRange.to
? new Date(addDays(dateRange.to, 1).setHours(0, 0, 0, 0))
: new Date(addDays(new Date(), 1).setHours(0, 0, 0, 0)),
? dayjs(addDays(dateRange.to, 1).setHours(0, 0, 0, 0)).format()
: dayjs(addDays(new Date(), 1).setHours(0, 0, 0, 0)).format(),
sources: isSelectAllSource ? undefined : usageSources,
teamMemberIds: isSelectAllTmb ? undefined : selectTmbIds,
unit

View File

@@ -45,8 +45,8 @@ const UsageTableList = ({
filterParams;
const requestParams = useMemo(() => {
return {
dateStart: dateRange.from || new Date(),
dateEnd: addDays(dateRange.to || new Date(), 1),
dateStart: dayjs(dateRange.from || new Date()).format(),
dateEnd: dayjs(addDays(dateRange.to || new Date(), 1)).format(),
sources: isSelectAllSource ? undefined : usageSources,
teamMemberIds: isSelectAllTmb ? undefined : selectTmbIds,
projectName

View File

@@ -16,8 +16,6 @@ import FillRowTabs from '@fastgpt/web/components/common/Tabs/FillRowTabs';
import MultipleSelect, {
useMultipleSelect
} from '@fastgpt/web/components/common/MySelect/MultipleSelect';
import SearchInput from '@fastgpt/web/components/common/Input/SearchInput';
import MySelect from '@fastgpt/web/components/common/MySelect';
import { useRouter } from 'next/router';
import dynamic from 'next/dynamic';

View File

@@ -51,6 +51,7 @@ export const readConfigData = async (name: string) => {
export function initGlobalVariables() {
function initPlusRequest() {
global.textCensorHandler = function textCensorHandler({ text }: { text: string }) {
if (!isProVersion()) return Promise.resolve({ code: 200 });
return POST<{ code: number; message?: string }>('/common/censor/check', { text });
};