|
@@ -1,25 +1,98 @@
|
|
|
<template>
|
|
|
- <div>考勤</div>
|
|
|
+ <div class="all">
|
|
|
+ <workpoints :initia_arr="initia_arr" :initia_head="initia_head" :obj="obj" @initia="initia"/>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-</script>
|
|
|
+import workpoints from "@/components/publics/workpoints";
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ initia_head: {
|
|
|
+ initial_suername: "考勤积分",
|
|
|
+ initial_suertext: "以下考勤奖扣分,均为B分",
|
|
|
+ },
|
|
|
+ initia_arr: [
|
|
|
+ { initialName: "月度全勤,每月加分", initia_mark: false, initia_input: "" },
|
|
|
+ { initialName: "正常打卡,每次加分", initia_mark: false, initia_input: "" },
|
|
|
+ { initialName: "上下班缺卡,每次扣分", initia_mark: false, initia_input: "" },
|
|
|
+ { initialName: "上班迟到,每次扣分", initia_mark: false, initia_input: "" },
|
|
|
+ // { initialName: "严重迟到,每次扣分", initia_mark: false, initia_input: "" },
|
|
|
+ { initialName: "下班早退,每次扣分", initia_mark: false, initia_input: "" },
|
|
|
+ { initialName: "矿工缺席,每次扣分", initia_mark: false, initia_input: "" },
|
|
|
+ { initialName: "加班,每小时加分", initia_mark: false, initia_input: "" },
|
|
|
+ { initialName: "请假,每小时扣分", initia_mark: false, initia_input: "" },
|
|
|
+ ],
|
|
|
+ obj:{
|
|
|
+ month_full_ad:"",
|
|
|
+ normal:"",
|
|
|
+ no_sign:"",
|
|
|
+ absent:"",
|
|
|
+ on_duty_late:"",
|
|
|
+ off_duty_early:"",
|
|
|
+ ot_per_hour:"",
|
|
|
+ leave_per_hour:"",
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ workpoints,
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ initia(ok){
|
|
|
+ let objs = this.obj
|
|
|
+ objs.month_full_ad = ok[0].sj
|
|
|
+ objs.normal = ok[1].sj
|
|
|
+ objs.no_sign = ok[2].sj
|
|
|
+ objs.absent = ok[5].sj
|
|
|
+ objs.on_duty_late = ok[3].sj
|
|
|
+ objs.off_duty_early = ok[4].sj
|
|
|
+ objs.ot_per_hour = ok[6].sj
|
|
|
+ objs.leave_per_hour = ok[7].sj
|
|
|
+ // console.log(objs)
|
|
|
|
|
|
-<style>
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
+ this.$axios.post('api/ad/update', this.obj).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ // let objToStr = JSON.stringify(this.obj)
|
|
|
+ // console.log(objToStr)
|
|
|
+ // this.$axios({
|
|
|
+ // url: 'api/ad/update',
|
|
|
+ // method:'post',
|
|
|
+ // data:this.obj,
|
|
|
+ // headers: {"Content-Type": "application/x-www-form-urlencoded","J-TOKEN":" eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC1kaW5nLmcxMDcuY29tXC9hcGlcL2RpbmdcL2xvZ2luIiwiaWF0IjoxNTk3NDc5OTgxLCJleHAiOjE1OTgwNzk5ODEsIm5iZiI6MTU5NzQ3OTk4MSwianRpIjoiVnpYeUQwRW82dU1VWFJNVSIsInN1YiI6MiwicHJ2IjoiY2E2NDg5ZDUwZjI0MDdhNjc4MzBlODA5MGQwMTQ4ODM1Njg1OTYyYiIsInJvbGUiOiJlbXBsb3llZSJ9.mfpDxWCOwNYevccHWwYu2nHc6FRjyz-2RjCbEflMXiY" },
|
|
|
+
|
|
|
+ // }).then((ok)=>{
|
|
|
+ // console.log(ok)
|
|
|
+ // })
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
+ // this.$axios.post('api/ad/update', {
|
|
|
+ // month_full_ad : ok[0].sj,
|
|
|
+ // normal : ok[1].sj,
|
|
|
+ // no_sign : ok[2].sj,
|
|
|
+ // absent : ok[3].sj,
|
|
|
+ // on_duty_late : ok[4].sj,
|
|
|
+ // off_duty_early : ok[5].sj,
|
|
|
+ // ot_per_hour : ok[6].sj,
|
|
|
+ // leave_per_hour : ok[7].sj,
|
|
|
+ // }).then(res => {
|
|
|
+ // console.log(res)
|
|
|
+ // });
|
|
|
+ // console.log(ok[0].sj)
|
|
|
|
|
|
- },
|
|
|
- mounted() {
|
|
|
+ // console.log(ok)
|
|
|
|
|
|
- },
|
|
|
- methods:{
|
|
|
-
|
|
|
- }
|
|
|
- };
|
|
|
+ // this.month_full_ad = ok[0]
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
</style>
|