This commit is contained in:
yanran200730
2022-05-27 09:51:40 +08:00
parent acd4d63500
commit 267a84c7f7
2 changed files with 5 additions and 2 deletions

View File

@@ -24,7 +24,7 @@
<span @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">已出勤 {{ attendanceCount.hasIn || 0 }}</span> <span @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">已出勤 {{ attendanceCount.hasIn || 0 }}</span>
<span @click="changeTab(2)" :class="[currIndex === 2 ? 'active' : '']">未出勤 {{ attendanceCount.hasOut || 0 }}</span> <span @click="changeTab(2)" :class="[currIndex === 2 ? 'active' : '']">未出勤 {{ attendanceCount.hasOut || 0 }}</span>
</div> </div>
<div class="right" @click="linkTo('./AttendanceSetting')">考勤设置</div> <div class="right" @click="linkTo('./AttendanceSetting')" v-if="isAdmin">考勤设置</div>
</div> </div>
<div class="info-table"> <div class="info-table">
<div class="table-header"> <div class="table-header">
@@ -61,7 +61,8 @@
attendanceCount: {}, attendanceCount: {},
all: '1', all: '1',
hasIn: '', hasIn: '',
hasOut: '' hasOut: '',
isAdmin: false
} }
}, },
@@ -84,6 +85,7 @@
}, },
created () { created () {
this.isAdmin = !!this.$store.state.user.adminAuthType
this.date = this.$dayjs(new Date).format('YYYY年MM月DD') this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
this.getList() this.getList()
this.getTotal() this.getTotal()

View File

@@ -155,6 +155,7 @@
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['compressed'], sizeType: ['compressed'],
sourceType: ['camera'],
success: res => { success: res => {
let formData = new FormData() let formData = new FormData()
formData.append('file', res.tempFiles[0]) formData.append('file', res.tempFiles[0])