1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-35d7984f"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,a,n){return e/=n/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,a){var i=o(),s=e-i,l=20,u=0;t="undefined"===typeof t?500:t;var c=function e(){u+=l;var o=Math.easeInOutQuad(u,i,s,t);r(o),u<t?n(e):a&&"function"===typeof a&&a()};c()}},"333d":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[a("el-pagination",e._b({attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},r=[],o=(a("c5f6"),a("09f4")),i={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&Object(o["a"])(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&Object(o["a"])(0,800)}}},s=i,l=(a("c0b9"),a("2877")),u=Object(l["a"])(s,n,r,!1,null,"31cb099a",null);t["a"]=u.exports},"42df":function(e,t,a){},6883:function(e,t,a){"use strict";a.r(t);var n=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:"school/add",expression:"'school/add'"}],staticClass:"newBand",on:{click:function(t){return e.openTeaching("create")}}},[e._v("新建")]),e._v(" "),a("el-form",{staticClass:"searchForm",attrs:{inline:!0},nativeOn:{submit:function(e){e.preventDefault()}},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}},[a("el-form-item",[a("el-input",{attrs:{type:"text",placeholder:"教学点名称"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{clearable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId",t)},expression:"searchForm.organId"}},e._l(e.branchList,(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-button",{attrs:{type:"danger"},on:{click:e.search}},[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",width:"55",prop:"id",label:"编号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name",label:"教学点名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"organName",label:"所属分部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"教学点来源",formatter:e.filterOrgan,width:"120px"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"120px",label:"费用"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.cooperationOrganId?"免费":t.row.remark)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"上课地点详情"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.address.split(",").join(""))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"delFlag",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(2==t.row.delFlag?"停用":"启用")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(a){return e.openTeaching("update",t.row)}}},[e._v("修改")]),e._v(" "),0==t.row.delFlag?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(a){return e.onUpdateSubmit(t.row,2)}}},[e._v("停用")]):e._e(),e._v(" "),2==t.row.delFlag?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(a){return e.onUpdateSubmit(t.row,0)}}},[e._v("启用")]):e._e(),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(a){return e.onUpdateSubmit(t.row,1)}}},[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:e.formTitle[e.formActionTitle],visible:e.teachingStatus,width:"500px"},on:{"update:visible":function(t){e.teachingStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[a("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[a("el-form-item",{attrs:{label:"教学点名称",prop:"name","label-width":e.formLabelWidth}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"教学点来源",prop:"source","label-width":e.formLabelWidth}},["update"==e.formActionTitle?[a("el-select",{attrs:{disabled:""},model:{value:e.form.source,callback:function(t){e.$set(e.form,"source",t)},expression:"form.source"}},[a("el-option",{attrs:{label:"合作单位",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"租赁",value:"2"}})],1)]:[a("el-select",{model:{value:e.form.source,callback:function(t){e.$set(e.form,"source",t)},expression:"form.source"}},[a("el-option",{attrs:{label:"合作单位",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"租赁",value:"2"}})],1)]],2),e._v(" "),1==e.form.source?a("el-form-item",{attrs:{prop:"cooperationOrganId",label:"合作单位","label-width":e.formLabelWidth}},[a("el-select",{on:{change:e.onCooperationChange},model:{value:e.form.cooperationOrganId,callback:function(t){e.$set(e.form,"cooperationOrganId",t)},expression:"form.cooperationOrganId"}},e._l(e.cooperationList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),e._v(" "),2==e.form.source?a("el-form-item",{attrs:{prop:"remark",label:"费用","label-width":e.formLabelWidth}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1):e._e(),e._v(" "),2==e.form.source?a("el-form-item",{attrs:{prop:"organId",label:"所属分部","label-width":e.formLabelWidth}},[a("el-select",{model:{value:e.form.organId,callback:function(t){e.$set(e.form,"organId",t)},expression:"form.organId"}},e._l(e.branchList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),e._v(" "),a("el-form-item",{attrs:{prop:"address","show-message":e.addressMessage,label:"上课地点","label-width":e.formLabelWidth}},[a("el-input",{staticClass:"text-address",attrs:{disabled:!0},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}},[a("el-button",{attrs:{slot:"append",type:"primary",icon:"el-icon-plus"},on:{click:e.addMap},slot:"append"},[e._v("选择")])],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return e.onTeachingCancel("ruleForm")}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onTeachingSubmit("ruleForm")}}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{"close-on-click-modal":!1,title:"选择地图","custom-class":"map-container",visible:e.mapStatus,width:"800px"},on:{"update:visible":function(t){e.mapStatus=t}}},[a("el-amap-search-box",{staticClass:"search-box",attrs:{value:"searchValue","search-option":e.searchOption,"on-search-result":e.onSearchResult}}),e._v(" "),a("el-amap",{attrs:{zoom:e.zoom,plugin:e.plugin,center:e.center}},e._l(e.markers,(function(t,n){return a("el-amap-marker",{key:n,attrs:{events:e.markerEvents(),position:t}})})),1)],1)],1)},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("教学点管理\n ")])}],o=(a("7f7f"),a("ac6a"),a("386d"),a("28a5"),a("333d")),i=a("99b4"),s=a("1cc7"),l=(a("4360"),a("8f9b")),u=a.n(l);(function(){var e=EventTarget.prototype.addEventListener,t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){t=!0}});document.addEventListener("testPassive",null,a),document.removeEventListener("testPassive",null,a)}catch(n){}EventTarget.prototype.addEventListener=function(a,n,r){this.func=e,r=r instanceof Object?r:{},r.passive=t,this.func(a,n,r)}})(),u.a.initAMapApiLoader({key:"b1e6ac2eb28902ce91a490edf194e000",plugin:["AMap.Geolocation","AMap.PlaceSearch","AMap.Geocoder"],v:"1.4.4"});var c={components:{pagination:o["a"]},data:function(){return{searchForm:{search:null,organId:null},searchLsit:[],tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},formActionTitle:"create",formTitle:{create:"添加教学点",update:"修改教学点"},teachingStatus:!1,formLabelWidth:"100px",addressDetail:{},form:{name:null,source:null,cooperationOrganId:null,remark:null,address:null,subsidy:null,organId:null},selectOrganId:null,rules:{name:[{required:!0,message:"请输入教学点名称",trigger:"blur"}],source:[{required:!0,message:"请选择教学点来源",trigger:"change"}],remark:[{required:!0,message:"请输入费用",trigger:"blur"}],address:[{required:!0,message:"请选择上课地点",trigger:"blur"}],cooperationOrganId:[{required:!0,message:"请选择合作单位",trigger:"change"}],organId:[{required:!0,message:"请选择所属分部",trigger:"change"}],subsidy:[{type:"number",message:"课酬补贴只能为数字",trigger:"blur"}]},addressMessage:!0,mapStatus:!1,zoom:16,center:[114.34371,30.55939],markers:[],plugin:[],searchOption:{city:"",citylimit:!0,pageSize:1,pageIndex:1,autoFitView:!0},cooperationList:[],branchList:[],searchValue:"测试"}},mounted:function(){this.getList(),this.getBreachList()},methods:{onTeachingSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.form.address=t.addressDetail.address,t.form.longitudeLatitude=t.addressDetail.poi,"create"==t.formActionTitle?Object(i["B"])(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["D"])(t.form).then((function(e){200==e.code?(t.$message.success("修改成功"),t.teachingStatus=!1,t.getList()):t.$message.error(e.msg)}))}))},onTeachingCancel:function(e){this.teachingStatus=!1,this.$refs[e].clearValidate()},addMap:function(){this.mapStatus=!0;var e=this.addressDetail.poi,t=this.addressDetail.address;if(e)this.markers=[],this.center=[e.split(",")[0],e.split(",")[1]],this.markers.push([e.split(",")[0],e.split(",")[1]]);else if(t&&""==e){var a=this,n=new AMap.PlaceSearch({pageSize:1,pageIndex:1});n.search(t,(function(t,n){if("complete"===t){var r=n.poiList.pois[0];e=r.location.lng+","+r.location.lat,a.center=[r.location.lng,r.location.lat],a.markers.push([r.location.lng,r.location.lat])}}))}},onCooperationChange:function(e){var t=this;this.cooperationList.forEach((function(a){a.value==e&&(t.form.organId=a.organId)}))},onSearchResult:function(e){var t=this;this.markers=[];var a=0,n=0;if(e.length>0){e.forEach((function(e){var r=e.lng,o=e.lat;n+=r,a+=o,t.markers.push([e.lng,e.lat])}));var r={lng:n/e.length,lat:a/e.length};this.center=[r.lng,r.lat]}},markerEvents:function(){var e=this;return{click:function(t){var a=new AMap.Geocoder;a.getAddress(t.lnglat,(function(a,n){if("complete"===a&&n.regeocode){n.regeocode.lnglat=t.lnglat;var r=n.regeocode.addressComponent;e.addressDetail={address:r.province+","+r.city+","+r.district+","+r.township+r.street+r.streetNumber,poi:t.lnglat.lng+","+t.lnglat.lat},e.form.address=n.regeocode.formattedAddress,e.mapStatus=!1,e.addressMessage=!1}else e.$message.error("请重新选择地址")}))}}},getList:function(){var e=this,t=this.searchForm;t.rows=this.pageInfo.limit,t.page=this.pageInfo.page,Object(i["C"])(t).then((function(t){200==t.code&&t.data&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},getBreachList:function(){var e=this;Object(s["A"])().then((function(t){if(200==t.code){var a=[];t.data.forEach((function(t){a.push(t.id),e.branchList.push({label:t.name,value:t.id})})),Object(i["v"])({organId:a.join(",")}).then((function(t){if(200==t.code){if(!t.data&&t.data.length<=0)return;t.data.forEach((function(t){e.cooperationList.push({value:t.id,organId:t.organId,label:t.name})}))}}))}}))},openTeaching:function(e,t){this.teachingStatus=!0,this.formActionTitle=e,"update"==e&&(this.addressDetail={address:t.address,poi:t.longitudeLatitude},this.form={id:t.id,name:t.name,source:t.cooperationOrganId?"1":"2",cooperationOrganId:t.cooperationOrganId,remark:t.remark,address:t.address.split(",").join(""),subsidy:t.subsidy,organId:t.organId})},onFormClose:function(e){this.form={name:null,source:null,cooperationOrganId:null,remark:null,address:null,subsidy:null},this.$refs[e].resetFields()},filterOrgan:function(e){var t="";return e.cooperationOrganId?this.cooperationList.forEach((function(a){a.value==e.cooperationOrganId&&(t=a.label)})):t="租赁",t},onUpdateSubmit:function(e,t){var a,n=this;a=2==t?"停用":0==t?"启用":"删除",this.$confirm("您确定".concat(a,"吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(i["D"])({id:e.id,delFlag:t}).then((function(a){200==a.code?(n.$message.success("修改成功"),n.teachingStatus=!1,2==t||0==t?e.delFlag=t:n.getList()):n.$message.error(a.msg)}))}))},search:function(){this.pageInfo.page=1,this.getList()}}},d=c,p=(a("8caa"),a("2877")),m=Object(p["a"])(d,n,r,!1,null,null,null);t["default"]=m.exports},"8caa":function(e,t,a){"use strict";var n=a("42df"),r=a.n(n);r.a},"99b4":function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"c",(function(){return l})),a.d(t,"b",(function(){return u})),a.d(t,"x",(function(){return c})),a.d(t,"v",(function(){return d})),a.d(t,"C",(function(){return p})),a.d(t,"B",(function(){return m})),a.d(t,"D",(function(){return f})),a.d(t,"w",(function(){return g})),a.d(t,"h",(function(){return h})),a.d(t,"j",(function(){return b})),a.d(t,"m",(function(){return v})),a.d(t,"i",(function(){return y})),a.d(t,"z",(function(){return O})),a.d(t,"k",(function(){return _})),a.d(t,"A",(function(){return k})),a.d(t,"y",(function(){return w})),a.d(t,"d",(function(){return I})),a.d(t,"f",(function(){return j})),a.d(t,"e",(function(){return S})),a.d(t,"g",(function(){return L})),a.d(t,"n",(function(){return x})),a.d(t,"o",(function(){return C})),a.d(t,"q",(function(){return F})),a.d(t,"p",(function(){return $})),a.d(t,"l",(function(){return T})),a.d(t,"t",(function(){return z})),a.d(t,"r",(function(){return q})),a.d(t,"u",(function(){return E})),a.d(t,"s",(function(){return A}));var n=a("b775"),r=a("4328"),o=a.n(r),i="/api-web";function s(e){return Object(n["a"])({url:i+"/cooperationOrgan/add",method:"post",data:o.a.stringify(e)})}function l(e){return Object(n["a"])({url:i+"/cooperationOrgan/update",method:"put",data:o.a.stringify(e)})}function u(e){return Object(n["a"])({url:i+"/cooperationOrgan/del/".concat(e),method:"post"})}function c(e){return Object(n["a"])({url:i+"/cooperationOrgan/queryPage",method:"get",params:e})}function d(e){return Object(n["a"])({url:i+"/cooperationOrgan/queryByOrganId",method:"get",params:e})}function p(e){return Object(n["a"])({url:i+"/school/queryPage",method:"get",params:e})}function m(e){return Object(n["a"])({url:i+"/school/add",method:"post",data:o.a.stringify(e)})}function f(e){return Object(n["a"])({url:i+"/school/update",method:"post",data:o.a.stringify(e)})}function g(e){return Object(n["a"])({url:i+"/employee/queryEmployByOrganId",method:"get",params:e})}function h(e){return Object(n["a"])({url:i+"/employee/add",method:"post",data:e})}function b(e){return Object(n["a"])({url:i+"/employee/update",method:"post",data:e})}function v(e){return Object(n["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function y(e){return Object(n["a"])({url:i+"/employee/employeeOperate",method:"post",data:o.a.stringify(e)})}function O(e){return Object(n["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function _(e){return Object(n["a"])({url:"/api-auth/role/".concat(e.id),method:"get"})}function k(e){return Object(n["a"])({url:"/api-auth/role/update",method:"post",data:e})}function w(e){return Object(n["a"])({url:"/api-auth/role/add",method:"post",data:e})}function I(e){return Object(n["a"])({url:i+"/courseScheduleRewards/queryPage",method:"get",params:e})}function j(e){return Object(n["a"])({url:i+"/courseScheduleRewards/query",method:"get",params:e})}function S(e){return Object(n["a"])({url:i+"/courseScheduleRewards/add",method:"post",data:o.a.stringify(e)})}function L(e){return Object(n["a"])({url:i+"/courseScheduleRewards/update",method:"post",data:o.a.stringify(e)})}function x(e){return Object(n["a"])({url:i+"/hotWordLabelManage/queryPage",method:"get",params:e})}function C(e){return Object(n["a"])({url:i+"/hotWordLabelManage/add",method:"post",data:o.a.stringify(e)})}function F(e){return Object(n["a"])({url:i+"/hotWordLabelManage/update",method:"post",data:o.a.stringify(e)})}function $(e){return Object(n["a"])({url:i+"/hotWordLabelManage/del/".concat(e),method:"post"})}function T(e){return Object(n["a"])({url:i+"/school/queryByOrganId",method:"get",params:e})}function z(e){return Object(n["a"])({url:i+"/paymentConfig/queryPage",method:"get",params:e})}function q(e){return Object(n["a"])({url:i+"/paymentConfig/add",method:"post",data:o.a.stringify(e)})}function E(e){return Object(n["a"])({url:i+"/paymentConfig/update",method:"post",data:o.a.stringify(e)})}function A(e){return Object(n["a"])({url:i+"/paymentConfig/del/"+e.id,method:"post"})}},c0b9:function(e,t,a){"use strict";var n=a("de4e"),r=a.n(n);r.a},de4e:function(e,t,a){}}]);
|