From fbd83ef832adf315d3cf5c9c6bd8164c897d283a Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 09 二月 2026 13:42:03 +0800
Subject: [PATCH] 整理代码

---
 src/pages/attendance/report.vue  |   63 --------------------
 src/pages/attendance/checkin.vue |  103 ----------------------------------
 2 files changed, 2 insertions(+), 164 deletions(-)

diff --git a/src/pages/attendance/checkin.vue b/src/pages/attendance/checkin.vue
index 0cb0fd6..18a87d7 100644
--- a/src/pages/attendance/checkin.vue
+++ b/src/pages/attendance/checkin.vue
@@ -16,13 +16,6 @@
                   size="16"></u-icon>
           <text class="shift-text">鐧界彮: 09:00-18:00</text>
         </view>
-        <!-- <view v-if="todayRecord?.checkInTime"
-              class="shift-item">
-          <u-icon name="checkmark-circle"
-                  color="#4cd964"
-                  size="16"></u-icon>
-          <text class="shift-text">{{ todayRecord.checkInTime }}宸叉墦鍗�</text>
-        </view> -->
       </view>
       <!-- 鎵撳崱鎸夐挳 -->
       <view class="checkin-button-container">
@@ -188,32 +181,6 @@
       return "涓嬬彮鎵撳崱";
     }
     return "宸叉墦鍗�";
-  });
-
-  // 鐢熸垚鏈�杩戞棩鏈�
-  const recentDates = computed(() => {
-    const dates = [];
-    const today = new Date();
-
-    // 鑾峰彇鏈�杩�7澶╃殑鏃ユ湡
-    for (let i = 6; i >= 0; i--) {
-      const date = new Date(today);
-      date.setDate(today.getDate() - i);
-
-      const dateStr = `${date.getFullYear()}-${String(
-        date.getMonth() + 1
-      ).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
-      const hasRecord = rawAttendance.value.some(item => item.date === dateStr);
-
-      dates.push({
-        date: dateStr,
-        day: date.getDate(),
-        isToday: i === 0,
-        hasRecord,
-      });
-    }
-
-    return dates;
   });
 
   // 瀵艰埅鍒拌缁嗘姤鍛婇〉闈�
@@ -709,67 +676,6 @@
     flex: 1;
   }
 
-  /* 鏃ユ湡閫夋嫨鍣� */
-  .date-picker {
-    margin-bottom: 24rpx;
-  }
-
-  .weekday {
-    display: inline-block;
-    width: 44rpx;
-    text-align: center;
-    font-size: 12px;
-    color: $text-tertiary;
-    margin-bottom: 12rpx;
-    font-weight: 500;
-  }
-
-  .date-items {
-    display: flex;
-    justify-content: space-between;
-  }
-
-  .date-item {
-    width: 44rpx;
-    height: 44rpx;
-    border-radius: 50%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    font-size: 14px;
-    color: $text-secondary;
-    background-color: rgba($primary-color, 0.05);
-    transition: all 0.3s ease;
-    cursor: pointer;
-  }
-
-  .date-item:hover {
-    background-color: rgba($primary-color, 0.1);
-    transform: scale(1.1);
-  }
-
-  .date-item.active {
-    background-color: $primary-color;
-    color: #ffffff;
-    font-weight: 600;
-    box-shadow: 0 2rpx 8rpx rgba($primary-color, 0.3);
-  }
-
-  .date-item.has-record {
-    position: relative;
-  }
-
-  .date-item.has-record::after {
-    content: "";
-    position: absolute;
-    bottom: 4rpx;
-    width: 8rpx;
-    height: 8rpx;
-    border-radius: 50%;
-    background-color: $success-color;
-    box-shadow: 0 1rpx 2rpx rgba($success-color, 0.3);
-  }
-
   /* 浠婃棩鑰冨嫟鐘舵�� */
   .today-status {
     display: flex;
@@ -820,15 +726,6 @@
 
     .checkin-time {
       font-size: 14px;
-    }
-
-    .weekday {
-      width: 38rpx;
-    }
-
-    .date-item {
-      width: 38rpx;
-      height: 38rpx;
     }
   }
 
diff --git a/src/pages/attendance/report.vue b/src/pages/attendance/report.vue
index 8894174..7d50294 100644
--- a/src/pages/attendance/report.vue
+++ b/src/pages/attendance/report.vue
@@ -98,14 +98,6 @@
     dept: "鐢熶骇涓�閮�",
   });
 
-  // 閮ㄩ棬閫夐」
-  const deptOptions = [
-    { label: "鐢熶骇涓�閮�", value: "鐢熶骇涓�閮�" },
-    { label: "鐢熶骇浜岄儴", value: "鐢熶骇浜岄儴" },
-    { label: "璁惧缁存姢閮�", value: "璁惧缁存姢閮�" },
-    { label: "璐ㄦ閮�", value: "璐ㄦ閮�" },
-  ];
-
   // 妯℃嫙鑰冨嫟鍘熷鏁版嵁
   const rawAttendance = ref([
     {
@@ -182,7 +174,6 @@
 
   // 鏌ヨ琛ㄥ崟
   const searchForm = reactive({
-    dept: "",
     date: "",
   });
 
@@ -220,9 +211,6 @@
   // 鏌ヨ
   const recomputeTable = () => {
     const list = rawAttendance.value.filter(item => {
-      if (searchForm.dept && item.dept !== searchForm.dept) {
-        return false;
-      }
       if (searchForm.date && item.date !== searchForm.date) {
         return false;
       }
@@ -235,27 +223,7 @@
     recomputeTable();
   };
 
-  const resetSearch = () => {
-    searchForm.dept = "";
-    searchForm.date = "";
-    recomputeTable();
-  };
-
-  // 瀵煎嚭锛堟紨绀猴級
-  const handleExport = () => {
-    uni.showToast({
-      title: "褰撳墠涓烘紨绀洪〉闈紝瀵煎嚭鍔熻兘鏈鎺ュ疄闄呮帴鍙�",
-      icon: "none",
-    });
-  };
-
   onMounted(() => {
-    // 榛樿灞曠ず褰撳ぉ鏁版嵁
-    // const today = new Date();
-    // const Y = today.getFullYear();
-    // const M = String(today.getMonth() + 1).padStart(2, "0");
-    // const D = String(today.getDate()).padStart(2, "0");
-    // searchForm.date = `${Y}-${M}-${D}`;
     recomputeTable();
   });
 </script>
@@ -425,33 +393,11 @@
     font-weight: 500;
   }
 
-  /* 瀵煎嚭鎸夐挳 */
-  .export-section {
-    text-align: center;
-    margin: 0 20rpx 30rpx;
-  }
-
-  .export-btn {
-    width: 100%;
-    border-radius: 8rpx;
-    border: 1rpx solid $primary-color;
-    color: $primary-color;
-    transition: all 0.3s ease;
-  }
-
-  .export-btn:hover {
-    background-color: $primary-color;
-    color: #ffffff;
-    box-shadow: 0 4rpx 12rpx rgba($primary-color, 0.3);
-    transform: translateY(-2rpx);
-  }
-
   /* 鍝嶅簲寮忚皟鏁� */
   @media (max-width: 375px) {
     .search-section,
     .record-list,
-    .empty-state,
-    .export-section {
+    .empty-state {
       margin: 12rpx;
     }
 
@@ -478,8 +424,7 @@
 
   .search-section,
   .record-item-card,
-  .empty-state,
-  .export-section {
+  .empty-state {
     animation: fadeInUp 0.5s ease-out;
   }
 
@@ -497,9 +442,5 @@
 
   .empty-state {
     animation-delay: 0.2s;
-  }
-
-  .export-section {
-    animation-delay: 0.3s;
   }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3