batch-adjust-legacy.cbb58cff.js 8.8 KB

1
  1. !function(){function t(t,e,n,a,o,i,r){try{var s=t[i](r),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(a,o)}function e(e){return function(){var n=this,a=arguments;return new Promise((function(o,i){var r=e.apply(n,a);function s(e){t(r,o,i,s,c,"next",e)}function c(e){t(r,o,i,s,c,"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.ea1cf20b.js","./index-legacy.81fd4e6f.js","./index-legacy.50ceab3b.js","./index-legacy.00d82922.js","./index-legacy.a9944503.js","./toolsValidate-legacy.7769ad73.js","./index-legacy.9ee98773.js","./index-legacy.75e78f7b.js","./index-legacy.16d013c6.js","./index-legacy.0256f666.js","./index-legacy.e7b78143.js","./index-legacy.c74636d9.js","./index-legacy.40afcdaf.js","./index-legacy.55bd130c.js","./index-legacy.819d05e3.js","./index-legacy.c75fe8a2.js","./icon_teacher-legacy.07765f44.js","./index-legacy.8271e59c.js","./use-tab-status-legacy.7b80393c.js","./index-legacy.3652aee1.js","./index-legacy.1f2c4a24.js","./Checker-legacy.a8f83c3c.js","./index-legacy.aa24f77a.js","./index-legacy.2605abd7.js","./index-legacy.e997fd26.js","./index-legacy.8bfb99fc.js","./index-legacy.2a9471c6.js","./utils-legacy.0c949fd0.js"],(function(t){"use strict";var n,a,o,i,r,s,c,u,d,l,f,m,p,h,g,y,_,j,b,v,x,w,T,S,A,L,k,I;return{setters:[function(t){n=t.O},function(t){a=t.O},function(t){o=t.O},function(t){i=t.O},function(t){r=t.r,s=t.d,c=t.ag,u=t.$,d=t.c,l=t.q,f=t.B,m=t.e,p=t.k,h=t.P,g=t.ah,y=t.m,_=t.f,j=t.o},function(t){b=t.v},function(t){v=t.P},function(t){x=t.C},function(t){w=t.C},function(t){T=t.F},function(t){S=t.R,A=t.a},function(t){L=t.T},function(t){k=t.P},function(t){I=t.D},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var C=r({changeType:1,startTimeStatus:!1,startTime:[],endTimeMinDate:new Date,endTimeStatus:!1,endTime:[],adjustDay:null,orchestraStatus:!1,orchestraList:[],orchestraId:null,orchestraName:null,classGroupIdList:[],classStatus:!1}),D={batchAdjust:"_batchAdjust_1wd6n_1",tips:"_tips_1wd6n_16",radioSection:"_radioSection_1wd6n_19",radioItem:"_radioItem_1wd6n_24",adjustDay:"_adjustDay_1wd6n_35"};t("default",s({name:"batch-adjust",setup:function(){var t=c(),s=r({submitLoading:!1,dialogStatus:!1,dialogMessage:""}),F=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,y.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:_.user.data.school.id,status:"DONE"}});case 3:e=t.sent,n=e.data,C.orchestraList=n.rows||[],C.orchestraList.length>0&&(a=C.orchestraList[0],C.orchestraId=a.id,C.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)}}(),V=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,!(C.classGroupIdList.length<=0)){e.next=4;break}return j("请选择班级"),e.abrupt("return");case 4:if(C.startTime.join("-")){e.next=7;break}return j("请选择课程开始日期"),e.abrupt("return");case 7:if(C.endTime.join("-")){e.next=10;break}return j("请选择课程结束日期"),e.abrupt("return");case 10:if(C.adjustDay){e.next=13;break}return j("请输入调整天数"),e.abrupt("return");case 13:return s.submitLoading=!0,e.next=16,y.post("/api-school/courseSchedule/batchAdjust",{hideLoading:!0,data:{adjustDay:C.changeType?"-"+C.adjustDay:C.adjustDay,classGroupIdList:C.classGroupIdList,startTime:C.startTime.join("-"),endTime:C.endTime.join("-")}});case 16:n=e.sent,s.submitLoading=!1,999===n.code?(s.dialogStatus=!0,s.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),s.submitLoading=!1;case 24:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(){return n.apply(this,arguments)}}(),G=function(t){return t&&t>=1?b(t):""};return u((function(){F()})),function(){return d("div",{class:D.batchAdjust},[d(a,null,null),d(x,{inset:!0},{default:function(){return[d(w,{isLink:!0,onClick:function(){return C.orchestraStatus=!0},valueClass:["van-ellipsis"]},{title:function(){return"乐团名称"},value:function(){return C.orchestraName}}),d(w,{isLink:!0,onClick:function(){C.classStatus=!0}},{title:function(){return"班级"},value:function(){return d("div",{class:D.value},[C.classGroupIdList.length<=0?d("div",{class:D.tips},[l("请选择班级")]):d("div",null,[l("已选"),d("span",{style:{padding:"0 4px"}},[C.classGroupIdList.length]),l("个班级")])])}}),d(T,{isLink:!0,label:"课程开始日期",placeholder:"请选择课程开始日期",readonly:!0,inputAlign:"right",modelValue:C.startTime.join("-"),onClick:function(){C.startTimeStatus=!0}},null),d(T,{isLink:!0,label:"课程结束日期",placeholder:"请选择课程结束日期",readonly:!0,inputAlign:"right",modelValue:C.endTime.join("-"),onClick:function(){C.endTimeStatus=!0}},null),d(w,{title:"调整方式"},{value:function(){return d(S,{"checked-color":"#FF8057",modelValue:C.changeType,"onUpdate:modelValue":function(t){return C.changeType=t},direction:"horizontal"},{default:function(){return[d(L,{size:"large",type:"primary",color:1!==C.changeType?"#EAEAEA":"#FF8057",textColor:1!==C.changeType?"#AAA":"#FFF",class:D.radioSection,round:!0},{default:function(){return[d(A,{class:D.radioItem,name:1},null),l("提前")]}}),d(L,{size:"large",type:"primary",color:0!==C.changeType?"#EAEAEA":"#FF8057",textColor:0!==C.changeType?"#AAA":"#FFF",class:D.radioSection,round:!0},{default:function(){return[d(A,{class:D.radioItem,name:0},null),l("延后")]}})]}})}}),d(T,{class:D.adjustDay,label:"调整天数",inputAlign:"right",type:"number",modelValue:C.adjustDay,"onUpdate:modelValue":function(t){return C.adjustDay=t},placeholder:"请输入调整天数",formatter:G},{extra:function(){return d("span",{style:{paddingLeft:"6px"}},[l("天")])}})]}}),d(i,{position:"bottom"},{default:function(){return[d("div",{class:["btnGroup btnMore"],style:{marginTop:"20px"}},[d(f,{color:"#ccc",round:!0,onClick:function(){m().isApp?p({api:"back"}):t.back()}},{default:function(){return[l("取消")]}}),d(f,{color:"#FF8057",round:!0,onClick:V,disabled:s.submitLoading,loading:s.submitLoading},{default:function(){return[l("下一步")]}})])]}}),d(h,{show:C.orchestraStatus,"onUpdate:show":function(t){return C.orchestraStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[d(k,{columns:C.orchestraList,columnsFieldNames:{text:"name",value:"id"},onCancel:function(){return C.orchestraStatus=!1},onConfirm:function(t){var e=t.selectedOptions[0];C.orchestraId!==e.id&&(C.orchestraId=e.id,C.orchestraName=e.name,C.classGroupIdList=[]),C.orchestraStatus=!1}},null)]}}),d(o,{modelValue:C.classStatus,"onUpdate:modelValue":function(t){return C.classStatus=t},position:"bottom",style:{background:"#f6f6f6"},destroy:!0},{default:function(){return[d(v,{onClose:function(){return C.classStatus=!1},orchestraId:C.orchestraId,selectItem:C.classGroupIdList,onConfirm:function(t){C.classGroupIdList=t}},null)]}}),d(h,{show:C.startTimeStatus,"onUpdate:show":function(t){return C.startTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[d(I,{minDate:new Date,onCancel:function(){return C.startTimeStatus=!1},onConfirm:function(t){C.startTime=t.selectedValues,C.startTimeStatus=!1,C.endTime=[],C.endTimeMinDate=g(C.startTime.join("-")||new Date).toDate()}},null)]}}),d(h,{show:C.endTimeStatus,"onUpdate:show":function(t){return C.endTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[d(I,{minDate:C.endTimeMinDate,onCancel:function(){return C.endTimeStatus=!1},onConfirm:function(t){C.endTime=t.selectedValues,C.endTimeStatus=!1}},null)]}}),d(n,{title:"提示",show:s.dialogStatus,"onUpdate:show":function(t){return s.dialogStatus=t},message:s.dialogMessage,confirmButtonText:"确定",onConfirm:function(){t.back()}},null)])}}}))}}}))}();