乡村相册
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
<div class="info">
|
||||
<div class="info-tab">
|
||||
<div class="left">
|
||||
<span @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">全部 10</span>
|
||||
<span @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">已出勤 10</span>
|
||||
<span @click="currIndex = 2" :class="[currIndex === 2 ? 'active' : '']">未出勤 10</span>
|
||||
<span @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">全部 {{ attendanceCount.all || 0 }}</span>
|
||||
<span @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">已出勤 {{ attendanceCount.hasIn || 0 }}</span>
|
||||
<span @click="currIndex = 2" :class="[currIndex === 2 ? 'active' : '']">未出勤 {{ attendanceCount.hasOut || 0 }}</span>
|
||||
</div>
|
||||
<div class="right" @click="linkTo('./AttendanceSetting')">考勤设置</div>
|
||||
</div>
|
||||
@@ -55,10 +55,10 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
photoTotal: {},
|
||||
date: '',
|
||||
currIndex: 0,
|
||||
list: []
|
||||
list: [],
|
||||
attendanceCount: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
created () {
|
||||
this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -98,13 +99,21 @@
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
})
|
||||
},
|
||||
|
||||
getTotal () {
|
||||
this.$http.post(`/api/appattendancerecord/attendanceCount?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.attendanceCount = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${this.date}`).then(res => {
|
||||
this.$http.post(`/api/appattendancerecord/alldetail?queryTime=${this.date.replace(/年|月/g, '-')}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user