1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-619c9d46"],{"09f4":function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),Math.easeInOutQuad=function(e,t,o,n){return e/=n/2,e<1?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(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 l(e,t,o){var l=r(),i=e-l,s=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=s;var r=Math.easeInOutQuad(c,l,i,t);a(r),c<t?n(e):o&&"function"===typeof o&&o()};u()}},"65ef":function(e,t,o){"use strict";var n=o("9bb7"),a=o.n(n);a.a},"9bb7":function(e,t,o){},adb21:function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o("bc3a"),a=o.n(n),r=(o("4328"),o("5f87")),l=o("3908"),i=function(e,t,o){var n=t.url,i={method:t.method?t.method:"get",headers:{Authorization:Object(r["a"])()},url:n,responseType:"blob"};"post"==i.method?i.data=t.params:i.params=t.params,e.$confirm(o||"您确定下载模板","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){l["a"].startLoading(),a()(i).then((function(o){var n=new Blob([o.data],{type:"application/vnd.ms-excel;charset=utf-8"}),a=new Response(n).text();a.then((function(o){if(-1!=o.indexOf("code")){var a=JSON.parse(o);e.$message.error(a.msg)}else{var r=URL.createObjectURL(n),l=document.createElement("a"),i=t.fileName||"导出文件.xlsx";l.href=r,l.setAttribute("download",i),document.body.appendChild(l),l.click()}})),l["a"].endLoading()})).catch((function(t){e.$message.error("下载失败,请联系管理员"),l["a"].endLoading()}))})).catch((function(){}))}},e85c:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"m-container"},[e._m(0),e._v(" "),o("div",{staticClass:"m-core"},[o("el-form",{staticClass:"searchForm",attrs:{inline:!0},model:{value:e.searchForm,callback:function(t){e.searchForm="string"===typeof t?t.trim():t},expression:"searchForm"}},[o("el-form-item",[o("el-input",{attrs:{placeholder:"请输入合作单位名称"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),o("el-form-item",[o("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.userBranchList,(function(e){return o("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),o("el-form-item",[o("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"}},[o("el-option",{attrs:{label:"开启",value:!0}}),e._v(" "),o("el-option",{attrs:{label:"关闭",value:!1}})],1)],1),e._v(" "),o("el-form-item",[o("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.onReSet}},[e._v("重置")]),e._v(" "),o("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(" "),o("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("新建")]),e._v(" "),o("div",{staticClass:"tableWrap"},[o("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[o("el-table-column",{attrs:{align:"center",prop:"id",label:"单位编号"}}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"name",label:"单位名称"}}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"name",label:"所属分部"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[e._v("\n "+e._s(t.row.organization.name)+"\n ")])]}}])}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"linkman",label:"联系人"}}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"job",label:"职位"}}),e._v(" "),o("el-table-column",{attrs:{align:"center",prop:"mobileNo",label:"手机号"}}),e._v(" "),o("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(" "),o("el-table-column",{attrs:{align:"center",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[e._v("\n "+e._s(t.row.isEnable?"开启":"关闭")+"\n ")])]}}])}),e._v(" "),o("el-table-column",{attrs:{align:"center",label:"操作",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"cooperationOrgan/update",expression:"'cooperationOrgan/update'"}],attrs:{type:"text"},on:{click:function(o){return e.openTeaching("update",t.row)}}},[e._v("修改")]),e._v(" "),o("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"cooperationOrgan/del",expression:"'cooperationOrgan/del'"}],attrs:{type:"text"},on:{click:function(o){return e.onDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),o("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(" "),o("el-dialog",{attrs:{title:e.formTitle[e.formActionTitle],visible:e.teachingStatus,width:"500px"},on:{"update:visible":function(t){e.teachingStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[o("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[o("el-form-item",{attrs:{label:"单位名称",prop:"name","label-width":e.formLabelWidth}},[o("el-input",{attrs:{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(" "),o("el-form-item",{attrs:{label:"所属分部",prop:"organId","label-width":e.formLabelWidth}},[o("el-select",{attrs:{filterable:"",clearable:""},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.userBranchList,(function(e){return o("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),o("el-form-item",{attrs:{label:"状态",prop:"isEnable","label-width":e.formLabelWidth}},[o("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.form.isEnable,callback:function(t){e.$set(e.form,"isEnable","string"===typeof t?t.trim():t)},expression:"form.isEnable"}},[o("el-option",{attrs:{label:"开启",value:!0}}),e._v(" "),o("el-option",{attrs:{label:"关闭",value:!1}})],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"联系人",prop:"linkman","label-width":e.formLabelWidth}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.linkman,callback:function(t){e.$set(e.form,"linkman","string"===typeof t?t.trim():t)},expression:"form.linkman"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"职位",prop:"job","label-width":e.formLabelWidth}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.job,callback:function(t){e.$set(e.form,"job","string"===typeof t?t.trim():t)},expression:"form.job"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"手机号",prop:"mobileNo","label-width":e.formLabelWidth}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.mobileNo,callback:function(t){e.$set(e.form,"mobileNo","string"===typeof t?t.trim():t)},expression:"form.mobileNo"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"是否全职资源",prop:"fullJobResource","label-width":e.formLabelWidth}},[o("el-select",{model:{value:e.form.fullJobResource,callback:function(t){e.$set(e.form,"fullJobResource","string"===typeof t?t.trim():t)},expression:"form.fullJobResource"}},[o("el-option",{attrs:{label:"是",value:1}}),e._v(" "),o("el-option",{attrs:{label:"否",value:0}})],1)],1)],1),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.teachingStatus=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onTeachingSubmit("ruleForm")}}},[e._v("确 定")])],1)],1)],1)},a=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("h2",[o("div",{staticClass:"squrt"}),e._v("合作单位\n ")])}],r=o("db72"),l=(o("386d"),o("7f7f"),o("ac6a"),o("333d")),i=o("99b4"),s=o("1cc7"),c=o("e3eb"),u=o.n(c),m=(o("4360"),o("61f7")),f=(o("5f87"),o("adb21")),p=o("4328"),d=o.n(p),b=(o("bc3a"),function(e,t,o){t?Object(m["b"])(t)?o():o(new Error("请输入正确的11位手机号码")):o(new Error("请输入电话号码"))}),g={name:"branchManager",components:{pagination:l["a"]},data:function(){return{searchForm:{organId:null,isEnable:null,search:null},searchLsit:[],tableList:[],userBranchList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},teachingStatus:!1,formActionTitle:"create",formTitle:{create:"添加合作单位",update:"修改合作单位"},formLabelWidth:"120px",form:{id:null,name:null,linkman:null,job:null,mobileNo:null,fullJobResource:null,organId:null},rules:{name:[{required:!0,message:"请输入教学点名称",trigger:"blur"}],linkman:[{required:!0,message:"请输入联系人",trigger:"blur"}],job:[{required:!0,message:"请输入职位",trigger:"blur"}],mobileNo:[{required:!0,validator:b,trigger:"blur"},,{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],organId:[{required:!0,message:"请选择所属分部",trigger:"change"}],fullJobResource:[{required:!0,message:"请选择是否全职资源",trigger:"change"}],isEnable:[{required:!0,message:"请选择状态",trigger:"change"}]}}},mounted:function(){var e=this;this.getList(),Object(s["Y"])().then((function(t){200==t.code&&t.data.forEach((function(t){e.userBranchList.push({label:t.name,value:t.id})}))}))},methods:{onDelete:function(e){var t=this;this.$confirm("您确定删除合作单位?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(i["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(f["a"])(this,{url:"/api-web/export/cooperationOrgan",fileName:"合作单位.xlsx",method:"post",params:d.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,Object(i["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(i["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(i["B"])(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.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})},onFormClose:function(e){this.form={id:null,name:null,linkman:null,job:null,mobileNo:null,fullJobResource:null,organId:null,isEnable:null},this.$refs[e].resetFields()}}},h=g,v=(o("65ef"),o("2877")),_=Object(v["a"])(h,n,a,!1,null,"393956c3",null);t["default"]=_.exports}}]);
|