From 513d93bed0618f5fc0e6f147a9e23a545c9b6f65 Mon Sep 17 00:00:00 2001 From: YDKD <1606354057@qq.com> Date: Fri, 8 Apr 2022 10:37:06 +0800 Subject: [PATCH] feat(person): complete person attendance functional --- .eslintrc.js | 1 + index.html | 2 +- src/api/getApi.ts | 8 ++ src/api/type.ts | 1 + src/components/Button/src/Button.vue | 13 +-- src/components/Icon/src/Icon.vue | 3 +- src/components/Icon/types.ts | 8 -- src/utils/getKey.ts | 3 + .../attendance/components/count-panel.vue | 81 ++++++++++++++++++- src/views/attendance/hooks/index.ts | 26 ++++++ src/views/attendance/hooks/useTable.ts | 51 ++++++++++++ types/components.d.ts | 8 +- types/system.d.ts | 3 +- 13 files changed, 187 insertions(+), 21 deletions(-) delete mode 100644 src/components/Icon/types.ts create mode 100644 src/utils/getKey.ts create mode 100644 src/views/attendance/hooks/index.ts create mode 100644 src/views/attendance/hooks/useTable.ts diff --git a/.eslintrc.js b/.eslintrc.js index 7ff6239..9985178 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,6 +34,7 @@ module.exports = { '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', 'vue/no-multiple-template-root': 'off', + 'vue/no-v-model-argument': 'off', 'no-useless-escape': 'off', 'vue/html-self-closing': [ 'error', diff --git a/index.html b/index.html index e2a940b..9ba8b3b 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + diff --git a/src/api/getApi.ts b/src/api/getApi.ts index 1e69fac..ffecda7 100644 --- a/src/api/getApi.ts +++ b/src/api/getApi.ts @@ -66,3 +66,11 @@ export function getSerialNum() { method: 'GET' }) } + +export function getWorkerAttendance(params: any) { + return defaultRequest.request({ + url: '/sys/person/attendance', + method: 'GET', + params + }) +} diff --git a/src/api/type.ts b/src/api/type.ts index c30463d..8dfb05d 100644 --- a/src/api/type.ts +++ b/src/api/type.ts @@ -7,6 +7,7 @@ interface BaseReturnType { interface dataStructure { result?: any code: number + total: number } export interface ReutrnDataType extends BaseReturnType { diff --git a/src/components/Button/src/Button.vue b/src/components/Button/src/Button.vue index 59c3d4a..a576302 100644 --- a/src/components/Button/src/Button.vue +++ b/src/components/Button/src/Button.vue @@ -3,14 +3,14 @@ * @Autor: YDKD * @Date: 2022-04-01 10:57:59 * @LastEditors: YDKD - * @LastEditTime: 2022-04-07 14:58:26 + * @LastEditTime: 2022-04-07 17:52:39 -->