(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-238fa90c"],{"09f4":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),Math.easeInOutQuad=function(e,t,n,a){return e/=a/2,e<1?n/2*e*e+t:(e--,-n/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 i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function r(e,t,n){var r=i(),l=e-r,s=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=s;var i=Math.easeInOutQuad(c,r,l,t);o(i),c1&&!e.basdisabled?n("i",{staticClass:"el-icon-remove-outline marginLeft10 iconStyle",staticStyle:{"font-size":"20px",cursor:"pointer"},on:{click:function(t){return e.deleteLinkMan(a)}}}):e._e(),e._v(" "),e.basdisabled||a+1!=e.form.cooperationOrganLinkmanList.length?e._e():n("i",{staticClass:"el-icon-circle-plus-outline marginLeft10 iconStyle",staticStyle:{"font-size":"20px",cursor:"pointer"},on:{click:e.addLinkMan}})],1)}))],2),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.teachingStatus=!1}}},[e._v("取 消")]),e._v(" "),e.basdisabled?e._e():n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onTeachingSubmit("ruleForm")}}},[e._v("确 定")])],1)],1)],1)},o=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("h2",[n("div",{staticClass:"squrt"}),e._v("\n 合作单位\n ")])}],i=(n("96cf"),n("1da1")),r=(n("7f7f"),n("5530")),l=(n("386d"),n("333d")),s=n("99b4"),c=n("e3eb"),u=n.n(c),m=n("61f7"),d=n("adb21"),p=n("1cc7"),f=n("4328"),b=n.n(f),g=function(e,t,n){t?Object(m["b"])(t)?n():n(new Error("请输入正确的11位手机号码")):n(new Error("请输入电话号码"))},h={name:"branchManager",components:{pagination:l["a"]},data:function(){return{searchForm:{organId:null,isEnable:null,search:null},validPhone:g,searchLsit:[],tableList:[],educationList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},teachingStatus:!1,formActionTitle:"create",formTitle:{create:"添加合作单位",update:"修改合作单位",look:"查看合作单位"},formLabelWidth:"120px",form:{id:null,name:null,linkman:null,job:null,mobileNo:null,fullJobResource:null,organId:null,educationUserId:null,cooperationOrganLinkmanList:[{cooperationOrganId:"",job:"",linkman:"",mobileNo:""}]},rules:{name:[{required:!0,message:"请输入教学点名称",trigger:"blur"}],organId:[{required:!0,message:"请选择所属分部",trigger:"change"}],educationUserId:[{required:!0,message:"请选择乐团主管",trigger:"change"}],fullJobResource:[{required:!0,message:"请选择是否全职资源",trigger:"change"}],isEnable:[{required:!0,message:"请选择状态",trigger:"change"}]},basdisabled:!1,actionRow:null}},mounted:function(){this.getList(),this.$store.dispatch("setBranchs")},methods:{onDelete:function(e){var t=this;this.$confirm("您确定删除合作单位?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(s["d"])(e.id).then((function(e){200==e.code?(t.$message.success("删除成功"),t.teachingStatus=!1,t.getList()):t.$message.error(e.msg)}))})).catch((function(){}))},search:function(){this.pageInfo.page=1,this.getList()},onReSet:function(){this.searchForm={organId:null,isEnable:null},this.search()},onExport:function(){Object(d["a"])(this,{url:"/api-web/export/cooperationOrgan",fileName:"合作单位.xls",method:"post",params:b.a.stringify(u()(this.searchForm))},"您确定导出合作单位?")},onTeachingSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;"create"==t.formActionTitle?(t.form.id&&delete t.form.id,console.log(t.form),Object(s["c"])(t.form).then((function(e){200==e.code?(t.$message.success("创建成功"),t.teachingStatus=!1,t.getList()):t.$message.error(e.msg)}))):"update"==t.formActionTitle&&Object(s["e"])(t.form).then((function(e){200==e.code?(t.$message.success("修改成功"),t.teachingStatus=!1,t.getList()):t.$message.error(e.msg)}))}))},getList:function(){var e=this;Object(s["F"])(Object(r["a"])({rows:this.pageInfo.limit,page:this.pageInfo.page},this.searchForm)).then((function(t){200==t.code&&t.data&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},openTeaching:function(e,t){this.teachingStatus=!0,this.formActionTitle=e,"update"==e?(this.changeOrgan(t.organId),this.actionRow=t,this.form={id:t.id,name:t.name,linkman:t.linkman,job:t.job,mobileNo:t.mobileNo?t.mobileNo:null,ownershipType:t.ownershipType,organId:t.organId,fullJobResource:t.fullJobResource,isEnable:t.isEnable,educationUserId:t.educationUserId,cooperationOrganLinkmanList:t.cooperationOrganLinkmanList.length>0?t.cooperationOrganLinkmanList:[{cooperationOrganId:t.id,job:"",linkman:"",mobileNo:""}]},this.basdisabled=!1):"look"==e?(this.changeOrgan(t.organId),this.actionRow=t,this.form={id:t.id,name:t.name,linkman:t.linkman,job:t.job,mobileNo:t.mobileNo?t.mobileNo:null,ownershipType:t.ownershipType,organId:t.organId,fullJobResource:t.fullJobResource,isEnable:t.isEnable,educationUserId:t.educationUserId,cooperationOrganLinkmanList:t.cooperationOrganLinkmanList},this.basdisabled=!0):(this.basdisabled=!1,this.actionRow=null)},onFormClose:function(e){this.form={id:null,name:null,linkman:null,job:null,mobileNo:null,fullJobResource:null,organId:null,isEnable:null,educationUserId:null,cooperationOrganLinkmanList:[{cooperationOrganId:"",job:"",linkman:"",mobileNo:""}]},this.$refs[e].resetFields()},changeOrgan:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.form.educationUserId=null,!t){e.next=12;break}return e.prev=2,e.next=5,Object(p["Q"])({organId:t,employeeRole:"EDUCATION"});case 5:a=e.sent,this.educationList=null===a||void 0===a||null===(n=a.data)||void 0===n?void 0:n.EDUCATION,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](2),console.log(e.t0);case 12:case"end":return e.stop()}}),e,this,[[2,9]])})));function t(t){return e.apply(this,arguments)}return t}(),deleteLinkMan:function(e){console.log(this.form.cooperationOrganLinkmanList),this.form.cooperationOrganLinkmanList.splice(e,1)},addLinkMan:function(){this.actionRow?(console.log(this.actionRow),this.form.cooperationOrganLinkmanList.push({cooperationOrganId:this.actionRow.id,job:"",linkman:"",mobileNo:""})):this.form.cooperationOrganLinkmanList.push({cooperationOrganId:"",job:"",linkman:"",mobileNo:""})}},watch:{teachingStatus:function(e){e||this.getList()}}},v=h,k=(n("3422"),n("2877")),w=Object(k["a"])(v,a,o,!1,null,"57e55890",null);t["default"]=w.exports}}]);