refactor(services): 重构服务文件结构,将服务按功能分类到不同目录

- 将服务文件按功能分类到core、ai、analytics、security等目录
- 修复logger导入路径问题,统一使用相对路径
- 更新相关文件的导入路径引用
- 添加新的批量操作组件导出文件
- 修复dashboard页面中的类型错误
- 添加dotenv依赖到package.json
This commit is contained in:
2026-03-25 13:46:26 +08:00
parent e59d7c6620
commit 2748456d8a
598 changed files with 74404 additions and 9576 deletions

View File

@@ -114,7 +114,7 @@ const Transactions: React.FC = () => {
sorter: (a: Transaction, b: Transaction) => a.amount - b.amount,
render: (amount: number, record: Transaction) => (
<Text style={{ color: record.type === 'income' ? '#52c41a' : '#ff4d4f', fontWeight: 500 }}>
{record.type === 'income' ? '+' : '-'}${amount.toFixed(2)}
{record.type === 'income' ? '+' : '-'}${(amount || 0).toFixed(2)}
</Text>
),
},
@@ -125,13 +125,17 @@ const Transactions: React.FC = () => {
filters: [
{ text: '收入', value: 'income' },
{ text: '支出', value: 'expense' },
{ text: '退款', value: 'refund' },
{ text: '费用', value: 'fee' },
],
render: (type: string) => {
const typeConfig = {
income: { text: '收入', color: 'success' },
expense: { text: '支出', color: 'error' },
refund: { text: '退款', color: 'warning' },
fee: { text: '费用', color: 'processing' },
};
const config = typeConfig[type as keyof typeof typeConfig];
const config = typeConfig[type as keyof typeof typeConfig] || { text: type, color: 'default' };
return <Tag color={config.color}>{config.text}</Tag>;
},
},