(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5b5a1f0c"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),Math.easeInOutQuad=function(e,t,a,l){return e/=l/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var l=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function n(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function u(e,t,a){var u=r(),o=e-u,s=20,i=0;t="undefined"===typeof t?500:t;var c=function e(){i+=s;var r=Math.easeInOutQuad(i,u,o,t);n(r),i1&&void 0!==arguments[1]?arguments[1]:["value","label"],a=Object(n["a"])(t,2),r=a[0],u=a[1],o={};if(e&&e.length){var s,i=Object(l["a"])(e);try{for(i.s();!(s=i.n()).done;){var c=s.value;o[c[r]]=c[u]}}catch(d){i.e(d)}finally{i.f()}}return o}},c171:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[a("h2",[a("div",{staticClass:"squrt"}),e._v("\n 老师考勤管理\n "),a("filter-search",{attrs:{keys:["attendanceStatus","visitFlag"],moreKeys:["start","end","organId"]},on:{reload:e.reloadSearch}})],1),e._v(" "),a("div",{staticClass:"m-core"},[a("save-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",{attrs:{prop:"search"}},[a("el-input",{attrs:{clearable:"",placeholder:"课程名称/编号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"teacherId"}},[a("remote-search",{attrs:{commit:"setTeachers",isForzenWithQueryCondition:!0},model:{value:e.searchForm.teacherId,callback:function(t){e.$set(e.searchForm,"teacherId",t)},expression:"searchForm.teacherId"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"organId"}},[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId","string"===typeof t?t.trim():t)},expression:"searchForm.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"courseScheduleType"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择课程类型"},model:{value:e.searchForm.courseScheduleType,callback:function(t){e.$set(e.searchForm,"courseScheduleType","string"===typeof t?t.trim():t)},expression:"searchForm.courseScheduleType"}},e._l(e.courseType,(function(e,t){return a("el-option",{key:t,attrs:{value:e.value,label:e.label}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"jobNature"}},[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:"工作类型"},model:{value:e.searchForm.jobNature,callback:function(t){e.$set(e.searchForm,"jobNature","string"===typeof t?t.trim():t)},expression:"searchForm.jobNature"}},e._l(e.jobNature,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"signInStatus"}},[a("el-select",{attrs:{clearable:"",placeholder:"签到状态"},model:{value:e.searchForm.signInStatus,callback:function(t){e.$set(e.searchForm,"signInStatus","string"===typeof t?t.trim():t)},expression:"searchForm.signInStatus"}},[a("el-option",{attrs:{value:1,label:"正常签到"}}),e._v(" "),a("el-option",{attrs:{value:0,label:"异常签到"}}),e._v(" "),a("el-option",{attrs:{value:3,label:"未签到"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"signOutStatus"}},[a("el-select",{attrs:{clearable:"",placeholder:"签退状态"},model:{value:e.searchForm.signOutStatus,callback:function(t){e.$set(e.searchForm,"signOutStatus","string"===typeof t?t.trim():t)},expression:"searchForm.signOutStatus"}},[a("el-option",{attrs:{value:1,label:"正常签退"}}),e._v(" "),a("el-option",{attrs:{value:0,label:"异常签退"}}),e._v(" "),a("el-option",{attrs:{value:3,label:"未签退"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"courseTime"}},[a("el-date-picker",{staticStyle:{width:"410px"},attrs:{type:"daterange","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"考勤开始日期","picker-options":{firstDayOfWeek:1},"end-placeholder":"考勤结束日期"},model:{value:e.searchForm.courseTime,callback:function(t){e.$set(e.searchForm,"courseTime","string"===typeof t?t.trim():t)},expression:"searchForm.courseTime"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")])],1),e._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/queryTeacherAttendances",expression:"'export/queryTeacherAttendances'"}],attrs:{type:"primary"},on:{click:e.onExport}},[e._v("导出")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[a("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"teacherName",label:"老师名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("copy-text",[e._v(e._s(t.row.teacherName))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"courseScheduleId",label:"课程编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("copy-text",[e._v(e._s(t.row.courseScheduleId))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"courseScheduleName",label:"课程名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("copy-text",[e._v(e._s(t.row.courseScheduleName))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"classDate",label:"上课日期"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"startClassTime",label:"上课时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.startClassTime+"-"+t.row.endClassTime)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"startClassTime",label:"课程类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("coursesType")(t.row.courseScheduleType))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"工作类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("jobNature")(t.row.jobNature)))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"签到时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.signInTime)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"签到状态"},scopedSlots:e._u([{key:"default",fn:function(t){return["NOT_START"!=t.row.courseScheduleStatus?a("div",[e._v("\n "+e._s(e._f("attendanceType")(t.row.signInStatus))+"\n ")]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"startClassTime",label:"签退时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.signOutTime)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"签退状态"},scopedSlots:e._u([{key:"default",fn:function(t){return["NOT_START"!=t.row.courseScheduleStatus?a("div",[e._v("\n "+e._s(e._f("attendanceOutType")(t.row.signOutStatus))+"\n ")]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"申诉状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e.$constant.complaintsStatus[t.row.complaintsStatus])+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"remark",label:"备注"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"220px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("auth",{attrs:{auths:"teacherAttendance/repealComplaints"}},["FULL_TIME"!=t.row.jobNature&&2==t.row.complaintsStatus?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.unappeal(t.row)}}},[e._v("撤销申诉")]):e._e()],1),e._v(" "),a("auth",{attrs:{auths:"teacherAttendance/addComplaints"}},[null==t.row.complaintsStatus||3==t.row.complaintsStatus?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.appeal(t.row)}}},[e._v("申诉")]):e._e()],1),e._v(" "),a("auth",{attrs:{auths:"teacherAttendance/update"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.hand(t.row)}}},[e._v("处理意见")])],1)]}}])})],1),e._v(" "),a("el-dialog",{attrs:{title:"申诉",width:"400px",visible:e.appealVisible},on:{"update:visible":function(t){e.appealVisible=t}}},[e.appealVisible&&e.detail?a("appeal",{attrs:{detail:e.detail},on:{close:function(t){e.appealVisible=!1},submited:e.getList}}):e._e()],1),e._v(" "),a("el-dialog",{attrs:{title:"处理意见",width:"400px",visible:e.handVisible},on:{"update:visible":function(t){e.handVisible=t}}},[e.handVisible&&e.detail?a("hand",{attrs:{detail:e.detail},on:{close:function(t){e.handVisible=!1},submited:e.getList}}):e._e()],1),e._v(" "),a("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1)],1)])},n=[],r=a("c7eb"),u=(a("96cf"),a("1da1")),o=(a("386d"),a("15fd")),s=a("5530"),i=(a("ac6a"),a("456d"),a("bc3a")),c=a.n(i),d=a("5f87"),b=a("333d"),v=a("3908"),p=(a("4328"),a("e3eb")),f=a.n(p),m=(a("1cc7"),a("111c")),h=a("92e3"),_=a("d7a3"),T=a("447e"),E=a("6ecc"),y=a("ed08"),S=["courseTime"],I=new Date;I=I.getFullYear()+"-"+(I.getMonth()+1)+"-"+I.getDate();var g={components:{pagination:b["a"],appeal:T["a"],hand:E["a"]},data:function(){return{searchForm:{search:null,organId:null,signInStatus:null,signOutStatus:null,jobNature:null,courseTime:[]},detail:null,appealVisible:!1,handVisible:!1,jobNature:h["E"],courseType:h["v"],tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},computed:{isEmptyQuery:function(){return!Object.keys(f()(Object(s["a"])({},this.searchForm))).length&&!this.teacherAttendanceId},teacherAttendanceId:function(){return this.$route.query.teacherAttendanceId}},created:function(){this.searchForm.courseTime.length<=0&&(this.searchForm.courseTime=[I,I])},mounted:function(){var e=this.$route.query;this.$store.dispatch("setBranchs"),e.organId&&(this.searchForm.organId=e.organId),(e.start||e.end)&&(this.searchForm.courseTime=[e.start,e.end]),this.init()},methods:{init:function(){this.getList()},getSearchValues:function(){var e=this.searchForm,t=e.courseTime,a=Object(o["a"])(e,S),l=Object(s["a"])(Object(s["a"])({},a),{},{page:this.rules.page,rows:this.rules.limit,attendanceStatus:this.$route.query.attendanceStatus,visitFlag:this.$route.query.visitFlag},Object(y["d"])(t,["courseStartDate","courseEndDate"]));return l},reloadSearch:function(){this.isEmptyQuery&&(this.courseTime=[I,I]),notSetTime||(this.searchForm.timer=[I,I]),this.rules.page=1,this.getList()},getList:function(){var e=this,t=this.getSearchValues();this.isEmptyQuery?this.$message.error("请至少选择一个条件"):Object(m["a"])(t).then((function(t){200==t.code&&(e.tableList=t.data.rows,e.rules.total=t.data.total)}))},search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.$refs["searchForm"].resetFields(),this.searchForm.courseTime=[I,I],this.search()},hand:function(e){this.detail=e,this.handVisible=!0},appeal:function(e){this.appealVisible=!0,this.detail=e},unappeal:function(){var e=Object(u["a"])(Object(r["a"])().mark((function e(t){return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$confirm("是否确认撤销申诉?","提示",{type:"warning"});case 3:return e.next=5,Object(_["b"])({courseScheduleId:t.courseScheduleId,userId:t.teacherId});case 5:this.$message.success("撤销成功"),this.getList(),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(t){return e.apply(this,arguments)}return t}(),onExport:function(){var e=this,t=this.getSearchValues();if(this.isEmptyQuery)this.$message.error("请至少选择一个条件");else{var a="/api-web/export/queryTeacherAttendances",l={method:"POST",headers:{Authorization:Object(d["b"])(),tenantId:Object(d["a"])()},params:t,url:a,responseType:"blob"};this.$confirm("您确定导出考勤列表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){v["a"].startLoading(),c()(l).then((function(t){var a=new Blob([t.data],{type:"application/vnd.ms-excel;charset=utf-8"}),l=new Response(a).text();l.then((function(t){if(-1!=t.indexOf("code")){var l=JSON.parse(t);if(403==l.code)return e.$message.error("登录过期,请重新登录!"),void setTimeout((function(){e.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);e.$message.error(l.msg)}else{var n=URL.createObjectURL(a),r=document.createElement("a"),u="考勤列表"+(new Date).getTime()+".xls";r.href=n,r.setAttribute("download",u),document.body.appendChild(r),r.click()}})),v["a"].endLoading()})).catch((function(t){e.$message.error("导出数据失败,请联系管理员"),v["a"].endLoading()}))})).catch((function(){}))}}}},O=g,A=a("2877"),N=Object(A["a"])(O,l,n,!1,null,"2a76e768",null);t["default"]=N.exports},d7a3:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return r})),a.d(t,"c",(function(){return u}));var l=a("829b"),n=function(e){return Object(l["a"])({url:"/api-web/teacherAttendance/repealComplaints",method:"post",data:e,requestType:"form"})},r=function(e){return Object(l["a"])({url:"/api-web/teacherAttendance/addComplaints",method:"post",data:e,requestType:"form"})},u=function(e){return Object(l["a"])({url:"/api-web/teacherAttendance/update",method:"post",data:e,requestType:"form"})}}}]);