|  | @@ -1,6 +1,6 @@
 | 
											
												
													
														|  |  <template>
 |  |  <template>
 | 
											
												
													
														|  |    <div class="all">
 |  |    <div class="all">
 | 
											
												
													
														|  | -    <workpoints :initia_arr="initia_arr" :initia_head="initia_head" :obj="obj"  @initia="initia"/>
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <workpoints :initia_arr="initia_arr" :initia_head="initia_head" :obj="obj" @initia="initia" />
 | 
											
												
													
														|  |    </div>
 |  |    </div>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -14,26 +14,58 @@ export default {
 | 
											
												
													
														|  |          initial_suertext: "以下考勤奖扣分,均为B分",
 |  |          initial_suertext: "以下考勤奖扣分,均为B分",
 | 
											
												
													
														|  |        },
 |  |        },
 | 
											
												
													
														|  |        initia_arr: [
 |  |        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: "" },
 |  |          // { 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:"",
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | 
 |  | +      obj: {
 | 
											
												
													
														|  | 
 |  | +        month_full_ad: "", //>=0
 | 
											
												
													
														|  | 
 |  | +        normal: "", //>=0
 | 
											
												
													
														|  | 
 |  | +        no_sign: "", //<=0
 | 
											
												
													
														|  | 
 |  | +        absent: "", //<=0
 | 
											
												
													
														|  | 
 |  | +        on_duty_late: "", //<=0
 | 
											
												
													
														|  | 
 |  | +        off_duty_early: "", //<=0
 | 
											
												
													
														|  | 
 |  | +        ot_per_hour: "", //>=0
 | 
											
												
													
														|  | 
 |  | +        leave_per_hour: "", //<=0
 | 
											
												
													
														|  | 
 |  | +      },
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    components: {
 |  |    components: {
 | 
											
										
											
												
													
														|  | @@ -42,54 +74,22 @@ export default {
 | 
											
												
													
														|  |    created() {},
 |  |    created() {},
 | 
											
												
													
														|  |    mounted() {},
 |  |    mounted() {},
 | 
											
												
													
														|  |    methods: {
 |  |    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)
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -      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)
 |  | 
 | 
											
												
													
														|  | -      // })
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -      
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -      // 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)
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -      // console.log(ok)
 |  | 
 | 
											
												
													
														|  | 
 |  | +    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;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -      // this.month_full_ad = ok[0]
 |  | 
 | 
											
												
													
														|  | -		 
 |  | 
 | 
											
												
													
														|  | -	  }
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.$axios.post("api/ad/update", this.obj).then((res) => {
 | 
											
												
													
														|  | 
 |  | +        console.log(res);
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 |