添加假数据

main
junhong 1 week ago
parent bef1f49532
commit c4e3f5e49f
  1. 158
      src/views/sitePersonnel/work-attendance/index.vue

@ -43,7 +43,7 @@ const state = reactive({
detail: 'workAttendance:page:list', detail: 'workAttendance:page:list',
}, },
pageInfo: { total: 0, base: { limit: 8, current: 1 } }, pageInfo: { total: 0, base: { limit: 8, current: 1 } },
baseQuery: { actionTimeAfter:formattedTime + ' 00:00:00',actionTimeBefore:formattedTime + ' 23:59:59' }, baseQuery: { actionTimeAfter: formattedTime + ' 00:00:00', actionTimeBefore: formattedTime + ' 23:59:59' },
beforeFilter: (params) => { beforeFilter: (params) => {
//1. 使 //1. 使
return new Promise((resolve) => { return new Promise((resolve) => {
@ -61,6 +61,141 @@ const state = reactive({
res.data.list = res.data.pageData res.data.list = res.data.pageData
return res.data.list return res.data.list
}, },
tableData: [{
"id": 17,
"personId": 21059,
"personCode": "112325",
"personName": "小高测试用例1",
"departmentId": 53,
"deptName": "小高测试用例部门1",
"cardNo": "40D3989B",
"siteId": "1",
"siteName": "门禁测试",
"attendanceType": "51",
"actionTime": "2023-08-24 02:17:55",
"reportTime": "2023-08-24 02:17:56",
"dataSource": 1,
"supplementFormId": null,
"number": null,
imageType: 1,
openType: 43,
startSwingTime: "2025-05-13 02:17:55",
}, {
"id": 17,
"personId": 21059,
"personCode": "112325",
"personName": "小高测试用例1",
"departmentId": 53,
"deptName": "小高测试用例部门1",
"cardNo": "40D3989B",
"siteId": "1",
"siteName": "门禁测试",
"attendanceType": "51",
"actionTime": "2023-08-24 02:17:55",
"reportTime": "2023-08-24 02:17:56",
"dataSource": 1,
"supplementFormId": null,
"number": null,
imageType: 2,
openType: 42,
startSwingTime: "2025-05-13 02:17:55",
}, {
"id": 17,
"personId": 21059,
"personCode": "112325",
"personName": "小高测试用例1",
"departmentId": 53,
"deptName": "小高测试用例部门1",
"cardNo": "40D3989B",
"siteId": "1",
"siteName": "门禁测试",
"attendanceType": "51",
"actionTime": "2023-08-24 02:17:55",
"reportTime": "2023-08-24 02:17:56",
"dataSource": 1,
"supplementFormId": null,
"number": null,
imageType: 1,
openType: 42,
startSwingTime: "2025-05-13 02:17:55",
}, {
"id": 17,
"personId": 21059,
"personCode": "112325",
"personName": "小高测试用例1",
"departmentId": 53,
"deptName": "小高测试用例部门1",
"cardNo": "40D3989B",
"siteId": "1",
"siteName": "门禁测试",
"attendanceType": "51",
"actionTime": "2023-08-24 02:17:55",
"reportTime": "2023-08-24 02:17:56",
"dataSource": 1,
"supplementFormId": null,
"number": null,
imageType: 1,
openType: 42,
startSwingTime: "2025-05-13 02:17:55",
}, {
"id": 17,
"personId": 21059,
"personCode": "112325",
"personName": "小高测试用例1",
"departmentId": 53,
"deptName": "小高测试用例部门1",
"cardNo": "40D3989B",
"siteId": "1",
"siteName": "门禁测试",
"attendanceType": "51",
"actionTime": "2023-08-24 02:17:55",
"reportTime": "2023-08-24 02:17:56",
"dataSource": 1,
"supplementFormId": null,
"number": null,
imageType: 2,
openType: 42,
startSwingTime: "2025-05-13 02:17:55",
}, {
"id": 17,
"personId": 21059,
"personCode": "112325",
"personName": "小高测试用例1",
"departmentId": 53,
"deptName": "小高测试用例部门1",
"cardNo": "40D3989B",
"siteId": "1",
"siteName": "门禁测试",
"attendanceType": "51",
"actionTime": "2023-08-24 02:17:55",
"reportTime": "2023-08-24 02:17:56",
"dataSource": 1,
"supplementFormId": null,
"number": null,
imageType: 1,
openType: 42,
startSwingTime: "2025-05-13 02:17:55",
}, {
"id": 17,
"personId": 21059,
"personCode": "112325",
"personName": "小高测试用例1",
"departmentId": 53,
"deptName": "小高测试用例部门1",
"cardNo": "40D3989B",
"siteId": "1",
"siteName": "门禁测试",
"attendanceType": "51",
"actionTime": "2023-08-24 02:17:55",
"reportTime": "2023-08-24 02:17:56",
"dataSource": 1,
"supplementFormId": null,
"number": null,
imageType: 1,
openType: 42,
startSwingTime: "2025-05-13 02:17:55",
}],
autoQuery:false
}) })
onMounted(() => { onMounted(() => {
@ -69,7 +204,24 @@ onMounted(() => {
<template> <template>
<div class="app-container"> <div class="app-container">
<BaseTablePage :tableOptions="state"> <el-table :data="state.tableData">
<el-table-column type="index" align="center" label="序号" width="70" />
<el-table-column label="姓名" align="center" prop="personName" />
<el-table-column label="考勤方式" align="center" prop="enterOrExit">
<template #default="scope">
<span>{{ stausList().find(item => item.value === scope.row.openType)?.label || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="刷卡时间" align="center" prop="startSwingTime" />
<el-table-column label="考勤点名称" align="center" prop="imageType">
<template #default="scope">
<span>{{ scope.row.siteName }}</span>
</template>
</el-table-column>
</el-table>
<!-- <BaseTablePage :tableOptions="state">
<template v-slot:column> <template v-slot:column>
<el-table-column type="index" align="center" label="序号" width="70" /> <el-table-column type="index" align="center" label="序号" width="70" />
<el-table-column label="姓名" align="center" prop="personName" /> <el-table-column label="姓名" align="center" prop="personName" />
@ -85,7 +237,7 @@ onMounted(() => {
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
</BaseTablePage> </BaseTablePage> -->
</div> </div>
</template> </template>

Loading…
Cancel
Save