feat: 增强财务管理系统功能与分析能力

主要更新:
- 🎯 新增综合分析仪表板,包含关键指标卡片、预算对比、智能洞察等组件
- 📊 增强数据可视化能力,新增标签云分析、时间维度分析等图表
- 📱 优化移动端响应式设计,改进触控交互体验
- 🔧 新增多个API模块(base、budget、tag),完善数据管理
- 🗂️ 重构路由结构,新增贷款、快速添加、设置、统计等独立模块
- 🔄 优化数据导入导出功能,增强数据迁移能力
- 🐛 修复多个已知问题,提升系统稳定性

技术改进:
- 使用IndexedDB提升本地存储性能
- 实现模拟API服务,支持离线开发
- 增加自动化测试脚本,确保功能稳定
- 优化打包配置,提升构建效率

文件变更:
- 新增42个文件
- 修改55个文件
- 包含测试脚本、配置文件、组件和API模块

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
你的用户名
2025-08-24 16:41:58 +08:00
parent 4b4616de1e
commit 675fe0a1a8
154 changed files with 10035 additions and 3978 deletions

View File

@@ -2,7 +2,7 @@ import { chromium } from 'playwright';
(async () => {
const browser = await chromium.launch({
headless: false // 有头模式,方便观察
headless: false, // 有头模式,方便观察
});
const context = await browser.newContext();
const page = await context.newPage();
@@ -14,9 +14,9 @@ import { chromium } from 'playwright';
console.log('1. 访问系统并登录...');
await page.goto('http://localhost:5666/', {
waitUntil: 'networkidle',
timeout: 30000
timeout: 30_000,
});
// 如果在登录页,执行登录
if (page.url().includes('/auth/login')) {
await page.waitForTimeout(1000);
@@ -25,13 +25,13 @@ import { chromium } from 'playwright';
await page.fill('input[type="password"]', '123456');
await page.keyboard.press('Enter');
await page.waitForTimeout(2000);
} catch (e) {
} catch {
console.log('登录失败或已登录,继续执行...');
}
}
console.log('2. 测试菜单切换...\n');
// 测试多次切换
const testCases = [
{ name: '交易管理', selector: 'a[href="/finance/transaction"]' },
@@ -41,38 +41,39 @@ import { chromium } from 'playwright';
{ name: '贷款管理', selector: 'a[href="/finance/loan"]' },
{ name: '人员管理(返回)', selector: 'a[href="/finance/person"]' },
];
for (const testCase of testCases) {
console.log(`切换到 ${testCase.name}...`);
// 点击菜单
await page.click(testCase.selector);
await page.waitForTimeout(1500);
// 获取当前URL
const currentUrl = page.url();
console.log(` - 当前URL: ${currentUrl}`);
// 检查页面内容
const pageTitle = await page.textContent('h1, .ant-card-head-title', { timeout: 3000 }).catch(() => null);
const pageTitle = await page
.textContent('h1, .ant-card-head-title', { timeout: 3000 })
.catch(() => null);
console.log(` - 页面标题: ${pageTitle || '未找到标题'}`);
// 检查是否有数据表格或卡片
const hasTable = await page.locator('.ant-table').count() > 0;
const hasCard = await page.locator('.ant-card').count() > 0;
const hasTable = (await page.locator('.ant-table').count()) > 0;
const hasCard = (await page.locator('.ant-card').count()) > 0;
console.log(` - 包含表格: ${hasTable ? '是' : '否'}`);
console.log(` - 包含卡片: ${hasCard ? '是' : '否'}`);
console.log('');
}
console.log('测试完成!菜单切换功能正常。');
} catch (error) {
console.error('测试失败:', error);
}
// 保持浏览器打开10秒供查看
console.log('\n浏览器将在10秒后关闭...');
await page.waitForTimeout(10000);
await page.waitForTimeout(10_000);
await browser.close();
})();
})();