|
@@ -0,0 +1,83 @@
|
|
|
+<template>
|
|
|
+ <v-dialog
|
|
|
+ :title="title"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="900px"
|
|
|
+ v-model="visible">
|
|
|
+ <el-table :data="gridData">
|
|
|
+ <el-table-column property="name" label="姓名" width="200"/>
|
|
|
+ <el-table-column property="title" label="职位" width="200"/>
|
|
|
+ <el-table-column property="workDate" label="工作日" width="200"/>
|
|
|
+ <el-table-column property="userCheckTime" label="打卡时间" width="150" />
|
|
|
+ <el-table-column property="locationResult" label="考勤类型" width="200" >
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.locationResult === 'Normal'">范围内</span>
|
|
|
+ <span v-else-if="scope.row.locationResult === 'Outside'">范围外</span>
|
|
|
+ <span v-else-if="scope.row.locationResult === 'NotSigned'">未打卡</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="checkType" label="考勤类型" width="200" >
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.checkType === 'OnDuty'">上班</span>
|
|
|
+ <span v-else-if="scope.row.checkType === 'OffDuty'">下班</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="timeResult" label="打卡结果" width="200">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.timeResult === 'Normal'">正常</span>
|
|
|
+ <span v-else-if="scope.row.timeResult === 'Early'">早退</span>
|
|
|
+ <span v-else-if="scope.row.timeResult === 'Late'">迟到</span>
|
|
|
+ <span v-else-if="scope.row.timeResult === 'SeriousLate'">严重迟到</span>
|
|
|
+ <span v-else-if="scope.row.timeResult === 'Absenteeism'">旷工迟到</span>
|
|
|
+ <span v-else-if="scope.row.timeResult === 'NotSigned'">未打卡</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="visible = false" icon="circle-close">关闭</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </v-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import ddService from "@/api/test/dd/dd.js"
|
|
|
+ export default {
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ title: '',
|
|
|
+ method: '',
|
|
|
+ visible: false,
|
|
|
+ loading: false,
|
|
|
+ gridData:[]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init (id,name,title) {
|
|
|
+ this.title = '考勤列表'
|
|
|
+ this.visible = true
|
|
|
+ this.loading = false
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.loading = true
|
|
|
+ ddService.getWorkListCord(id).then((data) => {
|
|
|
+ console.log('data',data)
|
|
|
+ this.gridData = data.recordresult
|
|
|
+ this.gridData.forEach((item)=>{
|
|
|
+ item.name = name
|
|
|
+ item.title = title
|
|
|
+ })
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+
|