From 96dd34f77d81db58f54e3d0ad4a8cc8082189a61 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 16 四月 2026 13:52:27 +0800
Subject: [PATCH] 考勤相关更改

---
 src/api/officeManagementApi/studies.js                               |   25 ++++
 src/api/officeManagementApi/checkingIn.js                            |   25 ++++
 src/api/officeManagementApi/index.js                                 |   11 +
 src/views/OfficeRelated/checkingIn/checkingInInfo.vue                |   21 +--
 src/views/OfficeRelated/checkingIn/components/BusinessTripTable.vue  |    1 
 src/views/OfficeRelated/checkingIn/mockData.js                       |   74 ++++++------
 src/api/officeManagementApi/conference.js                            |   25 ++++
 src/views/OfficeRelated/checkingIn/components/AttendanceCalendar.vue |  119 ++++++++++++++++---
 8 files changed, 231 insertions(+), 70 deletions(-)

diff --git a/src/api/officeManagementApi/checkingIn.js b/src/api/officeManagementApi/checkingIn.js
new file mode 100644
index 0000000..ccf1855
--- /dev/null
+++ b/src/api/officeManagementApi/checkingIn.js
@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+// 妗堜緥鍒楄〃鍙婅鎯�
+export function meetinglist(data) {
+  return request({
+    url: '/project/meeting/list',
+    method: 'post',
+    data: data
+  })
+}
+// 鑰冨嫟淇敼
+export function meetingedit(data) {
+  return request({
+    url: '/project/meeting/edit',
+    method: 'post',
+    data: data
+  })
+}
+// 鑰冨嫟璇︽儏
+export function meetingInfo(id) {
+  return request({
+    url: '/project/meeting/getInfo/' + id,
+    method: 'get'
+  })
+}
diff --git a/src/api/officeManagementApi/conference.js b/src/api/officeManagementApi/conference.js
new file mode 100644
index 0000000..e250558
--- /dev/null
+++ b/src/api/officeManagementApi/conference.js
@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+// 妗堜緥鍒楄〃鍙婅鎯�
+export function meetinglist(data) {
+  return request({
+    url: '/project/meeting/list',
+    method: 'post',
+    data: data
+  })
+}
+// 浼氳绾淇敼
+export function meetingedit(data) {
+  return request({
+    url: '/project/meeting/edit',
+    method: 'post',
+    data: data
+  })
+}
+// 浼氳绾璇︽儏
+export function meetingInfo(id) {
+  return request({
+    url: '/project/meeting/getInfo/' + id,
+    method: 'get'
+  })
+}
diff --git a/src/api/officeManagementApi/index.js b/src/api/officeManagementApi/index.js
new file mode 100644
index 0000000..07a8fbe
--- /dev/null
+++ b/src/api/officeManagementApi/index.js
@@ -0,0 +1,11 @@
+export * from "./affirm";
+export * from "./allocation";
+export * from "./appear";
+export * from "./assess";
+export * from "./course";
+export * from "./ethicalReview";
+export * from "./decide";
+export * from "./GetWitness";
+export * from "./maintain";
+export * from "./OrganUtilization";
+export * from "./transfer";
diff --git a/src/api/officeManagementApi/studies.js b/src/api/officeManagementApi/studies.js
new file mode 100644
index 0000000..3278538
--- /dev/null
+++ b/src/api/officeManagementApi/studies.js
@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+// 妗堜緥鍒楄〃鍙婅鎯�
+export function meetinglist(data) {
+  return request({
+    url: '/project/meeting/list',
+    method: 'post',
+    data: data
+  })
+}
+// 杩涗慨淇敼
+export function meetingedit(data) {
+  return request({
+    url: '/project/meeting/edit',
+    method: 'post',
+    data: data
+  })
+}
+// 杩涗慨璇︽儏
+export function meetingInfo(id) {
+  return request({
+    url: '/project/meeting/getInfo/' + id,
+    method: 'get'
+  })
+}
diff --git a/src/views/OfficeRelated/checkingIn/checkingInInfo.vue b/src/views/OfficeRelated/checkingIn/checkingInInfo.vue
index 2ff3344..4ca8cae 100644
--- a/src/views/OfficeRelated/checkingIn/checkingInInfo.vue
+++ b/src/views/OfficeRelated/checkingIn/checkingInInfo.vue
@@ -50,10 +50,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="鍑哄樊璁板綍" name="businessTripList">
-          <personal-business-trip-table
-            :data="businessTripData"
-            :loading="loading"
-          />
+          <person-business :data="businessTripData" :loading="loading" />
         </el-tab-pane>
         <el-tab-pane label="鏃ュ巻瑙嗗浘" name="calendar">
           <attendance-calendar
@@ -145,14 +142,14 @@
 
     generatePersonalAttendanceData() {
       const data = [];
-      const currentMonth = 12; // 12鏈�
+      const currentMonth = 4; // 12鏈�
 
       for (let day = 1; day <= 31; day++) {
         if (Math.random() > 0.2) {
           // 80%鐨勫嚭鍕ょ巼
           data.push({
             id: day,
-            date: `2024-${currentMonth
+            date: `2026-${currentMonth
               .toString()
               .padStart(2, "0")}-${day.toString().padStart(2, "0")}`,
             checkIn: `08:${String(Math.floor(Math.random() * 30)).padStart(
@@ -175,22 +172,22 @@
       return [
         {
           id: 1,
-          tripNumber: "BT202412001",
+          tripNumber: "BT202612001",
           startCity: "鍖椾含",
           endCity: "涓婃捣",
-          startDate: "2024-12-05",
-          endDate: "2024-12-08",
+          startDate: "2026-04-05",
+          endDate: "2026-04-08",
           distance: 1200,
           purpose: "瀹㈡埛浼氳",
           status: "宸插畬鎴�"
         },
         {
           id: 2,
-          tripNumber: "BT202412002",
+          tripNumber: "BT202612002",
           startCity: "鍖椾含",
           endCity: "骞垮窞",
-          startDate: "2024-12-15",
-          endDate: "2024-12-18",
+          startDate: "2026-04-012",
+          endDate: "2026-04-16",
           distance: 1900,
           purpose: "椤圭洰璋冪爺",
           status: "宸插畬鎴�"
diff --git a/src/views/OfficeRelated/checkingIn/components/AttendanceCalendar.vue b/src/views/OfficeRelated/checkingIn/components/AttendanceCalendar.vue
index 5f90278..f0e23d1 100644
--- a/src/views/OfficeRelated/checkingIn/components/AttendanceCalendar.vue
+++ b/src/views/OfficeRelated/checkingIn/components/AttendanceCalendar.vue
@@ -1,10 +1,24 @@
 <template>
   <div class="attendance-calendar">
-    <el-calendar v-model="calendarValue">
-      <template #date-cell="{ data }">
+    <!-- <el-button @click="refreshCalendar" size="small" type="primary"
+      >鍒锋柊</el-button
+    > -->
+
+    <!-- Element UI 鐨勬棩鍘嗙粍浠� -->
+    <el-calendar v-model="value">
+      <template slot="dateCell" slot-scope="{ date, data }">
         <div class="calendar-date">
-          <div class="date-number">{{ data.day.split('-')[2] }}</div>
+          <div class="date-number">
+            {{
+              data.day
+                .split("-")
+                .slice(1)
+                .join("-")
+            }}
+          </div>
+          <!-- <div style="font-size: 10px; color: #666;">{{ data.day }}</div> -->
           <div class="date-events">
+            <!-- Element UI 涓娇鐢ㄦ彃妲戒綔鐢ㄥ煙 -->
             <div
               v-for="event in getDateEvents(data.day)"
               :key="event.id"
@@ -23,46 +37,91 @@
 
 <script>
 export default {
-  name: 'AttendanceCalendar',
+  name: "AttendanceCalendar",
   props: {
     attendanceData: Array,
     businessTripData: Array
   },
   data() {
     return {
-      calendarValue: new Date()
+      value: new Date(), // Element UI 浣跨敤 value
+      localAttendanceData: [],
+      localBusinessTripData: []
+    };
+  },
+  watch: {
+    attendanceData: {
+      immediate: true,
+      handler(val) {
+        this.localAttendanceData = val || [];
+        console.log("鑰冨嫟鏁版嵁:", this.localAttendanceData);
+        this.$nextTick(() => {
+          this.$forceUpdate(); // Vue 2 鐨勫己鍒舵洿鏂�
+        });
+      }
+    },
+    businessTripData: {
+      immediate: true,
+      handler(val) {
+        this.localBusinessTripData = val || [];
+        console.log("鍑哄樊鏁版嵁:", this.localBusinessTripData);
+        this.$nextTick(() => {
+          this.$forceUpdate();
+        });
+      }
     }
   },
+  mounted() {
+    console.log("Calendar mounted with Vue 2.6.12");
+    this.testMethod();
+  },
   methods: {
+    refreshCalendar() {
+      console.log("鎵嬪姩鍒锋柊鏃ュ巻");
+      this.$forceUpdate();
+    },
+    testMethod() {
+      console.log("娴嬭瘯鏂规硶鏄惁鍙皟鐢�");
+      console.log("getDateEvents 娴嬭瘯:", this.getDateEvents("2024-01-15"));
+    },
     getDateEvents(date) {
-      const events = []
+      console.log("getDateEvents 琚皟鐢�, 鏃ユ湡:", date);
+      console.log("褰撳墠鑰冨嫟鏁版嵁:", this.localAttendanceData);
+      console.log("褰撳墠鍑哄樊鏁版嵁:", this.localBusinessTripData);
 
-      // 妫�鏌ュ嚭鍕よ褰�
-      const attendance = this.attendanceData.find(item => item.date === date)
+      const events = [];
+
+      // 鑰冨嫟鏁版嵁
+      const attendance = (this.localAttendanceData || []).find(item => {
+        return item && item.date === date;
+      });
+
       if (attendance) {
         events.push({
           id: `attendance-${date}`,
-          type: 'attendance',
-          text: `${attendance.checkIn}-${attendance.checkOut}`
-        })
+          type: "attendance",
+          text: `${attendance.checkIn || "--"}-${attendance.checkOut || "--"}`
+        });
       }
 
-      // 妫�鏌ュ嚭宸褰�
-      const businessTrip = this.businessTripData.find(item =>
-        date >= item.startDate && date <= item.endDate
-      )
+      // 鍑哄樊鏁版嵁
+      const businessTrip = (this.localBusinessTripData || []).find(item => {
+        return item && date >= item.startDate && date <= item.endDate;
+      });
+
       if (businessTrip) {
         events.push({
           id: `business-trip-${date}`,
-          type: 'business-trip',
-          text: `鍑哄樊: ${businessTrip.endCity}`
-        })
+          type: "business-trip",
+          text: `鍑哄樊: ${businessTrip.endCity || ""}`
+        });
       }
 
-      return events
+      console.log("鎵惧埌鐨勪簨浠�:", events);
+      return events;
     }
   }
-}
+};
 </script>
 
 <style scoped>
@@ -72,6 +131,7 @@
 
 .calendar-date {
   height: 100%;
+  padding: 8px;
   display: flex;
   flex-direction: column;
 }
@@ -79,6 +139,7 @@
 .date-number {
   font-weight: bold;
   margin-bottom: 4px;
+  font-size: 16px;
 }
 
 .date-events {
@@ -91,6 +152,19 @@
   align-items: center;
   margin-bottom: 2px;
   font-size: 12px;
+  padding: 2px 4px;
+  border-radius: 2px;
+  background-color: #f5f7fa;
+}
+
+.event-item.attendance {
+  background-color: #f0f9eb;
+  color: #67c23a;
+}
+
+.event-item.business-trip {
+  background-color: #ecf5ff;
+  color: #409eff;
 }
 
 .event-dot {
@@ -107,10 +181,13 @@
 .event-item.business-trip .event-dot {
   background-color: #409eff;
 }
-
+::v-deep .el-calendar-table .el-calendar-day {
+  height: 115px;
+}
 .event-text {
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
+  flex: 1;
 }
 </style>
diff --git a/src/views/OfficeRelated/checkingIn/components/BusinessTripTable.vue b/src/views/OfficeRelated/checkingIn/components/BusinessTripTable.vue
index a07a9d4..02bbcbe 100644
--- a/src/views/OfficeRelated/checkingIn/components/BusinessTripTable.vue
+++ b/src/views/OfficeRelated/checkingIn/components/BusinessTripTable.vue
@@ -122,6 +122,7 @@
   },
   computed: {
     filteredData() {
+
       let data = this.data.filter(item => {
         const nameMatch = !this.filters.employeeName ||
           item.employeeName.includes(this.filters.employeeName)
diff --git a/src/views/OfficeRelated/checkingIn/mockData.js b/src/views/OfficeRelated/checkingIn/mockData.js
index 8c15455..8b99d84 100644
--- a/src/views/OfficeRelated/checkingIn/mockData.js
+++ b/src/views/OfficeRelated/checkingIn/mockData.js
@@ -3,47 +3,47 @@
     // 鍛樺伐鑰冨嫟鏁版嵁 - 闇�瑕佽ˉ鍏呭畬鏁存湀浠界殑鏁版嵁
     attendanceData: [
       // 12鏈�1-4鏃�
-      { id: 1, date: '2024-12-01', checkIn: '08:30', checkOut: '18:00', status: 'present', workHours: 9.5 },
-      { id: 2, date: '2024-12-02', checkIn: '09:15', checkOut: '18:00', status: 'late', workHours: 8.75 },
-      { id: 3, date: '2024-12-03', checkIn: '08:45', checkOut: '17:30', status: 'present', workHours: 8.75 },
-      { id: 4, date: '2024-12-04', checkIn: '08:25', checkOut: '18:10', status: 'present', workHours: 9.75 },
+      { id: 1, date: '2026-04-01', checkIn: '08:30', checkOut: '18:00', status: 'present', workHours: 9.5 },
+      { id: 2, date: '2026-04-02', checkIn: '09:15', checkOut: '18:00', status: 'late', workHours: 8.75 },
+      { id: 3, date: '2026-04-03', checkIn: '08:45', checkOut: '17:30', status: 'present', workHours: 8.75 },
+      { id: 4, date: '2026-04-04', checkIn: '08:25', checkOut: '18:10', status: 'present', workHours: 9.75 },
 
       // 12鏈�5-8鏃ワ紙5鍙风己鍕わ紝5-8鍙峰嚭宸級
-      { id: 5, date: '2024-12-05', checkIn: null, checkOut: null, status: 'absent', workHours: 0 },
-      { id: 6, date: '2024-12-06', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
-      { id: 7, date: '2024-12-07', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
-      { id: 8, date: '2024-12-08', checkIn: '08:40', checkOut: '17:45', status: 'present', workHours: 9.0 },
+      { id: 5, date: '2026-04-05', checkIn: null, checkOut: null, status: 'absent', workHours: 0 },
+      { id: 6, date: '2026-04-06', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
+      { id: 7, date: '2026-04-07', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
+      { id: 8, date: '2026-04-08', checkIn: '08:40', checkOut: '17:45', status: 'present', workHours: 9.0 },
 
       // 12鏈�9-14鏃�
-      { id: 9, date: '2024-12-09', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 },
-      { id: 10, date: '2024-12-10', checkIn: '09:05', checkOut: '17:50', status: 'late', workHours: 8.75 },
-      { id: 11, date: '2024-12-11', checkIn: '08:50', checkOut: '18:15', status: 'present', workHours: 9.5 },
-      { id: 12, date: '2024-12-12', checkIn: '08:30', checkOut: '17:40', status: 'present', workHours: 9.0 },
-      { id: 13, date: '2024-12-13', checkIn: '08:55', checkOut: '18:00', status: 'present', workHours: 9.0 },
-      { id: 14, date: '2024-12-14', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 },
+      { id: 9, date: '2026-04-09', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 },
+      { id: 10, date: '2026-04-10', checkIn: '09:05', checkOut: '17:50', status: 'late', workHours: 8.75 },
+      { id: 11, date: '2026-04-11', checkIn: '08:50', checkOut: '18:15', status: 'present', workHours: 9.5 },
+      { id: 12, date: '2026-04-12', checkIn: '08:30', checkOut: '17:40', status: 'present', workHours: 9.0 },
+      { id: 13, date: '2026-04-13', checkIn: '08:55', checkOut: '18:00', status: 'present', workHours: 9.0 },
+      { id: 14, date: '2026-04-14', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 },
 
       // 12鏈�15-18鏃ワ紙鍑哄樊锛�
-      { id: 15, date: '2024-12-15', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
-      { id: 16, date: '2024-12-16', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
-      { id: 17, date: '2024-12-17', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
-      { id: 18, date: '2024-12-18', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
+      { id: 15, date: '2026-04-15', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
+      { id: 16, date: '2026-04-16', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
+      { id: 17, date: '2026-04-17', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
+      { id: 18, date: '2026-04-18', checkIn: null, checkOut: null, status: 'trip', workHours: 0 },
 
       // 12鏈�19-24鏃�
-      { id: 19, date: '2024-12-19', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 },
-      { id: 20, date: '2024-12-20', checkIn: '08:40', checkOut: '17:55', status: 'present', workHours: 9.25 },
-      { id: 21, date: '2024-12-21', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // 鍛ㄥ叚
-      { id: 22, date: '2024-12-22', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // 鍑哄樊
-      { id: 23, date: '2024-12-23', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // 鍑哄樊
-      { id: 24, date: '2024-12-24', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // 鍑哄樊
+      { id: 19, date: '2026-04-19', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 },
+      { id: 20, date: '2026-04-20', checkIn: '08:40', checkOut: '17:55', status: 'present', workHours: 9.25 },
+      { id: 21, date: '2026-04-21', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // 鍛ㄥ叚
+      { id: 22, date: '2026-04-22', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // 鍑哄樊
+      { id: 23, date: '2026-04-23', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // 鍑哄樊
+      { id: 24, date: '2026-04-24', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // 鍑哄樊
 
       // 12鏈�25-31鏃�
-      { id: 25, date: '2024-12-25', checkIn: '08:50', checkOut: '17:45', status: 'present', workHours: 8.75 },
-      { id: 26, date: '2024-12-26', checkIn: '09:10', checkOut: '17:40', status: 'late', workHours: 8.5 },
-      { id: 27, date: '2024-12-27', checkIn: '08:35', checkOut: '18:00', status: 'present', workHours: 9.25 },
-      { id: 28, date: '2024-12-28', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 },
-      { id: 29, date: '2024-12-29', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // 鍛ㄦ棩
-      { id: 30, date: '2024-12-30', checkIn: '08:30', checkOut: '17:30', status: 'present', workHours: 9.0 },
-      { id: 31, date: '2024-12-31', checkIn: '08:40', checkOut: '16:00', status: 'present', workHours: 7.5 }
+      { id: 25, date: '2026-04-25', checkIn: '08:50', checkOut: '17:45', status: 'present', workHours: 8.75 },
+      { id: 26, date: '2026-04-26', checkIn: '09:10', checkOut: '17:40', status: 'late', workHours: 8.5 },
+      { id: 27, date: '2026-04-27', checkIn: '08:35', checkOut: '18:00', status: 'present', workHours: 9.25 },
+      { id: 28, date: '2026-04-28', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 },
+      { id: 29, date: '2026-04-29', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // 鍛ㄦ棩
+      { id: 30, date: '2026-04-30', checkIn: '08:30', checkOut: '17:30', status: 'present', workHours: 9.0 },
+      { id: 31, date: '2026-04-31', checkIn: '08:40', checkOut: '16:00', status: 'present', workHours: 7.5 }
     ],
 
     // 鍑哄樊鏁版嵁 - 闇�瑕佽皟鏁存棩鏈熻寖鍥村尮閰�
@@ -53,8 +53,8 @@
         tripNumber: 'BT202412001',
         startCity: '鍖椾含',
         endCity: '涓婃捣',
-        startDate: '2024-12-05',
-        endDate: '2024-12-07', // 璋冩暣涓�7鍙风粨鏉�
+        startDate: '2026-04-05',
+        endDate: '2026-04-07', // 璋冩暣涓�7鍙风粨鏉�
         distance: 1200,
         purpose: '瀹㈡埛浼氳',
         status: 'completed'
@@ -64,8 +64,8 @@
         tripNumber: 'BT202412002',
         startCity: '鍖椾含',
         endCity: '骞垮窞',
-        startDate: '2024-12-15',
-        endDate: '2024-12-18',
+        startDate: '2026-04-15',
+        endDate: '2026-04-18',
         distance: 1900,
         purpose: '椤圭洰璋冪爺',
         status: 'completed'
@@ -75,8 +75,8 @@
         tripNumber: 'BT202412003',
         startCity: '鍖椾含',
         endCity: '娣卞湷',
-        startDate: '2024-12-22',
-        endDate: '2024-12-24',
+        startDate: '2026-04-22',
+        endDate: '2026-04-24',
         distance: 1950,
         purpose: '鎶�鏈氦娴�',
         status: 'completed'

--
Gitblit v1.9.3