fetch: 页面移植

对话数据、账单统计移植
This commit is contained in:
杨谢雨 2025-03-06 15:57:03 +08:00
parent 1285218eea
commit aaa0967f24
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { Echart } from '@/components/Echart'; import { Echart } from '@/components/Echart';
import { getReqChartBy30 } from '@/api/new-ai/statictic'; import { getReqChartBy30 } from '@/api/new-ai/statictic';
import {dayjs} from 'element-plus'
const options = ref({}); const options = ref({});
onMounted(async () => { onMounted(async () => {
@ -10,7 +10,7 @@
const xData: any = []; const xData: any = [];
const yData: any = []; const yData: any = [];
data.forEach((i: any) => { data.forEach((i: any) => {
xData.push(i.date); xData.push(dayjs(i.date).format('YYYY-MM-DD'));
yData.push(i.tokens); yData.push(i.tokens);
}); });