wenkai há 1 semana atrás
pai
commit
7249be9c80
3 ficheiros alterados com 15 adições e 24 exclusões
  1. 1 0
      src/utils/request.ts
  2. 1 1
      src/views/index.vue
  3. 13 23
      src/views/system/gameEvent/edit.vue

+ 1 - 0
src/utils/request.ts

@@ -29,6 +29,7 @@ axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
 const service = axios.create({
   baseURL: import.meta.env.VITE_APP_BASE_API,
   // baseURL: 'http://meet2.sportsrobo.club:8080',
+  // baseURL: 'http://localhost:8080',
   timeout: 50000
 });
 

+ 1 - 1
src/views/index.vue

@@ -488,7 +488,7 @@ const handleQuickAction = (action: string) => {
       // 跳转到新增赛事页面
       router.push(`/system/gameEvent/add`);
       break;
-    case 'manageAthletes':
+    case 'manageTeam':
       // 跳转到参赛队伍管理页面
       router.push(`/game/gameTeam`);
       break;

+ 13 - 23
src/views/system/gameEvent/edit.vue

@@ -83,12 +83,8 @@
             <el-row :gutter="20">
               <el-col :span="12">
                 <el-form-item label="是否默认赛事" prop="isDefault">
-                  <el-radio-group v-model="basicForm.isDefault" >
-                    <el-radio
-                      v-for="dict in sys_yes_no"
-                      :key="dict.value"
-                      :value="dict.value"
-                    >{{ dict.label }}</el-radio>
+                  <el-radio-group v-model="basicForm.isDefault">
+                    <el-radio v-for="dict in sys_yes_no" :key="dict.value" :value="dict.value">{{ dict.label }} </el-radio>
                   </el-radio-group>
                 </el-form-item>
               </el-col>
@@ -260,12 +256,7 @@
               <el-table-column label="配置类型" prop="configType" width="150">
                 <template #default="scope">
                   <el-select v-model="scope.row.configType" placeholder="请选择配置类型" style="width: 100%">
-                    <el-option
-                      v-for="type in configTypes"
-                      :key="type.typeCode"
-                      :label="type.typeName"
-                      :value="type.typeCode"
-                    />
+                    <el-option v-for="type in configTypes" :key="type.typeCode" :label="type.typeName" :value="type.typeCode" />
                   </el-select>
                 </template>
               </el-table-column>
@@ -374,7 +365,7 @@
 </template>
 
 <script setup name="GameEventEdit" lang="ts">
-import { getGameEvent, addGameEvent, updateGameEvent,changeEventDefault } from '@/api/system/gameEvent';
+import { getGameEvent, addGameEvent, updateGameEvent, changeEventDefault } from '@/api/system/gameEvent';
 import { GameEventVO, GameEventForm } from '@/api/system/gameEvent/types';
 import { listGameEventConfig, addGameEventConfig, updateGameEventConfig, delGameEventConfig } from '@/api/system/gameEventConfig';
 import { GameEventConfigVO, GameEventConfigForm } from '@/api/system/gameEventConfig/types';
@@ -640,10 +631,10 @@ const loadImageConfigData = async (eventId: string | number) => {
       orderByColumn: '',
       isAsc: ''
     });
-    
+
     // 获取所有图片配置模板
     const allImageConfigs = Array.isArray(templateRes.rows) ? templateRes.rows : [];
-    
+
     // 查询当前赛事的图片配置数据(如果是默认赛事,eventId为空字符串)
     const eventRes = await listGameEventConfig({
       eventId: eventId === '' ? '' : eventId,
@@ -655,7 +646,7 @@ const loadImageConfigData = async (eventId: string | number) => {
     });
 
     const eventImageConfigs = Array.isArray(eventRes.rows) ? eventRes.rows : [];
-    
+
     // 合并配置:以模板为基础,用当前赛事的数据覆盖
     imageConfigItems.value = allImageConfigs.map((template) => {
       const existingConfig = eventImageConfigs.find((item) => item.configKey === template.configKey);
@@ -668,7 +659,6 @@ const loadImageConfigData = async (eventId: string | number) => {
         configId: existingConfig?.configId
       };
     });
-    
   } catch (error) {
     console.error('加载图片配置数据失败:', error);
     proxy?.$modal.msgError('加载图片配置数据失败: ' + (error as Error).message);
@@ -718,7 +708,7 @@ const refreshImageConfigs = async () => {
 const saveImageConfigData = async (eventId?: string | number) => {
   try {
     // 如果是默认赛事操作,使用空字符串作为eventId
-    const targetEventId = eventId === '' ? '' : (eventId || (route.params.id as string));
+    const targetEventId = eventId === '' ? '' : eventId || (route.params.id as string);
     const updates: GameEventConfigForm[] = [];
     const adds: GameEventConfigForm[] = [];
 
@@ -864,7 +854,7 @@ const addConfigItem = () => {
     configKey: '',
     configValue: '',
     configDesc: '',
-    configType: '', // 添加配置类型字段
+    configType: '' // 添加配置类型字段
   });
 };
 
@@ -975,11 +965,11 @@ const saveEvent = async () => {
 
     let savedEventId: string;
     // 如果设置为默认赛事,则取消其他赛事的默认状态
-    if(basicForm.value.isDefault === '0'){
-      handleStatusChange({ 
-        eventId: basicForm.value.eventId, 
+    if (basicForm.value.isDefault === '0') {
+      handleStatusChange({
+        eventId: basicForm.value.eventId,
         isDefault: basicForm.value.isDefault,
-        eventName: basicForm.value.eventName 
+        eventName: basicForm.value.eventName
       } as GameEventVO);
     }