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/activity/index.vue |  194 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 155 insertions(+), 39 deletions(-)

diff --git a/web/src/views/activity/index.vue b/web/src/views/activity/index.vue
index 76f7e4f..33e97f9 100644
--- a/web/src/views/activity/index.vue
+++ b/web/src/views/activity/index.vue
@@ -1,26 +1,29 @@
-鍜屼綘<template>
+<template>
   <div class="activity-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">
         <el-input
           v-model="searchForm.name"
           placeholder="璇疯緭鍏ユ瘮璧涘悕绉�"
-          style="width: 300px"
+          style="width: 200px"
           clearable
           @keyup.enter="handleSearch"
-        >
-          <template #prefix>
-            <el-icon><Search /></el-icon>
-          </template>
-        </el-input>
+          @clear="handleClear"
+        />
         <el-button type="primary" @click="handleSearch">
           <el-icon><Search /></el-icon>
-          鎼滅储
+          鏌ヨ
         </el-button>
-        <el-button type="success" @click="handleAdd">
+        <el-button type="primary" @click="handleAdd">
           <el-icon><Plus /></el-icon>
           鏂板姣旇禌
         </el-button>
@@ -37,15 +40,25 @@
             <el-tag :type="getStatusType(row.stateName)">{{ row.stateName }}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column label="鎿嶄綔" width="150" fixed="right">
+        <el-table-column label="鎿嶄綔" width="120" fixed="right" align="center">
           <template #default="{ row }">
             <div class="table-actions">
-              <el-button type="warning" size="small" @click="handleEdit(row)">
-                缂栬緫
-              </el-button>
-              <el-button type="danger" size="small" @click="handleDelete(row)">
-                鍒犻櫎
-              </el-button>
+              <el-button 
+                text 
+                :icon="Edit" 
+                size="small" 
+                @click="handleEdit(row)"
+                class="action-btn edit-btn"
+                title="缂栬緫"
+              />
+              <el-button 
+                text 
+                :icon="Delete" 
+                size="small" 
+                @click="handleDelete(row)"
+                class="action-btn delete-btn"
+                title="鍒犻櫎"
+              />
             </div>
           </template>
         </el-table-column>
@@ -72,6 +85,7 @@
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { useRouter } from 'vue-router'
 import { getActivities } from '@/api/activity'
+import { Search, Plus, Edit, Delete } from '@element-plus/icons-vue'
 
 const loading = ref(false)
 const router = useRouter()
@@ -105,6 +119,12 @@
 // 鎼滅储
 const handleSearch = () => {
   pagination.page = 1
+  loadData()
+}
+
+// 娓呯┖鎼滅储
+const handleClear = () => {
+  searchForm.name = ''
   loadData()
 }
 
@@ -165,32 +185,128 @@
 })
 </script>
 
-<style lang="scss" scoped>
+<style scoped>
 .activity-page {
-  .card-title {
-    margin-bottom: 20px;
-    color: #303133;
-    font-size: 16px;
-    font-weight: 500;
+  padding: 20px;
+}
+
+.page-card {
+  background: white;
+  border-radius: 8px;
+  padding: 24px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+}
+
+/* 椤甸潰澶撮儴鏍峰紡 */
+.page-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: flex-start;
+  margin-bottom: 24px;
+  gap: 20px;
+}
+
+.title-section {
+  flex: 1;
+}
+
+.page-title {
+  margin: 0 0 8px 0;
+  font-size: 24px;
+  font-weight: 600;
+  color: #1a1a1a;
+  line-height: 1.2;
+}
+
+.page-subtitle {
+  margin: 0;
+  font-size: 14px;
+  color: #666;
+  line-height: 1.4;
+}
+
+/* 宸ュ叿鏍忔牱寮� */
+.toolbar {
+  display: flex;
+  gap: 12px;
+  align-items: center;
+  flex-shrink: 0;
+}
+
+/* 鎼滅储宸ュ叿鏍忔牱寮� */
+.search-toolbar {
+  display: flex;
+  gap: 12px;
+  align-items: center;
+  justify-content: flex-end;
+  margin-bottom: 20px;
+}
+
+/* 鎼滅储妗嗘牱寮� */
+.search-icon {
+  color: #999;
+}
+
+.search-button {
+  margin-right: 4px;
+}
+
+/* 琛ㄦ牸鎿嶄綔鎸夐挳鏍峰紡 */
+.table-actions {
+  display: flex;
+  gap: 12px;
+  justify-content: center;
+}
+
+.action-btn {
+  padding: 4px;
+  border: none;
+  background: transparent !important;
+  transition: all 0.2s ease;
+}
+
+.edit-btn {
+  color: #409eff;
+}
+
+.edit-btn:hover {
+  color: #337ecc;
+  transform: scale(1.2);
+  background: rgba(64, 158, 255, 0.1) !important;
+}
+
+.delete-btn {
+  color: #f56c6c;
+}
+
+.delete-btn:hover {
+  color: #dd6161;
+  transform: scale(1.2);
+  background: rgba(245, 108, 108, 0.1) !important;
+}
+
+.pagination {
+  margin-top: 20px;
+  display: flex;
+  justify-content: flex-end;
+}
+
+/* 鍝嶅簲寮忛�傞厤 */
+@media (max-width: 768px) {
+  .page-header {
+    flex-direction: column;
+    align-items: stretch;
+    gap: 16px;
   }
   
   .toolbar {
-    display: flex;
-    gap: 12px;
-    margin-bottom: 20px;
-    align-items: center;
-  }
-  
-  .table-actions {
-    display: flex;
-    gap: 8px;
     flex-wrap: wrap;
+    gap: 8px;
   }
   
-  .pagination {
-    margin-top: 20px;
-    display: flex;
-    justify-content: flex-end;
+  .toolbar .el-input {
+    width: 100% !important;
+    max-width: 280px;
   }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0