-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(person): complete person attendance functional
- Loading branch information
Showing
13 changed files
with
187 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const getKey = <T, K extends keyof T>(record: T, key: K): T[K] => { | ||
return record[key] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* @Version: 1.0 | ||
* @Autor: YDKD | ||
* @Date: 2022-04-07 17:14:27 | ||
* @LastEditors: YDKD | ||
* @LastEditTime: 2022-04-08 10:31:04 | ||
*/ | ||
import { | ||
getInitData, | ||
tableData, | ||
total, | ||
queryData, | ||
hideSinglePage, | ||
record, | ||
vacationType | ||
} from './useTable' | ||
|
||
export { | ||
getInitData, | ||
tableData, | ||
total, | ||
queryData, | ||
hideSinglePage, | ||
record, | ||
vacationType | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* @Version: 1.0 | ||
* @Autor: YDKD | ||
* @Date: 2022-04-07 17:14:45 | ||
* @LastEditors: YDKD | ||
* @LastEditTime: 2022-04-08 10:30:41 | ||
*/ | ||
|
||
import { getWorkerAttendance } from '@/api/getApi' | ||
import { ref, unref, computed } from 'vue' | ||
|
||
const queryData = ref({ | ||
search: '', | ||
page: 1, | ||
pageSize: 10 | ||
}) | ||
|
||
const tableData = ref([]) | ||
const total = ref(0) | ||
|
||
const getInitData = async () => { | ||
const params = unref(queryData) | ||
const { data } = await getWorkerAttendance(params) | ||
tableData.value = data.result | ||
total.value = data.total | ||
} | ||
|
||
const record = { | ||
0: 'icon-icon-test', | ||
1: 'icon-zhengque' | ||
} | ||
|
||
const vacationType = { | ||
0: '出勤', | ||
1: '矿工', | ||
2: '病假', | ||
3: '休假', | ||
4: '事假', | ||
5: '其他' | ||
} | ||
|
||
const hideSinglePage = computed(() => total.value < queryData.value.pageSize) | ||
export { | ||
getInitData, | ||
tableData, | ||
total, | ||
queryData, | ||
hideSinglePage, | ||
record, | ||
vacationType | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters