Compare commits

..
84 Commits
Author SHA1 Message Date
DevOpsandfactory-droid[bot] f986c63cd1 fix: 修复集体项目队员名称显示
- 修改 members 渲染逻辑,支持 name 和 playerName 两种字段

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-16 13:46:55 +08:00
DevOps 45d7e9f36f Revert "修复合计时间显示-1的问题:添加前端备用计算逻辑"
This reverts commit 5f5ab37e97.
2026-01-16 11:16:45 +08:00
DevOpsandfactory-droid[bot] 5f5ab37e97 修复合计时间显示-1的问题:添加前端备用计算逻辑
当后端返回的estimatedDuration为null或负数时,前端自动计算参赛人数×2分钟作为默认时长

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-16 11:13:45 +08:00
DevOpsandfactory-droid[bot] 066f13f48d fix: 调度页面状态列显示中文状态文本
- 修改状态列数据源从venueName改为status
- 状态显示: 未开始/进行中/已完成

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 19:11:26 +08:00
Z-WICK 6eff8a08b6 fix(schedule): 修复移动弹窗选择场地后自动关闭的问题
- 在el-select上添加:teleported="false"属性
- 防止下拉框点击事件冒泡导致popover关闭
2026-01-15 14:38:44 +08:00
Z-WICKandfactory-droid[bot] ba2535f163 隐藏编排页面项目编号显示
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 14:12:52 +08:00
Z-WICKandfactory-droid[bot] 9035a6aafa 修复集体项目展开后显示队员名单
- 在items映射中添加members字段,保留API返回的队员数据
- groupItemsByTeam方法已正确处理members数组
- 集体项目现在正确显示队员姓名而非队伍名称

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 14:02:46 +08:00
Z-WICKandfactory-droid[bot] 23d1856dcc fix: 修复表号与序号顺序不一致问题
移除按id排序逻辑,使表号与显示顺序保持一致

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 13:16:40 +08:00
Z-WICKandfactory-droid[bot] 0cd46d125f fix: 调度页面只显示有项目的时间段
从编排数据中提取实际有项目的时间段,过滤掉没有比赛的时间段

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 13:04:57 +08:00
Z-WICKandfactory-droid[bot] 1643acf767 fix: 修复调度页面编排状态检查逻辑
使用 isCompleted 字段替代 scheduleStatus 判断编排是否完成

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 12:59:57 +08:00
Z-WICKandfactory-droid[bot] 0c6437084b fix: 编排页面隐藏签到状态和异常操作按钮
这些功能只在调度页面中显示

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 12:54:55 +08:00
Z-WICKandfactory-droid[bot] 0419af8561 fix: 修复项目时间统计表分组数显示问题
- 添加 getScheduleResult API 调用获取编排数据
- 支持 competitionGroups 和 scheduleGroups 两种字段名
- 当 projectId 为 -1 时,从 group.title 提取项目名作为 key
- 使用项目名作为 fallback 进行分组数查找

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-15 12:15:19 +08:00
Z-WICK d85833ede5 Revert "fix: show actual athlete count for individual projects"
This reverts commit 81b9cc5f35caa486da4440cf824daf0f0af9cc6d.
2026-01-13 16:54:47 +08:00
Z-WICKandfactory-droid[bot] 11dc18c367 fix: show actual athlete count for individual projects
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-13 16:53:04 +08:00
DevOpsandfactory-droid[bot] d7af8d1394 fix: venue tab filtering using String() comparison for large IDs
- Fixed JavaScript precision loss issue with large venue IDs
- Changed Number() to String() comparison in filteredCompetitionGroups
- Changed Number() to String() comparison in venueData computed property
- Added ExportPreview component

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-13 16:42:28 +08:00
DevOpsandfactory-droid[bot] c04193bf84 修复赛事状态动态计算:报名结束当天全天显示报名中
- competition/index.vue: 列表页状态动态计算
- competition/list.vue: 添加calculateStatus方法
- order/index.vue: 修复报名结束当天判断逻辑
- schedule/index.vue: 修复标记签到语法错误

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-10 12:07:48 +08:00
Z-WICK 940e2f55e1 sync changes 2026-01-10 11:22:11 +08:00
Z-WICKandfactory-droid[bot] 279af5f8b6 feat: 编排页面显示预计时长
1. 接收后端estimatedDuration字段
2. 场地视图合计时间列显示预计时长

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-09 17:59:15 +08:00
Z-WICKandfactory-droid[bot] e1f13dae0d feat: 优化编排页面显示
1. 项目列表分组类别显示男子/女子/混合标签
2. 编排页时间段只显示有比赛的时段
3. 集体项目显示队数和组数
4. 单人项目显示1组

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-09 17:42:48 +08:00
Z-WICKandfactory-droid[bot] bb3122a843 feat: 移除项目编码手动输入
- 项目编码由后端自动生成
- 移除表单中的项目编码输入框和验证规则

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-08 17:19:33 +08:00
Z-WICKandfactory-droid[bot] e146e74fe7 feat: 添加单位统计API调用
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-08 16:08:47 +08:00
Z-WICKandfactory-droid[bot] c3a0ad1a7d 重构项3: 添加表号生成和显示功能
- 在编排页面项目头部添加表号显示
- 实现generateTableNo方法,格式为: 场地(1位)+时段(1位)+序号(2位)
- 时段规则: 上午=1, 下午=2
- 序号在同场地同时段中按id排序确定

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-08 15:46:48 +08:00
Z-WICKandfactory-droid[bot] 1f694dce21 重构项1: 移除项目管理中的场地分配功能
- 移除表格中的所属场地列
- 移除表单中的场地选择字段
- 移除场地相关的API导入和数据定义
- 移除handleCompetitionChangeInForm、loadVenuesForProjects、getVenueName等函数
- 后端已实现动态场地分配,无需前端指定

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-08 15:37:07 +08:00
Z-WICKandfactory-droid[bot] fa34616909 feat: 赛事管理页面状态根据时间自动计算
- 添加 calculateStatus 方法根据报名时间和比赛时间计算状态
- 状态显示不再依赖数据库字段,而是实时计算

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-07 12:28:07 +08:00
Z-WICKandfactory-droid[bot] 8ac66b09bd fix: 将订单管理改为赛事管理
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-07 11:58:03 +08:00
Z-WICKandfactory-droid[bot] b2643c966d fix: 修复场地类型(venueType)加载和保存问题
- 在loadVenues中添加venueType字段映射,确保从后端加载时正确回显
- 在saveVenues中添加venueType字段,确保保存时正确提交
- 修复附件上传headers认证问题

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-06 15:17:28 +08:00
Z-WICK 3eb6a2b31d fix(deduction): 修复扣分项编辑功能
- form对象添加itemName字段解决编辑时名称不显示
- 查询时过滤空字符串参数避免无数据问题
- 字段名deductionPoints改为deductionPoint与后端一致
2026-01-06 14:56:10 +08:00
Z-WICKandfactory-droid[bot] d4d0710115 fix(competition): 修复附件上传按钮失灵问题
- 添加 getToken 导入
- 为 avue-form 上传组件添加 Blade-Auth headers 认证

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-06 12:52:28 +08:00
Z-WICKandfactory-droid[bot] 8e7bb90c60 fix: 修复报名详情页面文案和统计逻辑
- 修正错误文案: 单位型号人数 → 报名人数, 剩下显时(公共) → 预计时长(分钟)
- 重新设计参赛人数统计表格: 单位/单人项目/集体项目/男/女/合计
- 修复统计逻辑按项目类型和性别正确统计

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-06 11:47:56 +08:00
Z-WICKandfactory-droid[bot] 1cf134eb44 fix: 移除项目列表中的参赛人数限制列
- 从competition/index.vue移除参赛人数限制列
- 从competition/create.vue移除参赛人数限制列
- 该功能已不再使用

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-06 10:59:51 +08:00
Z-WICKandfactory-droid[bot] dcae1a4542 feat(project): add venue selection for project management
- Add venueId field to project form
- Load venue list when competition is selected
- Allow assigning projects to specific venues

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-05 15:59:09 +08:00
Z-WICK 198792e5e3 Revert "feat(judgeInvite): add project assignment editing feature"
This reverts commit ecd569337d.
2026-01-05 15:20:01 +08:00
Z-WICKandfactory-droid[bot] b3b59b8ce4 feat(judgeInvite): add project assignment editing feature
- Add edit projects button in judge invite list
- Add edit projects dialog with project multi-select
- Add updateInviteProjects API method
- Fix: load project list before opening edit dialog

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-05 15:08:04 +08:00
Z-WICK 73784808a7 feat(judgeInvite): 增加场地过滤条件 2025-12-31 16:20:50 +08:00
Z-WICK 231fc9b550 fix(project): 将最大参赛人数改为单位容纳人数,用于编排分组计算 2025-12-30 16:55:20 +08:00
Z-WICK ac29290d69 fix(project): 移除项目编辑/新增页面的报名时间字段 2025-12-30 16:48:56 +08:00
Z-WICK 8429179f85 feat(schedule): 前端支持动态时间段配置
- 添加 getScheduleConfig API 调用
- 更新 generateTimeSlots 从后端获取时间配置
- 添加 loadScheduleConfig 和 formatTimeForDisplay 方法
- 时间段不再硬编码,从 ScheduleConfig 动态获取
2025-12-30 10:51:28 +08:00
Z-WICK 099d2af9b8 fix(schedule): 修复markPlayerAsException重复定义导致的事件绑定问题 2025-12-29 17:28:03 +08:00
Z-WICK ed688f596a fix(api): 修复updateCheckInStatus API路径 2025-12-29 15:42:43 +08:00
Z-WICK 454097f791 fix(schedule): 修复展开选手详情中的异常状态持久化API调用
- markPlayerAsException方法添加updateCheckInStatus API调用
- removePlayerException方法添加updateCheckInStatus API调用
- 添加编排完成状态检查
2025-12-29 15:33:19 +08:00
Z-WICK e39553baea feat: add estimated duration field and exception status persistence
- Add estimatedDuration field to project form with validation
- Add estimatedDuration column to project table
- Add updateCheckInStatus API for exception status persistence
- Call backend API when marking/removing exception status
2025-12-29 15:08:29 +08:00
Z-WICK cc6762a4f4 docs: 更新README,简化内容并更新域名 2025-12-29 14:21:48 +08:00
Z-WICK 8b26b8c717 fix: 项目管理表格显示所属赛事名称 2025-12-29 13:24:14 +08:00
Z-WICK 12f66f44c1 fix: 修复项目编辑时报名费字段映射问题 2025-12-29 11:48:03 +08:00
Z-WICK 09257b7069 fix: 修复项目管理页面编辑项目API调用错误
- 将updateProject改为submitProject,后端submit接口同时支持新增和修改
2025-12-29 11:21:55 +08:00
Z-WICK 55c19d1ca8 fix: 修复项目管理页面新增项目API调用错误
- 将addProject改为submitProject,匹配后端API端点/martial/project/submit
2025-12-29 11:16:13 +08:00
Z-WICKandfactory-droid[bot] f05c6f9b62 裁判邀请表格添加负责场地列
- 显示裁判负责的场地名称
- 总裁显示"全部场地"

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-29 10:32:46 +08:00
Z-WICKandfactory-droid[bot] b0e0f56f62 添加总裁(裁判长)角色支持到裁判邀请和评委管理页面
- judgeInvite/index.vue: 添加总裁选项和显示
- referee/index.vue: 添加总裁筛选和显示

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-28 20:06:08 +08:00
Z-WICK bb604caa12 feat: 添加项目类型筛选和显示功能
- 添加项目类型下拉筛选框(套路/散打/器械/对练)
- 在表格中添加项目类型列
- 支持项目类型查询参数
2025-12-28 19:03:48 +08:00
Z-WICK 1339e684a9 fix: 修复项目管理页面筛选功能
- 将分组类别从下拉框改为文本输入框,支持模糊搜索
- 移除项目类型筛选(后端不支持该字段)
- 修复handleReset中的缩进问题
2025-12-28 17:28:18 +08:00
Z-WICKandfactory-droid[bot] 87ddbb312f fix: 移除赛事筛选的 status 限制,显示所有赛事
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-28 17:12:18 +08:00
Z-WICKandfactory-droid[bot] 6313b28c6d fix: 修复项目管理页面数据显示问题
- 修复 API 响应数据解析 (res.data.data.records)
- 移除后端不支持的 eventType 参数
- 修复报名费字段映射 (registrationFee -> price)
- 修复分组类别显示为文本而非数字

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-28 17:09:38 +08:00
Z-WICKandfactory-droid[bot] 1bfe992f04 fix: change participantType to type to match backend field name
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-28 16:37:31 +08:00
Z-WICKandClaude Opus 4.5 bf3021331f refactor: 裁判角色名称修改 - 裁判长→主裁判, 普通裁判→裁判员
- 修改referee/index.vue中的UI显示文字
- 修改judgeInvite/index.vue中的UI显示文字
- 更新referee.js中的注释

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:37:29 +08:00
Z-WICKandClaude Opus 4.5 ffcbafd855 feat(judgeInvite): 移除项目分配功能,裁判默认负责整个场地所有项目
- 移除导入裁判时的项目选择下拉框
- 移除项目必选验证
- 不传projects参数,后端自动获取场地所有项目

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 16:35:27 +08:00
Z-WICKandClaude Opus 4.5 bbe4933e3a feat: 裁判邀请导入功能添加场地和项目选择
- 导入对话框添加场地下拉选择
- 导入对话框添加项目多选
- 调用API时传递venueId和projects参数

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:45:10 +08:00
hongjianli fae2a3a5e6 fix bugs 2025-12-26 13:15:26 +08:00
hongjianli 5288a74559 Merge branch 'main' of git.waypeak.work:martial/martial-web 2025-12-26 11:06:52 +08:00
hongjianli 56657e3e1c fix bugs 2025-12-26 11:06:38 +08:00
Z-WICKandClaude Opus 4.5 434017e6f8 修复导出功能:正确处理blob响应
- axios拦截器跳过blob类型响应的code检查
- 从res.data获取blob数据而非res

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 13:58:21 +08:00
Z-WICKandClaude Opus 4.5 a9e335e0a5 实现赛程表导出功能
- 添加 exportSchedule API 调用后端导出接口
- 实现 handleExport 方法,支持下载 Excel 文件
- 文件名格式:赛程表_赛事名称.xlsx

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 13:45:09 +08:00
Z-WICKandClaude Opus 4.5 6d8c3b9a37 场地Tab添加场地过滤功能
- 添加场地按钮列表,支持切换不同场地
- 新增 selectedVenueIdForVenueTab 状态变量
- 修改 venueData 计算属性支持按场地过滤
- 初始化时默认选中第一个场地

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 13:34:35 +08:00
Z-WICKandClaude Opus 4.5 a99d521683 feat: 竞赛分组页面项目支持折叠,默认收起
- 点击项目头部可展开/收起队伍列表
- 默认所有项目收起,方便管理多个项目
- 添加展开图标指示当前状态

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:55:55 +08:00
Z-WICKandClaude Opus 4.5 3291ee16c6 feat: 竞赛分组页面添加队伍展开功能,显示选手签到状态和异常标记
- 点击队伍行可展开显示选手详情
- 显示选手签到状态:未签到/已签到/异常
- 支持标记异常和取消异常操作
- 优化评分页面代码

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:49:33 +08:00
Z-WICKandClaude Opus 4.5 d1eeac4877 feat: 赛程编排表格按队伍分组显示选手
- 将同一单位的选手合并为一个队伍行
- 多选手队伍可展开查看具体选手
- 队伍状态根据所有选手状态计算(已签到/未签到/部分签到/部分异常)
- 上移/下移操作移动整个队伍
- 异常标记:单人队伍在主行标记,多人队伍需展开后标记单个选手
- 修复语法错误(转义字符和字符串引号)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 17:17:34 +08:00
Z-WICKandClaude c110ea4ec2 fix: 修复P2和P3问题
1. P2: 修复订单管理this.$set不兼容Vue3问题,改为直接赋值
2. P3: 修复选手年龄显示-1问题,改为显示"--"

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-22 13:25:38 +08:00
Z-WICKandClaude 02b73f9f86 chore: 更新package-lock.json
🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 14:44:37 +08:00
hongjianli 87822220f6 Merge branch 'main' of git.waypeak.work:martial/martial-web 2025-12-17 09:31:23 +08:00
hongjianli 461ced449e fix bugs 2025-12-17 09:31:14 +08:00
Z-WICK fa53b19052 fix: 修复 API 代理路径,去掉多余的 /api 前缀
🤖 Generated with Claude Code
2025-12-13 23:11:31 +08:00
hongjianli fe7a3825ad fix bugs 2025-12-13 09:34:06 +08:00
hongjianli 284a2b3eab fix bugs 2025-12-12 17:54:40 +08:00
hongjianli 44fd5077b4 fix bugs 2025-12-11 16:56:19 +08:00
hongjianli d6b698ca17 修改前端页面 2025-12-03 13:51:22 +08:00
hongjianli 2234837deb fix bugs 2025-11-30 12:15:21 +08:00
Z-WICKandClaude 123ca9245c docs: 更新前端项目文档
- 修复字符编码问题(之前显示乱码)
- 添加完整的项目说明和技术栈介绍
- 记录 Docker 部署方法和 CI/CD 流程
- 添加常见问题解答(登录接口错误、容器启动失败等)
- 完善生产架构图和网络拓扑说明
- 补充开发规范和配置说明

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:24:05 +08:00
Z-WICKandClaude f4bb887d5c fix: 修复 Drone 部署步骤使用正确的 Dockerfile
- 使用 Dockerfile.deploy 而非默认 Dockerfile
- 直接使用 docker run 而不是 docker-compose(避免依赖问题)
- 强制删除旧容器后创建新容器(确保使用新镜像)
- 修复镜像构建后容器没有更新的问题

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:05:01 +08:00
Z-WICKandClaude 60b4144276 fix: 修复前端 nginx 配置和 API 基础路径
- nginx.conf: 将后端代理地址从 martial-backend 改为 172.21.0.1:8123(宿主机网关)
- .env.production: 移除 VITE_APP_API 的 /api 前缀
- 修复登录时 "No endpoint POST /api/blade-auth/oauth/token" 错误
- 修复容器启动失败 "host not found in upstream martial-backend" 错误

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:01:30 +08:00
Z-WICKandClaude 6d687c250f fix: 修复前端 API 路径配置
- 移除 VITE_APP_API 的 /api 前缀
- BladeX 框架的端点已包含完整路径(/blade-auth, /blade-system 等)
- 修复登录时 "No endpoint POST /api/blade-auth/oauth/token" 错误

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:55:30 +08:00
Z-WICKandClaude b6b6a04e51 修复前端 CI/CD:改为在部署服务器上构建镜像
问题:
- plugins/docker 尝试推送镜像到 Docker Hub
- 没有配置认证导致 'denied: requested access to resource is denied'

解决方案:
- 移除 plugins/docker 步骤
- 添加 drone-scp 步骤传输构建产物(dist、Dockerfile、nginx.conf)
- 在部署服务器上执行 docker build
- 直接使用本地镜像启动容器

优势:
- 不需要配置 Docker Hub 认证
- 不需要推送和拉取镜像,更快
- 镜像只存在于部署服务器本地
- 修正健康检查 URL 为 http://154.30.6.21/

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 18:04:56 +08:00
Z-WICKandClaude 1423bb89ab 修复前端构建:正确配置 BladeX 私有 npm registry
问题:
- Dockerfile 中 npm install 时未复制 .npmrc 文件
- 使用 --registry 参数覆盖了 .npmrc 中的私有 registry 配置
- 导致无法下载 @saber scope 的私有包,报 E401 认证错误

解决方案:
- Dockerfile: 在 npm install 前复制 .npmrc 文件
- Dockerfile: 移除 --registry 参数,使用 .npmrc 中的配置
- .drone.yml: 同样移除 --registry 参数

现在 npm 会正确使用:
- @saber 包 -> https://center.javablade.com (私有 registry)
- 其他包 -> npm 默认源

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:57:25 +08:00
Z-WICKandClaude 49090bb3ac 修复 Drone CI 配置:移除 host volumes 以解决 untrusted 仓库问题
- 移除 npm-cache volume 挂载
- 同一构建内的步骤仍可共享 node_modules
- 使用国内镜像加速依赖下载

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:45:39 +08:00
Z-WICKandClaude d77baf0687 添加 Drone CI/CD 前端自动化部署配置
1. 新增 .drone.yml 配置文件
   - 自动安装 npm 依赖
   - 自动构建生产版本
   - 构建 Docker 镜像
   - 自动部署到生产服务器
   - 健康检查验证部署成功

2. 新增 Dockerfile
   - 多阶段构建:Node 编译 + Nginx 运行
   - 优化镜像体积,使用 alpine 基础镜像
   - 配置静态资源缓存
   - 添加健康检查

3. 新增 nginx.conf
   - 配置前端路由支持(Vue Router history 模式)
   - 代理 API 请求到后端服务
   - 优化 Gzip 压缩和静态资源缓存
   - 支持 BladeX 系统模块路径代理

现在推送代码后,前端会自动部署到生产环境!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:04:57 +08:00
Z-WICKandClaude e253079860 修复Vite代理配置,解决前后端通信问题
1. 修复后端API代理配置
   - 更新代理目标端口从82改为8123(匹配实际后端端口)
   - 区分BladeX系统模块和业务模块的URL路径处理

2. 解决验证码接口404问题
   - 新增 ^/api/blade- 规则处理系统模块(blade-auth、blade-system等)
   - 系统模块需去掉 /api 前缀转发到后端 /blade-auth/* 路径
   - 业务模块保留 /api 前缀转发到后端 /api/martial/* 路径

3. 验证测试结果
   -  /api/blade-auth/oauth/captcha 验证码接口正常
   -  /api/blade-system/tenant/info 租户信息接口正常
   -  /api/martial/competition/list 比赛列表接口正常

现在前端登录页面可以正常获取验证码,所有API接口都能正确访问。

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:31:05 +08:00
15 changed files with 1549 additions and 326 deletions
+37
View File
@@ -0,0 +1,37 @@
# 待处理问题
## Issue 1: 调度页面"状态"列数据应从后端获取
### 问题描述
调度页面中的"状态"列(已完赛/未完赛)目前是前端硬编码为 `false`,并非从后端 API 获取的真实状态。
### 当前行为
- 前端在加载调度数据时,将 `completed` 字段默认设置为 `false`
- 所有参赛者的状态都显示为"未完赛"
### 期望行为
- 从后端 API 获取每个参赛者的真实完赛状态
- 正确显示"已完赛"或"未完赛"
### 相关代码
**文件:** `src/views/martial/dispatch/index.vue`
```javascript
// 第320行 - 当前硬编码
completed: false,
// 第69-70行 - 状态显示逻辑
<el-tag v-if="scope.row.completed" type="success" size="small">已完赛</el-tag>
<el-tag v-else type="warning" size="small">未完赛</el-tag>
```
### 待办
- [ ] 后端 API 返回参赛者的完赛状态字段
- [ ] 前端从 API 响应中读取真实状态
---
+19
View File
@@ -188,6 +188,15 @@ export const saveDispatch = (data) => {
* 导出赛程表
* @param {Number} competitionId - 赛事ID
*/
// 预览赛程表数据
export const getScheduleExportPreview = (competitionId, template, venueId) => {
return request({
url: "/api/martial/export/schedule/preview",
method: "get",
params: { competitionId, template, venueId }
})
}
export const exportSchedule = (competitionId) => {
return request({
url: '/martial/export/schedule',
@@ -196,3 +205,13 @@ export const exportSchedule = (competitionId) => {
responseType: 'blob'
})
}
export const exportScheduleTemplate2 = (competitionId, venueId, venueName, timeSlot) => {
return request({
url: '/martial/export/schedule2',
method: 'get',
params: { competitionId, venueId, venueName, timeSlot },
responseType: 'blob'
})
}
+13
View File
@@ -141,3 +141,16 @@ export const getOrderAmountStats = (orderId) => {
params: { orderId }
})
}
/**
* 获取单位统计
* @param {Number} competitionId - 赛事ID
*/
export const getOrganizationStats = (competitionId) => {
return request({
url: '/api/martial/registrationOrder/organization-stats',
method: 'get',
params: { competitionId }
})
}
+2 -2
View File
@@ -48,7 +48,7 @@ export default [
redirect: '/martial/order/list',
children: [
{
path: 'competition/list',
path: 'competition/index',
name: '赛事管理',
meta: {
keepAlive: false,
@@ -65,7 +65,7 @@ export default [
},
{
path: 'order/list',
name: '订单管理',
name: '赛事管理',
meta: {
keepAlive: false,
},
+72 -156
View File
@@ -85,10 +85,10 @@
>
<template #default="scope">
<el-tag
:type="getStatusType(scope.row.status)"
:type="getStatusType(calculateStatus(scope.row))"
size="small"
>
{{ getStatusText(scope.row.status) }}
{{ getStatusText(calculateStatus(scope.row)) }}
</el-tag>
</template>
</el-table-column>
@@ -647,124 +647,51 @@
项目列表
</div>
<el-form-item label="" class="button-right">
<el-alert
title="项目配置提示"
type="info"
:closable="false"
show-icon
style="margin-bottom: 15px;"
>
<template #default>
<p>请先保存赛事基本信息然后前往 <strong>项目管理</strong> 功能配置比赛项目</p>
<el-button
v-if="currentView !== 'view'"
v-if="competitionId"
type="primary"
icon="el-icon-plus"
size="small"
@click="handleAddProject"
style="margin-top: 10px;"
@click="goToProjectManagement"
>
添加项目
</el-button>
</el-form-item>
<el-table
:data="formData.projects"
border
style="width: 100%"
>
<el-table-column
label="项目名称"
min-width="150"
>
<template #default="scope">
<el-input
v-if="currentView !== 'view'"
v-model="scope.row.projectName"
placeholder="例如:太极拳"
size="small"
/>
<span v-else>{{ scope.row.projectName }}</span>
</template>
</el-table-column>
<el-table-column
label="项目代码"
width="120"
>
<template #default="scope">
<el-input
v-if="currentView !== 'view'"
v-model="scope.row.projectCode"
placeholder="例如:TJQ001"
size="small"
/>
<span v-else>{{ scope.row.projectCode }}</span>
</template>
</el-table-column>
<el-table-column
label="组别"
width="120"
>
<template #default="scope">
<el-input
v-if="currentView !== 'view'"
v-model="scope.row.category"
placeholder="例如:成年男子组"
size="small"
/>
<span v-else>{{ scope.row.category }}</span>
</template>
</el-table-column>
<el-table-column
label="报名费用(元)"
width="130"
align="center"
>
<template #default="scope">
<el-input-number
v-if="currentView !== 'view'"
v-model="scope.row.price"
:min="0"
:precision="2"
:step="10"
size="small"
style="width: 100%"
placeholder="0.00"
/>
<span v-else style="color: #f56c6c">¥{{ scope.row.price || 0 }}</span>
</template>
</el-table-column>
<el-table-column
label="项目说明"
min-width="200"
>
<template #default="scope">
<el-input
v-if="currentView !== 'view'"
v-model="scope.row.description"
placeholder="请输入项目说明"
size="small"
/>
<span v-else>{{ scope.row.description }}</span>
</template>
</el-table-column>
<el-table-column
v-if="currentView !== 'view'"
label="操作"
width="80"
align="center"
>
<template #default="scope">
<el-button
type="danger"
link
size="small"
icon="el-icon-delete"
@click="handleDeleteProject(scope.$index)"
>
删除
前往项目管理
</el-button>
</template>
</el-alert>
<div v-if="formData.projects && formData.projects.length > 0">
<el-table :data="formData.projects" border size="small" style="width: 100%">
<el-table-column prop="projectCode" label="项目编码" width="120" />
<el-table-column prop="projectName" label="项目名称" min-width="150" />
<el-table-column prop="category" label="组别" width="120" />
<el-table-column label="项目类型" width="100" align="center">
<template #default="scope">
<el-tag v-if="scope.row.eventType === 1" type="primary" size="small">套路</el-tag>
<el-tag v-else-if="scope.row.eventType === 2" type="danger" size="small">散打</el-tag>
<el-tag v-else-if="scope.row.eventType === 3" type="success" size="small">器械</el-tag>
<el-tag v-else-if="scope.row.eventType === 4" type="warning" size="small">对练</el-tag>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="price" label="报名费(元)" width="100" align="center">
<template #default="scope">
<span style="color: #f56c6c">¥{{ scope.row.price || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="maxParticipants" label="容纳人数" width="100" align="center" />
</el-table>
</div>
<el-empty v-else description="暂无项目,请前往项目管理添加" :image-size="60" />
</div>
<!-- 场地配置 -->
<div class="form-section">
@@ -1003,7 +930,7 @@ export default {
propsHttp: {
res: 'data',
},
headers: { 'Blade-Auth': 'bearer ' + getToken() },
action: '/blade-resource/oss/endpoint/put-file'
}
]
@@ -1274,18 +1201,7 @@ export default {
console.log('项目列表长度:', projectList.length);
if (projectList.length > 0) {
this.formData.projects = projectList.map(item => ({
id: item.id,
projectName: item.projectName,
projectCode: item.projectCode,
category: item.category,
type: item.type,
minParticipants: item.minParticipants,
maxParticipants: item.maxParticipants,
estimatedDuration: item.estimatedDuration,
price: item.price,
description: item.description
}));
this.formData.projects = projectList.map(item => ({ ...item }));
console.log('✅ 加载的项目列表:', this.formData.projects);
console.log('✅ 项目数量:', this.formData.projects.length);
} else {
@@ -1335,7 +1251,8 @@ export default {
venueCode: item.venueCode,
capacity: item.capacity,
location: item.location,
remark: item.facilities || ''
remark: item.facilities || '',
venueType: item.venueType || 'indoor'
}));
console.log('✅ 加载的场地列表:', this.formData.venues);
console.log('✅ 场地数量:', this.formData.venues.length);
@@ -1407,6 +1324,7 @@ export default {
handleOpenAttachmentUpload(type) {
this.currentAttachmentType = type;
this.attachmentUploadForm = {};
this.attachmentUploadOption.column[0].headers = { "Blade-Auth": "bearer " + getToken() };
this.attachmentUploadDialogVisible = true;
},
@@ -1579,7 +1497,7 @@ export default {
handleCreate() {
this.$router.push({
path: '/martial/competition/list',
path: '/martial/competition/index',
query: { mode: 'create' }
});
},
@@ -1587,21 +1505,21 @@ export default {
handleView(row) {
console.log(row)
this.$router.push({
path: '/martial/competition/list',
path: '/martial/competition/index',
query: { mode: 'view', id: row.id }
});
},
handleEdit(row) {
this.$router.push({
path: '/martial/competition/list',
path: '/martial/competition/index',
query: { mode: 'edit', id: row.id }
});
},
switchToEdit() {
this.$router.push({
path: '/martial/competition/list',
path: '/martial/competition/index',
query: { mode: 'edit', id: this.competitionId }
});
},
@@ -1643,20 +1561,16 @@ export default {
this.formData.schedule.splice(index, 1);
},
// 项目列表管理
handleAddProject() {
this.formData.projects.push({
projectName: '',
projectCode: '',
category: '',
maxParticipants: null,
price: 0,
description: ''
// 项目列表管理 - 跳转到项目管理页面
goToProjectManagement() {
if (this.competitionId) {
this.$router.push({
path: '/martial/project/list',
query: { competitionId: this.competitionId }
});
},
handleDeleteProject(index) {
this.formData.projects.splice(index, 1);
} else {
this.$message.warning('请先保存赛事基本信息');
}
},
// 场地配置管理
@@ -1705,10 +1619,10 @@ export default {
savePromises.push(this.saveActivitySchedules(savedCompetitionId));
}
// 2. 保存项目列表
if (this.formData.projects && this.formData.projects.length > 0) {
savePromises.push(this.saveProjects(savedCompetitionId));
}
// 2. 项目列表 - 已移至项目管理功能配置
// if (this.formData.projects && this.formData.projects.length > 0) {
// savePromises.push(this.saveProjects(savedCompetitionId));
// }
// 3. 保存场地配置
if (this.formData.venues && this.formData.venues.length > 0) {
@@ -1792,9 +1706,7 @@ export default {
},
async saveProjects(competitionId) {
const projects = this.formData.projects.filter(item =>
item.projectName && item.projectCode
);
const projects = this.formData.projects.filter(item => item.projectName);
if (projects.length === 0) {
return Promise.resolve();
@@ -1812,16 +1724,19 @@ export default {
const promises = projects.map(project => {
const projectData = {
...project,
competitionId: finalCompetitionId,
projectName: project.projectName,
projectCode: project.projectCode,
category: project.category || '',
type: project.type || 1, // 默认个人项目
eventType: project.eventType || 1,
type: project.type || 1,
minParticipants: project.minParticipants || 1,
maxParticipants: project.maxParticipants || 1,
maxParticipants: project.maxParticipants || 100,
estimatedDuration: project.estimatedDuration || 5,
price: project.price || 0,
description: project.description || ''
sortOrder: project.sortOrder || 0,
description: project.description || '',
rules: project.rules || ''
};
// 如果有 id,说明是编辑已有的项目
@@ -1862,7 +1777,8 @@ export default {
venueCode: venue.venueCode,
capacity: venue.capacity || 100,
location: venue.location || '',
facilities: venue.remark || ''
facilities: venue.remark || '',
venueType: venue.venueType || 'indoor'
};
// 如果有 id,说明是编辑已有的场地
@@ -1879,7 +1795,7 @@ export default {
backToList() {
this.$router.push({
path: '/martial/competition/list'
path: '/martial/competition/index'
});
// 路由跳转后,在 initPage 中会自动加载列表
},
@@ -2050,7 +1966,7 @@ export default {
return 3;
}
// 报名中
if (regStart && regEnd && now >= regStart && now <= regEnd) {
if (regStart && regEnd && now >= regStart && now <= new Date(regEnd.getFullYear(), regEnd.getMonth(), regEnd.getDate(), 23, 59, 59)) {
return 2;
}
// 未开始(默认状态)
+2 -2
View File
@@ -60,10 +60,10 @@
>
<template #default="scope">
<el-tag
:type="getStatusType(scope.row.status)"
:type="getStatusType(calculateStatus(scope.row))"
size="small"
>
{{ getStatusText(scope.row.status) }}
{{ getStatusText(calculateStatus(scope.row)) }}
</el-tag>
</template>
</el-table-column>
+50 -13
View File
@@ -130,6 +130,7 @@ export default {
selectedVenueId: null,
venues: [], // 场地列表
timeSlots: [], // 时间段列表
timeSlotIndexMap: {}, // 显示索引到实际时间段索引的映射
dispatchGroups: [], // 调度分组列表
hasChanges: false, // 是否有未保存的更改
originalData: null // 原始数据(用于取消时恢复)
@@ -155,12 +156,13 @@ export default {
async checkScheduleStatus() {
try {
const res = await getScheduleResult(this.competitionId)
const scheduleStatus = res.data?.data?.scheduleStatus || res.data?.scheduleStatus || 0
const scheduleData = res.data?.data
const isCompleted = scheduleData?.isCompleted || false
console.log('编排状态:', scheduleStatus)
console.log('编排完成状态:', isCompleted)
// 如果编排未完成(状态不是2,提示用户并返回
if (scheduleStatus !== 2) {
// 如果编排未完成,提示用户并返回
if (!isCompleted) {
this.$message.warning('请先完成编排并锁定后,才能进行调度操作')
// 延迟返回上一页
setTimeout(() => {
@@ -188,8 +190,16 @@ export default {
const data = res.data?.data
if (data) {
// 生成时间段
this.generateTimeSlots(data.competitionStartTime || data.competition_start_time, data.competitionEndTime || data.competition_end_time)
// 获取编排数据以确定有项目的时间段
let scheduleGroups = []
try {
const scheduleRes = await getScheduleResult(this.competitionId)
scheduleGroups = scheduleRes.data?.data?.competitionGroups || scheduleRes.data?.data?.scheduleGroups || []
} catch (e) {
console.warn('获取编排数据失败:', e)
}
// 生成时间段(只显示有项目的时间段)
this.generateTimeSlots(data.competitionStartTime || data.competition_start_time, data.competitionEndTime || data.competition_end_time, scheduleGroups)
}
} catch (err) {
console.error('加载赛事信息失败', err)
@@ -199,17 +209,29 @@ export default {
}
},
// 生成时间段列表
generateTimeSlots(startTime, endTime) {
// 生成时间段列表(只显示有项目的时间段)
generateTimeSlots(startTime, endTime, scheduleGroups) {
if (!startTime || !endTime) {
this.timeSlots = ['2025年11月6日 上午8:30', '2025年11月6日 下午13:30']
this.timeSlotIndexMap = { 0: 0, 1: 1 }
return
}
const slots = []
// 从编排数据中提取实际有项目的时间段索引
const usedTimeSlotIndices = new Set()
if (scheduleGroups && scheduleGroups.length > 0) {
scheduleGroups.forEach(group => {
if (group.timeSlotIndex !== undefined && group.timeSlotIndex !== null) {
usedTimeSlotIndices.add(group.timeSlotIndex)
}
})
}
const allSlots = []
const start = new Date(startTime)
const end = new Date(endTime)
let currentDate = new Date(start)
let slotIndex = 0
while (currentDate <= end) {
const year = currentDate.getFullYear()
@@ -217,13 +239,28 @@ export default {
const day = currentDate.getDate()
const dateStr = `${year}${month}${day}`
slots.push(`${dateStr} 上午8:30`)
slots.push(`${dateStr} 下午13:30`)
allSlots.push({ label: `${dateStr} 上午8:30`, index: slotIndex++ })
allSlots.push({ label: `${dateStr} 下午13:30`, index: slotIndex++ })
currentDate.setDate(currentDate.getDate() + 1)
}
this.timeSlots = slots
// 如果有编排数据,只显示有项目的时间段
if (usedTimeSlotIndices.size > 0) {
const filteredSlots = allSlots.filter(slot => usedTimeSlotIndices.has(slot.index))
this.timeSlots = filteredSlots.map(slot => slot.label)
// 保存映射关系:显示索引 -> 实际时间段索引
this.timeSlotIndexMap = {}
filteredSlots.forEach((slot, displayIndex) => {
this.timeSlotIndexMap[displayIndex] = slot.index
})
} else {
this.timeSlots = allSlots.map(slot => slot.label)
this.timeSlotIndexMap = {}
allSlots.forEach((slot, displayIndex) => {
this.timeSlotIndexMap[displayIndex] = slot.index
})
}
},
// 加载场地列表
@@ -268,7 +305,7 @@ export default {
const res = await getDispatchData({
competitionId: this.competitionId,
venueId: this.selectedVenueId,
timeSlotIndex: this.selectedTime
timeSlotIndex: this.timeSlotIndexMap[this.selectedTime] !== undefined ? this.timeSlotIndexMap[this.selectedTime] : this.selectedTime
})
if (res.data.success) {
+16 -3
View File
@@ -2,7 +2,7 @@
<div class="martial-order-container">
<el-card shadow="hover">
<div class="page-header">
<h2 class="page-title">订单管理</h2>
<h2 class="page-title">赛事管理</h2>
</div>
<el-form :inline="true" :model="searchForm" class="search-form">
<el-form-item>
@@ -60,8 +60,8 @@
</el-table-column>
<el-table-column prop="status" label="状态" width="90" align="center">
<template #default="scope">
<el-tag :type="getStatusType(scope.row.status)" size="small">
{{ getStatusText(scope.row.status) }}
<el-tag :type="getStatusType(calculateStatus(scope.row))" size="small">
{{ getStatusText(calculateStatus(scope.row)) }}
</el-tag>
</template>
</el-table-column>
@@ -252,6 +252,19 @@ export default {
return `${start} ~ ${end}`
},
// 根据时间计算赛事状态
calculateStatus(row) {
const now = new Date()
const regStart = row.registrationStartTime ? new Date(row.registrationStartTime) : null
const regEnd = row.registrationEndTime ? new Date(row.registrationEndTime) : null
const compStart = row.competitionStartTime ? new Date(row.competitionStartTime) : null
const compEnd = row.competitionEndTime ? new Date(row.competitionEndTime) : null
if (compEnd && now > compEnd) return 4
if (compStart && now >= compStart) return 3
if (regStart && regEnd && now >= regStart && now <= new Date(regEnd.getFullYear(), regEnd.getMonth(), regEnd.getDate(), 23, 59, 59)) return 2
return 1
},
getStatusType(status) {
const statusMap = {
1: 'info', // 未开始
+5 -60
View File
@@ -135,7 +135,10 @@
</el-table-column>
<el-table-column prop="category" label="分组类别" width="100" align="center">
<template #default="{ row }">
<span>{{ row.category || '-' }}</span>
<el-tag v-if="row.category == 1" type="primary" size="small">男子</el-tag>
<el-tag v-else-if="row.category == 2" type="danger" size="small">女子</el-tag>
<el-tag v-else-if="row.category == 3" type="success" size="small">混合</el-tag>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="eventType" label="项目类型" width="100" align="center">
@@ -174,6 +177,7 @@
{{ row.maxParticipants || 0 }}
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
@@ -235,7 +239,6 @@
placeholder="请选择赛事"
filterable
style="width: 100%"
@change="handleCompetitionChangeInForm"
>
<el-option
v-for="item in competitionList"
@@ -246,34 +249,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属场地" prop="venueId">
<el-select
v-model="form.venueId"
placeholder="请选择场地"
clearable
style="width: 100%"
>
<el-option
v-for="item in venueList"
:key="item.id"
:label="item.venueName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目编码" prop="projectCode">
<el-input
v-model="form.projectCode"
placeholder="请输入项目编码"
maxlength="50"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
@@ -481,7 +456,6 @@ import {
exportProjects
} from '@/api/martial/project'
import { getCompetitionList } from '@/api/martial/competition'
import { getVenuesByCompetition } from '@/api/martial/venue'
import { getToken } from '@/utils/auth'
import dayjs from 'dayjs'
@@ -492,7 +466,6 @@ const tableData = ref([])
const total = ref(0)
const selection = ref([])
const competitionList = ref([])
const venueList = ref([])
const dialogVisible = ref(false)
const detailVisible = ref(false)
const dialogTitle = ref('')
@@ -514,7 +487,6 @@ const queryParams = reactive({
const form = reactive({
id: null,
competitionId: '',
venueId: null,
projectCode: '',
projectName: '',
category: null,
@@ -543,10 +515,6 @@ const rules = {
competitionId: [
{ required: true, message: '请选择所属赛事', trigger: 'change' }
],
projectCode: [
{ required: true, message: '请输入项目编码', trigger: 'blur' },
{ min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' }
],
projectName: [
{ required: true, message: '请输入项目名称', trigger: 'blur' },
{ min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur' }
@@ -583,20 +551,6 @@ const loadCompetitionList = async () => {
}
}
// 表单中赛事变更时加载场地列表
const handleCompetitionChangeInForm = async (competitionId) => {
form.venueId = null
venueList.value = []
if (competitionId) {
try {
const res = await getVenuesByCompetition(competitionId)
venueList.value = res.data?.data?.records || []
} catch (error) {
console.error('加载场地列表失败:', error)
}
}
}
// 查询数据
const fetchData = async () => {
loading.value = true
@@ -663,15 +617,6 @@ const handleEdit = async (row) => {
if (row.price !== undefined) {
form.registrationFee = row.price
}
// 加载该赛事的场地列表
if (row.competitionId) {
try {
const res = await getVenuesByCompetition(row.competitionId)
venueList.value = res.data?.data?.records || []
} catch (error) {
console.error('加载场地列表失败:', error)
}
}
dialogVisible.value = true
}
+931
View File
@@ -0,0 +1,931 @@
<template>
<div class="project-container">
<!-- 搜索区域 -->
<el-card shadow="never" class="search-card">
<el-form :inline="true" :model="queryParams" class="search-form">
<el-form-item label="赛事">
<el-select
v-model="queryParams.competitionId"
placeholder="请选择赛事"
clearable
filterable
style="width: 200px"
>
<el-option
v-for="item in competitionList"
:key="item.id"
:label="item.competitionName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="项目名称">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
style="width: 200px"
/>
</el-form-item>
<el-form-item label="分组类别">
<el-input
v-model="queryParams.category"
placeholder="请输入分组类别"
clearable
style="width: 150px"
/>
</el-form-item>
<el-form-item label="项目类型">
<el-select
v-model="queryParams.eventType"
placeholder="请选择项目类型"
clearable
style="width: 150px"
>
<el-option label="套路" :value="1" />
<el-option label="散打" :value="2" />
<el-option label="器械" :value="3" />
<el-option label="对练" :value="4" />
</el-select>
</el-form-item>
<el-form-item label="参赛类型">
<el-select
v-model="queryParams.type"
placeholder="请选择参赛类型"
clearable
style="width: 150px"
>
<el-option label="单人" :value="1" />
<el-option label="集体" :value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" :icon="Search" @click="handleSearch">
查询
</el-button>
<el-button :icon="Refresh" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<!-- 工具栏 -->
<el-card shadow="never" class="toolbar-card">
<div class="toolbar">
<div class="toolbar-left">
<el-button type="primary" :icon="Plus" @click="handleAdd">
新增项目
</el-button>
<el-button
type="danger"
:icon="Delete"
:disabled="!selection.length"
@click="handleBatchDelete"
>
批量删除
</el-button>
<el-upload
:action="uploadUrl"
:headers="uploadHeaders"
:before-upload="beforeUpload"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
:show-file-list="false"
accept=".xlsx,.xls"
>
<el-button type="success" :icon="Upload">导入Excel</el-button>
</el-upload>
<el-button type="warning" :icon="Download" @click="handleExport">
导出Excel
</el-button>
</div>
<div class="toolbar-right">
<el-tooltip content="刷新" placement="top">
<el-button circle :icon="Refresh" @click="fetchData" />
</el-tooltip>
</div>
</div>
</el-card>
<!-- 数据表格 -->
<el-card shadow="never" class="table-card">
<el-table
v-loading="loading"
:data="tableData"
stripe
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
prop="projectCode"
label="项目编码"
width="120"
align="center"
/>
<el-table-column
prop="projectName"
label="项目名称"
min-width="180"
show-overflow-tooltip
/>
<el-table-column label="所属赛事" min-width="150" show-overflow-tooltip>
<template #default="{ row }">
{{ getCompetitionName(row.competitionId) }}
</template>
</el-table-column>
<el-table-column prop="category" label="分组类别" width="100" align="center">
<template #default="{ row }">
<span>{{ row.category || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="eventType" label="项目类型" width="100" align="center">
<template #default="{ row }">
<el-tag v-if="row.eventType === 1" type="primary" size="small">套路</el-tag>
<el-tag v-else-if="row.eventType === 2" type="danger" size="small">散打</el-tag>
<el-tag v-else-if="row.eventType === 3" type="success" size="small">器械</el-tag>
<el-tag v-else-if="row.eventType === 4" type="warning" size="small">对练</el-tag>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="type" label="参赛类型" width="100" align="center">
<template #default="{ row }">
<el-tag v-if="row.type === 1" type="success" size="small">单人</el-tag>
<el-tag v-else-if="row.type === 2" type="warning" size="small">集体</el-tag>
</template>
</el-table-column>
<el-table-column
prop="price"
label="报名费(元)"
width="110"
align="center"
>
<template #default="{ row }">
<span style="color: #f56c6c">¥{{ row.price || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="estimatedDuration" label="预计时长" width="100" align="center">
<template #default="{ row }">
<span>{{ row.estimatedDuration || 5 }}分钟</span>
</template>
</el-table-column>
<el-table-column label="单位容纳人数" width="120" align="center">
<template #default="{ row }">
{{ row.maxParticipants || 0 }}
</template>
</el-table-column>
<el-table-column label="所属场地" width="120" align="center">
<template #default="{ row }">
<span>{{ getVenueName(row.venueId) }}</span>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
width="160"
align="center"
>
<template #default="{ row }">
{{ formatDate(row.createTime) }}
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center" fixed="right">
<template #default="{ row }">
<el-button link type="primary" :icon="Edit" @click="handleEdit(row)">
编辑
</el-button>
<el-button link type="primary" :icon="View" @click="handleView(row)">
查看
</el-button>
<el-button link type="danger" :icon="Delete" @click="handleDelete(row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="pagination-container">
<el-pagination
v-model:current-page="queryParams.current"
v-model:page-size="queryParams.size"
:page-sizes="[10, 20, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="fetchData"
@current-change="fetchData"
/>
</div>
</el-card>
<!-- 新增/编辑弹窗 -->
<el-dialog
v-model="dialogVisible"
:title="dialogTitle"
width="800px"
:close-on-click-modal="false"
@close="handleDialogClose"
>
<el-form
ref="formRef"
:model="form"
:rules="rules"
label-width="120px"
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="所属赛事" prop="competitionId">
<el-select
v-model="form.competitionId"
placeholder="请选择赛事"
filterable
style="width: 100%"
@change="handleCompetitionChangeInForm"
>
<el-option
v-for="item in competitionList"
:key="item.id"
:label="item.competitionName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属场地" prop="venueId">
<el-select
v-model="form.venueId"
placeholder="请选择场地"
clearable
style="width: 100%"
>
<el-option
v-for="item in venueList"
:key="item.id"
:label="item.venueName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目编码" prop="projectCode">
<el-input
v-model="form.projectCode"
placeholder="请输入项目编码"
maxlength="50"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目名称" prop="projectName">
<el-input
v-model="form.projectName"
placeholder="请输入项目名称"
maxlength="100"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="分组类别" prop="category">
<el-select
v-model="form.category"
placeholder="请选择分组类别"
style="width: 100%"
>
<el-option label="男子" :value="1" />
<el-option label="女子" :value="2" />
<el-option label="团体" :value="3" />
<el-option label="混合" :value="4" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类型" prop="eventType">
<el-select
v-model="form.eventType"
placeholder="请选择项目类型"
style="width: 100%"
>
<el-option label="套路" :value="1" />
<el-option label="散打" :value="2" />
<el-option label="器械" :value="3" />
<el-option label="对练" :value="4" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="参赛类型" prop="type">
<el-select
v-model="form.type"
placeholder="请选择参赛类型"
style="width: 100%"
>
<el-option label="单人" :value="1" />
<el-option label="集体" :value="2" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="预计时长(分钟)" prop="estimatedDuration">
<el-input-number
v-model="form.estimatedDuration"
:min="1"
:max="120"
placeholder="每人/队预计比赛时长"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报名费(元)" prop="registrationFee">
<el-input-number
v-model="form.registrationFee"
:min="0"
:precision="2"
:step="10"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="单位容纳人数" prop="maxParticipants">
<el-input-number
v-model="form.maxParticipants"
:min="1"
:max="1000"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="排序序号" prop="sortOrder">
<el-input-number
v-model="form.sortOrder"
:min="0"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="比赛规则" prop="rules">
<el-input
v-model="form.rules"
type="textarea"
:rows="4"
placeholder="请输入比赛规则说明"
maxlength="500"
show-word-limit
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
type="textarea"
:rows="3"
placeholder="请输入备注信息"
maxlength="200"
show-word-limit
/>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :loading="submitLoading" @click="handleSubmit">
确定
</el-button>
</template>
</el-dialog>
<!-- 查看详情弹窗 -->
<el-dialog v-model="detailVisible" title="项目详情" width="700px">
<el-descriptions :column="2" border>
<el-descriptions-item label="项目编码">
{{ detailData.projectCode }}
</el-descriptions-item>
<el-descriptions-item label="项目名称">
{{ detailData.projectName }}
</el-descriptions-item>
<el-descriptions-item label="所属赛事">
{{ getCompetitionName(detailData.competitionId) }}
</el-descriptions-item>
<el-descriptions-item label="分组类别">
<el-tag v-if="detailData.category === 1" type="primary">男子</el-tag>
<el-tag v-else-if="detailData.category === 2" type="danger">女子</el-tag>
<el-tag v-else-if="detailData.category === 3" type="success">团体</el-tag>
<el-tag v-else-if="detailData.category === 4" type="warning">混合</el-tag>
</el-descriptions-item>
<el-descriptions-item label="项目类型">
<span v-if="detailData.eventType === 1">套路</span>
<span v-else-if="detailData.eventType === 2">散打</span>
<span v-else-if="detailData.eventType === 3">器械</span>
<span v-else-if="detailData.eventType === 4">对练</span>
</el-descriptions-item>
<el-descriptions-item label="参赛类型">
<el-tag v-if="detailData.type === 1" type="success" size="small">单人</el-tag>
<el-tag v-else-if="detailData.type === 2" type="warning" size="small">集体</el-tag>
</el-descriptions-item>
<el-descriptions-item label="报名费">
<span style="color: #f56c6c; font-weight: bold">
¥{{ detailData.registrationFee || 0 }}
</span>
</el-descriptions-item>
<el-descriptions-item label="单位容纳人数">
{{ detailData.maxParticipants }}
</el-descriptions-item>
<el-descriptions-item label="已报名人数">
<span :style="{
color: detailData.currentCount >= detailData.maxParticipants ? '#f56c6c' : '#67c23a',
fontWeight: 'bold'
}">
{{ detailData.currentCount || 0 }}
</span>
</el-descriptions-item>
<el-descriptions-item label="创建时间" :span="2">
{{ formatDate(detailData.createTime) }}
</el-descriptions-item>
<el-descriptions-item label="比赛规则" :span="2">
{{ detailData.rules || '暂无' }}
</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">
{{ detailData.remark || '暂无' }}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, computed } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
Search,
Refresh,
Plus,
Delete,
Edit,
View,
Upload,
Download
} from '@element-plus/icons-vue'
import {
getProjectList,
submitProject,
removeProject,
importProjects,
exportProjects
} from '@/api/martial/project'
import { getCompetitionList } from '@/api/martial/competition'
import { getVenuesByCompetition } from '@/api/martial/venue'
import { getToken } from '@/utils/auth'
import dayjs from 'dayjs'
// 数据定义
const loading = ref(false)
const submitLoading = ref(false)
const tableData = ref([])
const total = ref(0)
const selection = ref([])
const competitionList = ref([])
const venueList = ref([])
const allVenuesCache = ref(new Map()) // 全局场地缓存
const dialogVisible = ref(false)
const detailVisible = ref(false)
const dialogTitle = ref('')
const formRef = ref(null)
const detailData = ref({})
// 查询参数
const queryParams = reactive({
current: 1,
size: 10,
competitionId: '',
projectName: '',
category: '',
eventType: '',
type: ''
})
// 表单数据
const form = reactive({
id: null,
competitionId: '',
venueId: null,
projectCode: '',
projectName: '',
category: null,
eventType: null,
type: null,
estimatedDuration: 5,
registrationFee: 0,
maxParticipants: 100,
sortOrder: 0,
rules: '',
remark: ''
})
// 上传配置
const uploadUrl = computed(() => {
return import.meta.env.VITE_APP_BASE_URL + '/api/blade-martial/project/import'
})
const uploadHeaders = computed(() => {
return {
'Blade-Auth': 'bearer ' + getToken()
}
})
// 表单验证规则
const rules = {
competitionId: [
{ required: true, message: '请选择所属赛事', trigger: 'change' }
],
projectCode: [
{ required: true, message: '请输入项目编码', trigger: 'blur' },
{ min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' }
],
projectName: [
{ required: true, message: '请输入项目名称', trigger: 'blur' },
{ min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur' }
],
category: [
{ required: true, message: '请选择分组类别', trigger: 'change' }
],
eventType: [
{ required: true, message: '请选择项目类型', trigger: 'change' }
],
estimatedDuration: [
{ required: true, message: '请输入预计时长', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择参赛类型', trigger: 'change' }
],
registrationFee: [
{ required: true, message: '请输入报名费', trigger: 'blur' }
],
maxParticipants: [
{ required: true, message: '请输入单位容纳人数', trigger: 'blur' }
]
}
// 加载赛事列表
const loadCompetitionList = async () => {
try {
const res = await getCompetitionList(1, 1000, {})
if (res.data && res.data.data && res.data.data.records) {
competitionList.value = res.data.data.records
}
} catch (error) {
console.error('加载赛事列表失败:', error)
}
}
// 表单中赛事变更时加载场地列表
const handleCompetitionChangeInForm = async (competitionId) => {
form.venueId = null
venueList.value = []
if (competitionId) {
try {
const res = await getVenuesByCompetition(competitionId)
venueList.value = res.data?.data?.records || []
} catch (error) {
console.error('加载场地列表失败:', error)
}
}
}
// 查询数据
const fetchData = async () => {
loading.value = true
try {
// Only pass parameters that backend supports
const params = {
competitionId: queryParams.competitionId || undefined,
projectName: queryParams.projectName || undefined,
category: queryParams.category || undefined,
eventType: queryParams.eventType || undefined,
type: queryParams.type || undefined
}
const res = await getProjectList(
queryParams.current,
queryParams.size,
params
)
if (res.data && res.data.data) {
tableData.value = res.data.data.records || []
total.value = res.data.data.total || 0
// 加载项目对应的场地信息
await loadVenuesForProjects(tableData.value)
}
} catch (error) {
ElMessage.error('获取数据失败')
console.error(error)
} finally {
loading.value = false
}
}
// 加载项目对应的场地信息
const loadVenuesForProjects = async (projects) => {
// 获取所有不同的赛事ID
const competitionIds = [...new Set(projects.map(p => p.competitionId).filter(Boolean))]
for (const compId of competitionIds) {
try {
const res = await getVenuesByCompetition(compId)
const venues = res.data?.data?.records || []
// 缓存场地信息
venues.forEach(v => {
allVenuesCache.value.set(v.id, v.venueName)
})
} catch (err) {
console.error('加载场地失败:', err)
}
}
}
// 搜索
const handleSearch = () => {
queryParams.current = 1
fetchData()
}
// 重置
const handleReset = () => {
Object.assign(queryParams, {
current: 1,
size: 10,
competitionId: '',
projectName: '',
category: '',
eventType: '',
type: ''
})
fetchData()
}
// 新增
const handleAdd = () => {
dialogTitle.value = '新增项目'
resetForm()
dialogVisible.value = true
}
// 编辑
const handleEdit = async (row) => {
dialogTitle.value = '编辑项目'
Object.keys(form).forEach((key) => {
form[key] = row[key]
})
// 处理字段名映射:后端返回 price,表单使用 registrationFee
if (row.price !== undefined) {
form.registrationFee = row.price
}
// 加载该赛事的场地列表
if (row.competitionId) {
try {
const res = await getVenuesByCompetition(row.competitionId)
venueList.value = res.data?.data?.records || []
} catch (error) {
console.error('加载场地列表失败:', error)
}
}
dialogVisible.value = true
}
// 查看
const handleView = (row) => {
detailData.value = { ...row }
detailVisible.value = true
}
// 删除
const handleDelete = (row) => {
ElMessageBox.confirm('确定要删除该项目吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
try {
await removeProject(row.id)
ElMessage.success('删除成功')
fetchData()
} catch (error) {
ElMessage.error('删除失败')
}
})
.catch(() => {})
}
// 批量删除
const handleBatchDelete = () => {
ElMessageBox.confirm(`确定要删除选中的 ${selection.value.length} 个项目吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
try {
const ids = selection.value.map((item) => item.id).join(',')
await removeProject(ids)
ElMessage.success('删除成功')
fetchData()
} catch (error) {
ElMessage.error('删除失败')
}
})
.catch(() => {})
}
// 提交表单
const handleSubmit = async () => {
if (!formRef.value) return
await formRef.value.validate(async (valid) => {
if (valid) {
submitLoading.value = true
try {
// 构建提交数据,确保字段名与后端一致
const submitData = {
...form,
price: form.registrationFee // 后端使用 price 字段
}
if (form.id) {
await submitProject(submitData)
ElMessage.success('修改成功')
} else {
await submitProject(submitData)
ElMessage.success('新增成功')
}
dialogVisible.value = false
fetchData()
} catch (error) {
ElMessage.error(form.id ? '修改失败' : '新增失败')
} finally {
submitLoading.value = false
}
}
})
}
// 选择变化
const handleSelectionChange = (val) => {
selection.value = val
}
// 关闭弹窗
const handleDialogClose = () => {
resetForm()
}
// 重置表单
const resetForm = () => {
Object.assign(form, {
id: null,
competitionId: '',
projectCode: '',
projectName: '',
category: null,
eventType: null,
type: null,
estimatedDuration: 5,
registrationFee: 0,
maxParticipants: 100,
sortOrder: 0,
rules: '',
remark: ''
})
if (formRef.value) {
formRef.value.clearValidate()
}
}
// 上传前检查
const beforeUpload = (file) => {
if (!queryParams.competitionId) {
ElMessage.warning('请先选择赛事')
return false
}
const isExcel =
file.type === 'application/vnd.ms-excel' ||
file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
if (!isExcel) {
ElMessage.error('只能上传 Excel 文件!')
return false
}
const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) {
ElMessage.error('文件大小不能超过 5MB!')
return false
}
return true
}
// 上传成功
const handleUploadSuccess = (response) => {
if (response.success) {
ElMessage.success('导入成功')
fetchData()
} else {
ElMessage.error(response.msg || '导入失败')
}
}
// 上传失败
const handleUploadError = () => {
ElMessage.error('导入失败')
}
// 导出
const handleExport = async () => {
try {
const res = await exportProjects(queryParams)
const blob = new Blob([res], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
const link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = `项目列表_${dayjs().format('YYYYMMDDHHmmss')}.xlsx`
link.click()
window.URL.revokeObjectURL(link.href)
ElMessage.success('导出成功')
} catch (error) {
ElMessage.error('导出失败')
}
}
// 根据ID获取赛事名称
const getCompetitionName = (competitionId) => {
if (!competitionId) return '-'
const competition = competitionList.value.find(item => item.id === competitionId)
return competition ? competition.competitionName : '-'
}
const getVenueName = (venueId) => {
if (!venueId) return '-'
// 先从当前场地列表查找
let venue = venueList.value.find(item => item.id === venueId)
if (venue) return venue.venueName
// 再从全局缓存查找
if (allVenuesCache.value.has(venueId)) {
return allVenuesCache.value.get(venueId)
}
return '-'
}
// 格式化日期
const formatDate = (date) => {
if (!date) return '-'
return dayjs(date).format('YYYY-MM-DD HH:mm:ss')
}
// 生命周期
onMounted(() => {
loadCompetitionList()
fetchData()
})
</script>
<style scoped lang="scss">
.project-container {
padding: 20px;
.search-card,
.toolbar-card,
.table-card {
margin-bottom: 20px;
}
.search-form {
.el-form-item {
margin-bottom: 0;
}
}
.toolbar {
display: flex;
justify-content: space-between;
align-items: center;
.toolbar-left {
display: flex;
gap: 10px;
}
}
.pagination-container {
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
}
</style>
+48 -26
View File
@@ -123,10 +123,11 @@
<div v-if="scope.row.hint" class="row-hint">{{ scope.row.hint }}</div>
</template>
</el-table-column>
<el-table-column prop="participantCategory" label="人/单位" width="100"></el-table-column>
<el-table-column prop="teamCount" label="队伍" width="80" align="center"></el-table-column>
<el-table-column prop="singleTeamPeople" label="报名人数" width="120" align="center"></el-table-column>
<el-table-column prop="estimatedDuration" label="预计时长(分)" width="150" align="center"></el-table-column>
<el-table-column prop="projectType" label="人/集体" width="100" align="center"></el-table-column>
<el-table-column prop="athleteCount" label="人数/集体" width="100" align="center"></el-table-column>
<el-table-column prop="groupCount" label="数" width="80" align="center"></el-table-column>
<el-table-column prop="estimatedDuration" label="时长(分)" width="100" align="center"></el-table-column>
<el-table-column prop="projectCode" label="项目编码" width="120" align="center"></el-table-column>
</el-table>
</div>
@@ -161,6 +162,7 @@ import {
import { getCompetitionDetail } from '@/api/martial/competition'
import { getProjectDetail } from '@/api/martial/project'
import { getParticipantList } from '@/api/martial/participant'
import { getScheduleResult } from '@/api/martial/activitySchedule'
export default {
name: 'MartialRegistrationDetail',
@@ -387,39 +389,59 @@ export default {
// 使用缓存的参赛者列表
const participants = await this.getParticipants()
// 2. 按项目ID分组
const projectMap = new Map()
// 预加载项目信息
await this.preloadProjectInfo(participants)
// 获取编排数据,统计每个项目的分组数
let projectGroupCount = new Map()
try {
const scheduleRes = await getScheduleResult(this.competitionId)
const scheduleData = scheduleRes.data?.data
const scheduleGroups = scheduleData?.competitionGroups || scheduleData?.scheduleGroups || []
scheduleGroups.forEach(group => {
const groupProjectId = group.projectId
let key = null
if (groupProjectId && groupProjectId !== -1 && groupProjectId !== '-1') {
key = String(groupProjectId)
} else if (group.title) {
key = group.title.split(' ')[0]
}
if (key) {
projectGroupCount.set(key, (projectGroupCount.get(key) || 0) + 1)
}
})
} catch (scheduleErr) {
console.warn("获取编排数据失败,组数将显示为-:", scheduleErr)
}
// 按项目ID分组统计人数
const projectAthleteCount = new Map()
participants.forEach(athlete => {
// 兼容驼峰和下划线命名
const projectId = athlete.projectId || athlete.project_id
if (projectId) {
if (!projectMap.has(projectId)) {
projectMap.set(projectId, [])
}
projectMap.get(projectId).push(athlete)
projectAthleteCount.set(projectId, (projectAthleteCount.get(projectId) || 0) + 1)
}
})
// 3. 从缓存中获取项目信息并统计(项目信息已经在 loadRegistrationStats 中预加载)
// 从缓存中获取项目信息并构建统计数据
const projectStats = []
for (const [projectId, athleteList] of projectMap) {
for (const [projectId, count] of projectAthleteCount) {
const project = this.projectCache.get(projectId)
if (project) {
const projectType = project.type || 1 // 1=单人, 2=集体
projectStats.push({
projectName: project.projectName || project.project_name || '未知项目',
participantCategory: project.category || '',
teamCount: 1, // 简化处理,设为1
singleTeamPeople: athleteList.length,
estimatedDuration: project.estimatedDuration || project.estimated_duration || 0
})
} else {
// 如果缓存中没有(理论上应该发生),添加基本信息
projectStats.push({
projectName: `项目ID:${projectId}`,
participantCategory: '',
teamCount: 1,
singleTeamPeople: athleteList.length,
estimatedDuration: 0
projectType: projectType === 1 ? '单人' : '集体',
athleteCount: count,
groupCount:
projectGroupCount.get(String(projectId)) ||
projectGroupCount.get(project.projectName || project.project_name || '') ||
'-',
estimatedDuration: project.estimatedDuration || project.estimated_duration || 0,
projectCode: project.projectCode || project.project_code || ''
})
}
}
@@ -0,0 +1,145 @@
<template>
<el-dialog
title="导出预览"
:model-value="visible"
@update:model-value="handleVisibleChange"
width="90%"
top="5vh"
:before-close="handleClose"
>
<div class="export-options">
<el-form :inline="true" size="small">
<el-form-item label="导出模板">
<el-select v-model="exportTemplate" placeholder="选择模板" style="width: 200px">
<el-option label="模板1-详细赛程表" value="template1" />
<el-option label="模板2-比赛时间表" value="template2" />
</el-select>
</el-form-item>
<el-form-item label="场地" v-if="exportTemplate === 'template2'">
<el-select v-model="selectedVenue" placeholder="选择场地" style="width: 150px">
<el-option label="全部场地" :value="null" />
<el-option v-for="venue in venues" :key="venue.id" :label="venue.venueName" :value="venue.id" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="loadPreviewData" :loading="loading">刷新预览</el-button>
</el-form-item>
</el-form>
</div>
<div class="preview-table" v-loading="loading">
<el-table v-if="exportTemplate === 'template1'" :data="previewData" border stripe max-height="500" style="width: 100%">
<el-table-column prop="scheduleDate" label="比赛日期" width="120" />
<el-table-column prop="timeSlot" label="时间段" width="100" />
<el-table-column prop="venueName" label="场地" width="120" />
<el-table-column prop="projectName" label="项目名称" width="180" />
<el-table-column prop="category" label="组别" width="80" />
<el-table-column prop="athleteName" label="运动员姓名" width="120" />
<el-table-column prop="teamName" label="单位/队伍" width="150" />
<el-table-column prop="sortOrder" label="出场顺序" width="90" />
<el-table-column prop="status" label="状态" width="80" />
</el-table>
<el-table v-if="exportTemplate === 'template2'" :data="previewData" border stripe max-height="500" style="width: 100%">
<el-table-column prop="sequenceNo" label="序号" width="80" />
<el-table-column prop="projectName" label="项目" width="200" />
<el-table-column prop="participantCount" label="人数" width="80" />
<el-table-column prop="groupCount" label="组数" width="80" />
<el-table-column prop="durationMinutes" label="时间" width="80" />
<el-table-column prop="tableNo" label="表号" width="100" />
</el-table>
<div v-if="previewData.length === 0 && !loading" class="empty-tip">暂无数据</div>
</div>
<div class="preview-stats" v-if="previewData.length > 0">
<span> {{ previewData.length }} 条记录</span>
</div>
<template #footer>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleExport" :loading="exporting">确认导出</el-button>
</template>
</el-dialog>
</template>
<script>
import { getScheduleExportPreview, exportSchedule, exportScheduleTemplate2 } from '@/api/martial/activitySchedule'
export default {
name: 'ExportPreview',
props: {
visible: { type: Boolean, default: false },
competitionId: { type: [String, Number], required: true },
competitionName: { type: String, default: '' },
venues: { type: Array, default: () => [] }
},
emits: ['update:visible'],
data() {
return {
exportTemplate: 'template1',
selectedVenue: null,
previewData: [],
loading: false,
exporting: false
}
},
watch: {
visible(val) { if (val) this.loadPreviewData() },
exportTemplate() { this.loadPreviewData() },
selectedVenue() { if (this.exportTemplate === 'template2') this.loadPreviewData() }
},
methods: {
handleVisibleChange(val) { this.$emit('update:visible', val) },
async loadPreviewData() {
this.loading = true
try {
const res = await getScheduleExportPreview(this.competitionId, this.exportTemplate, this.selectedVenue)
this.previewData = res.data?.data || res.data || []
} catch (error) {
console.error('加载预览数据失败:', error)
this.$message.error('加载预览数据失败')
this.previewData = []
} finally {
this.loading = false
}
},
async handleExport() {
this.exporting = true
try {
let res, filename
if (this.exportTemplate === 'template1') {
res = await exportSchedule(this.competitionId)
filename = '赛程表_' + (this.competitionName || this.competitionId) + '.xlsx'
} else {
const venue = this.venues.find(v => v.id === this.selectedVenue)
const venueName = venue ? venue.venueName : null
res = await exportScheduleTemplate2(this.competitionId, this.selectedVenue, venueName, null)
filename = '比赛时间_' + (venueName || '全部场地') + '_' + (this.competitionName || this.competitionId) + '.xlsx'
}
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
const link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = filename
link.click()
window.URL.revokeObjectURL(link.href)
this.$message.success('导出成功')
this.handleClose()
} catch (error) {
console.error('导出失败:', error)
this.$message.error('导出失败')
} finally {
this.exporting = false
}
},
handleClose() { this.$emit('update:visible', false) }
}
}
</script>
<style scoped>
.export-options { margin-bottom: 20px; padding: 15px; background: #f5f7fa; border-radius: 4px; }
.preview-table { min-height: 300px; }
.preview-stats { margin-top: 15px; color: #666; font-size: 14px; }
.empty-tip { text-align: center; padding: 60px 0; color: #999; }
</style>
+170 -43
View File
@@ -7,12 +7,13 @@
</div>
<div class="header-right">
<el-button
v-if="!isScheduleCompleted"
size="small"
type="primary"
:loading="autoArrangeLoading"
@click="handleAutoArrange"
>
{{ isScheduleCompleted ? '重新编排' : '自动编排' }}
自动编排
</el-button>
<el-button size="small" type="danger" @click="showExceptionDialog">
异常组 <el-badge :value="exceptionList.length" :hidden="exceptionList.length === 0" />
@@ -85,8 +86,9 @@
<span class="project-title">{{ group.title }}</span>
<span class="project-meta">{{ group.type }}</span>
<span class="project-meta">{{ getTeamCount(group) }}</span>
<span class="project-meta">{{ group.items?.length || 0 }}</span>
<span class="project-meta">{{ group.code }}</span>
<span class="project-meta">{{ group.type === '集体' ? getTeamCount(group) : 1 }}</span>
<!-- <span class="project-meta">{{ group.code }}</span> -->
<span class="project-table-no">表号: {{ generateTableNo(group) }}</span>
</div>
<div class="project-actions" @click.stop>
<el-popover
@@ -102,7 +104,7 @@
</template>
<div class="move-popover">
<div class="move-label">移动到</div>
<el-select v-model="moveTargetVenueId" placeholder="选择场地" size="small" style="width: 100%; margin-bottom: 10px;">
<el-select v-model="moveTargetVenueId" placeholder="选择场地" size="small" style="width: 100%; margin-bottom: 10px;" :teleported="false">
<el-option
v-for="venue in venues"
:key="venue.id"
@@ -184,36 +186,7 @@
>
<span class="player-detail-index">{{ playerIndex + 1 }}</span>
<span class="player-detail-name">{{ player.playerName }}</span>
<span class="player-detail-status">
<el-tag
:type="player.status === '已签到' ? 'success' : player.status === '异常' ? 'danger' : 'info'"
size="small"
>
{{ player.status || '未签到' }}
</el-tag>
</span>
<span class="player-detail-actions">
<el-button
v-if="(player.status || '未签到') === '未签到'"
link
size="small"
@click="markPlayerAsException(group, team, playerIndex)"
:disabled="isScheduleCompleted"
style="color: #f56c6c;"
>
标记异常
</el-button>
<el-button
v-if="player.status === '异常'"
link
size="small"
@click="removePlayerException(group, team, playerIndex)"
:disabled="isScheduleCompleted"
style="color: #67c23a;"
>
取消异常
</el-button>
</span>
<!-- 签到状态和异常操作只在调度功能中显示 -->
</div>
</div>
</div>
@@ -267,7 +240,7 @@
<el-table-column prop="duration" label="合计时间" width="100" align="center"></el-table-column>
<el-table-column prop="status" label="状态" width="100" align="center">
<template #default="scope">
<span v-if="scope.row.status" class="status-active">{{ scope.row.status }}</span>
<span :class="['status-tag', scope.row.status === 2 ? 'status-completed' : scope.row.status === 1 ? 'status-progress' : 'status-pending']">{{ scope.row.status === 2 ? '已完成' : scope.row.status === 1 ? '进行中' : '未开始' }}</span>
</template>
</el-table-column>
</el-table>
@@ -276,7 +249,7 @@
<div class="footer-actions">
<el-button size="small" @click="handleSaveDraft" v-if="!isScheduleCompleted">保存草稿</el-button>
<el-button size="small" @click="handleExport" v-if="isScheduleCompleted">导出</el-button>
<el-button v-if="isScheduleCompleted" size="small" @click="exportPreviewVisible = true">导出</el-button>
<el-button size="small" type="primary" @click="handleConfirm" v-if="!isScheduleCompleted">完成编排</el-button>
</div>
@@ -373,6 +346,13 @@
</span>
</template>
</el-dialog>
<!-- 导出预览对话框 -->
<ExportPreview
v-model:visible="exportPreviewVisible"
:competition-id="competitionId"
:competition-name="competitionInfo.competitionName"
:venues="venues"
/>
</div>
</template>
@@ -380,12 +360,14 @@
import { ArrowDown, ArrowRight } from '@element-plus/icons-vue'
import { getVenuesByCompetition } from '@/api/martial/venue'
import { getCompetitionDetail } from '@/api/martial/competition'
import { getScheduleResult, saveAndLockSchedule, saveDraftSchedule, triggerAutoArrange, moveScheduleGroup, exportSchedule } from '@/api/martial/activitySchedule'
import { getScheduleResult, saveAndLockSchedule, saveDraftSchedule, triggerAutoArrange, moveScheduleGroup, exportSchedule, exportScheduleTemplate2 } from '@/api/martial/activitySchedule'
import { updateCheckInStatus, getScheduleConfig } from '@/api/martial/schedulePlan'
import ExportPreview from './ExportPreview.vue'
export default {
name: 'MartialScheduleList',
components: {
ExportPreview,
ArrowDown,
ArrowRight
},
@@ -399,6 +381,7 @@ export default {
selectedVenueIdForVenueTab: null, // 选中的场地ID(场地Tab
confirmDialogVisible: false,
isScheduleCompleted: false, // 是否已完成编排
exportPreviewVisible: false, // 导出预览对话框
loading: false,
autoArrangeLoading: false, // 自动编排加载状态
venues: [], // 场地列表(从后端加载)
@@ -439,7 +422,7 @@ export default {
const filtered = this.competitionGroups.filter(group => {
console.log(`分组"${group.title}": venueId=${group.venueId}(${typeof group.venueId}), timeSlotIndex=${group.timeSlotIndex}(${typeof group.timeSlotIndex})`)
const venueMatch = group.venueId === this.selectedVenueId || Number(group.venueId) === Number(this.selectedVenueId)
const venueMatch = String(group.venueId) === String(this.selectedVenueId)
const timeMatch = group.timeSlotIndex === this.selectedTime
console.log(` 场地匹配:${venueMatch}, 时间匹配:${timeMatch}`)
return venueMatch && timeMatch
@@ -463,8 +446,7 @@ export default {
// 如果选中了场地,进一步过滤
if (this.selectedVenueIdForVenueTab) {
groupsInTimeSlot = groupsInTimeSlot.filter(group => {
return group.venueId === this.selectedVenueIdForVenueTab ||
Number(group.venueId) === Number(this.selectedVenueIdForVenueTab)
return String(group.venueId) === String(this.selectedVenueIdForVenueTab)
})
}
@@ -474,8 +456,8 @@ export default {
participant: group.type,
team: 1, // 队伍数量,可以从分组中计算
number: group.items?.length || 0, // 参赛人数
duration: 0, // 合计时间,如果后端有数据可以显示
status: group.venueName, // 显示场地名称
duration: group.estimatedDuration || 0, // 合计时间
status: group.status, // 状态: 0-未开始, 1-进行中, 2-已完成
venueName: group.venueName,
hint: '' // 可以根据需要添加提示信息
}))
@@ -496,6 +478,43 @@ export default {
}
},
methods: {
// 生成表号: 场地(1位) + 时段(1位,上午=1/下午=2) + 序号(2位)
generateTableNo(group) {
// 1. 获取场地编号
let venueNo = 1
if (group.venueId) {
const venue = this.venues.find(v => v.id === group.venueId || String(v.id) === String(group.venueId))
if (venue && venue.venueName) {
// 从场地名称提取数字
const match = venue.venueName.match(/\d+/)
if (match) {
venueNo = parseInt(match[0])
}
}
}
// 2. 获取时段:上午=1, 下午=2
let period = 1
if (group.timeSlot) {
const hour = parseInt(group.timeSlot.split(':')[0])
period = hour < 12 ? 1 : 2
}
// 3. 获取序号:在同场地同时段中的顺序(与显示顺序一致)
const sameSlotGroups = this.competitionGroups.filter(g => {
const gVenueMatch = String(g.venueId) === String(group.venueId)
if (!gVenueMatch) return false
const gHour = parseInt((g.timeSlot || '08:30').split(':')[0])
const gPeriod = gHour < 12 ? 1 : 2
return gPeriod === period
})
// 使用原始数组顺序(与显示顺序一致),不再按id排序
const orderIndex = sameSlotGroups.findIndex(g => g.id === group.id) + 1
// 4. 格式化: 场地(1位) + 时段(1位) + 序号(2位)
return `${venueNo}${period}${String(orderIndex).padStart(2, '0')}`
},
// 检查项目是否展开
isProjectExpanded(groupId) {
return this.expandedProjects[groupId] === true
@@ -601,8 +620,22 @@ export default {
playerIds: []
})
}
// If item has members array (from API), use it as players
if (item.members && item.members.length > 0) {
item.members.forEach(member => {
teamMap.get(key).players.push({
id: member.id,
playerName: member.name || member.playerName,
organization: member.organization,
status: member.status
})
teamMap.get(key).playerIds.push(member.id)
})
} else {
// Fallback: use item itself as player
teamMap.get(key).players.push(item)
teamMap.get(key).playerIds.push(item.id)
}
})
return Array.from(teamMap.values())
},
@@ -623,6 +656,14 @@ export default {
const targetVenue = this.venues.find(v => v.id === this.moveTargetVenueId)
// In draft mode (negative groupId), just update frontend state
if (group.id && group.id.toString().startsWith("-")) {
group.venueId = this.moveTargetVenueId
group.venueName = targetVenue ? targetVenue.venueName : ""
this.$message.success(`已移动到 ${group.venueName}`)
return
}
try {
// 调用后端API移动分组
const res = await moveScheduleGroup({
@@ -836,6 +877,49 @@ export default {
console.log('生成的时间段:', this.timeSlots)
},
// 根据实际编排数据更新显示的时间段(只显示有比赛的时段)
updateTimeSlotsFromGroups() {
if (!this.competitionGroups || this.competitionGroups.length === 0) {
return
}
// 从分组数据中提取实际使用的时段索引
const usedTimeSlotIndexes = new Set()
this.competitionGroups.forEach(group => {
if (group.timeSlotIndex !== null && group.timeSlotIndex !== undefined) {
usedTimeSlotIndexes.add(group.timeSlotIndex)
}
})
if (usedTimeSlotIndexes.size === 0) {
return
}
// 保存原始时段用于映射
const allSlots = [...this.timeSlots]
const filteredSlots = []
const indexMapping = {}
let newIndex = 0
allSlots.forEach((slot, oldIndex) => {
if (usedTimeSlotIndexes.has(oldIndex)) {
filteredSlots.push(slot)
indexMapping[oldIndex] = newIndex
newIndex++
}
})
// 更新分组的时段索引
this.competitionGroups.forEach(group => {
if (group.timeSlotIndex !== null && group.timeSlotIndex !== undefined) {
const newIdx = indexMapping[group.timeSlotIndex]
if (newIdx !== undefined) {
group.timeSlotIndex = newIdx
}
}
})
this.timeSlots = filteredSlots
console.log("过滤后的时间段:", this.timeSlots)
if (this.selectedTime >= this.timeSlots.length) {
this.selectedTime = 0
}
},
// 加载场地列表
async loadVenues() {
try {
@@ -897,12 +981,14 @@ export default {
venueName: group.venueName,
timeSlot: group.timeSlot,
timeSlotIndex: group.timeSlotIndex,
estimatedDuration: group.estimatedDuration || 0,
items: (group.participants || []).map(p => ({
id: p.id,
schoolUnit: p.schoolUnit,
playerName: p.playerName,
status: p.status || '未签到',
sortOrder: p.sortOrder
sortOrder: p.sortOrder,
members: p.members || []
}))
}))
@@ -925,6 +1011,7 @@ export default {
console.log('解析后的competitionGroups:', this.competitionGroups)
console.log('当前selectedVenueId:', this.selectedVenueId)
console.log('当前selectedTime:', this.selectedTime)
this.updateTimeSlotsFromGroups()
this.$message.success(data.isDraft ? '已加载草稿数据' : '已加载编排数据')
} else {
// 后端还没有数据,使用默认数据进行展示
@@ -1110,6 +1197,7 @@ export default {
venueName: group.venueName,
timeSlot: group.timeSlot,
timeSlotIndex: group.timeSlotIndex,
estimatedDuration: group.estimatedDuration || 0,
participants: group.items.map((item, index) => ({
id: item.id,
schoolUnit: item.schoolUnit,
@@ -1148,6 +1236,34 @@ export default {
group.items.splice(itemIndex + 1, 0, temp)
this.$message.success('下移成功')
},
handleExportCommand(command) {
if (command === 'template1') {
this.handleExport()
} else if (command === 'template2') {
this.handleExportTemplate2()
}
},
async handleExportTemplate2() {
try {
this.loading = true
const venueId = this.selectedVenueId
const venue = this.venues.find(v => v.id === venueId)
const venueName = venue ? venue.venueName : null
const res = await exportScheduleTemplate2(this.competitionId, venueId, venueName, null)
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
const link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = `比赛时间_${venueName || '全部场地'}_${this.competitionInfo.competitionName || this.competitionId}.xlsx`
link.click()
window.URL.revokeObjectURL(link.href)
this.$message.success('导出成功')
} catch (error) {
console.error('导出失败:', error)
this.$message.error('导出失败,请稍后重试')
} finally {
this.loading = false
}
},
async handleExport() {
try {
this.loading = true
@@ -1198,6 +1314,7 @@ export default {
venueName: group.venueName,
timeSlot: group.timeSlot,
timeSlotIndex: group.timeSlotIndex,
estimatedDuration: group.estimatedDuration || 0,
participants: group.items.map((item, index) => ({
id: item.id,
schoolUnit: item.schoolUnit,
@@ -1421,6 +1538,16 @@ export default {
color: #606266;
font-size: 13px;
}
.project-table-no {
color: #409EFF;
font-size: 13px;
font-weight: 500;
margin-left: 10px;
padding: 2px 8px;
background-color: #ecf5ff;
border-radius: 4px;
}
}
.project-actions {
+24 -6
View File
@@ -94,7 +94,8 @@
<el-table-column label="总裁判分数" width="120" align="center" fixed="right">
<template #default="scope">
<span class="total-score">{{ formatScore(scope.row.totalScore) }}</span>
<span v-if="scope.row.scoreStatus === 2" class="total-score">{{ formatScore(scope.row.chiefJudgeScore) }}</span>
<span v-else class="pending-score">待确认</span>
</template>
</el-table-column>
@@ -153,12 +154,17 @@
<div class="total-score-display">
<span class="label">总分</span>
<span class="value">{{ formatScore(currentDetail.totalScore) }}</span>
<template v-if="currentDetail.scoreStatus === 2">
<span class="value">{{ formatScore(currentDetail.chiefJudgeScore) }}</span>
<div class="calculation-note">(主裁判已确认)</div>
</template>
<template v-else>
<span class="value pending">待确认最终得分</span>
<div class="calculation-note">
<span v-if="currentDetail.judgeScores.length > 2">
(去掉最高分和最低分后平均)
</span>
裁判员评分: {{ formatScore(currentDetail.totalScore) }}
<span v-if="currentDetail.judgeScores.length > 2">(去掉最高最低分后平均)</span>
</div>
</template>
</div>
</div>
</div>
@@ -398,7 +404,9 @@ export default {
playerNo: score.playerNo || '',
judgeScores: [],
scoreDetails: [],
totalScore: 0
totalScore: 0,
chiefJudgeScore: score.chiefJudgeScore,
scoreStatus: score.scoreStatus || 0
})
}
@@ -565,6 +573,16 @@ export default {
}
.total-score {
}
.pending-score {
color: #e6a23c;
font-weight: 500;
}
.value.pending {
color: #e6a23c;
font-weight: 500;
color: #1b7c5e;
font-weight: 700;
font-size: 14px;
+1 -1
View File
@@ -59,7 +59,7 @@
<i class="el-icon-s-order"></i>
</div>
<div class="card-info">
<h3>订单管理</h3>
<h3>赛事管理</h3>
<p>查看和管理订单</p>
</div>
<i class="card-arrow el-icon-arrow-right"></i>