(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3da416c4"],{"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(),s=e-u,o=20,i=0;t="undefined"===typeof t?500:t;var c=function e(){i+=o;var r=Math.easeInOutQuad(i,u,s,t);n(r),i1&&void 0!==arguments[1]?arguments[1]:["value","label"],a=Object(n["a"])(t,2),r=a[0],u=a[1],s={};if(e&&e.length){var o,i=Object(l["a"])(e);try{for(i.s();!(o=i.n()).done;){var c=o.value;s[c[r]]=c[u]}}catch(d){i.e(d)}finally{i.f()}}return s}},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 老师考勤列表 "),a("filter-search",{attrs:{searchKey:"teacherAttendanceId"},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",[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: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:"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",[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",[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",[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",[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",[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.courseTime,callback:function(t){e.courseTime="string"===typeof t?t.trim():t},expression:"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'"}],staticStyle:{"background-color":"#14928a",border:"1px solid #14928a"},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[a("div",[e._v("\n "+e._s(e._f("attendanceType")(t.row.signInStatus))+"\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(t.row.signOutTime)+"\n ")])]}}])}),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._f("attendanceOutType")(t.row.signOutStatus))+"\n ")])]}}])}),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["PART_TIME"===t.row.jobNature&&2==t.row.complaintsStatus?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"teacherAttendance/repealComplaints",expression:"'teacherAttendance/repealComplaints'"}],attrs:{type:"text"},on:{click:function(a){return e.unappeal(t.row)}}},[e._v("撤销申诉")]):e._e(),e._v(" "),"PART_TIME"!==t.row.jobNature||null!=t.row.complaintsStatus&&3!=t.row.complaintsStatus?e._e():a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"teacherAttendance/addComplaints",expression:"'teacherAttendance/addComplaints'"}],attrs:{type:"text"},on:{click:function(a){return e.appeal(t.row)}}},[e._v("申诉")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"teacherAttendance/update",expression:"'teacherAttendance/update'"}],attrs:{type:"text"},on:{click:function(a){return e.hand(t.row)}}},[e._v("处理意见")])]}}])})],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("96cf"),a("1da1")),u=(a("386d"),a("5530")),s=(a("ac6a"),a("456d"),a("bc3a")),o=a.n(s),i=a("5f87"),c=a("333d"),d=a("3908"),p=a("4328"),v=a.n(p),b=a("e3eb"),m=a.n(b),f=(a("1cc7"),a("b775")),h="/api-web";function _(e){return Object(f["a"])({url:h+"/teacherAttendance/queryTeacherAttendances",method:"post",data:v.a.stringify(e)})}var g=a("92e3"),y=a("829b"),S=function(e){return Object(y["a"])({url:"/api-web/teacherAttendance/repealComplaints",method:"post",data:e,requestType:"form"})},E=function(e){return Object(y["a"])({url:"/api-web/teacherAttendance/addComplaints",method:"post",data:e,requestType:"form"})},T=function(e){return Object(y["a"])({url:"/api-web/teacherAttendance/update",method:"post",data:e,requestType:"form"})},I=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"申述图片",prop:"url"}},[a("div",{staticStyle:{width:"100%"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{action:"/api-web/uploadFile",headers:e.headers,"on-success":e.handleSuccess,accept:".jpg, .jpeg, .png","show-file-list":!1}},[e.form.url?a("img",{staticClass:"avatar",attrs:{src:e.form.url}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)]),e._v(" "),a("el-form-item",{attrs:{label:"申述内容",prop:"content",rules:[{required:!0,message:"请输入申诉内容"}]}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入申诉内容"},model:{value:e.form.content,callback:function(t){e.$set(e.form,"content",t)},expression:"form.content"}})],1)],1),e._v(" "),a("div",{staticStyle:{"text-align":"right","margin-top":"20px"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return e.$emit("close")}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确认")])],1)],1)},A=[],x={props:["detail"],data:function(){return{headers:{Authorization:Object(i["a"])()},form:{content:"",url:""}}},methods:{handleSuccess:function(e){this.$set(this.form,"url",e.data.url)},submit:function(){var e=this;this.$refs.form.validate(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}return t.prev=1,t.next=4,E(Object(u["a"])(Object(u["a"])({},e.form),{},{courseScheduleId:e.detail.courseScheduleId,userId:e.detail.teacherId}));case 4:e.$message.success("提交成功"),e.$emit("submited"),e.$emit("close"),t.next=11;break;case 9:t.prev=9,t.t0=t["catch"](1);case 11:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e){return t.apply(this,arguments)}}())}}},O=x,w=(a("0f4d"),a("2877")),N=Object(w["a"])(O,I,A,!1,null,null,null),R=N.exports,C=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-form",{ref:"quitForm",attrs:{model:e.quitForm,rules:e.quitRules}},[a("el-form-item",{attrs:{prop:"disposeContent"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请填写处理意见"},model:{value:e.quitForm.disposeContent,callback:function(t){e.$set(e.quitForm,"disposeContent","string"===typeof t?t.trim():t)},expression:"quitForm.disposeContent"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",staticStyle:{"text-align":"right"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return e.$emit("close")}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1)},L=[],k={props:["detail"],data:function(){return{quitForm:{reason:null},quitRules:{reason:[{required:!0,message:"请填写退团退费原因"}]}}},methods:{submit:function(){var e=this;this.$refs.quitForm.validate(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}return t.prev=1,t.next=4,T(Object(u["a"])({id:e.detail.teacherAttendanceId},e.quitForm));case 4:e.$emit("close"),e.$emit("submited"),e.$message.success("提交成功"),t.next=11;break;case 9:t.prev=9,t.t0=t["catch"](1);case 11:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e){return t.apply(this,arguments)}}())}}},F=k,j=Object(w["a"])(F,C,L,!1,null,null,null),$=j.exports,P=new Date;P=P.getFullYear()+"-"+(P.getMonth()+1)+"-"+P.getDate();var M={components:{pagination:c["a"],appeal:R,hand:$},data:function(){return{searchForm:{search:null,organId:null,signInStatus:null,signOutStatus:null,jobNature:null},detail:null,appealVisible:!1,handVisible:!1,jobNature:g["m"],courseTime:[],courseType:g["j"],tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},computed:{isEmptyQuery:function(){return!Object.keys(m()(Object(u["a"])(Object(u["a"])({},this.searchForm),{},{courseTime:this.courseTime}))).length&&!this.teacherAttendanceId},teacherAttendanceId:function(){return this.$route.query.teacherAttendanceId}},created:function(){},mounted:function(){this.$store.dispatch("setBranchs"),this.teacherAttendanceId||(this.courseTime=[P,P]),this.init()},activated:function(){this.init()},methods:{init:function(){this.getList()},getSearchValues:function(){var e={page:this.rules.page,rows:this.rules.limit,teacherAttendanceId:this.teacherAttendanceId};return Object.assign(e,this.searchForm),this.courseTime&&this.courseTime.length>0&&(e.courseStartDate=this.courseTime[0],e.courseEndDate=this.courseTime[1]),e},reloadSearch:function(){this.isEmptyQuery&&(this.courseTime=[P,P]),this.getList()},getList:function(){var e=this,t=this.getSearchValues();this.isEmptyQuery?this.$message.error("请至少选择一个条件"):_(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.searchForm={search:null,organIdList:null,signInStatus:null,signOutStatus:null,jobNature:null},this.courseTime=[P,P],this.$refs["searchForm"].resetFields(),this.search()},hand:function(e){this.handVisible=!0,this.detail=e},appeal:function(e){this.appealVisible=!0,this.detail=e},unappeal:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.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,S({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(i["a"])()},params:t,url:a,responseType:"blob"};this.$confirm("您确定导出考勤列表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){d["a"].startLoading(),o()(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);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()}})),d["a"].endLoading()})).catch((function(t){e.$message.error("导出数据失败,请联系管理员"),d["a"].endLoading()}))})).catch((function(){}))}}}},U=M,D=Object(w["a"])(U,l,n,!1,null,"48b38100",null);t["default"]=D.exports}}]);