wenkai 2 недель назад
Родитель
Сommit
8aba2f4d66

+ 4 - 4
src/components/Editor/index.vue

@@ -59,7 +59,7 @@ const upload = reactive<UploadOption>({
 const quillEditorRef = ref();
 const uploadRef = ref<HTMLDivElement>();
 
-const options = ref<any>({
+const options = computed(() => ({
   theme: 'snow',
   bounds: document.body,
   debug: 'warn',
@@ -84,15 +84,15 @@ const options = ref<any>({
             // 调用element图片上传
             uploadRef.value.click();
           } else {
-            Quill.format('image', true);
+            // Quill.format('image', true);
           }
         }
       }
     }
   },
-  placeholder: '请输入内容',
+  placeholder: props.readOnly ? '' : '请输入内容',
   readOnly: props.readOnly
-});
+}));
 
 const styles = computed(() => {
   const style: any = {};

+ 18 - 8
src/views/login.vue

@@ -8,12 +8,16 @@
       <el-form-item v-if="tenantEnabled" prop="tenantId">
         <el-select v-model="loginForm.tenantId" filterable :placeholder="proxy.$t('login.selectPlaceholder')" style="width: 100%">
           <el-option v-for="item in tenantList" :key="item.tenantId" :label="item.companyName" :value="item.tenantId"></el-option>
-          <template #prefix><svg-icon icon-class="company" class="el-input__icon input-icon" /></template>
+          <template #prefix>
+            <svg-icon icon-class="company" class="el-input__icon input-icon" />
+          </template>
         </el-select>
       </el-form-item>
       <el-form-item prop="username">
         <el-input v-model="loginForm.username" type="text" size="large" auto-complete="off" :placeholder="proxy.$t('login.username')">
-          <template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
+          <template #prefix>
+            <svg-icon icon-class="user" class="el-input__icon input-icon" />
+          </template>
         </el-input>
       </el-form-item>
       <el-form-item prop="password">
@@ -25,7 +29,9 @@
           :placeholder="proxy.$t('login.password')"
           @keyup.enter="handleLogin"
         >
-          <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
+          <template #prefix>
+            <svg-icon icon-class="password" class="el-input__icon input-icon" />
+          </template>
         </el-input>
       </el-form-item>
       <el-form-item v-if="captchaEnabled" prop="code">
@@ -37,13 +43,15 @@
           style="width: 63%"
           @keyup.enter="handleLogin"
         >
-          <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
+          <template #prefix>
+            <svg-icon icon-class="validCode" class="el-input__icon input-icon" />
+          </template>
         </el-input>
         <div class="login-code">
           <img :src="codeUrl" class="login-code-img" @click="getCode" />
         </div>
       </el-form-item>
-      <el-checkbox v-model="loginForm.rememberMe" style="margin: 0 0 25px 0">{{ proxy.$t('login.rememberPassword') }}</el-checkbox>
+      <el-checkbox v-model="loginForm.rememberMe" style="margin: 0 0 25px 0">{{ proxy.$t('login.rememberPassword') }} </el-checkbox>
       <el-form-item style="float: right">
         <el-button circle :title="proxy.$t('login.social.wechat')" @click="doSocialLogin('wechat')">
           <svg-icon icon-class="wechat" />
@@ -95,9 +103,9 @@ const router = useRouter();
 const { t } = useI18n();
 
 const loginForm = ref<LoginData>({
-  tenantId: '000000',
-  username: 'admin',
-  password: 'admin123',
+  tenantId: '',
+  username: '',
+  password: '',
   rememberMe: false,
   code: '',
   uuid: ''
@@ -261,8 +269,10 @@ onMounted(() => {
   width: 400px;
   padding: 25px 25px 5px 25px;
   z-index: 1;
+
   .el-input {
     height: 40px;
+
     input {
       height: 40px;
     }

+ 25 - 6
src/views/system/activityIntroduction/index.vue

@@ -76,6 +76,9 @@
         </el-table-column>
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
           <template #default="scope">
+            <el-tooltip content="查看" placement="top">
+              <el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['system:article:view']"></el-button>
+            </el-tooltip>
             <el-tooltip content="修改" placement="top">
               <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:article:edit']"></el-button>
             </el-tooltip>
@@ -92,30 +95,30 @@
     <el-dialog :title="dialog.title" v-model="dialog.visible" width="1200px" append-to-body>
       <el-form ref="articleFormRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="赛事" prop="eventId">
-          <el-select v-model="form.eventId" placeholder="请选择赛事" clearable>
+          <el-select v-model="form.eventId" placeholder="请选择赛事" clearable :disabled="isViewMode">
             <el-option v-for="event in eventOptions" :key="event.eventId" :label="event.eventName" :value="event.eventId" />
           </el-select>
         </el-form-item>
         <el-form-item label="标题" prop="title">
-          <el-input v-model="form.title" placeholder="请输入标题" />
+          <el-input v-model="form.title" placeholder="请输入标题" :disabled="isViewMode" />
         </el-form-item>
         <el-form-item label="内容">
-          <editor v-model="form.content" :min-height="192" />
+          <editor v-model="form.content" :min-height="192" :readOnly="isViewMode" />
         </el-form-item>
         <el-form-item label="文章类型" prop="type">
-          <el-select v-model="form.type" placeholder="请选择文章类型">
+          <el-select v-model="form.type" placeholder="请选择文章类型" :disabled="isViewMode">
             <el-option v-for="dict in article_type" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="是否展示" prop="status">
-          <el-radio-group v-model="form.status">
+          <el-radio-group v-model="form.status" :disabled="isViewMode">
             <el-radio v-for="dict in article_status" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+          <el-button v-if="!isViewMode" :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
           <el-button @click="cancel">取 消</el-button>
         </div>
       </template>
@@ -155,6 +158,9 @@ const dialog = reactive<DialogOption>({
   title: ''
 });
 
+// 添加查看模式状态
+const isViewMode = ref(false);
+
 const initFormData: ArticleForm = {
   id: undefined,
   eventId: undefined,
@@ -199,6 +205,7 @@ const getList = async () => {
 /** 取消按钮 */
 const cancel = () => {
   reset();
+  isViewMode.value = false;
   dialog.visible = false;
 };
 
@@ -230,6 +237,7 @@ const handleSelectionChange = (selection: ArticleVO[]) => {
 /** 新增按钮操作 */
 const handleAdd = () => {
   reset();
+  isViewMode.value = false;
   dialog.visible = true;
   dialog.title = '添加文章';
 };
@@ -240,10 +248,21 @@ const handleUpdate = async (row?: ArticleVO) => {
   const _id = row?.id || ids.value[0];
   const res = await getArticle(_id);
   Object.assign(form.value, res.data);
+  isViewMode.value = false;
   dialog.visible = true;
   dialog.title = '修改文章';
 };
 
+const handleView = async (row?: ArticleVO) => {
+  reset();
+  const _id = row?.id || ids.value[0];
+  const res = await getArticle(_id);
+  Object.assign(form.value, res.data);
+  isViewMode.value = true;
+  dialog.visible = true;
+  dialog.title = '查看文章';
+};
+
 /** 提交按钮 */
 const submitForm = () => {
   articleFormRef.value?.validate(async (valid: boolean) => {

+ 109 - 88
src/views/system/gameEvent/index.vue

@@ -11,26 +11,21 @@
               <el-input v-model="queryParams.eventName" placeholder="请输入赛事名称" clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <el-form-item label="赛事类型" prop="eventType">
-              <el-select v-model="queryParams.eventType" placeholder="请选择赛事类型" clearable >
-                <el-option v-for="dict in game_event_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
+              <el-select v-model="queryParams.eventType" placeholder="请选择赛事类型" clearable>
+                <el-option v-for="dict in game_event_type" :key="dict.value" :label="dict.label" :value="dict.value" />
               </el-select>
             </el-form-item>
             <el-form-item label="开始时间" prop="startTime">
-              <el-date-picker clearable
-                v-model="queryParams.startTime"
-                type="date"
-                value-format="YYYY-MM-DD"
-                placeholder="请选择开始时间"
-              />
+              <el-date-picker clearable v-model="queryParams.startTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择开始时间" />
             </el-form-item>
             <el-form-item label="是否默认赛事" prop="isDefault">
-              <el-select v-model="queryParams.isDefault" placeholder="请选择是否默认赛事" clearable >
-                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value"/>
+              <el-select v-model="queryParams.isDefault" placeholder="请选择是否默认赛事" clearable>
+                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
               </el-select>
             </el-form-item>
             <el-form-item label="状态" prop="status">
-              <el-select v-model="queryParams.status" placeholder="请选择状态" clearable >
-                <el-option v-for="dict in game_event_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
+              <el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
+                <el-option v-for="dict in game_event_status" :key="dict.value" :label="dict.label" :value="dict.value" />
               </el-select>
             </el-form-item>
             <el-form-item>
@@ -46,16 +41,20 @@
       <template #header>
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
-            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:gameEvent:add']">新增</el-button>
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:gameEvent:add']">新增 </el-button>
           </el-col>
           <el-col :span="1.5">
-            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:gameEvent:edit']">修改</el-button>
+            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:gameEvent:edit']"
+              >修改
+            </el-button>
           </el-col>
           <el-col :span="1.5">
-            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:gameEvent:remove']">删除</el-button>
+            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:gameEvent:remove']"
+              >删除
+            </el-button>
           </el-col>
           <el-col :span="1.5">
-            <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:gameEvent:export']">导出</el-button>
+            <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:gameEvent:export']">导出 </el-button>
           </el-col>
           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
@@ -68,13 +67,13 @@
         <el-table-column label="赛事名称" align="center" prop="eventName" />
         <el-table-column label="赛事类型" align="center" prop="eventType">
           <template #default="scope">
-            <dict-tag :options="game_event_type" :value="scope.row.eventType"/>
+            <dict-tag :options="game_event_type" :value="scope.row.eventType" />
           </template>
         </el-table-column>
         <el-table-column label="举办地点" align="center" prop="location" />
-        <el-table-column label="用途" align="center" prop="purpose" >
+        <el-table-column label="用途" align="center" prop="purpose">
           <template #default="scope">
-            <dict-tag :options="game_event_purpose" :value="scope.row.purpose"/>
+            <dict-tag :options="game_event_purpose" :value="scope.row.purpose" />
           </template>
         </el-table-column>
         <el-table-column label="开始时间" align="center" prop="startTime" width="180">
@@ -89,18 +88,18 @@
         </el-table-column>
         <el-table-column label="赛事链接" align="center" prop="eventUrlUrl" width="100">
           <template #default="scope">
-            <image-preview :src="scope.row.eventUrlUrl" :width="50" :height="50"/>
+            <image-preview :src="scope.row.eventUrlUrl" :width="50" :height="50" />
           </template>
         </el-table-column>
         <el-table-column label="裁判码" align="center" prop="refereeUrlUrl" width="100">
           <template #default="scope">
-            <image-preview :src="scope.row.refereeUrlUrl" :width="50" :height="50"/>
+            <image-preview :src="scope.row.refereeUrlUrl" :width="50" :height="50" />
           </template>
         </el-table-column>
         <el-table-column label="举办单位" align="center" prop="unit" />
         <el-table-column label="是否默认赛事" align="center" prop="isDefault">
           <template #default="scope">
-            <dict-tag :options="sys_yes_no" :value="scope.row.isDefault"/>
+            <dict-tag :options="sys_yes_no" :value="scope.row.isDefault" />
           </template>
         </el-table-column>
         <el-table-column label="创建时间" align="center" prop="createTime" width="180">
@@ -115,11 +114,11 @@
         </el-table-column>
         <el-table-column label="状态" align="center" prop="status">
           <template #default="scope">
-            <dict-tag :options="game_event_status" :value="scope.row.status"/>
+            <dict-tag :options="game_event_status" :value="scope.row.status" />
           </template>
         </el-table-column>
         <el-table-column label="备注" align="center" prop="remark" />
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
           <template #default="scope">
             <el-tooltip content="修改" placement="top">
               <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:gameEvent:edit']"></el-button>
@@ -128,23 +127,42 @@
               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:gameEvent:remove']"></el-button>
             </el-tooltip> -->
             <el-tooltip :content="getDeleteTooltip(scope.row)" placement="top">
-              <el-button 
-                link 
-                type="primary" 
-                icon="Delete" 
+              <el-button
+                link
+                type="primary"
+                icon="Delete"
                 :disabled="!canDelete(scope.row)"
-                @click="handleDelete(scope.row)" 
-                v-hasPermi="['system:event:remove']">
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['system:event:remove']"
+              >
               </el-button>
             </el-tooltip>
             <el-tooltip content="导入报名信息" placement="top">
-              <el-button link type="primary" icon="FolderOpened" @click="handleImportRegistration(scope.row)" v-hasPermi="['system:gameEvent:import']"></el-button>
+              <el-button
+                link
+                type="primary"
+                icon="FolderOpened"
+                @click="handleImportRegistration(scope.row)"
+                v-hasPermi="['system:gameEvent:import']"
+              ></el-button>
             </el-tooltip>
             <el-tooltip content="添加参赛者" placement="top">
-              <el-button link type="primary" icon="User" @click="handleAddParticipant(scope.row)" v-hasPermi="['system:gameEvent:addParticipant']"></el-button>
+              <el-button
+                link
+                type="primary"
+                icon="User"
+                @click="handleAddParticipant(scope.row)"
+                v-hasPermi="['system:gameEvent:addParticipant']"
+              ></el-button>
             </el-tooltip>
             <el-tooltip content="添加裁判" placement="top">
-              <el-button link type="primary" icon="Avatar" @click="handleAddReferee(scope.row)" v-hasPermi="['system:gameEvent:addReferee']"></el-button>
+              <el-button
+                link
+                type="primary"
+                icon="Avatar"
+                @click="handleAddReferee(scope.row)"
+                v-hasPermi="['system:gameEvent:addReferee']"
+              ></el-button>
             </el-tooltip>
             <!-- 新增预览按钮 -->
             <el-tooltip content="预览" placement="top">
@@ -152,7 +170,13 @@
             </el-tooltip>
             <!-- 新增比赛数据按钮 -->
             <el-tooltip content="比赛数据" placement="top">
-              <el-button link type="primary" icon="DataAnalysis" @click="handleGameData(scope.row)" v-hasPermi="['system:gameEvent:gameData']"></el-button>
+              <el-button
+                link
+                type="primary"
+                icon="DataAnalysis"
+                @click="handleGameData(scope.row)"
+                v-hasPermi="['system:gameEvent:gameData']"
+              ></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -179,14 +203,16 @@ import RankingBoard from './RankingBoard.vue';
 
 const router = useRouter();
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { game_event_type, game_event_status, sys_yes_no, game_event_purpose } = toRefs<any>(proxy?.useDict('game_event_type', 'game_event_status', 'sys_yes_no', 'game_event_purpose'));
+const { game_event_type, game_event_status, sys_yes_no, game_event_purpose } = toRefs<any>(
+  proxy?.useDict('game_event_type', 'game_event_status', 'sys_yes_no', 'game_event_purpose')
+);
 
 // 定义 RefereeForm 组件的类型
 interface RefereeFormInstance {
   openDialog: (eventId: string) => void;
 }
 
-const refereeFormRef = ref<InstanceType<typeof RefereeForm> & RefereeFormInstance | null>(null);
+const refereeFormRef = ref<(InstanceType<typeof RefereeForm> & RefereeFormInstance) | null>(null);
 
 const gameEventList = ref<GameEventVO[]>([]);
 const buttonLoading = ref(false);
@@ -221,9 +247,9 @@ const initFormData: GameEventForm = {
   isDefault: undefined,
   status: undefined,
   remark: undefined
-}
+};
 const data = reactive<PageData<GameEventForm, GameEventQuery>>({
-  form: {...initFormData},
+  form: { ...initFormData },
   queryParams: {
     pageNum: 1,
     pageSize: 10,
@@ -234,19 +260,12 @@ const data = reactive<PageData<GameEventForm, GameEventQuery>>({
     startTime: undefined,
     isDefault: undefined,
     status: undefined,
-    params: {
-    }
+    params: {}
   },
   rules: {
-    eventCode: [
-      { required: true, message: "赛事编号不能为空", trigger: "blur" }
-    ],
-    eventName: [
-      { required: true, message: "赛事名称不能为空", trigger: "blur" }
-    ],
-    eventType: [
-      { required: true, message: "赛事类型不能为空", trigger: "change" }
-    ],
+    eventCode: [{ required: true, message: '赛事编号不能为空', trigger: 'blur' }],
+    eventName: [{ required: true, message: '赛事名称不能为空', trigger: 'blur' }],
+    eventType: [{ required: true, message: '赛事类型不能为空', trigger: 'change' }]
     // purpose: [
     //   { required: true, message: "用途不能为空", trigger: "change" }
     // ],
@@ -280,49 +299,49 @@ const getList = async () => {
   gameEventList.value = res.rows;
   total.value = res.total;
   loading.value = false;
-}
+};
 
 /** 取消按钮 */
 const cancel = () => {
   reset();
   dialog.visible = false;
-}
+};
 
 /** 表单重置 */
 const reset = () => {
-  form.value = {...initFormData};
+  form.value = { ...initFormData };
   gameEventFormRef.value?.resetFields();
-}
+};
 
 /** 搜索按钮操作 */
 const handleQuery = () => {
   queryParams.value.pageNum = 1;
   getList();
-}
+};
 
 /** 重置按钮操作 */
 const resetQuery = () => {
   queryFormRef.value?.resetFields();
   handleQuery();
-}
+};
 
 /** 多选框选中数据 */
 const handleSelectionChange = (selection: GameEventVO[]) => {
-  ids.value = selection.map(item => item.eventId);
+  ids.value = selection.map((item) => item.eventId);
   single.value = selection.length != 1;
   multiple.value = !selection.length;
-}
+};
 
 /** 新增按钮操作 */
 const handleAdd = () => {
   router.push('/system/gameEvent/add');
-}
+};
 
 /** 修改按钮操作 */
 const handleUpdate = async (row?: GameEventVO) => {
   const _eventId = row?.eventId || ids.value[0];
   router.push(`/system/gameEvent/edit/${_eventId}`);
-}
+};
 
 /** 提交按钮 */
 const submitForm = () => {
@@ -330,91 +349,94 @@ const submitForm = () => {
     if (valid) {
       buttonLoading.value = true;
       if (form.value.eventId) {
-        await updateGameEvent(form.value).finally(() =>  buttonLoading.value = false);
+        await updateGameEvent(form.value).finally(() => (buttonLoading.value = false));
       } else {
-        await addGameEvent(form.value).finally(() =>  buttonLoading.value = false);
+        await addGameEvent(form.value).finally(() => (buttonLoading.value = false));
       }
-      proxy?.$modal.msgSuccess("操作成功");
+      proxy?.$modal.msgSuccess('操作成功');
       dialog.visible = false;
       await getList();
     }
   });
-}
-
+};
 
 /** 删除按钮操作 */
 const handleDelete = async (row?: GameEventVO) => {
   const _ids = row?.eventId || ids.value;
-  
+
   if (!_ids || (Array.isArray(_ids) && _ids.length === 0)) {
-    proxy?.$modal.msgError("请选择要删除的赛事");
+    proxy?.$modal.msgError('请选择要删除的赛事');
     return;
   }
-  
+
   // 如果是单个删除,需要检查时间限制
   if (row) {
     const endTime = new Date(row.endTime);
     const currentTime = new Date();
     const daysDiff = Math.floor((currentTime.getTime() - endTime.getTime()) / (1000 * 60 * 60 * 24));
-    
+
     if (daysDiff < 100) {
       proxy?.$modal.msgError(`该赛事结束时间不足100天,无法删除。距离可删除时间还有 ${100 - daysDiff} 天。`);
       return;
     }
-    
-    await proxy?.$modal.confirm('是否确认删除赛事编号为"' + row.eventCode + '"的数据项?').finally(() => loading.value = false);
+
+    await proxy?.$modal.confirm('是否确认删除赛事编号为"' + row.eventCode + '"的数据项?').finally(() => (loading.value = false));
     await delGameEvent(row.eventId);
-    proxy?.$modal.msgSuccess("删除成功");
+    proxy?.$modal.msgSuccess('删除成功');
   } else {
     // 批量删除
-    const selectedEvents = gameEventList.value.filter(event => ids.value.includes(event.eventId));
-    const invalidEvents = selectedEvents.filter(event => {
+    const selectedEvents = gameEventList.value.filter((event) => ids.value.includes(event.eventId));
+    const invalidEvents = selectedEvents.filter((event) => {
       const endTime = new Date(event.endTime);
       const currentTime = new Date();
       const daysDiff = Math.floor((currentTime.getTime() - endTime.getTime()) / (1000 * 60 * 60 * 24));
       return daysDiff < 100;
     });
-    
+
     if (invalidEvents.length > 0) {
-      const eventNames = invalidEvents.map(event => event.eventName).join('、');
+      const eventNames = invalidEvents.map((event) => event.eventName).join('、');
       proxy?.$modal.msgError(`以下赛事结束时间不足100天,无法删除:${eventNames}`);
       return;
     }
-    
-    const eventCodes = selectedEvents.map(event => event.eventCode).join('、');
-    await proxy?.$modal.confirm(`是否确认删除以下赛事:${eventCodes}?`).finally(() => loading.value = false);
+
+    const eventCodes = selectedEvents.map((event) => event.eventCode).join('、');
+    await proxy?.$modal.confirm(`是否确认删除以下赛事:${eventCodes}?`).finally(() => (loading.value = false));
     await delGameEvent(ids.value);
     proxy?.$modal.msgSuccess(`成功删除 ${selectedEvents.length} 个赛事`);
   }
-  
+
   await getList();
-}
+};
 /** 判断是否可以删除赛事 */
 const canDelete = (row: GameEventVO): boolean => {
   const endTime = new Date(row.endTime);
   const currentTime = new Date();
   const daysDiff = Math.floor((currentTime.getTime() - endTime.getTime()) / (1000 * 60 * 60 * 24));
   return daysDiff >= 100;
-}
+};
 
 /** 获取删除按钮的提示信息 */
 const getDeleteTooltip = (row: GameEventVO): string => {
   if (canDelete(row)) {
-    return "删除";
+    return '删除';
   } else {
     const endTime = new Date(row.endTime);
     const currentTime = new Date();
     const daysDiff = Math.floor((currentTime.getTime() - endTime.getTime()) / (1000 * 60 * 60 * 24));
     return `赛事结束时间不足100天,无法删除。距离可删除时间还有 ${100 - daysDiff} 天。`;
   }
-}
+};
 
 /** 导出按钮操作 */
 const handleExport = () => {
-  proxy?.download('system/gameEvent/export', {
-    ...queryParams.value
-  }, `gameEvent_${new Date().getTime()}.xlsx`)
-}
+  proxy?.download(
+    'system/gameEvent/export',
+    {
+      ...queryParams.value
+    },
+    `gameEvent_${new Date().getTime()}.xlsx`
+  );
+};
 
 // 导入报名表逻辑
 const handleImportRegistration = (row: GameEventVO) => {
@@ -478,5 +500,4 @@ onActivated(() => {
     getList();
   }
 });
-
 </script>

+ 6 - 6
src/views/system/gameTeam/index.vue

@@ -51,17 +51,17 @@
       <el-table v-loading="loading" border :data="gameTeamList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="主键" align="center" prop="teamId" v-if="false" />
+        <el-table-column label="队伍编号" align="center" prop="teamCode" />
         <el-table-column label="赛事ID" align="center" prop="eventId" />
         <el-table-column label="队伍名称" align="center" prop="teamName" />
-        <el-table-column label="队伍编号" align="center" prop="teamCode" />
-        <!-- <el-table-column label="领队" align="center" prop="leader" />
+        <el-table-column label="领队" align="center" prop="leader" />
         <el-table-column label="队员列表" align="center" prop="athleteValue" />
         <el-table-column label="参与项目列表" align="center" prop="projectValue" />
         <el-table-column label="人数" align="center" prop="athleteNum" />
-        <el-table-column label="号码段" align="center" prop="numberRange" /> -->
+        <el-table-column label="号码段" align="center" prop="numberRange" />
         <el-table-column label="团队描述" align="center" prop="teamDescribe" />
-        <!-- <el-table-column label="状态" align="center" prop="status" /> -->
-        <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
+        <el-table-column label="状态" align="center" prop="status" />
+        <el-table-column label="备注" align="center" prop="remark" />
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
           <template #default="scope">
             <el-tooltip content="修改" placement="top">
@@ -143,7 +143,7 @@
               是否更新已经存在的用户数据
             </div>
             <span>仅允许导入xls、xlsx格式文件。</span>
-            <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link>
+            <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板 </el-link>
           </div>
         </template>
       </el-upload>