1 |
- !function(){function t(t,e,n,a,o,r,i){try{var s=t[r](i),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(a,o)}function e(e){return function(){var n=this,a=arguments;return new Promise((function(o,r){var i=e.apply(n,a);function s(e){t(i,o,r,s,u,"next",e)}function u(e){t(i,o,r,s,u,"throw",e)}s(void 0)}))}}var n=document.createElement("style");n.innerHTML="._batchAdjust_1wd6n_1{margin-top:.32rem}._batchAdjust_1wd6n_1 .van-cell{font-size:.42667rem;padding:.48rem .32rem}._batchAdjust_1wd6n_1 .van-cell__value{color:#333;font-weight:400}._batchAdjust_1wd6n_1 .van-radio-group,._batchAdjust_1wd6n_1 .van-checkbox-group{justify-content:flex-end}._batchAdjust_1wd6n_1 ._tips_1wd6n_16{color:#c8c9cc}._batchAdjust_1wd6n_1 ._radioSection_1wd6n_19{position:relative;min-width:.85333rem;justify-content:center}._batchAdjust_1wd6n_1 ._radioItem_1wd6n_24{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0}._batchAdjust_1wd6n_1 ._radioSection_1wd6n_19+._radioSection_1wd6n_19{margin-left:.32rem}._adjustDay_1wd6n_35 .van-field__control{color:var(--van-primary-color)}\n",document.head.appendChild(n),System.register(["./index-legacy.df49868a.js","./index-legacy.47bc1690.js","./index-legacy.a418c316.js","./index-legacy.697c501a.js","./toolsValidate-legacy.95a8e7c1.js","./index-legacy.c2bcae81.js","./index-legacy.bab9fe30.js","./index-legacy.92a01198.js","./index-legacy.569a2858.js","./index-legacy.25e655f1.js","./index-legacy.453fd926.js","./index-legacy.62a334e5.js","./index-legacy.5ec06f8e.js","./icon_teacher-legacy.07765f44.js","./index-legacy.57721991.js","./use-tab-status-legacy.7bf91b8c.js","./index-legacy.1900d24e.js","./index-legacy.deb7af23.js","./Checker-legacy.289748ec.js","./index-legacy.0ebc214d.js","./index-legacy.4df1d4ab.js","./Picker-legacy.cd27e6c1.js","./index-legacy.00966b07.js","./index-legacy.18044794.js","./index-legacy.21964237.js","./utils-legacy.24861f33.js"],(function(t){"use strict";var n,a,o,r,i,s,u,c,d,l,f,m,p,h,g,y,_,j,b,v,x,w,T,S,A,L,k,I,C;return{setters:[function(t){n=t.O},function(t){a=t.r,o=t.d,r=t.ag,i=t.$,s=t.c,u=t.aj,c=t.q,d=t.B,l=t.f,f=t.e,m=t.P,p=t.ai,h=t.a_,g=t.m,y=t.g,_=t.o},function(t){j=t.O},function(t){b=t.O},function(t){v=t.v},function(t){x=t.P},function(t){w=t.C},function(t){T=t.C},function(t){S=t.F},function(t){A=t.R,L=t.a},function(t){k=t.T},function(t){I=t.P},function(t){C=t.D},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var D=a({changeType:1,startTimeStatus:!1,startTime:[],endTimeMinDate:new Date,endTimeStatus:!1,endTime:[],adjustDay:null,orchestraStatus:!1,orchestraList:[],orchestraId:null,orchestraName:null,classGroupIdList:[],classStatus:!1}),F={batchAdjust:"_batchAdjust_1wd6n_1",tips:"_tips_1wd6n_16",radioSection:"_radioSection_1wd6n_19",radioItem:"_radioItem_1wd6n_24",adjustDay:"_adjustDay_1wd6n_35"};t("default",o({name:"batch-adjust",setup:function(){var t=r(),o=a({submitLoading:!1,dialogStatus:!1,dialogMessage:""}),V=function(){var t=e(regeneratorRuntime.mark((function t(){var e,n,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,g.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:y.user.data.school.id,status:"DONE"}});case 3:e=t.sent,n=e.data,D.orchestraList=n.rows||[],D.orchestraList.length>0&&(a=D.orchestraList[0],D.orchestraId=a.id,D.orchestraName=a.name),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),G=function(){var n=e(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(D.classGroupIdList.length<=0)){e.next=4;break}return _("请选择班级"),e.abrupt("return");case 4:if(D.startTime.join("-")){e.next=7;break}return _("请选择课程开始日期"),e.abrupt("return");case 7:if(D.endTime.join("-")){e.next=10;break}return _("请选择课程结束日期"),e.abrupt("return");case 10:if(D.adjustDay){e.next=13;break}return _("请输入调整天数"),e.abrupt("return");case 13:return o.submitLoading=!0,e.next=16,g.post("/api-school/courseSchedule/batchAdjust",{hideLoading:!0,data:{adjustDay:D.changeType?"-"+D.adjustDay:D.adjustDay,classGroupIdList:D.classGroupIdList,startTime:D.startTime.join("-"),endTime:D.endTime.join("-")}});case 16:n=e.sent,o.submitLoading=!1,999===n.code?(o.dialogStatus=!0,o.dialogMessage=n.message):t.push({path:"/course-preview",query:{cacheId:n.data}}),e.next=24;break;case 21:e.prev=21,e.t0=e.catch(0),o.submitLoading=!1;case 24:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(){return n.apply(this,arguments)}}(),E=function(t){return t&&t>=1?v(t):""};return i((function(){V()})),function(){return s("div",{class:F.batchAdjust},[s(u,null,null),s(w,{inset:!0},{default:function(){return[s(T,{isLink:!0,onClick:function(){return D.orchestraStatus=!0},valueClass:["van-ellipsis"]},{title:function(){return"乐团名称"},value:function(){return D.orchestraName}}),s(T,{isLink:!0,onClick:function(){D.classStatus=!0}},{title:function(){return"班级"},value:function(){return s("div",{class:F.value},[D.classGroupIdList.length<=0?s("div",{class:F.tips},[c("请选择班级")]):s("div",null,[c("已选"),s("span",{style:{padding:"0 4px"}},[D.classGroupIdList.length]),c("个班级")])])}}),s(S,{isLink:!0,label:"课程开始日期",placeholder:"请选择课程开始日期",readonly:!0,inputAlign:"right",modelValue:D.startTime.join("-"),onClick:function(){D.startTimeStatus=!0}},null),s(S,{isLink:!0,label:"课程结束日期",placeholder:"请选择课程结束日期",readonly:!0,inputAlign:"right",modelValue:D.endTime.join("-"),onClick:function(){D.endTimeStatus=!0}},null),s(T,{title:"调整方式"},{value:function(){return s(A,{"checked-color":"#FF8057",modelValue:D.changeType,"onUpdate:modelValue":function(t){return D.changeType=t},direction:"horizontal"},{default:function(){return[s(k,{size:"large",type:"primary",color:1!==D.changeType?"#EAEAEA":"#FF8057",textColor:1!==D.changeType?"#AAA":"#FFF",class:F.radioSection,round:!0},{default:function(){return[s(L,{class:F.radioItem,name:1},null),c("提前")]}}),s(k,{size:"large",type:"primary",color:0!==D.changeType?"#EAEAEA":"#FF8057",textColor:0!==D.changeType?"#AAA":"#FFF",class:F.radioSection,round:!0},{default:function(){return[s(L,{class:F.radioItem,name:0},null),c("延后")]}})]}})}}),s(S,{class:F.adjustDay,label:"调整天数",inputAlign:"right",type:"number",modelValue:D.adjustDay,"onUpdate:modelValue":function(t){return D.adjustDay=t},placeholder:"请输入调整天数",formatter:E},{extra:function(){return s("span",{style:{paddingLeft:"6px"}},[c("天")])}})]}}),s(b,{position:"bottom"},{default:function(){return[s("div",{class:["btnGroup btnMore"],style:{marginTop:"20px"}},[s(d,{color:"#ccc",round:!0,onClick:function(){l().isApp?f({api:"back"}):t.back()}},{default:function(){return[c("取消")]}}),s(d,{color:"#FF8057",round:!0,onClick:G,disabled:o.submitLoading,loading:o.submitLoading},{default:function(){return[c("下一步")]}})])]}}),s(m,{show:D.orchestraStatus,"onUpdate:show":function(t){return D.orchestraStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[s(I,{columns:D.orchestraList,columnsFieldNames:{text:"name",value:"id"},onCancel:function(){return D.orchestraStatus=!1},onConfirm:function(t){var e=t.selectedOptions[0];D.orchestraId!==e.id&&(D.orchestraId=e.id,D.orchestraName=e.name,D.classGroupIdList=[]),D.orchestraStatus=!1}},null)]}}),s(j,{modelValue:D.classStatus,"onUpdate:modelValue":function(t){return D.classStatus=t},position:"bottom",style:{background:"#f6f6f6"},destroy:!0},{default:function(){return[s(x,{onClose:function(){return D.classStatus=!1},orchestraId:D.orchestraId,selectItem:D.classGroupIdList,onConfirm:function(t){D.classGroupIdList=t}},null)]}}),s(m,{show:D.startTimeStatus,"onUpdate:show":function(t){return D.startTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[s(C,{minDate:new Date,formatter:function(t,e){return"year"===t&&(e.text+="年"),"month"===t&&(e.text+="月"),"day"===t&&(e.text+="日"),e},onCancel:function(){return D.startTimeStatus=!1},onConfirm:function(t){D.startTime=t.selectedValues,D.startTimeStatus=!1,D.endTime=[],D.endTimeMinDate=p(D.startTime.join("-")||new Date).toDate()}},null)]}}),s(m,{show:D.endTimeStatus,"onUpdate:show":function(t){return D.endTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[s(C,{minDate:D.endTimeMinDate,formatter:h,onCancel:function(){return D.endTimeStatus=!1},onConfirm:function(t){D.endTime=t.selectedValues,D.endTimeStatus=!1}},null)]}}),s(n,{title:"提示",show:o.dialogStatus,"onUpdate:show":function(t){return o.dialogStatus=t},message:o.dialogMessage,confirmButtonText:"确定",onConfirm:function(){t.back()}},null)])}}}))}}}))}();
|