|
@@ -7,7 +7,7 @@ import Icon from '@/components/IconPark'
|
|
|
import { Table, Tag, Popconfirm, Popover, Button } from 'antd'
|
|
|
import { fetchAttendanceList, unlinkAttendance, deleteAttendance } from '@/services/user/system'
|
|
|
|
|
|
-export enum addType {
|
|
|
+export enum modalType {
|
|
|
addobjectModal = 0,
|
|
|
applicantModal = 1
|
|
|
}
|
|
@@ -16,7 +16,7 @@ const Attendance = () => {
|
|
|
id: '',
|
|
|
attendanceList: [],
|
|
|
visible: false,
|
|
|
- type: addType.addobjectModal
|
|
|
+ type: modalType.addobjectModal
|
|
|
})
|
|
|
|
|
|
const { run: tryGetRoleStaffList } = useRequest(fetchAttendanceList, {
|
|
@@ -69,7 +69,7 @@ const Attendance = () => {
|
|
|
dataIndex: 'staff',
|
|
|
align: 'left',
|
|
|
width: '70%',
|
|
|
- render: (_, record) => (
|
|
|
+ render: (_, record: API.AttendanceItem) => (
|
|
|
<div>
|
|
|
{record.staff.map(item => (
|
|
|
// console.log(item.staffName)
|
|
@@ -84,7 +84,7 @@ const Attendance = () => {
|
|
|
<span
|
|
|
className="hover:text-hex-886ab5 cursor-pointer text-purple-500"
|
|
|
onClick={() =>
|
|
|
- setState({ ...state, id: record.id, visible: true, type: addType.addobjectModal })
|
|
|
+ setState({ ...state, id: record.id, visible: true, type: modalType.addobjectModal })
|
|
|
}>
|
|
|
<Icon type="plus" />
|
|
|
添加
|
|
@@ -121,7 +121,7 @@ const Attendance = () => {
|
|
|
<div className="absolute right-7 top-7 z-100">
|
|
|
<Button
|
|
|
type="primary"
|
|
|
- onClick={() => setState({ ...state, visible: true, type: addType.applicantModal })}>
|
|
|
+ onClick={() => setState({ ...state, visible: true, type: modalType.applicantModal })}>
|
|
|
添加新申请人
|
|
|
</Button>
|
|
|
{/* <AddObjectModal title="添加新申请人" type visvi onCan /> */}
|