(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cf3b2968"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function n(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(e,t,r){var l=n(),i=e-l,s=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=s;var n=Math.easeInOutQuad(c,l,i,t);o(n),c0&&(e.roleList=[],r.rows.forEach((function(t){e.roleList.push({label:t.roleName,value:t.id})})))})),Object(s["d"])({delFlag:0,rows:9999}).then((function(t){200==t.code&&t.data&&t.data.rows&&(e.branchList=[],t.data.rows.forEach((function(t){e.branchList.push({label:t.name,value:t.id})})))}))},roleOperation:function(e,t){this.formActionTitle=e,this.roleStatus=!0,"update"==e&&(this.form={id:t.id,realName:t.realName,gender:t.gender,phone:Number(t.phone),roleIds:t.roleIds,organIdLists:t.organIdList?t.organIdList:[],jobNature:t.jobNature,entryDate:t.entryDate,contactAddress:t.contactAddress,postalCode:t.postalCode})},onFormClose:function(e){this.form={realName:null,gender:null,phone:null,roleName:null,organIdLists:[],jobNature:null,entryDate:null},this.$refs[e].resetFields()},formatLockFlag:function(e){var t=["正常","冻结"];return e.demissionDate?"离职":t[e.lockFlag]},checkStatus:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){var r,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(i["q"])({employeeId:t.id}).then(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(o){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(200!==o.code){e.next=13;break}if(!o.data.hasCourseSchedule){e.next=6;break}a.$message.error("请先交接指导老师课程"),r=!1,e.next=13;break;case 6:if(!o.data.hasCourseGroupRelation){e.next=12;break}return n=t.id,e.next=10,Object(s["n"])({userId:n}).then((function(e){200===e.code&&(a.educationList=e.data,a.educationViseble=!0,r=!1)}));case 10:e.next=13;break;case 12:r=!0;case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:return e.abrupt("return",r);case 3:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),onStaffOperation:function(e,t){var r=this,a="RESET_PASSWORD"==e;this.$confirm("您确定".concat(a?"重置密码":"修改员工状态","?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function o(){var n;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:if("DEMISSION"!==e||t.demissionDate){o.next=7;break}return r.activeRow=t,o.next=4,r.checkStatus(t);case 4:if(n=o.sent,n){o.next=7;break}return o.abrupt("return");case 7:Object(i["k"])({employeeId:t.id,operate:e}).then((function(e){200==e.code?(r.$message.success(a?"重置密码成功":"更改成功"),r.roleStatus=!1,r.getList()):r.$message.error(e.msg)}));case 8:case"end":return o.stop()}}),o)})))).catch((function(e){}))},submitEducation:function(){var e=this;Object(i["J"])({currentUserId:this.activeRow.id,targetUserId:this.educationForm.targetUserId}).then((function(t){if(200===t.code){var r="DEMISSION",a=e.activeRow;Object(i["k"])({employeeId:a.id,operate:r}).then((function(t){200==t.code?(e.$message.success("更改成功"),e.roleStatus=!1,e.educationViseble=!1,e.getList()):e.$message.error(t.msg)}))}}))}},watch:{educationViseble:function(e){e||(this.educationForm.targetUserId="",this.$refs["educationForm"].resetFields())}}},d=m,f=(r("fefe"),r("2877")),p=Object(f["a"])(d,a,o,!1,null,"a91752aa",null);t["default"]=p.exports},e4d4:function(e,t,r){},fefe:function(e,t,r){"use strict";r("e4d4")}}]);