|
@@ -9,7 +9,7 @@
|
|
|
<el-col :span="24" class="main">
|
|
|
<el-col :span="24" class="leaveBtn">
|
|
|
<!-- <van-button round type="info" icon="smile" @click="onClickRight()">考勤打卡</van-button> -->
|
|
|
- <punchBtn :show="show" :time="time" :stuInfo="stuInfo" @openClick="openClick" @onSubmit="onSubmit"></punchBtn>
|
|
|
+ <punchBtn :show="show" :form="form" @openClick="openClick" @onSubmit="onSubmit"></punchBtn>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="leaveList">
|
|
|
<checkList :checkWorkList="checkWorkList"></checkList>
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
punchBtn, //考勤打卡
|
|
|
},
|
|
|
data: () => ({
|
|
|
- time: '',
|
|
|
+ info: {},
|
|
|
checkWorkList: [
|
|
|
{
|
|
|
studentid: '流域',
|
|
@@ -59,18 +59,18 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
show: false,
|
|
|
- stuInfo: {},
|
|
|
+ form: {
|
|
|
+ attend: [],
|
|
|
+ },
|
|
|
title: '',
|
|
|
isleftarrow: '',
|
|
|
transitionName: 'fade',
|
|
|
navShow: true,
|
|
|
}),
|
|
|
-
|
|
|
created() {
|
|
|
this.searchInfo();
|
|
|
this.getDate();
|
|
|
},
|
|
|
-
|
|
|
computed: {},
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|
|
@@ -83,32 +83,38 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapAttendance(['fetch']),
|
|
|
+ ...mapAttendance(['fetch', 'create']),
|
|
|
searchInfo() {
|
|
|
let site = JSON.parse(sessionStorage.getItem('site'));
|
|
|
- this.$set(this, `stuInfo`, site);
|
|
|
+ this.$set(this.form, `batchid`, site.batchid);
|
|
|
+ this.$set(this.form, `classid`, site.classid);
|
|
|
+ },
|
|
|
+ openClick() {
|
|
|
+ this.show = true;
|
|
|
+ },
|
|
|
+ async onSubmit(form) {
|
|
|
+ this.form.termid = '123456';
|
|
|
+ let data = this.form;
|
|
|
+ console.log(this.form.attend);
|
|
|
+ // let res = await this.create(data);
|
|
|
+ this.show = false;
|
|
|
},
|
|
|
-
|
|
|
getDate() {
|
|
|
this.timer = setInterval(() => {
|
|
|
var adate = new Date();
|
|
|
+ let year = adate.getFullYear();
|
|
|
+ let mouth = adate.getMonth() + 1;
|
|
|
+ let date = adate.getDate();
|
|
|
+ let newsdate = year + '-' + mouth + '-' + date;
|
|
|
this.value = adate.getHours() + ':' + adate.getMinutes() + adate.getSeconds();
|
|
|
let str = adate.getHours() > 9 ? adate.getHours() : '0' + adate.getHours();
|
|
|
let tt = adate.getMinutes() > 9 ? adate.getMinutes() : '0' + adate.getMinutes();
|
|
|
let ss = adate.getSeconds() > 9 ? adate.getSeconds() : '0' + adate.getSeconds();
|
|
|
let tim = str + ':' + tt + ':' + ss;
|
|
|
- console.log(this.time);
|
|
|
- this.$set(this, `time`, tim);
|
|
|
+ this.$set(this.form.attend, `time`, tim);
|
|
|
+ this.$set(this.form.attend, `date`, newsdate);
|
|
|
}, 1000);
|
|
|
},
|
|
|
-
|
|
|
- openClick() {
|
|
|
- this.show = true;
|
|
|
- },
|
|
|
- onSubmit(form) {
|
|
|
- console.log(form);
|
|
|
- this.show = false;
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|