Browse Source

feat: 新增考勤打卡功能模块,包括打卡页面和相关API接口。新增考勤组查询、上班打卡、下班打卡及获取当前考勤状态的功能。

master
lizhuang 1 week ago
parent
commit
eb597b55b4

+ 53
- 0
src/api/checkin/punch-card.js View File

import request from '@/utils/request'

/**
* 根据用户id查询考勤组
* @param {*} query
* @returns Promise
*/
export function queryAttendanceGroupByUserId(query) {
return request({
url: '/dk/app/queryAttendanceGroupByUserId',
method: 'get',
params: query
})
}

/**
* 上班打卡
* @param {*} query
* @returns Promise
*/
export function checkIn(query) {
return request({
url: '/dk/app/checkIn',
method: 'get',
params: query
})
}

/**
* 下班打卡
* @param {*} query
* @returns Promise
*/
export function checkOut(query) {
return request({
url: '/dk/app/checkOut',
method: 'get',
params: query
})
}

/**
* 获取当日当前员工考勤状态
* @param {*} query
* @returns Promise
*/
export function getCurrentDayRecord(query) {
return request({
url: '/dk/app/getCurrentDayRecord',
method: 'get',
params: query
})
}

+ 1
- 0
src/assets/icons/svg/punch-card-statistics.svg View File

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749718882858" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1646" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M765.67 702H274.46c-47.6 0-86.33-38.73-86.33-86.33V295.33c0-47.6 38.73-86.33 86.33-86.33h491.21c47.6 0 86.33 38.73 86.33 86.33v320.34c0 47.6-38.73 86.33-86.33 86.33zM274.46 249c-25.55 0-46.33 20.78-46.33 46.33v320.34c0 25.55 20.78 46.33 46.33 46.33h491.21c25.55 0 46.33-20.78 46.33-46.33V295.33c0-25.55-20.78-46.33-46.33-46.33H274.46zM663.12 789.84H377.01c-11.05 0-20-8.95-20-20s8.95-20 20-20h286.11c11.05 0 20 8.95 20 20s-8.95 20-20 20z" fill="#333333" p-id="1647"></path><path d="M520.07 594.45c-11.05 0-20-8.95-20-20V346.73c0-11.05 8.95-20 20-20s20 8.95 20 20v227.72c0 11.05-8.95 20-20 20zM663.07 594.45c-11.05 0-20-8.95-20-20V493c0-11.05 8.95-20 20-20s20 8.95 20 20v81.45c0 11.05-8.95 20-20 20zM377.07 594.45c-11.05 0-20-8.95-20-20V432c0-11.05 8.95-20 20-20s20 8.95 20 20v142.45c0 11.05-8.95 20-20 20z" fill="#E83245" p-id="1648"></path></svg>

+ 1
- 0
src/assets/icons/svg/punch-card.svg View File

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749718823861" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1322" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M516.1 754.92c-15.44 0-30.01-5.92-41.07-16.7-33.32-32.48-81.79-82.77-123.42-137.91-53.38-70.69-80.44-129.95-80.44-176.12 0-64.95 25.29-126 71.21-171.93 45.92-45.92 106.98-71.21 171.93-71.21s126 25.29 171.93 71.21c45.92 45.92 71.21 106.98 71.21 171.93 0 46.04-26.48 105.14-78.71 175.68-40.8 55.11-88.36 105.41-121.07 137.91-11.03 10.96-25.67 17.05-41.22 17.14h-0.35z m-1.79-533.87c-112.01 0-203.14 91.13-203.14 203.14 0 36.75 25.02 89.31 72.36 152.01 40.12 53.14 87.08 101.85 119.42 133.37 7.34 7.15 19.24 7.07 26.53-0.17 31.73-31.52 77.8-80.24 117.11-133.34 46.35-62.6 70.86-115.12 70.86-151.87 0-112.01-91.13-203.14-203.14-203.14z" fill="#333333" p-id="1323"></path><path d="M514.31 852c-61.81 0-120.21-9.07-164.44-25.54-22.75-8.47-40.9-18.59-53.96-30.08-11.08-9.75-24.29-25.87-24.29-47.28 0-44.47 55.92-80.21 149.58-95.6 10.9-1.79 21.19 5.59 22.98 16.49s-5.59 21.19-16.49 22.98c-36.19 5.95-67.88 15.81-89.21 27.76-16.81 9.42-26.85 20.02-26.85 28.37 0 9.43 13.67 25.53 52.2 39.88C403.71 803.83 457.16 812 514.32 812s110.6-8.18 150.49-23.02c38.53-14.34 52.2-30.45 52.2-39.88 0-8.34-10.04-18.95-26.85-28.37-21.34-11.96-53.02-21.82-89.21-27.76-10.9-1.79-18.28-12.08-16.49-22.98s12.08-18.28 22.98-16.49c93.66 15.4 149.58 51.14 149.58 95.6 0 21.41-13.21 37.53-24.29 47.28-13.06 11.49-31.21 21.61-53.96 30.08C634.53 842.93 576.13 852 514.33 852z" fill="#333333" p-id="1324"></path><path d="M490.23 514.34c-8.42 0-16.84-3.2-23.25-9.61l-59.85-59.85c-7.81-7.81-7.81-20.47 0-28.28 7.81-7.81 20.47-7.81 28.28 0l54.82 54.82 109.58-109.58c7.81-7.81 20.47-7.81 28.28 0 7.81 7.81 7.81 20.47 0 28.29L513.47 504.75c-6.41 6.41-14.83 9.61-23.25 9.61z" fill="#E83245" p-id="1325"></path></svg>

+ 6
- 1
src/router/index.js View File

meta: { title: '个人中心', icon: 'user' } meta: { title: '个人中心', icon: 'user' }
} }
] ]
}
},
{
path: '/m/checkin',
component: () => import('@/views/m/checkin'),
hidden: true
},
] ]


// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载

+ 1031
- 0
src/views/m/checkin/index.vue
File diff suppressed because it is too large
View File


Loading…
Cancel
Save