chunk-27bee078.5e1e70e6.js 19 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-27bee078"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",function(){return i}),Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function n(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,r){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);n(o),u<t?a(e):r&&"function"===typeof r&&r()};c()}},6883:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[e._m(0),e._v(" "),r("div",{staticClass:"m-core"},[r("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(" "),r("el-form",{staticClass:"searchForm",attrs:{inline:!0},nativeOn:{submit:function(e){e.preventDefault()}},model:{value:e.searchForm,callback:function(t){e.searchForm="string"===typeof t?t.trim():t},expression:"searchForm"}},[r("el-form-item",[r("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","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),r("el-form-item",[r("el-select",{attrs:{clearable:"",filterable:"",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 r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")])],1)],1),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{align:"center",width:"55",prop:"id",label:"编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"name",label:"教学点名称"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"organName",label:"所属分部"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"教学点来源",formatter:e.filterOrgan,width:"120px"}}),e._v(" "),r("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(" "),r("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(" "),r("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(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(r){return e.openTeaching("update",t.row)}}},[e._v("修改")]),e._v(" "),0==t.row.delFlag?r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(r){return e.onUpdateSubmit(t.row,2)}}},[e._v("停用")]):e._e(),e._v(" "),2==t.row.delFlag?r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(r){return e.onUpdateSubmit(t.row,0)}}},[e._v("启用")]):e._e(),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"school/update",expression:"'school/update'"}],attrs:{type:"text"},on:{click:function(r){return e.onUpdateSubmit(t.row,1)}}},[e._v("删除")])]}}])})],1),e._v(" "),r("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(" "),r("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")}}},[r("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[r("el-form-item",{attrs:{label:"教学点名称",prop:"name","label-width":e.formLabelWidth}},[r("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(" "),r("el-form-item",{attrs:{label:"教学点来源",prop:"source","label-width":e.formLabelWidth}},["update"==e.formActionTitle?[r("el-select",{attrs:{filterable:"",clearable:"",disabled:""},model:{value:e.form.source,callback:function(t){e.$set(e.form,"source","string"===typeof t?t.trim():t)},expression:"form.source"}},[r("el-option",{attrs:{label:"合作单位",value:"1"}}),e._v(" "),r("el-option",{attrs:{label:"租赁",value:"2"}})],1)]:[r("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.form.source,callback:function(t){e.$set(e.form,"source","string"===typeof t?t.trim():t)},expression:"form.source"}},[r("el-option",{attrs:{label:"合作单位",value:"1"}}),e._v(" "),r("el-option",{attrs:{label:"租赁",value:"2"}})],1)]],2),e._v(" "),1==e.form.source?r("el-form-item",{attrs:{prop:"cooperationOrganId",label:"合作单位","label-width":e.formLabelWidth}},[r("el-select",{attrs:{filterable:"",clearable:""},on:{change:e.onCooperationChange},model:{value:e.form.cooperationOrganId,callback:function(t){e.$set(e.form,"cooperationOrganId","string"===typeof t?t.trim():t)},expression:"form.cooperationOrganId"}},e._l(e.cooperationList,function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),2==e.form.source?r("el-form-item",{attrs:{prop:"remark",label:"费用","label-width":e.formLabelWidth}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark","string"===typeof t?t.trim():t)},expression:"form.remark"}})],1):e._e(),e._v(" "),2==e.form.source?r("el-form-item",{attrs:{prop:"organId",label:"所属分部","label-width":e.formLabelWidth}},[r("el-select",{attrs:{clearable:"",filterable:""},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.branchList,function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),r("el-form-item",{attrs:{prop:"address","show-message":e.addressMessage,label:"上课地点","label-width":e.formLabelWidth}},[r("el-input",{staticClass:"text-address",attrs:{disabled:!0},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address","string"===typeof t?t.trim():t)},expression:"form.address"}},[r("el-button",{attrs:{slot:"append",type:"primary",icon:"el-icon-plus"},on:{click:e.addMap},slot:"append"},[e._v("选择")])],1)],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){return e.onTeachingCancel("ruleForm")}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onTeachingSubmit("ruleForm")}}},[e._v("确 定")])],1)],1),e._v(" "),r("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}}},[r("el-amap-search-box",{staticClass:"search-box",attrs:{value:"searchValue","search-option":e.searchOption,"on-search-result":e.onSearchResult}}),e._v(" "),r("el-amap",{attrs:{zoom:e.zoom,plugin:e.plugin,center:e.center}},e._l(e.markers,function(t,a){return r("el-amap-marker",{key:a,attrs:{events:e.markerEvents(),position:t}})}),1)],1)],1)},n=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[r("div",{staticClass:"squrt"}),e._v("教学点管理\n ")])}],o=(r("7f7f"),r("ac6a"),r("386d"),r("28a5"),r("333d")),i=r("99b4"),s=r("1cc7"),l=(r("4360"),r("8f9b")),u=r.n(l);(function(){var e=EventTarget.prototype.addEventListener,t=!1;try{var r=Object.defineProperty({},"passive",{get:function(){t=!0}});document.addEventListener("testPassive",null,r),document.removeEventListener("testPassive",null,r)}catch(a){}EventTarget.prototype.addEventListener=function(r,a,n){this.func=e,n=n instanceof Object?n:{},n.passive=t,this.func(r,a,n)}})(),u.a.initAMapApiLoader({key:"b1e6ac2eb28902ce91a490edf194e000",plugin:["AMap.Geolocation","AMap.PlaceSearch","AMap.Geocoder"],v:"1.4.4"});var c={name:"addressManager",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["G"])(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["I"])(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 r=this,a=new AMap.PlaceSearch({pageSize:1,pageIndex:1});a.search(t,function(t,a){if("complete"===t){var n=a.poiList.pois[0];e=n.location.lng+","+n.location.lat,r.center=[n.location.lng,n.location.lat],r.markers.push([n.location.lng,n.location.lat])}})}},onCooperationChange:function(e){var t=this;this.cooperationList.forEach(function(r){r.value==e&&(t.form.organId=r.organId)})},onSearchResult:function(e){var t=this;this.markers=[];var r=0,a=0;if(e.length>0){e.forEach(function(e){var n=e.lng,o=e.lat;a+=n,r+=o,t.markers.push([e.lng,e.lat])});var n={lng:a/e.length,lat:r/e.length};this.center=[n.lng,n.lat]}},markerEvents:function(){var e=this;return{click:function(t){var r=new AMap.Geocoder;r.getAddress(t.lnglat,function(r,a){if("complete"===r&&a.regeocode){a.regeocode.lnglat=t.lnglat;var n=a.regeocode.addressComponent;e.addressDetail={address:n.province+","+n.city+","+n.district+","+n.township+n.street+n.streetNumber,poi:t.lnglat.lng+","+t.lnglat.lat},e.form.address=a.regeocode.formattedAddress,e.mapStatus=!1,e.addressMessage=!1}else e.$message.error("请重新选择地址")})}}},getList:function(){var e=this,t=this.searchForm,r={search:t.search?t.search:null,organId:t.organId?t.organId:null,rows:this.pageInfo.limit,page:this.pageInfo.page};Object(i["H"])(r).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["U"])().then(function(t){if(200==t.code){var r=[];t.data.forEach(function(t){r.push(t.id),e.branchList.push({label:t.name,value:t.id})}),Object(i["z"])({organId:r.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(r){r.value==e.cooperationOrganId&&(t=r.label)}):t="租赁",t},onUpdateSubmit:function(e,t){var r,a=this;r=2==t?"停用":0==t?"启用":"删除",this.$confirm("您确定".concat(r,"吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i["I"])({id:e.id,delFlag:t}).then(function(r){200==r.code?(a.$message.success("修改成功"),a.teachingStatus=!1,2==t||0==t?e.delFlag=t:a.getList()):a.$message.error(r.msg)})})},search:function(){this.pageInfo.page=1,this.getList()}}},d=c,p=(r("8caa"),r("2877")),f=Object(p["a"])(d,a,n,!1,null,null,null);t["default"]=f.exports},"81e4":function(e,t,r){},"8caa":function(e,t,r){"use strict";var a=r("81e4"),n=r.n(a);n.a},"99b4":function(e,t,r){"use strict";r.d(t,"c",function(){return s}),r.d(t,"e",function(){return l}),r.d(t,"d",function(){return u}),r.d(t,"B",function(){return c}),r.d(t,"z",function(){return d}),r.d(t,"H",function(){return p}),r.d(t,"G",function(){return f}),r.d(t,"I",function(){return m}),r.d(t,"A",function(){return g}),r.d(t,"j",function(){return h}),r.d(t,"l",function(){return b}),r.d(t,"p",function(){return v}),r.d(t,"k",function(){return y}),r.d(t,"E",function(){return O}),r.d(t,"n",function(){return _}),r.d(t,"F",function(){return k}),r.d(t,"D",function(){return I}),r.d(t,"f",function(){return w}),r.d(t,"h",function(){return j}),r.d(t,"g",function(){return L}),r.d(t,"i",function(){return x}),r.d(t,"r",function(){return S}),r.d(t,"s",function(){return F}),r.d(t,"u",function(){return T}),r.d(t,"t",function(){return C}),r.d(t,"o",function(){return E}),r.d(t,"x",function(){return $}),r.d(t,"v",function(){return q}),r.d(t,"y",function(){return A}),r.d(t,"w",function(){return M}),r.d(t,"m",function(){return P}),r.d(t,"b",function(){return W}),r.d(t,"a",function(){return z}),r.d(t,"C",function(){return B}),r.d(t,"q",function(){return D}),r.d(t,"J",function(){return N});var a=r("b775"),n=r("4328"),o=r.n(n),i="/api-web";function s(e){return Object(a["a"])({url:i+"/cooperationOrgan/add",method:"post",data:o.a.stringify(e)})}function l(e){return Object(a["a"])({url:i+"/cooperationOrgan/update",method:"put",data:o.a.stringify(e)})}function u(e){return Object(a["a"])({url:i+"/cooperationOrgan/del/".concat(e),method:"post"})}function c(e){return Object(a["a"])({url:i+"/cooperationOrgan/queryPage",method:"get",params:e})}function d(e){return Object(a["a"])({url:i+"/cooperationOrgan/queryByOrganId",method:"get",params:e})}function p(e){return Object(a["a"])({url:i+"/school/queryPage",method:"get",params:e})}function f(e){return Object(a["a"])({url:i+"/school/add",method:"post",data:o.a.stringify(e)})}function m(e){return Object(a["a"])({url:i+"/school/update",method:"post",data:o.a.stringify(e)})}function g(e){return Object(a["a"])({url:i+"/employee/queryEmployByOrganId",method:"get",params:e})}function h(e){return Object(a["a"])({url:i+"/employee/add",method:"post",data:e})}function b(e){return Object(a["a"])({url:i+"/employee/update",method:"post",data:e})}function v(e){return Object(a["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function y(e){return Object(a["a"])({url:i+"/employee/employeeOperate",method:"post",data:o.a.stringify(e)})}function O(e){return Object(a["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function _(e){return Object(a["a"])({url:"/api-auth/role/".concat(e.id),method:"get"})}function k(e){return Object(a["a"])({url:"/api-auth/role/update",method:"post",data:e})}function I(e){return Object(a["a"])({url:"/api-auth/role/add",method:"post",data:e})}function w(e){return Object(a["a"])({url:i+"/courseScheduleRewards/queryPage",method:"get",params:e})}function j(e){return Object(a["a"])({url:i+"/courseScheduleRewards/query",method:"get",params:e})}function L(e){return Object(a["a"])({url:i+"/courseScheduleRewards/add",method:"post",data:o.a.stringify(e)})}function x(e){return Object(a["a"])({url:i+"/courseScheduleRewards/update",method:"post",data:o.a.stringify(e)})}function S(e){return Object(a["a"])({url:i+"/hotWordLabelManage/queryPage",method:"get",params:e})}function F(e){return Object(a["a"])({url:i+"/hotWordLabelManage/add",method:"post",data:o.a.stringify(e)})}function T(e){return Object(a["a"])({url:i+"/hotWordLabelManage/update",method:"post",data:o.a.stringify(e)})}function C(e){return Object(a["a"])({url:i+"/hotWordLabelManage/del/".concat(e),method:"post"})}function E(e){return Object(a["a"])({url:i+"/school/queryByOrganId",method:"get",params:e})}function $(e){return Object(a["a"])({url:i+"/paymentConfig/queryPage",method:"get",params:e})}function q(e){return Object(a["a"])({url:i+"/paymentConfig/add",method:"post",data:o.a.stringify(e)})}function A(e){return Object(a["a"])({url:i+"/paymentConfig/update",method:"post",data:o.a.stringify(e)})}function M(e){return Object(a["a"])({url:i+"/paymentConfig/del/"+e.id,method:"post"})}function P(e){return Object(a["a"])({url:i+"/teacher/findTeacherByOrganId",method:"get",params:e})}function W(e){return Object(a["a"])({url:i+"/appVersionInfo/list",method:"get",params:e})}function z(e){return Object(a["a"])({url:i+"/appVersionInfo/add",method:"post",data:o.a.stringify(e)})}function B(e){return Object(a["a"])({url:i+"/appVersionInfo/update",method:"post",data:o.a.stringify(e)})}function D(e){return Object(a["a"])({url:i+"/employee/hasCourseGroupRelation",method:"post",data:o.a.stringify(e)})}function N(e){return Object(a["a"])({url:i+"/employee/updateEducationTeacherId",method:"post",data:o.a.stringify(e)})}}}]);