Blame view

src/components/staff/StaffAttendanceDetail.vue 1.79 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
      <el-dialog
        :title="$t('staffAttendanceDetail.title')"
        :visible.sync="visible"
        width="80%"
        @close="close"
      >
        <el-table :data="staffAttendanceDetailInfo.details" border style="width: 100%">
          <el-table-column :label="$t('staffAttendanceDetail.face')" align="center">
            <template slot-scope="scope">
              <el-image
                :src="scope.row.facePath || '/img/noPhoto.jpg'"
                style="width: 60px; height: 60px; border-radius: 4px;"
              />
            </template>
          </el-table-column>
          <el-table-column prop="staffName" :label="$t('staffAttendanceDetail.staffName')" align="center" />
          <el-table-column prop="clockTime" :label="$t('staffAttendanceDetail.clockTime')" align="center" />
        </el-table>
      </el-dialog>
    </template>
    
    <script>
    import { queryAttendanceLog } from '@/api/staff/adminStaffDetailApi'
19bafb73   wuxw   v1.9 优化采购相关bug
25
    import { getCommunityId } from '@/api/community/communityApi' 
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    
    export default {
      name: 'StaffAttendanceDetail',
      data() {
        return {
          visible: false,
          staffAttendanceDetailInfo: {
            details: []
          }
        }
      },
      methods: {
        async open(param) {
          this.visible = true
          try {
            const { data } = await queryAttendanceLog({
19bafb73   wuxw   v1.9 优化采购相关bug
42
              communityId: getCommunityId(),
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
              staffId: param.staffId,
              date: param.date,
              page: 1,
              row: 30
            })
            this.staffAttendanceDetailInfo.details = data
          } catch (error) {
            this.$message.error(this.$t('staffAttendanceDetail.fetchError'))
          }
        },
        close() {
          this.visible = false
          this.staffAttendanceDetailInfo.details = []
        }
      }
    }
    </script>
    
    <style lang="scss" scoped>
    </style>