mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
fix: timezone count (#4604)
* fix: timezone count * fix: ts * fix: test llm
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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';
|
||||
|
||||
|
@@ -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 });
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user