| | |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | <div |
| | | class="bodyTopButtonGroup" |
| | | style="margin-top: 0;height: 60px;display:flex;align-items: center;justify-content: center" |
| | | > |
| | | <el-button |
| | | v-waves |
| | | :disabled="isDisabled" |
| | | type="primary" |
| | | style="width: 150px;height: 40px;" |
| | | icon="el-icon-alarm-clock" |
| | | @click="clockIn" |
| | | >考勤打卡</el-button> |
| | | </div> |
| | | <!-- <div--> |
| | | <!-- class="bodyTopButtonGroup"--> |
| | | <!-- style="margin-top: 0;height: 60px;display:flex;align-items: center;justify-content: center"--> |
| | | <!-- >--> |
| | | <!-- <el-button--> |
| | | <!-- v-waves--> |
| | | <!-- :disabled="isDisabled"--> |
| | | <!-- type="primary"--> |
| | | <!-- style="width: 150px;height: 40px;"--> |
| | | <!-- icon="el-icon-alarm-clock"--> |
| | | <!-- @click="clockIn"--> |
| | | <!-- >考勤打卡</el-button>--> |
| | | <!-- </div>--> |
| | | |
| | | </div> |
| | | |
| | |
| | | import waves from '@/directive/waves' |
| | | import { AttendanceSave, AttendanceSearch } from '@/api/attendanceModule' |
| | | import $ from 'jquery' |
| | | import { handleDatetime2 } from '@/utils/global' |
| | | |
| | | export default { |
| | | name: 'AttendanceClockIn', |
| | |
| | | this.isDisabled = true |
| | | } else { |
| | | this.form2 = res.userdate[0] |
| | | this.tableData = res.checkcrd |
| | | this.isDisabled = false |
| | | await this.clockIn() |
| | | |
| | | // this.tableData = res.checkcrd |
| | | // this.isDisabled = false |
| | | } |
| | | }, |
| | | async clockIn() { |
| | |
| | | } |
| | | const res = await AttendanceSave(data) |
| | | if (res.code === '200') { |
| | | await this.enterNative(this.form2.usercode) |
| | | // await this.enterNative(this.form2.usercode) |
| | | this.$message.success('打卡成功!') |
| | | |
| | | const { data: res2 } = await AttendanceSearch({ usercode: this.form2.usercode }) |
| | | this.tableData = res2.checkcrd.sort((a, b) => new Date(b.createdate).getTime() - new Date(a.createdate).getTime()) |
| | | this.isDisabled = false |
| | | } |
| | | }, |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 250 |
| | | this.tableHeight = this.mainHeight - 180 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | } |