refactor: 重构项目结构并优化代码

- 删除无用的文件和错误日志
- 创建统一的 imports 模块集中管理依赖
- 重构组件使用新的 imports 方式
- 修复文档路径大小写问题
- 优化类型定义和接口导出
- 更新依赖版本
- 改进错误处理和API配置
- 统一组件导出方式
This commit is contained in:
2026-03-27 16:56:06 +08:00
parent 2748456d8a
commit 22308fe042
337 changed files with 37060 additions and 57483 deletions

View File

@@ -1,12 +1,40 @@
import React, { useState, useEffect } from 'react';
import { Card, Typography, Row, Col, Select, Button, Table, Statistic, Spin, message, Alert, Badge } from 'antd';
import { LineChart, Line, AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';
import { AlertOutlined, UpOutlined, DownOutlined, ReloadOutlined, EyeOutlined } from '@ant-design/icons';
//
import { productDataSource, ProfitMonitor as ProfitMonitorData } from '@/services/productDataSource';
const { Title, Text, Paragraph } = Typography;
const { Option } = Select;
import {
useState,
useEffect,
Card,
Typography,
Row,
Col,
Select,
Button,
Table,
Statistic,
Spin,
message,
Alert,
Badge,
LineChart,
Line,
AreaChart,
Area,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
Legend,
ResponsiveContainer,
AlertOutlined,
UpOutlined,
DownOutlined,
ReloadOutlined,
EyeOutlined,
Title,
Text,
Paragraph,
Option,
FC,
} from '@/imports';
import { productDataSource } from '@/services/productDataSource';
interface ProfitData {
id: string;
@@ -38,7 +66,7 @@ interface ProductProfit {
status: 'up' | 'down' | 'stable';
}
const ProfitMonitor: React.FC = () => {
const ProfitMonitor: FC = () => {
const [loading, setLoading] = useState<boolean>(false);
const [profitData, setProfitData] = useState<ProfitData[]>([]);
const [alerts, setAlerts] = useState<AlertItem[]>([]);