chunk-238fa90c.712a41a6.js 16 KB

1
  1. (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),c<t?a(e):n&&"function"===typeof n&&n()};u()}},"1cf0":function(e,t,n){},3422:function(e,t,n){"use strict";n("1cf0")},adb21:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n("bc3a"),o=n.n(a),i=(n("4328"),n("5f87")),r=n("3908"),l=n("e3eb"),s=n.n(l),c=function(e,t,n){var a=t.url,l={method:t.method?t.method:"get",headers:{Authorization:Object(i["a"])()},url:a,responseType:"blob"};"post"==l.method?l.data=t.params:l.params=t.params,e.$confirm(n||"您确定下载模板","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){r["a"].startLoading(),o()(s()(l)).then((function(n){var a=new Blob([n.data],{type:"application/vnd.ms-excel;charset=utf-8"}),o=new Response(a).text();o.then((function(n){if(-1!=n.indexOf("code")){var o=JSON.parse(n);e.$message.error(o.msg)}else{var i=URL.createObjectURL(a),r=document.createElement("a"),l=t.fileName||"导出文件.xls";r.href=i,r.setAttribute("download",l),document.body.appendChild(r),r.click()}})),r["a"].endLoading()})).catch((function(t){e.$message.error("下载失败,请联系管理员"),r["a"].endLoading()}))})).catch((function(){}))}},e85c:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"m-container"},[e._m(0),e._v(" "),n("div",{staticClass:"m-core"},[n("save-form",{staticClass:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[n("el-form-item",[n("el-input",{attrs:{clearable:"",placeholder:"请输入合作单位名称"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),n("el-form-item",[n("el-select",{attrs:{placeholder:"请选择分部",filterable:"",clearable:""},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){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),n("el-form-item",[n("el-select",{attrs:{placeholder:"请选择状态",filterable:"",clearable:""},model:{value:e.searchForm.isEnable,callback:function(t){e.$set(e.searchForm,"isEnable","string"===typeof t?t.trim():t)},expression:"searchForm.isEnable"}},[n("el-option",{attrs:{label:"开启",value:!0}}),e._v(" "),n("el-option",{attrs:{label:"关闭",value:!1}})],1)],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")]),e._v(" "),n("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")]),e._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/cooperationOrgan",expression:"'export/cooperationOrgan'"}],attrs:{type:"primary"},on:{click:e.onExport}},[e._v("导出")])],1)],1),e._v(" "),n("div",{directives:[{name:"permission",rawName:"v-permission",value:"cooperationOrgan/add",expression:"'cooperationOrgan/add'"}],staticClass:"newBand",on:{click:function(t){return e.openTeaching("create")}}},[e._v("\n 新建\n ")]),e._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"id",label:"单位编号"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"name",label:"单位名称"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"name",label:"所属分部"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[e._v("\n "+e._s(t.row.organization.name)+"\n ")])]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"realName",label:"乐团主管"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"是否全职资源"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.fullJobResource?"是":"否")+"\n ")]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[e._v("\n "+e._s(t.row.isEnable?"开启":"关闭")+"\n ")])]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{type:"text"},on:{click:function(n){return e.openTeaching("look",t.row)}}},[e._v("查看")]),e._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"cooperationOrgan/update",expression:"'cooperationOrgan/update'"}],attrs:{type:"text"},on:{click:function(n){return e.openTeaching("update",t.row)}}},[e._v("修改")]),e._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"cooperationOrgan/del",expression:"'cooperationOrgan/del'"}],attrs:{type:"text"},on:{click:function(n){return e.onDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),n("pagination",{attrs:{sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"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(" "),n("el-dialog",{attrs:{title:e.formTitle[e.formActionTitle],visible:e.teachingStatus,width:"1060px"},on:{"update:visible":function(t){e.teachingStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[n("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules,inline:!0}},[n("el-row",[n("el-form-item",{attrs:{label:"单位名称",prop:"name","label-width":e.formLabelWidth}},[n("el-input",{staticStyle:{width:"180px !important"},attrs:{disabled:e.basdisabled,autocomplete:"off"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"===typeof t?t.trim():t)},expression:"form.name"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"所属分部",prop:"organId","label-width":e.formLabelWidth}},[n("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:e.basdisabled,filterable:"",clearable:""},on:{change:e.changeOrgan},model:{value:e.form.organId,callback:function(t){e.$set(e.form,"organId","string"===typeof t?t.trim():t)},expression:"form.organId"}},e._l(e.selects.branchs,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),e._v(" "),n("el-row",[n("el-form-item",{attrs:{label:"乐团主管",prop:"educationUserId","label-width":e.formLabelWidth,rules:[{required:!0,message:"乐团主管不能为空"}]}},[n("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:!e.form.organId||e.basdisabled,filterable:"",clearable:""},model:{value:e.form.educationUserId,callback:function(t){e.$set(e.form,"educationUserId","string"===typeof t?t.trim():t)},expression:"form.educationUserId"}},e._l(e.educationList,(function(t,a){return n("el-option",{key:a,attrs:{label:t.realName,value:t.userId}},[n("span",{staticStyle:{float:"left"}},[e._v(e._s(t.realName))]),e._v(" "),n("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(String(t.userId)))])])})),1)],1),e._v(" "),n("el-form-item",{attrs:{label:"合作单位状态",prop:"isEnable","label-width":e.formLabelWidth}},[n("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:e.basdisabled,filterable:"",clearable:""},model:{value:e.form.isEnable,callback:function(t){e.$set(e.form,"isEnable","string"===typeof t?t.trim():t)},expression:"form.isEnable"}},[n("el-option",{attrs:{label:"开启",value:!0}}),e._v(" "),n("el-option",{attrs:{label:"关闭",value:!1}})],1)],1),e._v(" "),n("el-form-item",{attrs:{label:"是否全职资源",prop:"fullJobResource","label-width":e.formLabelWidth}},[n("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:e.basdisabled},model:{value:e.form.fullJobResource,callback:function(t){e.$set(e.form,"fullJobResource","string"===typeof t?t.trim():t)},expression:"form.fullJobResource"}},[n("el-option",{attrs:{label:"是",value:1}}),e._v(" "),n("el-option",{attrs:{label:"否",value:0}})],1)],1)],1),e._v(" "),e._l(e.form.cooperationOrganLinkmanList,(function(t,a){return n("el-row",{key:a},[n("el-form-item",{attrs:{rules:[{required:!0,message:"请输入联系人",trigger:"blur"}],label:"联系人"+(a+1),prop:"cooperationOrganLinkmanList."+a+".linkman","label-width":e.formLabelWidth}},[n("el-input",{staticStyle:{width:"180px !important"},attrs:{disabled:e.basdisabled,autocomplete:"off"},model:{value:t.linkman,callback:function(n){e.$set(t,"linkman","string"===typeof n?n.trim():n)},expression:"item.linkman"}})],1),e._v(" "),n("el-form-item",{attrs:{rules:[{required:!0,message:"请输入职位",trigger:"blur"}],label:"联系人"+(a+1)+"职位",prop:"cooperationOrganLinkmanList."+a+".job","label-width":e.formLabelWidth}},[n("el-input",{staticStyle:{width:"180px !important"},attrs:{disabled:e.basdisabled,autocomplete:"off"},model:{value:t.job,callback:function(n){e.$set(t,"job","string"===typeof n?n.trim():n)},expression:"item.job"}})],1),e._v(" "),n("el-form-item",{attrs:{rules:[{required:!0,validator:e.validPhone,trigger:"blur"},,{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],label:"联系人"+(a+1)+"手机号",prop:"cooperationOrganLinkmanList."+a+".mobileNo","label-width":e.formLabelWidth}},[n("el-input",{staticStyle:{width:"180px !important"},attrs:{disabled:e.basdisabled,autocomplete:"off"},model:{value:t.mobileNo,callback:function(n){e.$set(t,"mobileNo","string"===typeof n?n.trim():n)},expression:"item.mobileNo"}})],1),e._v(" "),e.form.cooperationOrganLinkmanList.length>1&&!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}}]);