WXL
2025-12-28 1b736033f6d01b774d58b4c2d7cd2ce8607a44fa
src/views/OfficeRelated/checkingIn/mockData.js
@@ -1,131 +1,52 @@
// 在父组件 data() 中或单独创建 mockData.js 文件
export const generateMockData = () => {
  return {
    // 员工考勤数据
    // 员工考勤数据 - 需要补充完整月份的数据
    attendanceData: [
      {
        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: 5,
        date: '2024-12-05',
        checkIn: null,
        checkOut: null,
        status: 'absent',
        workHours: 0
      },
      {
        id: 6,
        date: '2024-12-08',
        checkIn: '08:40',
        checkOut: '17:45',
        status: 'present',
        workHours: 9.0
      },
      {
        id: 7,
        date: '2024-12-09',
        checkIn: '08:35',
        checkOut: '18:05',
        status: 'present',
        workHours: 9.5
      },
      {
        id: 8,
        date: '2024-12-10',
        checkIn: '09:05',
        checkOut: '17:50',
        status: 'late',
        workHours: 8.75
      },
      {
        id: 9,
        date: '2024-12-11',
        checkIn: '08:50',
        checkOut: '18:15',
        status: 'present',
        workHours: 9.5
      },
      {
        id: 10,
        date: '2024-12-12',
        checkIn: '08:30',
        checkOut: '17:40',
        status: 'present',
        workHours: 9.0
      },
      {
        id: 11,
        date: '2024-12-15',
        checkIn: '08:45',
        checkOut: '18:00',
        status: 'present',
        workHours: 9.25
      },
      {
        id: 12,
        date: '2024-12-16',
        checkIn: '08:55',
        checkOut: '17:55',
        status: 'present',
        workHours: 9.0
      },
      {
        id: 13,
        date: '2024-12-17',
        checkIn: '08:40',
        checkOut: '18:10',
        status: 'present',
        workHours: 9.5
      },
      {
        id: 14,
        date: '2024-12-18',
        checkIn: '09:20',
        checkOut: '17:30',
        status: 'late',
        workHours: 8.0
      },
      {
        id: 15,
        date: '2024-12-19',
        checkIn: '08:35',
        checkOut: '18:05',
        status: 'present',
        workHours: 9.5
      }
      // 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 },
      // 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 },
      // 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 },
      // 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 },
      // 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 }, // 出差
      // 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 }
    ],
    // 出差数据
    // 出差数据 - 需要调整日期范围匹配
    businessTripData: [
      {
        id: 1,
@@ -133,7 +54,7 @@
        startCity: '北京',
        endCity: '上海',
        startDate: '2024-12-05',
        endDate: '2024-12-08',
        endDate: '2024-12-07', // 调整为7号结束
        distance: 1200,
        purpose: '客户会议',
        status: 'completed'