From b39a0502e7941ce966fda53664cf1b04ba52d65f Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期三, 01 十月 2025 17:30:24 +0800
Subject: [PATCH] 清理测试文件:删除所有test、debug、fix、check_开头的文件,为重构做准备

---
 web/src/views/player/index.vue |  305 +++++++++++++++++++++++++++++---------------------
 1 files changed, 176 insertions(+), 129 deletions(-)

diff --git a/web/src/views/player/index.vue b/web/src/views/player/index.vue
index 3531e92..01b3304 100644
--- a/web/src/views/player/index.vue
+++ b/web/src/views/player/index.vue
@@ -1,25 +1,27 @@
 <template>
   <div class="player-page">
-    <div class="page-card">
-      <h3 class="card-title">鎶ュ悕瀹℃牳</h3>
-      
-      <!-- 鎼滅储鍜屾搷浣滄爮 -->
-      <div class="toolbar">
+    <!-- 椤甸潰鏍囬鍖哄煙 -->
+    <div class="page-header">
+      <div class="title-section">
+        <h1 class="page-title">鎶ュ悕瀹℃牳</h1>
+        <p class="page-subtitle">绠$悊鍙傝禌閫夋墜鐨勬姤鍚嶇敵璇凤紝瀹℃牳鍙傝禌璧勬牸鍜屼俊鎭�</p>
+      </div>
+    </div>
+
+    <!-- 鎼滅储宸ュ叿鏍� -->
+    <div class="search-toolbar">
+      <div class="search-form">
         <el-input
           v-model="searchForm.name"
           placeholder="璇疯緭鍏ュ鍛樺悕绉�"
-          style="width: 200px"
+          style="width: 180px"
           clearable
-          @keyup.enter="handleSearch"
-        >
-          <template #prefix>
-            <el-icon><Search /></el-icon>
-          </template>
-        </el-input>
+          @clear="handleClear"
+        />
         <el-select
           v-model="searchForm.activityId"
           placeholder="閫夋嫨姣旇禌"
-          style="width: 300px"
+          style="width: 200px"
           clearable
           filterable
         >
@@ -35,7 +37,7 @@
         <el-select
           v-model="searchForm.state"
           placeholder="閫夋嫨鐘舵��"
-          style="width: 150px"
+          style="width: 120px"
           clearable
         >
           <el-option label="寰呭鏍�" value="0" />
@@ -44,52 +46,58 @@
         </el-select>
         <el-button type="primary" @click="handleSearch">
           <el-icon><Search /></el-icon>
-          鎼滅储
+          鏌ヨ
         </el-button>
       </div>
+    </div>
 
-      <!-- 瀛﹀憳鍒楄〃 -->
-      <el-table :data="tableData" style="width: 100%" v-loading="loading">
-        <el-table-column label="澶村儚" width="80" align="center">
-          <template #default="{ row }">
-            <el-avatar :src="row.avatar" :size="40">
-              <el-icon><User /></el-icon>
-            </el-avatar>
-          </template>
-        </el-table-column>
-        <el-table-column prop="name" label="瀛﹀憳鍚嶇О" min-width="120" />
-        <el-table-column prop="activityName" label="鎶ュ悕椤圭洰" min-width="200" />
-        <el-table-column prop="phone" label="鑱旂郴鐢佃瘽" width="140" />
-        <el-table-column prop="applyTime" label="鐢宠鏃堕棿" width="180" />
-        <el-table-column prop="state" label="鐘舵��" width="100" align="center">
-          <template #default="{ row }">
-            <el-tag :type="getStateType(row.state)">{{ getStateText(row.state) }}</el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column label="鎿嶄綔" width="120" fixed="right">
-          <template #default="{ row }">
-            <div class="table-actions">
-              <!-- 鍙繚鐣欒鎯呮寜閽� -->
-              <el-button type="primary" size="small" @click="handleViewDetail(row)">
-                璇︽儏
-              </el-button>
-            </div>
-          </template>
-        </el-table-column>
-      </el-table>
+    <!-- 瀛﹀憳鍒楄〃 -->
+    <el-table :data="tableData" style="width: 100%" v-loading="loading">
+      <el-table-column label="澶村儚" width="80" align="center">
+        <template #default="{ row }">
+          <el-avatar :src="row.avatar" :size="40">
+            <el-icon><User /></el-icon>
+          </el-avatar>
+        </template>
+      </el-table-column>
+      <el-table-column label="瀛﹀憳鍚嶇О" min-width="120">
+        <template #default="{ row }">
+          {{ row.name }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="projectName" label="椤圭洰鍚嶇О" min-width="150" />
+      <el-table-column prop="activityName" label="姣旇禌鍚嶇О" min-width="200" />
+      <el-table-column prop="phone" label="鑱旂郴鐢佃瘽" width="140" />
+      <el-table-column prop="applyTime" label="鐢宠鏃堕棿" width="180" />
+      <el-table-column prop="state" label="鐘舵��" width="100" align="center">
+        <template #default="{ row }">
+          <el-tag :type="getStateType(row.state)">{{ getStateText(row.state) }}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="鎿嶄綔" width="80" align="center">
+        <template #default="{ row }">
+          <el-button
+            text
+            :icon="View"
+            @click="handleViewDetail(row)"
+            class="action-btn view-btn"
+            title="鏌ョ湅璇︽儏"
+          />
+        </template>
+      </el-table-column>
+    </el-table>
 
-      <!-- 鍒嗛〉 -->
-      <div class="pagination">
-        <el-pagination
-          v-model:current-page="pagination.page"
-          v-model:page-size="pagination.size"
-          :page-sizes="[10, 20, 50, 100]"
-          :total="pagination.total"
-          layout="total, sizes, prev, pager, next, jumper"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
+    <!-- 鍒嗛〉 -->
+    <div class="pagination">
+      <el-pagination
+        v-model:current-page="pagination.page"
+        v-model:page-size="pagination.size"
+        :page-sizes="[10, 20, 50, 100]"
+        :total="pagination.total"
+        layout="total, sizes, prev, pager, next, jumper"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
     </div>
   </div>
 </template>
@@ -98,6 +106,7 @@
 import { reactive, ref, onMounted } from 'vue'
 import { useRouter } from 'vue-router'
 import { ElMessage, ElMessageBox } from 'element-plus'
+import { Search, User, View } from '@element-plus/icons-vue'
 import { PlayerApi } from '@/api/player'
 import { getAllActivities } from '@/api/activity'
 
@@ -122,44 +131,7 @@
 })
 
 // 琛ㄦ牸鏁版嵁
-const tableData = ref([
-  {
-    id: 1,
-    name: '寮犱笁',
-    avatar: '',
-    activityName: '2024骞村垱鏂板垱涓氬ぇ璧�',
-    phone: '13800138001',
-    applyTime: '2024-01-05 14:30:00',
-    state: 0 // 0-鏈鏍�
-  },
-  {
-    id: 2,
-    name: '鏉庡洓',
-    avatar: '',
-    activityName: '涔︽硶姣旇禌',
-    phone: '13900139002',
-    applyTime: '2024-01-16 10:30:00',
-    state: 1 // 1-瀹℃牳閫氳繃
-  },
-  {
-    id: 3,
-    name: '鐜嬩簲',
-    avatar: '',
-    activityName: '缁樼敾姣旇禌',
-    phone: '13900139003',
-    applyTime: '2024-01-17 14:20:00',
-    state: 2 // 2-瀹℃牳椹冲洖
-  },
-  {
-    id: 4,
-    name: '璧靛叚',
-    avatar: '',
-    activityName: '闊充箰姣旇禌',
-    phone: '13900139004',
-    applyTime: '2024-01-18 09:15:00',
-    state: 0 // 0-鏈鏍�
-  }
-])
+const tableData = ref([])
 
 // 鑾峰彇鐘舵�佹爣绛剧被鍨�
 const getStateType = (state: number | null | undefined) => {
@@ -189,7 +161,11 @@
   loadData()
 }
 
-
+const handleClear = () => {
+  searchForm.name = ''
+  pagination.page = 1
+  loadData()
+}
 
 // 鏌ョ湅璇︽儏锛堣烦杞埌璇︽儏椤甸潰锛屽彧璇绘ā寮忥級
 const handleViewDetail = (row: any) => {
@@ -230,40 +206,49 @@
   return activity.name
 }
 
-
-
 // 鍔犺浇娲诲姩閫夐」
 const loadActivityOptions = async () => {
   try {
     const activities = await getAllActivities()
-    // 鍙樉绀虹姸鎬佷负1锛堣繘琛屼腑锛夌殑姣旇禌鍙婂叾闃舵
-    activityOptions.value = (activities || []).filter(activity => activity.state === 1)
-  } catch (e: any) {
-    console.error('鍔犺浇娲诲姩閫夐」澶辫触:', e)
+    
+    if (activities && Array.isArray(activities)) {
+      // 杩囨护鍑烘鍦ㄨ繘琛岀殑姣旇禌锛堜笉鏄樁娈碉級
+      const filtered = activities.filter(activity => 
+        activity.state === 1 && (activity.pid === 0 || activity.pid === "0")
+      )
+      
+      activityOptions.value = filtered
+    }
+  } catch (error) {
+    ElMessage.error('鍔犺浇娲诲姩閫夐」澶辫触')
   }
 }
+
+
 
 // 鍔犺浇鏁版嵁
 const loadData = async () => {
   loading.value = true
   try {
-    const list = await PlayerApi.getApplications(
+    const response = await PlayerApi.getApplications(
       searchForm.name || '', 
       searchForm.activityId || null, 
       searchForm.state !== '' ? parseInt(searchForm.state) : null,
       pagination.page, 
       pagination.size
     )
-    tableData.value = (list || []).map((item: any) => ({
+    const list = response.content || []
+    tableData.value = list.map((item: any) => ({
       id: item.id,
       name: item.playerName,
+      projectName: item.projectName,
       avatar: '',
       activityName: item.activityName,
       phone: item.phone,
       applyTime: item.applyTime,
       state: item.state
     }))
-    pagination.total = tableData.value.length
+    pagination.total = response.totalElements || 0
   } catch (e: any) {
     ElMessage.error(String(e?.message || e))
   } finally {
@@ -279,33 +264,95 @@
 
 <style lang="scss" scoped>
 .player-page {
-  .card-title {
-    margin-bottom: 20px;
-    color: #303133;
-    font-size: 16px;
-    font-weight: 500;
-  }
-  
-  .toolbar {
-    display: flex;
-    gap: 12px;
-    margin-bottom: 20px;
-    align-items: center;
-  }
-  
-  .table-actions {
-    display: flex;
-    gap: 8px;
-    flex-wrap: wrap;
-    align-items: center;
-  }
-  
+  padding: 20px;
+}
 
+/* 椤甸潰鏍囬鍖哄煙 */
+.page-header {
+  margin-bottom: 24px;
+}
+
+.title-section {
+  text-align: left;
+}
+
+.page-title {
+  font-size: 24px;
+  font-weight: 600;
+  color: #1f2937;
+  margin: 0 0 8px 0;
+}
+
+.page-subtitle {
+  font-size: 14px;
+  color: #6b7280;
+  margin: 0;
+  line-height: 1.5;
+}
+
+/* 鎼滅储宸ュ叿鏍� */
+.search-toolbar {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 20px;
+}
+
+.search-form {
+  display: flex;
+  gap: 12px;
+  align-items: center;
+}
+
+.search-area {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+}
+
+.action-area {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+}
+
+/* 鎿嶄綔鎸夐挳鏍峰紡 */
+.action-btn {
+  padding: 8px !important;
+  margin: 0 6px;
+  border-radius: 6px;
+  transition: all 0.2s ease;
+}
+
+.view-btn {
+  color: #3b82f6 !important;
+}
+
+.view-btn:hover {
+  background-color: rgba(59, 130, 246, 0.1) !important;
+  transform: scale(1.2);
+}
+
+.pagination {
+  margin-top: 20px;
+  display: flex;
+  justify-content: center;
+}
+
+/* 鍝嶅簲寮忛�傞厤 */
+@media (max-width: 768px) {
+  .search-toolbar {
+    flex-direction: column;
+    gap: 12px;
+    align-items: stretch;
+  }
   
-  .pagination {
-    margin-top: 20px;
-    display: flex;
-    justify-content: flex-end;
+  .search-area {
+    justify-content: center;
+    flex-wrap: wrap;
+  }
+  
+  .action-area {
+    justify-content: center;
   }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0