|
@@ -8,7 +8,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
<el-col :span="24" class="leaveBtn">
|
|
|
- <van-button round type="info" icon="smile" @click="onClickRight()">考勤打卡</van-button>
|
|
|
+ <!-- <van-button round type="info" icon="smile" @click="onClickRight()">考勤打卡</van-button> -->
|
|
|
+ <punchBtn :show="show" :stuInfo="stuInfo" @openClick="openClick" @onSubmit="onSubmit"></punchBtn>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="leaveList">
|
|
|
<checkList :checkWorkList="checkWorkList"></checkList>
|
|
@@ -22,12 +23,16 @@
|
|
|
<script>
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
import checkList from '@/layout/user/checkList.vue';
|
|
|
+import punchBtn from '@/layout/user/punchBtn.vue';
|
|
|
+import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: mapAttendance } = createNamespacedHelpers('attendance');
|
|
|
export default {
|
|
|
name: 'checkWork',
|
|
|
props: {},
|
|
|
components: {
|
|
|
NavBar, //头部导航
|
|
|
checkList, //考勤列表
|
|
|
+ punchBtn, //考勤打卡
|
|
|
},
|
|
|
data: () => ({
|
|
|
checkWorkList: [
|
|
@@ -52,12 +57,16 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
+ show: false,
|
|
|
+ stuInfo: {},
|
|
|
title: '',
|
|
|
isleftarrow: '',
|
|
|
transitionName: 'fade',
|
|
|
navShow: true,
|
|
|
}),
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
computed: {},
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|
|
@@ -70,8 +79,17 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- onClickRight() {
|
|
|
- console.log('考勤打卡');
|
|
|
+ ...mapAttendance(['fetch']),
|
|
|
+ searchInfo() {
|
|
|
+ let site = JSON.parse(sessionStorage.getItem('site'));
|
|
|
+ this.$set(this, `stuInfo`, site);
|
|
|
+ },
|
|
|
+ openClick() {
|
|
|
+ this.show = true;
|
|
|
+ },
|
|
|
+ onSubmit(form) {
|
|
|
+ console.log(form);
|
|
|
+ this.show = false;
|
|
|
},
|
|
|
},
|
|
|
};
|