1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesClass/addClassForm"],{"0f61":function(e,t,n){"use strict";var i=n("c475"),r=n.n(i);r.a},"4c0f":function(e,t,n){"use strict";n.r(t);var i=n("a790"),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a},"64da":function(e,t,n){"use strict";var i=n("f343"),r=n.n(i);r.a},a60d:function(e,t,n){"use strict";(function(e){n("e744");i(n("66fd"));var t=i(n("c233"));function i(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},a790:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("2f62");function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n("157c"),a=n("f344"),c={computed:o({},(0,i.mapGetters)(["mainColor","customStyle"])),data:function(){var e;return{form:(e={name:"",startDate:"",endDate:"",address:"",venueId:"",venueName:""},u(e,"address",""),u(e,"maxStudentCount",""),u(e,"timeReqList",[{week:"",startTime:"",endTime:""}]),e),rules:{name:[{required:!0,message:"请输入班级名称",trigger:"change"}],startDate:[{required:!0,message:"请选择课程周期开始时间",trigger:"change"}],endDate:[{required:!0,message:"请选择课程周期结束时间",trigger:"change"}],timeReqList:[{type:"array",required:!0,message:"请选择上课时间",trigger:"change"}],venueName:[{required:!0,message:"请选择归属场馆",trigger:"change"}],maxStudentCount:[{required:!0,message:"请输入学生数量",trigger:"change"}]},selectIndex:0,selectForm:{week:"",startTime:"",endTime:""},classDate:!1,weekList:[{name:"周一"},{name:"周二"},{name:"周三"},{name:"周四"},{name:"周五"},{name:"周六"},{name:"周日"}],startDateShow:!1,endDateShow:!1,cycleParams:{year:!0,month:!0,day:!0,hour:!1,minute:!1,second:!1},startTimeShow:!1,startTimeParams:{year:!1,month:!1,day:!1,hour:!0,minute:!0,second:!0},venueShow:!1,venueList:[],options:[{text:"删除",style:{color:"#fa3534"}}]}},onLoad:function(){var e=this;s.request(a.getVenueList,{page:1,size:1e4},"POST").then((function(t){e.venueList=t.data.row})).catch((function(t){e.$refs.uTips.show({title:t.message,type:"warning"})}))},onReady:function(){this.$refs.form.setRules(this.rules)},onShow:function(){},methods:{toSetDate:function(e){this.selectIndex=e,this.selectForm={week:this.form.timeReqList[e].week,startTime:this.form.timeReqList[e].startTime,endTime:this.form.timeReqList[e].endTime},this.classDate=!0},deleteDate:function(e,t){0==t&&this.form.timeReqList.splice(e,1)},addDate:function(){this.form.timeReqList.push({week:"",startTime:"",endTime:""})},setStartDate:function(e){this.form.startDate=e.year+"-"+e.month+"-"+e.day},setEndDate:function(e){this.form.endDate=e.year+"-"+e.month+"-"+e.day},setStartTime:function(e){1==this.timeType?this.selectForm.startTime=e.hour+":"+e.minute+":"+e.second:this.selectForm.endTime=e.hour+":"+e.minute+":"+e.second},setDate:function(){this.form.timeReqList[this.selectIndex]={week:this.selectForm.week,startTime:this.selectForm.startTime,endTime:this.selectForm.endTime},this.classDate=!1},setVenue:function(e){this.form.venueId=this.venueList[e[0]].id,this.form.venueName=this.venueList[e[0]].name,this.form.address=this.venueList[e[0]].address},submitForm:function(){var t=this;this.$refs.form.validate((function(n){n&&s.request(a.submitClassForm,o({},t.form),"POST").then((function(n){e.removeStorageSync({key:"extraLessonsUserList"}),t.$refs.uTips.show({title:"提交成功",type:"success"}),setTimeout((function(){e.navigateBack()}),1e3)})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})}))}))}}};t.default=c}).call(this,n("543d")["default"])},c233:function(e,t,n){"use strict";n.r(t);var i=n("d752"),r=n("4c0f");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("0f61"),n("64da");var u,s=n("f0c5"),a=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"3b65c50c",null,!1,i["a"],u);t["default"]=a.exports},c475:function(e,t,n){},d752:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var i={uForm:function(){return n.e("uview-ui/components/u-form/u-form").then(n.bind(null,"93b0"))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,"bbfd"))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-input/u-input")]).then(n.bind(null,"be27"))},uSwipeAction:function(){return n.e("uview-ui/components/u-swipe-action/u-swipe-action").then(n.bind(null,"eff6"))},uButton:function(){return n.e("uview-ui/components/u-button/u-button").then(n.bind(null,"0198"))},uPopup:function(){return n.e("uview-ui/components/u-popup/u-popup").then(n.bind(null,"e079"))},uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,"e681"))},uRadio:function(){return n.e("uview-ui/components/u-radio/u-radio").then(n.bind(null,"0ffe"))},uPicker:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-picker/u-picker")]).then(n.bind(null,"9838"))},uTopTips:function(){return n.e("uview-ui/components/u-top-tips/u-top-tips").then(n.bind(null,"14ca"))}},r=function(){var e=this,t=e.$createElement,n=(e._self._c,Object.assign({},e.customStyle,{marginTop:"15px"}));e._isMounted||(e.e0=function(t){e.startDateShow=!0},e.e1=function(t){e.startDateShow=!0},e.e2=function(t){e.endDateShow=!0},e.e3=function(t){e.endDateShow=!0},e.e4=function(t){e.venueShow=!0},e.e5=function(t){e.venueShow=!0},e.e6=function(t){return function(){e.startTimeShow=!0,e.timeType=1}()},e.e7=function(){e.startTimeShow=!0,e.timeType=1},e.e8=function(t){return function(){e.startTimeShow=!0,e.timeType=2}()},e.e9=function(){e.startTimeShow=!0,e.timeType=2}),e.$mp.data=Object.assign({},{$root:{a0:n}})},o=[]},f343:function(e,t,n){}},[["a60d","common/runtime","common/vendor"]]]);
|