diff --git a/.claude/settings.local.json b/.claude/settings.local.json index a158f1f..3d2fefe 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -15,7 +15,23 @@ "Bash(mvn clean compile:*)", "Bash(mvn clean package:*)", "Bash(mvn package:*)", - "Bash(findstr:*)" + "Bash(findstr:*)", + "Bash(python:*)", + "Bash(mysql:*)", + "Bash(netstat:*)", + "Bash(taskkill:*)", + "Bash(powershell -Command:*)", + "Bash(mvn spring-boot:run:*)", + "Bash(timeout /t 2)", + "Bash(ping:*)", + "Bash(mvn compile:*)", + "Bash(timeout /t 25)", + "Bash(git checkout:*)", + "Bash(timeout /t 5)", + "Bash(paste:*)", + "Bash(cp:*)", + "Bash(tasklist:*)", + "Bash(node:*)" ], "deny": [], "ask": [] diff --git a/doc/评委邀请码功能实现指南.md b/doc/评委邀请码功能实现指南.md new file mode 100644 index 0000000..6a56c47 --- /dev/null +++ b/doc/评委邀请码功能实现指南.md @@ -0,0 +1,581 @@ +# 评委邀请码功能实现指南 + +> **实施日期**: 2025-12-12 +> **页面路径**: `src/views/martial/judgeInvite/index.vue` +> **与赛事绑定**: ✅ 已通过 `competitionId` 实现 + +--- + +## 📋 实现方案 + +### 一、需求分析 + +根据文档,评委邀请码功能需要实现: + +1. **单个生成**:为单个评委生成6位邀请码 +2. **批量生成**:为多个评委批量生成邀请码 +3. **重新生成**:已有邀请码时可重新生成 +4. **复制功能**:点击邀请码可复制 +5. **赛事绑定**:所有操作都与选中的赛事绑定 + +### 二、后端接口(已完成) + +后端接口已在 `src/api/martial/judgeInvite.js` 中添加: + +```javascript +// 1. 生成邀请码 +export const generateInviteCode = (data) => { + return request({ + url: '/api/blade-martial/judgeInvite/generate', + method: 'post', + data + }) +} + +// 2. 批量生成邀请码 +export const batchGenerateInviteCode = (data) => { + return request({ + url: '/api/blade-martial/judgeInvite/generate/batch', + method: 'post', + data + }) +} + +// 3. 重新生成邀请码 +export const regenerateInviteCode = (inviteId) => { + return request({ + url: `/api/blade-martial/judgeInvite/regenerate/${inviteId}`, + method: 'put' + }) +} + +// 4. 查询评委邀请码 +export const getInviteByJudge = (competitionId, judgeId) => { + return request({ + url: '/api/blade-martial/judgeInvite/byJudge', + method: 'get', + params: { competitionId, judgeId } + }) +} +``` + +--- + +## 三、前端实现步骤 + +### 步骤1:导入新增的API + +在 `src/views/martial/judgeInvite/index.vue` 第281-292行,修改导入语句: + +```javascript +import { + getJudgeInviteList, + sendInvite, + batchSendInvites, + resendInvite, + cancelInvite, + confirmInvite, + getInviteStatistics, + importFromJudgePool, + exportInvites, + sendReminder, + generateInviteCode, // 新增 + batchGenerateInviteCode, // 新增 + regenerateInviteCode // 新增 +} from '@/api/martial/judgeInvite' +``` + +### 步骤2:修改邀请码列显示(第165-179行) + +将现有的邀请码列替换为: + +```vue + + + +``` + +### 步骤3:添加批量生成按钮(第129-131行) + +修改工具栏的"批量邀请"按钮功能: + +```vue + + 批量生成邀请码 + +``` + +### 步骤4:添加方法实现 + +在 ` - diff --git a/src/views/martial/judgeInvite/index.vue b/src/views/martial/judgeInvite/index.vue index ccbf488..41230e4 100644 Binary files a/src/views/martial/judgeInvite/index.vue and b/src/views/martial/judgeInvite/index.vue differ diff --git a/src/views/martial/judgeInvite/index.vue.old b/src/views/martial/judgeInvite/index.vue.old new file mode 100644 index 0000000..9102bf5 Binary files /dev/null and b/src/views/martial/judgeInvite/index.vue.old differ diff --git a/src/views/martial/judgeProject/index.vue b/src/views/martial/judgeProject/index.vue index 7e5a4cb..2ba582c 100644 --- a/src/views/martial/judgeProject/index.vue +++ b/src/views/martial/judgeProject/index.vue @@ -1,1722 +1,35 @@ - - diff --git a/src/views/martial/live/index.vue b/src/views/martial/live/index.vue index 71b366f..f794b37 100644 Binary files a/src/views/martial/live/index.vue and b/src/views/martial/live/index.vue differ diff --git a/src/views/martial/order/index.vue b/src/views/martial/order/index.vue index f0e4709..fc134c2 100644 --- a/src/views/martial/order/index.vue +++ b/src/views/martial/order/index.vue @@ -69,7 +69,15 @@ @@ -91,6 +99,7 @@ + + diff --git a/src/views/martial/schedule/index.vue b/src/views/martial/schedule/index.vue index efbf1e2..f7d4bfe 100644 --- a/src/views/martial/schedule/index.vue +++ b/src/views/martial/schedule/index.vue @@ -6,6 +6,14 @@

编排

+ + {{ isScheduleCompleted ? '重新编排' : '自动编排' }} + 异常组 @@ -18,6 +26,7 @@ size="small" :type="activeTab === 'competition' ? 'primary' : ''" @click="activeTab = 'competition'" + :disabled="isScheduleCompleted" > 竞赛分组 @@ -25,6 +34,7 @@ size="small" :type="activeTab === 'venue' ? 'primary' : ''" @click="activeTab = 'venue'" + :disabled="isScheduleCompleted" > 场地 @@ -91,7 +101,7 @@