1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["TeachingSet"],{"1e95":function(t,e,n){},3354:function(t,e,n){},"4ca3":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"teachingset"},[n("m-header"),n("van-search",{attrs:{shape:"round",placeholder:"搜小区、学校",background:"transparent","show-action":""},on:{search:t.onSearch},model:{value:t.search_value,callback:function(e){t.search_value=e},expression:"search_value"}},[n("div",{attrs:{slot:"action"},on:{click:t.onSearch},slot:"action"},[t._v("搜索")])]),n("el-amap",{attrs:{zoom:t.zoom,events:t.amapEvents(),plugin:t.plugin,center:t.center}},t._l(t.markers,function(t,e){return n("el-amap-marker",{key:e,attrs:{clickable:!0,events:t.events,position:t.position}})}),1),n("van-cell-group",[n("van-field",{attrs:{type:"textarea",rows:"1",autosize:"",disabled:!0,label:"教学地址",placeholder:"详情地址"},model:{value:t.addressDetail,callback:function(e){t.addressDetail=e},expression:"addressDetail"}}),n("van-field",{attrs:{type:"text",label:"教学点名称",placeholder:"请输入名称"},model:{value:t.teachingSchool,callback:function(e){t.teachingSchool=e},expression:"teachingSchool"}})],1),n("div",{staticClass:"button-group"},[n("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:t.onSubmit}},[t._v("确认")])],1)],1)},a=[],o=(n("386d"),n("28a5"),n("7f7f"),n("6e6e")),i=n("9afb"),u={name:"teachingset",components:{MHeader:o["a"]},data:function(){var t=this;return{type:this.$route.query.type,search_value:"",zoom:12,center:[114.34371,30.55939],markers:[],searchResult:[],plugin:[{pName:"Geolocation",events:{init:function(e){"create"==t.type&&e.getCurrentPosition(function(e,n){n&&n.position&&(t.lng=n.position.lng,t.lat=n.position.lat,t.center=[t.lng,t.lat],t.loaded=!0,t.$nextTick())})}}},{pName:"ToolBar",events:{init:function(){}}}],searchOption:{pageSize:1,pageIndex:1,autoFitView:!0},addressDetail:null,teachingSchool:null,lnglat:null}},mounted:function(){document.title="教学点设置";var t=this.$route.query;if(t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),"update"==t.type){this.addressDetail=t.address,this.teachingSchool=t.name,this.lnglat=t.longitudeLatitude;var e=t.longitudeLatitude.split(",");this.center=[e[0],e[1]],this.markers.push({position:[e[0],e[1]],events:this.markerEvents()})}},methods:{amapEvents:function(){return{complete:function(){}}},onSubmit:function(){var t=this;this.addressDetail?this.teachingSchool?"create"==this.type?Object(i["u"])({name:this.teachingSchool,address:this.addressDetail,longitudeLatitude:this.lnglat}).then(function(e){var n=e.data;200==n.code?(t.$toast("添加成功"),t.$router.push("/teachingSchool")):t.$toast(n.msg)}):"update"==this.type&&Object(i["w"])({id:this.$route.query.id,name:this.teachingSchool,address:this.addressDetail,longitudeLatitude:this.lnglat}).then(function(e){var n=e.data;200==n.code?(t.$toast("修改成功"),t.$router.push("/teachingSchool")):t.$toast(n.msg)}):this.$toast("请输入教学点名称"):this.$toast("请选择教学地点")},onSearch:function(){var t=this;if(this.search_value){this.markers=[];var e=new AMap.PlaceSearch(this.searchOption);e.search(this.search_value,function(e,n){if(n&&n.poiList&&n.poiList.count){var r=n.poiList.pois[0];t.searchResult.push(r),t.markers.push({position:[r.location.lng,r.location.lat],events:t.markerEvents(r)}),t.center=[r.location.lng,r.location.lat]}else if(void 0===n.poiList)throw new Error(n)})}},markerEvents:function(){var t=this;return{click:function(e){var n=new AMap.Geocoder;n.getAddress(e.lnglat,function(n,r){"complete"===n&&r.regeocode?(t.lnglat=e.lnglat.lng+","+e.lnglat.lat,t.addressDetail=r.regeocode.formattedAddress):t.$toast("请重新选择地址")})}}}}},s=u,c=(n("9049"),n("2877")),l=Object(c["a"])(s,r,a,!1,null,"19a3a253",null);e["default"]=l.exports},5115:function(t,e,n){"use strict";var r=n("3354"),a=n.n(r);a.a},"6e6e":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mheader"},[n("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[n("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),n("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},a=[],o={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},i=o,u=(n("5115"),n("2877")),s=Object(u["a"])(i,r,a,!1,null,"61d0e2e4",null);e["a"]=s.exports},9049:function(t,e,n){"use strict";var r=n("1e95"),a=n.n(r);a.a},"9afb":function(t,e,n){"use strict";n.d(e,"o",function(){return u}),n.d(e,"t",function(){return s}),n.d(e,"p",function(){return c}),n.d(e,"g",function(){return l}),n.d(e,"C",function(){return d}),n.d(e,"f",function(){return h}),n.d(e,"h",function(){return p}),n.d(e,"u",function(){return m}),n.d(e,"v",function(){return g}),n.d(e,"w",function(){return v}),n.d(e,"e",function(){return y}),n.d(e,"B",function(){return S}),n.d(e,"s",function(){return k}),n.d(e,"n",function(){return b}),n.d(e,"b",function(){return C}),n.d(e,"k",function(){return _}),n.d(e,"j",function(){return w}),n.d(e,"c",function(){return B}),n.d(e,"d",function(){return L}),n.d(e,"x",function(){return $}),n.d(e,"y",function(){return A}),n.d(e,"q",function(){return x}),n.d(e,"r",function(){return q}),n.d(e,"A",function(){return D}),n.d(e,"i",function(){return f}),n.d(e,"l",function(){return z}),n.d(e,"m",function(){return j}),n.d(e,"a",function(){return G}),n.d(e,"z",function(){return R});var r=n("4328"),a=n.n(r),o=n("981f").default,i="/api-teacher",u=function(t){return o({url:i+"/snaker/task/queryMyCreatedList",method:"get",params:t})},s=function(t){return o({url:i+"/snaker/task/queryWaitList",method:"get",params:t})},c=function(t){return o({url:i+"/snaker/task/queryProcessedList",method:"get",params:t})},l=function(t){return o({url:i+"/subject/findTeacherSubjets",method:"get",params:t})},d=function(t){return o({url:i+"/vipGroupCategory/queryAll",method:"get",params:t})},h=function(t){return o({url:i+"/vipGroupActivity/findByVipGroupCategory",method:"get",params:t})},p=function(t){return o({url:i+"/school/findVipSchoolByTeacher",method:"get",params:t})},f=function(t){return o({url:i+"/school/findVipSchoolByTeacher2",method:"get",params:t})},m=function(t){return o({url:i+"/school/add",method:"post",data:a.a.stringify(t)})},g=function(t){return o({url:i+"/school/del",method:"post",data:a.a.stringify(t)})},v=function(t){return o({url:i+"/school/update",method:"post",data:a.a.stringify(t)})},y=function(t){return o({url:i+"/teacherDefaultVipGroupSalary/findByTeacherAndCategory",method:"get",params:t})},S=function(t){return o({url:i+"/teacherVipGroup/vipGroupApply",method:"post",data:t})},k=function(t){return o({url:i+"/teacherLeaveRecord/queryVipCourseScheduleList",method:"get",params:t})},b=function(t){return o({url:i+"/leaveCategory/queryPage",method:"post",data:t})},C=function(t){return o({url:i+"/teacherLeaveRecord/askForLeave",method:"post",data:a.a.stringify(t)})},_=function(t){return o({url:i+"/teacherCourseSchedule/getCourseSchedulesWithDate",method:"get",params:t})},w=function(t){return o({url:i+"/teacherCourseSchedule/getCourseScheduleDateByMonth",method:"get",params:t})},B=function(t){return o({url:i+"/teacherCourseSchedule/classStartDateAdjust",method:"post",data:a.a.stringify(t)})},L=function(t){return o({url:i+"/teacherCourseSchedule/courseSwap",method:"post",data:a.a.stringify(t)})},$=function(t){return o({url:i+"/teacherCourseSchedule/statisticsInfo",method:"get",params:t})},A=function(t){return o({url:i+"/teacherCourseSchedule/statisticsList",method:"get",params:t})},x=function(t){return o({url:i+"/teacher/queryStudentApply",method:"get",params:t})},q=function(t){return o({url:i+"/teacher/querySubByMusicGroupId",method:"get",params:t})},D=function(t){return o({url:i+"/studentRegistration/updateSubject",method:"post",data:a.a.stringify(t)})},z=function(){return o({url:"/api-student/studentOrder/getLuckStatis",method:"get"})},j=function(){return o({url:"/api-web/api/practiceSum",method:"get"})},G=function(t){return o({url:"/api-teacher/classGroup/addStudyReport ",method:"post",data:t})},R=function(t){return o({url:"/api-teacher/studyReport/info",method:"get",params:t})}}}]);
|