(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22c453cd"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,a,r){return e/=r/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function l(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 o(e,t,a){var o=n(),u=e-o,s=20,i=0;t="undefined"===typeof t?500:t;var c=function e(){i+=s;var n=Math.easeInOutQuad(i,o,u,t);l(n),i1&&void 0!==arguments[1]?arguments[1]:["value","label"],a=Object(l["a"])(t,2),n=a[0],o=a[1],u={};if(e&&e.length){var s,i=Object(r["a"])(e);try{for(i.s();!(s=i.n()).done;){var c=s.value;u[c[n]]=c[o]}}catch(d){i.e(d)}finally{i.f()}}return u}},af82:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[e._m(0),e._v(" "),a("div",{staticClass:"m-core"},[a("div",{directives:[{name:"permission",rawName:"v-permission",value:"/teacherOperationAdd",expression:"'/teacherOperationAdd'"}],staticClass:"newBand",on:{click:function(t){return e.onTeacher("create")}}},[e._v("老师新增")]),e._v(" "),a("el-form",{staticClass:"searchForm",attrs:{inline:!0},model:{value:e.searchForm,callback:function(t){e.searchForm="string"===typeof t?t.trim():t},expression:"searchForm"}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"老师姓名或电话"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(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",[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"老师状态"},model:{value:e.searchForm.lockFlag,callback:function(t){e.$set(e.searchForm,"lockFlag","string"===typeof t?t.trim():t)},expression:"searchForm.lockFlag"}},e._l(e.teacherStatus,(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:{filterable:"",clearable:"",placeholder:"专业技能"},model:{value:e.searchForm.subjectId,callback:function(t){e.$set(e.searchForm,"subjectId","string"===typeof t?t.trim():t)},expression:"searchForm.subjectId"}},e._l(e.subjectList,(function(t){return a("el-option-group",{key:t.label,attrs:{label:t.label}},e._l(t.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)})),1)],1),e._v(" "),a("el-form-item",[a("el-select",{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.branchList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.value}})})),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:"",filterable:"",placeholder:"人事状态"},model:{value:e.searchForm.isProbationPeriod,callback:function(t){e.$set(e.searchForm,"isProbationPeriod","string"===typeof t?t.trim():t)},expression:"searchForm.isProbationPeriod"}},[a("el-option",{attrs:{label:"正式",value:"0"}}),e._v(" "),a("el-option",{attrs:{label:"试用",value:"1"}})],1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"开放陪练"},model:{value:e.searchForm.isSupportExtraPracticeLesson,callback:function(t){e.$set(e.searchForm,"isSupportExtraPracticeLesson","string"===typeof t?t.trim():t)},expression:"searchForm.isSupportExtraPracticeLesson"}},[a("el-option",{attrs:{label:"是",value:"true"}}),e._v(" "),a("el-option",{attrs:{label:"否",value:"false"}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",prop:"id",label:"老师编号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"realName",label:"老师名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(t.row.realName))]),e._v(" "),t.row.memo?a("p",[e._v(e._s("("+t.row.memo+")"))]):e._e()])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"organName",label:"所属分部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"150px",label:"老师状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("teacherStatus")(t.row.lockFlag)))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center","show-overflow-tooltip":!0,width:"200px",label:"专业技能"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"max-height":"68px",display:"block"},attrs:{title:t.row.splitSubjectName}},[e._v(e._s(t.row.splitSubjectName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"phone",width:"150px",label:"联系电话"}}),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[e._v("\n "+e._s(0==t.row.isProbationPeriod?"正式":"试用")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"vipNum",label:"已开小课"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"130px",label:"试听课安排"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.demoNum>0?"是":"否"))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"120px",label:"开放网管课"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.isSupportExtraPracticeLesson?"是":"否"))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"运营指标"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.gotoOperating(t.row)}}},[e._v(e._s(t.row.operatingIndex+"%"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务指标"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.gotoAfterSchool(t.row)}}},[e._v(e._s(t.row.serviceIndex+"%"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",fixed:"right",width:"200",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("router-link",{directives:[{name:"permission",rawName:"v-permission",value:"/teacherDetail",expression:"'/teacherDetail'"}],staticClass:"el-button--text",attrs:{to:{path:"/business/teacherDetail?teacherId="+t.row.id+"&teacherName="+t.row.realName,query:{search:JSON.stringify(e.searchForm),rules:JSON.stringify(e.pageInfo)}}}},[e._v("查看")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"/teacherIperationUpdate",expression:"'/teacherIperationUpdate'"}],attrs:{type:"text"},on:{click:function(a){return e.onTeacher("update",t.row)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"employee/employeeOperate",expression:"'employee/employeeOperate'"}],attrs:{type:"text"},on:{click:function(a){return e.onStaffOperation("LOCK_UNLOCK",t.row)}}},[e._v(e._s(1==t.row.lockFlag?"解冻":"冻结"))]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"api-auth/user/updatePassword2",expression:"'api-auth/user/updatePassword2'"}],attrs:{type:"text"},on:{click:function(a){return e.resetPassWrod(t.row)}}},[e._v("修改密码")])]}}])})],1),e._v(" "),a("pagination",{attrs:{total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"修改密码",visible:e.passwrodVisiable,"before-close":e.closePassWord,width:"400px"},on:{"update:visible":function(t){e.passwrodVisiable=t}}},[a("el-form",{ref:"passwrodForm",attrs:{model:e.passwrodForm,inline:!0}},[a("el-form-item",{attrs:{label:"手机号",prop:"phone","label-width":"80px",rules:[{required:!0,message:"手机号不能为空",trigger:"blur"},{pattern:/^1\d{10}$/,message:"请输入正确的手机号",trigger:"blur"}]}},[a("el-input",{attrs:{minlength:"11",maxlength:"11"},model:{value:e.passwrodForm.phone,callback:function(t){e.$set(e.passwrodForm,"phone","string"===typeof t?t.trim():t)},expression:"passwrodForm.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"输入密码",prop:"password","label-width":"80px",rules:[{required:!0,message:"密码不能为空",trigger:"blur"},{pattern:/^[\w]{6,20}$/,message:"密码为6-20位",trigger:"blur"}]}},[a("el-input",{model:{value:e.passwrodForm.password,callback:function(t){e.$set(e.passwrodForm,"password","string"===typeof t?t.trim():t)},expression:"passwrodForm.password"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"再次输入",prop:"password2","label-width":"80px",rules:[{required:!0,message:"密码不能为空",trigger:"blur"},{pattern:/^[\w]{6,20}$/,message:"密码为6-20位",trigger:"blur"}]}},[a("el-input",{model:{value:e.passwrodForm.password2,callback:function(t){e.$set(e.passwrodForm,"password2","string"===typeof t?t.trim():t)},expression:"passwrodForm.password2"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.passwrodVisiable=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitResetPassWord}},[e._v("确 定")])],1)],1)],1)},l=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("老师列表\n ")])}],n=(a("7f7f"),a("ac6a"),a("386d"),a("333d")),o=a("8018"),u=a("99b4"),s=a("d349"),i=a("1cc7"),c=a("92e3"),d=(a("4360"),{name:"teacherList",components:{pagination:n["a"]},data:function(){return{searchForm:{lockFlag:null,isProbationPeriod:null,jobNature:null,subjectId:null,organId:null,search:null,isSupportExtraPracticeLesson:null},jobNature:c["n"],teacherStatus:c["y"],subjectList:[],branchList:[],tableList:[],pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]},passwrodVisiable:!1,passwrodForm:{phone:"",password:"",password2:""},activatedRow:null}},activated:function(){this.__init(),this.getList()},mounted:function(){this.__init(),this.getList()},methods:{search:function(){this.pageInfo.page=1,this.getList()},__init:function(){var e=this;this.$route.query.search&&(this.$route.query.search instanceof Object?this.searchForm=this.$route.query.search:this.searchForm=JSON.parse(this.$route.query.search)),this.$route.query.rules&&(this.$route.query.rules instanceof Object?this.pageInfo=this.$route.query.rules:this.pageInfo=JSON.parse(this.$route.query.rules)),Object(i["Y"])().then((function(t){200==t.code&&(e.branchList=[],t.data.forEach((function(t){e.branchList.push({label:t.name,value:t.id})})))})),Object(s["D"])({delFlag:"NO",rows:9999}).then((function(t){var a=t.data;if(200==t.code){var r=[];a.rows.forEach((function(e,t){var a=[];e.subjects.forEach((function(e){a.push({value:e.id,label:e.name})})),r[t]={label:e.name,options:a}})),e.subjectList=r}}))},onTeacher:function(e,t){var a=JSON.stringify(this.searchForm),r=JSON.stringify(this.pageInfo),l={type:e,search:a,rules:r};t&&(l.teacherId=t.id);var n="/business/teacherOperation";"update"==e&&(n="/business/teacherOperationUpdate"),this.$router.push({path:n,query:l})},getList:function(){var e=this,t=this.searchForm;t.lockFlag?t.lockFlag:t.lockFlag=null,t.isProbationPeriod?t.isProbationPeriod:t.isProbationPeriod=null,t.jobNature?t.jobNature:t.jobNature=null,t.subjectId?t.subjectId:t.subjectId=null,t.search?t.search:t.search=null,t.isSupportExtraPracticeLesson?t.isSupportExtraPracticeLesson:t.isSupportExtraPracticeLesson=null,t.rows=this.pageInfo.limit,t.page=this.pageInfo.page,Object(o["x"])(t).then((function(t){200==t.code&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},onStaffOperation:function(e,t){var a=this,r="";r=1!=t.lockFlag?"是否冻结".concat(t.realName,"老师?"):"是否解冻".concat(t.realName,"老师?"),this.$confirm(r,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(u["k"])({employeeId:t.id,operate:e}).then((function(e){200==e.code?(a.$message.success("更改成功"),a.roleStatus=!1,a.getList()):a.$message.error(e.msg)}))})).catch((function(){}))},onReSet:function(){this.searchForm={lockFlag:null,isProbationPeriod:null,jobNature:null,organId:null,subjectId:null,search:null}},resetPassWrod:function(e){this.activatedRow=e,this.passwrodForm.phone=e.phone,this.passwrodVisiable=!0},closePassWord:function(){this.activatedRow=null,this.passwrodForm={phone:"",password:"",password2:""},this.$refs["passwrodForm"].resetFields(),this.passwrodVisiable=!1},submitResetPassWord:function(){var e=this;this.passwrodForm.password===this.passwrodForm.password2?this.$refs["passwrodForm"].validate((function(t){t&&Object(i["ic"])({mobile:e.passwrodForm.phone,newPassword:e.passwrodForm.password,userId:e.activatedRow.id}).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.closePassWord())}))})):this.$message.error("两次密码必须相同")},gotoAfterSchool:function(e){this.$router.push({path:"/operateManager/serverIndexList",query:{teacherId:e.id,activeIndex:"2"}})},gotoOperating:function(e){this.$router.push({path:"/operateManager/operateStudent",query:{teacherId:e.id,operatingTag:"1"}})}}}),p=d,b=(a("372e"),a("2877")),f=Object(b["a"])(p,r,l,!1,null,"3923779a",null);t["default"]=f.exports},fcab:function(e,t,a){}}]);