Przeglądaj źródła

feat(system): 更新运动员和裁判相关功能

- 在 GameAthlete 中添加项目列表字段并优化项目显示逻辑
- 在 GameReferee 中将 projectList 重命名为 projectList2
- 在 GameTeam 中添加 athleteList 字段
- 优化运动员和裁判的添加、编辑和删除逻辑
- 新增更新队伍运动员列表的功能
- 调整项目组别相关界面文案
- 修复了一些小问题和优化了代码结构
zhou 1 tydzień temu
rodzic
commit
7ca30ee54b

+ 2 - 0
src/api/system/gameAthlete/types.ts

@@ -73,6 +73,7 @@ export interface GameAthleteVO {
    * 参与项目列表
    */
   projectValue: string;
+  projectList: String[];
 
   /**
    * 状态(0正常 1停用)
@@ -165,6 +166,7 @@ export interface GameAthleteForm extends BaseEntity {
    * 参与项目列表
    */
   projectValue?: string;
+  projectList: String[];
 
   /**
    * 选中的项目列表(用于穿梭框)

+ 2 - 0
src/api/system/gameReferee/types.ts

@@ -33,6 +33,7 @@ export interface GameRefereeVO {
    * 负责的项目
    */
   projectList: string;
+  projectList2: string[];
 
   /**
    * 裁判码
@@ -86,6 +87,7 @@ export interface GameRefereeForm extends BaseEntity {
    * 负责的项目
    */
   projectList?: string;
+  projectList2?: string[];
 
   /**
    * 裁判码

+ 16 - 0
src/api/system/gameTeam/index.ts

@@ -72,3 +72,19 @@ export const getTeamCount = () => {
     method: 'get'
   });
 };
+
+/**
+ * 更新队伍中的运动员列表
+ * @param teamId 队伍ID
+ * @param athleteIds 运动员ID列表
+ */
+export const updateTeamAthletes = (teamId: string | number, athleteIds: Array<string | number>) => {
+  return request({
+    url: '/system/gameTeam/updateAthletes',
+    method: 'put',
+    data: {
+      teamId,
+      athleteIds
+    }
+  });
+};

+ 2 - 0
src/api/system/gameTeam/types.ts

@@ -32,6 +32,7 @@ export interface GameTeamVO {
    * 队员列表
    */
   athleteValue: string;
+  athleteList: String[];
 
   /**
    * 参与项目列表
@@ -93,6 +94,7 @@ export interface GameTeamForm extends BaseEntity {
    * 队员列表
    */
   athleteValue?: string;
+  athleteList: String[];
 
   /**
    * 参与项目列表

+ 140 - 53
src/views/system/gameAthlete/index.vue

@@ -4,9 +4,6 @@
       <div v-show="showSearch" class="mb-[10px]">
         <el-card shadow="hover">
           <el-form ref="queryFormRef" :model="queryParams" :inline="true">
-            <!-- <el-form-item label="赛事名称" prop="eventName">
-              <el-input v-model="queryParams.eventName" placeholder="请输入赛事名称" clearable @keyup.enter="handleQuery" />
-            </el-form-item> -->
             <el-form-item label="队伍名称" prop="teamName">
               <el-input v-model="queryParams.teamName" placeholder="请输入队伍名称" clearable @keyup.enter="handleQuery" />
             </el-form-item>
@@ -69,9 +66,9 @@
           </template>
         </el-table-column>
         <el-table-column label="年龄" align="center" prop="age" v-if="columns[5].visible" />
-        <el-table-column label="参与项目" align="center" prop="projectValue" width="200px" v-if="columns[6].visible">
+        <el-table-column label="参与项目" align="center" prop="projectList" width="200px" v-if="columns[6].visible">
           <template #default="scope">
-            {{ formatProjectList(scope.row.projectValue) }}
+            {{ formatProjectList(scope.row.projectList) }}
           </template>
         </el-table-column>
         <el-table-column label="证件号" align="center" prop="idCard" v-if="columns[7].visible" />
@@ -190,7 +187,7 @@
 <script setup name="GameAthlete" lang="ts">
 import { nextTick, ref, onMounted } from 'vue';
 import { listGameAthlete, getGameAthlete, delGameAthlete, addGameAthlete, updateGameAthlete } from '@/api/system/gameAthlete';
-import { listGameTeam } from '@/api/system/gameTeam';
+import { listGameTeam, updateTeamAthletes } from '@/api/system/gameTeam';
 import { listGameEventProject } from '@/api/system/gameEventProject';
 // import { getDefaultEvent } from '@/api/system/gameEvent';
 import { GameAthleteVO, GameAthleteQuery, GameAthleteForm } from '@/api/system/gameAthlete/types';
@@ -275,16 +272,17 @@ const initFormData: GameAthleteForm = {
   tshirtSize: undefined,
   groupType: undefined,
   projectValue: undefined,
+  projectList: [],
   selectedProjects: [], // 添加已选项目列表
   status: undefined,
   remark: undefined
 };
 const data = reactive<PageData<GameAthleteForm, GameAthleteQuery>>({
-  form: { ...initFormData, eventId: undefined },
+  form: { ...initFormData},
   queryParams: {
     pageNum: 1,
     pageSize: 10,
-    eventId: undefined, // 会自动设置为默认赛事ID
+    eventId: undefined,
     eventName: undefined,
     teamId: undefined,
     teamName: undefined,
@@ -338,7 +336,6 @@ const getTeamNameById = (teamId: string | number) => {
 // 获取赛事项目列表
 const getProjectList = async (eventId?: string) => {
   const res = await listGameEventProject({
-    // eventId: eventId || String(form.value.eventId),
     pageNum: 1,
     pageSize: 1000,
     orderByColumn: '',
@@ -352,25 +349,20 @@ const getProjectList = async (eventId?: string) => {
 };
 
 // 格式化项目列表显示
-const formatProjectList = (projectValue: string) => {
-  if (!projectValue) return '';
+const formatProjectList = (projectList: string[]) => {
+  if (!projectList) return '';
   // 将逗号分隔的ID列表转换为项目名称列表
-  const projectIds = projectValue.split(',');
-  const projectNames = projectIds.map((id) => {
-    const project = gameEventProjectList.value.find((p) => p.key === id);
-    return project ? project.label : id;
-  });
-  return projectNames.join(', ');
+  // const projectIds = projectValue.split(',');
+  // const projectNames = projectIds.map((id) => {
+  //   const project = gameEventProjectList.value.find((p) => p.key === id);
+  //   return project ? project.label : id;
+  // });
+  const projectNames = gameEventProjectList.value.filter((p) => projectList.includes(p.key)).map((p) => p.label);
+  return projectNames.join(',');
 };
 
 /** 查询参赛队员列表 */
 const getList = async () => {
-  // if (!queryParams.value.eventId) {
-  //   proxy?.$modal.msgWarning('未获取到默认赛事信息');
-  //   loading.value = false;
-  //   return;
-  // }
-
   loading.value = true;
   const res = await listGameAthlete(queryParams.value);
   gameAthleteList.value = res.rows;
@@ -428,11 +420,11 @@ const handleAdd = () => {
   dialog.visible = true;
   dialog.title = '添加参赛队员';
   // 获取项目列表
-  nextTick(() => {
-    if (form.value.eventId) {
-      getProjectList(String(form.value.eventId));
-    }
-  });
+  // nextTick(() => {
+  //   if (form.value.eventId) {
+  //     getProjectList(String(form.value.eventId));
+  //   }
+  // });
 };
 
 /** 修改按钮操作 */
@@ -452,11 +444,11 @@ const handleUpdate = async (row?: GameAthleteVO) => {
   dialog.visible = true;
   dialog.title = '修改参赛队员';
   // 获取项目列表
-  nextTick(() => {
-    if (form.value.eventId) {
-      getProjectList(String(form.value.eventId));
-    }
-  });
+  // nextTick(() => {
+  //   if (form.value.eventId) {
+  //     getProjectList(String(form.value.eventId));
+  //   }
+  // });
 };
 
 /** 提交按钮 */
@@ -464,24 +456,85 @@ const submitForm = () => {
   gameAthleteFormRef.value?.validate(async (valid: boolean) => {
     if (valid) {
       buttonLoading.value = true;
-      // 处理项目列表数据,将数组转换为逗号分隔的字符串
-      const submitForm = { ...form.value };
-      if (submitForm.selectedProjects && submitForm.selectedProjects.length > 0) {
-        submitForm.projectValue = submitForm.selectedProjects.join(',');
-      } else {
-        submitForm.projectValue = '';
+      try {
+        // 处理项目列表数据,将数组转换为逗号分隔的字符串
+        const submitForm = { ...form.value };
+        if (submitForm.selectedProjects && submitForm.selectedProjects.length > 0) {
+          submitForm.projectList = submitForm.selectedProjects;
+          // submitForm.projectValue = submitForm.selectedProjects.join(',');
+        } else {
+          // submitForm.projectValue = '';
+          submitForm.projectList = [];
+        }
+        // 删除selectedProjects属性,因为它不需要提交到后端
+        delete submitForm.selectedProjects;
+
+        let result;
+        if (form.value.athleteId) {
+          result = await updateGameAthlete(submitForm);
+        } else {
+          result = await addGameAthlete(submitForm);
+        }
+
+        // 更新队伍表中的运动员列表
+        if (submitForm.teamId) {
+          try {
+            // 获取当前队伍的所有运动员
+            const currentTeamAthletes = gameAthleteList.value
+              .filter(athlete => athlete.teamId === submitForm.teamId)
+              .map(athlete => athlete.athleteId);
+            
+            // 添加新运动员到列表中
+            if (!form.value.athleteId) {
+              // 新增运动员,需要从返回结果中获取新ID
+              const newAthleteId = result.data?.athleteId || submitForm.athleteId;
+              if (newAthleteId) {
+                currentTeamAthletes.push(newAthleteId);
+              }
+            } else {
+              // 更新运动员,检查是否改变了队伍
+              const originalAthlete = gameAthleteList.value.find(a => a.athleteId === form.value.athleteId);
+              if (originalAthlete && originalAthlete.teamId !== submitForm.teamId) {
+                // 运动员改变了队伍,需要从原队伍中移除,添加到新队伍中
+                
+                // 从原队伍中移除运动员
+                if (originalAthlete.teamId) {
+                  const originalTeamAthletes = gameAthleteList.value
+                    .filter(athlete => athlete.teamId === originalAthlete.teamId && athlete.athleteId !== form.value.athleteId)
+                    .map(athlete => athlete.athleteId);
+                  
+                  await updateTeamAthletes(originalAthlete.teamId, originalTeamAthletes);
+                }
+                
+                // 添加到新队伍中
+                if (!currentTeamAthletes.includes(form.value.athleteId)) {
+                  currentTeamAthletes.push(form.value.athleteId);
+                }
+              } else if (originalAthlete && originalAthlete.teamId === submitForm.teamId) {
+                // 运动员在同一队伍中,确保在列表中
+                if (!currentTeamAthletes.includes(form.value.athleteId)) {
+                  currentTeamAthletes.push(form.value.athleteId);
+                }
+              }
+            }
+            
+            // 更新队伍表中的运动员列表
+            await updateTeamAthletes(submitForm.teamId, currentTeamAthletes);
+          } catch (error) {
+            console.error('更新队伍运动员列表失败:', error);
+            proxy?.$modal.msgWarning('运动员信息保存成功,但更新队伍运动员列表失败');
+          }
+        }
+
+        proxy?.$modal.msgSuccess('操作成功');
+        dialog.visible = false;
+        await getList();
+      } catch (error) {
+        console.error('操作失败:', error);
+        proxy?.$modal.msgError('操作失败');
+      } finally {
+        buttonLoading.value = false;
       }
-      // 删除selectedProjects属性,因为它不需要提交到后端
-      delete submitForm.selectedProjects;
-
-      if (form.value.athleteId) {
-        await updateGameAthlete(submitForm).finally(() => (buttonLoading.value = false));
-      } else {
-        await addGameAthlete(submitForm).finally(() => (buttonLoading.value = false));
-      }
-      proxy?.$modal.msgSuccess('操作成功');
-      dialog.visible = false;
-      await getList();
     }
   });
 };
@@ -490,9 +543,42 @@ const submitForm = () => {
 const handleDelete = async (row?: GameAthleteVO) => {
   const _athleteIds = row?.athleteId || ids.value;
   await proxy?.$modal.confirm('是否确认删除参赛队员编号为"' + _athleteIds + '"的数据项?').finally(() => (loading.value = false));
-  await delGameAthlete(_athleteIds);
-  proxy?.$modal.msgSuccess('删除成功');
-  await getList();
+  
+  try {
+    await delGameAthlete(_athleteIds);
+    
+    // 从队伍表中移除被删除的运动员
+    const athleteIdsToRemove = Array.isArray(_athleteIds) ? _athleteIds : [_athleteIds];
+    const teamsToUpdate = new Set<number | string>();
+    
+    // 收集需要更新的队伍ID
+    athleteIdsToRemove.forEach(athleteId => {
+      const athlete = gameAthleteList.value.find(a => a.athleteId === athleteId);
+      if (athlete && athlete.teamId) {
+        teamsToUpdate.add(athlete.teamId);
+      }
+    });
+    
+    // 更新每个相关队伍中的运动员列表
+    for (const teamId of teamsToUpdate) {
+      try {
+        const currentTeamAthletes = gameAthleteList.value
+          .filter(athlete => athlete.teamId === teamId && !athleteIdsToRemove.includes(athlete.athleteId))
+          .map(athlete => athlete.athleteId);
+        
+        await updateTeamAthletes(teamId, currentTeamAthletes);
+      } catch (error) {
+        console.error(`更新队伍 ${teamId} 运动员列表失败:`, error);
+        proxy?.$modal.msgWarning(`运动员删除成功,但更新队伍 ${teamId} 运动员列表失败`);
+      }
+    }
+    
+    proxy?.$modal.msgSuccess('删除成功');
+    await getList();
+  } catch (error) {
+    console.error('删除失败:', error);
+    proxy?.$modal.msgError('删除失败');
+  }
 };
 
 /** 导出按钮操作 */
@@ -541,5 +627,6 @@ const importTemplate = () => {
 onMounted(() => {
   getList();
   getTeamList();
+  getProjectList();
 });
 </script>

+ 16 - 6
src/views/system/gameEvent/index.vue

@@ -142,6 +142,16 @@
                   <span class="button-text">排行榜</span>
                 </el-button>
               </el-tooltip>
+              <!-- 编写文章按钮 -->
+            <el-tooltip content="编写文章" placement="top">
+              <el-button
+                link
+                type="primary"
+                icon="EditPen"
+                @click="handleWriteArticle(scope.row)"
+                v-hasPermi="['system:gameEvent:writeArticle']"
+              ></el-button>
+            </el-tooltip>
             </div>
           </template>
         </el-table-column>
@@ -209,9 +219,9 @@
     <!-- 注册 RefereeForm 组件 -->
     <RefereeForm ref="refereeFormRef" />
     <!-- 排行榜对话框 -->
-    <el-dialog :title="`赛事 ${currentEventId} 排行榜`" v-model="rankingBoardVisible" width="800px" append-to-body>
+    <!-- <el-dialog :title="`赛事 ${currentEventId} 排行榜`" v-model="rankingBoardVisible" width="800px" append-to-body>
       <RankingBoard :eventId="currentEventId" v-if="rankingBoardVisible" />
-    </el-dialog>
+    </el-dialog> -->
     <!-- 文章编写对话框 -->
     <el-dialog v-model="articleDialog.visible" :title="articleDialog.title" width="1200px" append-to-body>
       <el-tabs v-model="activeTab" @tab-click="handleTabClick">
@@ -743,10 +753,10 @@ const articleData = reactive({
 });
 
 // 打开排行榜组件并传递赛事ID
-const openRankingBoard = (eventId: string) => {
-  currentEventId.value = eventId;
-  rankingBoardVisible.value = true;
-};
+// const openRankingBoard = (eventId: string) => {
+//   currentEventId.value = eventId;
+//   rankingBoardVisible.value = true;
+// };
 
 /** 状态修改  */
 const handleStatusChange = async (row: GameEventVO) => {

+ 4 - 4
src/views/system/gameEventGroup/index.vue

@@ -5,7 +5,7 @@
         <el-card shadow="hover">
           <el-form ref="queryFormRef" :model="queryParams" :inline="true">
             <el-form-item label="赛事组别" prop="groupName">
-              <el-input v-model="queryParams.groupName" placeholder="请输入项目组名" clearable @keyup.enter="handleQuery" />
+              <el-input v-model="queryParams.groupName" placeholder="请输入组名" clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <!-- <el-form-item label="包含项目列表" prop="projectList">
               <el-input v-model="queryParams.projectList" placeholder="请输入包含项目列表" clearable @keyup.enter="handleQuery" />
@@ -52,7 +52,7 @@
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="主键" align="center" prop="groupId" v-if="columns[0].visible" />
         <!-- <el-table-column label="赛事ID" align="center" prop="eventId" /> -->
-        <el-table-column label="赛事组别" align="center" prop="groupName" v-if="columns[1].visible" />
+        <el-table-column label="组别" align="center" prop="groupName" v-if="columns[1].visible" />
         <el-table-column label="包含项目" align="center" prop="projectList" v-if="columns[2].visible" />
         <el-table-column label="成员性别" align="center" prop="memberGender" v-if="columns[3].visible">
           <template #default="scope">
@@ -76,8 +76,8 @@
     <!-- 添加或修改赛事分组对话框 -->
     <el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
       <el-form ref="gameEventGroupFormRef" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="项目组名" prop="groupName">
-          <el-input v-model="form.groupName" placeholder="请输入项目组名" />
+        <el-form-item label="组名" prop="groupName">
+          <el-input v-model="form.groupName" placeholder="请输入组名" />
         </el-form-item>
         <el-form-item label="包含项目" prop="projectList">
           <el-transfer

+ 42 - 40
src/views/system/gameReferee/index.vue

@@ -77,10 +77,10 @@
         <el-form-item label="密码" prop="password">
           <el-input v-model="form.password" placeholder="请输入密码" />
         </el-form-item>
-        <el-form-item label="赛事项目" prop="projectList">
+        <el-form-item label="赛事项目" prop="projectList2">
           <!-- 赛事项目穿梭框 -->
           <el-transfer
-            v-model="form.projectList"
+            v-model="form.projectList2"
             :data="allProjects"
             :titles="['可选项目', '已选项目']"
             :button-texts="['移除', '添加']"
@@ -175,7 +175,8 @@ const form = reactive({
   groupName: undefined,
   account: undefined,
   password: undefined,
-  projectList: [] as string[], // 存储所负责的项目
+  // projectList: [] as string[], // 存储所负责的项目
+  projectList2: [] as string[], // 存储所负责的项目
   refereeCode: undefined,
   createTime: undefined,
   updateTime: undefined,
@@ -205,20 +206,20 @@ const getList = async () => {
   
   // 查询裁判列表
   const res = await listGameReferee(queryParams);
-  
-  // 为每个裁判添加项目名称列表用于展示
-  for (const referee of res.rows) {
-    if (referee.projectList) {
-      // 加载所有项目信息
-      const projectRes = await listGameEventProject({
+  // 加载所有项目信息
+  const projectRes = await listGameEventProject({
         pageNum: 1,
         pageSize: 10,
         orderByColumn: undefined,
         isAsc: undefined,
       });
-      
+  
+  // 为每个裁判添加项目名称列表用于展示
+  for (const referee of res.rows) {
+    if (referee.projectList2) {
       // 获取项目ID数组
-      const projectIds = referee.projectList.split(',').filter(id => id);
+      // const projectIds = referee.projectList.split(',').filter(id => id);
+      const projectIds = referee.projectList2.filter(id => id);
       
       // 从所有项目中筛选出在projectIds中存在的项目,并提取它们的label值(项目名称)
       const projectNames = projectRes.rows
@@ -250,7 +251,8 @@ const reset = () => {
     groupName: undefined,
     account: undefined,
     password: undefined,
-    projectList: [],
+    // projectList: [],
+    projectList2: [],
     refereeCode: undefined,
     createTime: undefined,
     updateTime: undefined,
@@ -311,12 +313,13 @@ const handleUpdate = async (row?: GameRefereeVO) => {
   await loadProjects();
   
   // 处理项目列表数据格式
-  if (res.data.projectList && typeof res.data.projectList === 'string') {
-    form.projectList = res.data.projectList.split(',').filter(id => id);
-  } else if (Array.isArray(res.data.projectList)) {
-    form.projectList = res.data.projectList;
+  // if (res.data.projectList && typeof res.data.projectList === 'string') {
+  //   form.projectList = res.data.projectList.split(',').filter(id => id);
+  // } else 
+  if (Array.isArray(res.data.projectList2)) {
+    form.projectList2 = res.data.projectList2;
   } else {
-    form.projectList = [];
+    form.projectList2 = [];
   }
   
   dialog.visible = true;
@@ -330,25 +333,29 @@ const submitForm = async () => {
     buttonLoading.value = true;
     // 提交前处理项目列表数据格式
     const submitForm: any = { ...form };
-    if (Array.isArray(form.projectList)) {
-      submitForm.projectList = form.projectList.join(',');
+    // if (Array.isArray(form.projectList)) {
+    //   submitForm.projectList = form.projectList.join(',');
+    // }
+    if (form.projectList2) {
+      submitForm.projectList2 = form.projectList2;
     }
 
     try {
       if (form.refereeId) {
         // 如果是更新操作,需要先获取原裁判信息,然后更新项目表中的裁判组
         const originalReferee = await getGameReferee(form.refereeId);
-        const originalProjectList = originalReferee.data.projectList || '';
-        const newProjectList = submitForm.projectList || '';
+        const originalProjectList = originalReferee.data.projectList2 || [];
+        const newProjectList = submitForm.projectList2 || [];
         
         // 获取当前项目列表中的项目ID集合
-        const currentProjectIds = new Set<string>(newProjectList.split(',').filter(id => id.trim()));
+        // const currentProjectIds = new Set<string>(newProjectList.filter(id => id.trim()));
         
         // 获取原项目列表中的项目ID集合
-        const originalProjectIds = new Set<string>(originalProjectList.split(',').filter(id => id.trim()));
+        // const originalProjectIds = new Set<string>(originalProjectList.filter(id => id.trim()));
         
         // 筛选出在原项目列表中但不在当前项目列表中的项目(即被删除的项目)
-        const removedProjectIds = Array.from(currentProjectIds).filter(id => !originalProjectIds.has(id));
+        // const removedProjectIds = Array.from(currentProjectIds).filter(id => !originalProjectIds.has(id));
+        const removedProjectIds = newProjectList.filter(id => !originalProjectList.includes(id));
         
         // 从被删除的项目中移除该裁判
         for (const projectId of removedProjectIds) {
@@ -371,7 +378,8 @@ const submitForm = async () => {
         }
         
         // 向新项目中添加该裁判
-        const newProjectIds = Array.from<string>(currentProjectIds).filter(id => !originalProjectIds.has(id));
+        // const newProjectIds = Array.from<string>(currentProjectIds).filter(id => !originalProjectIds.has(
+        const newProjectIds = newProjectList.filter(id => !originalProjectList.includes(id));
         for (const projectId of newProjectIds) {
           const projectRes = await getGameEventProject(projectId);
           
@@ -398,8 +406,8 @@ const submitForm = async () => {
         const newRefereeId = refereeResult.data?.refereeId || refereeResult.data;
         
         // 更新所选项目的裁判组字段
-        if (newRefereeId && form.projectList.length > 0) {
-          for (const projectId of form.projectList) {
+        if (newRefereeId && form.projectList2.length > 0) {
+          for (const projectId of form.projectList2) {
             const projectRes = await getGameEventProject(projectId);
             
             if (projectRes) {
@@ -438,21 +446,15 @@ const handleDelete = async (row?: GameRefereeVO) => {
     // 如果是单个删除,需要从项目表中移除该裁判
     if (row) {
       const refereeId = row.refereeId;
-      if (row.projectList) {
-        const projectIds = row.projectList.split(',').filter(id => id.trim());
+      if (row.projectList2) {
+        const projectIds = row.projectList2.filter(id => id.trim());
         
         for (const projectId of projectIds) {
           // 获取当前项目信息
-          const projectRes = await listGameEventProject({
-            projectId: projectId.trim(),
-            pageNum: 1,
-            pageSize: 10,
-            orderByColumn: undefined,
-            isAsc: undefined,
-          });
-          
-          if (projectRes.rows.length > 0) {
-            const project = projectRes.rows[0];
+          const getProject = await getGameEventProject(projectId.trim());
+          const project = getProject.data;
+          if (project) {
+            
             let currentRefereeGroups = project.refereeGroups || [];
             
             // 从裁判组中移除该裁判ID
@@ -487,7 +489,7 @@ const handleGenerateQRCode = async (row: GameRefereeVO) => {
     name: row.name,
     account: row.account,
     password: row.password,
-    projectList: row.projectList,
+    projectList: row.projectList2,
   };
   
   try {

+ 1 - 1
src/views/system/gameScore/gameScoreEdit.vue

@@ -210,7 +210,7 @@ const submitForm = () => {
   });
 }
 
-// 修改:加载运动员成绩列表方法,支持搜索
+// 加载运动员成绩列表方法,支持搜索
 const loadAthleteScores = async () => {
   loading.value = true;
   const resAthletes = await listGameAthlete({

+ 2 - 1
src/views/system/gameTeam/index.vue

@@ -211,7 +211,8 @@ const initFormData: GameTeamForm = {
   numberRange: undefined,
   teamDescribe: undefined,
   status: undefined,
-  remark: undefined
+  remark: undefined,
+  athleteList: []
 };
 const data = reactive<PageData<GameTeamForm, GameTeamQuery>>({
   form: { ...initFormData },