batch-adjust-legacy.8f6f5571.js 8.9 KB

1
  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.48c8d62c.js","./index-legacy.5a3e4145.js","./index-legacy.f3037807.js","./index-legacy.d1078003.js","./index-legacy.8cf5f94f.js","./toolsValidate-legacy.95a8e7c1.js","./index-legacy.0ab1a3b2.js","./index-legacy.269a0b91.js","./index-legacy.087e0425.js","./index-legacy.55fe5b03.js","./index-legacy.085e5a7e.js","./index-legacy.93204044.js","./index-legacy.384d768f.js","./index-legacy.a53f47a7.js","./index-legacy.ac553194.js","./index-legacy.c75fe8a2.js","./icon_teacher-legacy.07765f44.js","./index-legacy.04f465c8.js","./use-tab-status-legacy.6949b1de.js","./index-legacy.4e061cf8.js","./index-legacy.23554efd.js","./Checker-legacy.3526dce7.js","./index-legacy.0e0de364.js","./index-legacy.8429fc95.js","./index-legacy.ef66d7bb.js","./index-legacy.71047e87.js","./index-legacy.a2ac81dd.js","./utils-legacy.60f652b8.js"],(function(t){"use strict";var n,a,o,r,i,s,u,c,d,l,f,m,p,h,g,y,_,j,b,x,v,w,T,S,A,L,k,I,C;return{setters:[function(t){n=t.r,a=t.d,o=t.ag,r=t.$,i=t.c,s=t.q,u=t.B,c=t.e,d=t.k,l=t.P,f=t.ah,m=t.aj,p=t.m,h=t.f,g=t.o},function(t){y=t.O},function(t){_=t.O},function(t){j=t.O},function(t){b=t.O},function(t){x=t.v},function(t){v=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(){},function(){}],execute:function(){var D=n({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",a({name:"batch-adjust",setup:function(){var t=o(),a=n({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,p.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:h.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 g("请选择班级"),e.abrupt("return");case 4:if(D.startTime.join("-")){e.next=7;break}return g("请选择课程开始日期"),e.abrupt("return");case 7:if(D.endTime.join("-")){e.next=10;break}return g("请选择课程结束日期"),e.abrupt("return");case 10:if(D.adjustDay){e.next=13;break}return g("请输入调整天数"),e.abrupt("return");case 13:return a.submitLoading=!0,e.next=16,p.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,a.submitLoading=!1,999===n.code?(a.dialogStatus=!0,a.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),a.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?x(t):""};return r((function(){V()})),function(){return i("div",{class:F.batchAdjust},[i(_,null,null),i(w,{inset:!0},{default:function(){return[i(T,{isLink:!0,onClick:function(){return D.orchestraStatus=!0},valueClass:["van-ellipsis"]},{title:function(){return"乐团名称"},value:function(){return D.orchestraName}}),i(T,{isLink:!0,onClick:function(){D.classStatus=!0}},{title:function(){return"班级"},value:function(){return i("div",{class:F.value},[D.classGroupIdList.length<=0?i("div",{class:F.tips},[s("请选择班级")]):i("div",null,[s("已选"),i("span",{style:{padding:"0 4px"}},[D.classGroupIdList.length]),s("个班级")])])}}),i(S,{isLink:!0,label:"课程开始日期",placeholder:"请选择课程开始日期",readonly:!0,inputAlign:"right",modelValue:D.startTime.join("-"),onClick:function(){D.startTimeStatus=!0}},null),i(S,{isLink:!0,label:"课程结束日期",placeholder:"请选择课程结束日期",readonly:!0,inputAlign:"right",modelValue:D.endTime.join("-"),onClick:function(){D.endTimeStatus=!0}},null),i(T,{title:"调整方式"},{value:function(){return i(A,{"checked-color":"#FF8057",modelValue:D.changeType,"onUpdate:modelValue":function(t){return D.changeType=t},direction:"horizontal"},{default:function(){return[i(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[i(L,{class:F.radioItem,name:1},null),s("提前")]}}),i(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[i(L,{class:F.radioItem,name:0},null),s("延后")]}})]}})}}),i(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 i("span",{style:{paddingLeft:"6px"}},[s("天")])}})]}}),i(b,{position:"bottom"},{default:function(){return[i("div",{class:["btnGroup btnMore"],style:{marginTop:"20px"}},[i(u,{color:"#ccc",round:!0,onClick:function(){c().isApp?d({api:"back"}):t.back()}},{default:function(){return[s("取消")]}}),i(u,{color:"#FF8057",round:!0,onClick:G,disabled:a.submitLoading,loading:a.submitLoading},{default:function(){return[s("下一步")]}})])]}}),i(l,{show:D.orchestraStatus,"onUpdate:show":function(t){return D.orchestraStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[i(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)]}}),i(j,{modelValue:D.classStatus,"onUpdate:modelValue":function(t){return D.classStatus=t},position:"bottom",style:{background:"#f6f6f6"},destroy:!0},{default:function(){return[i(v,{onClose:function(){return D.classStatus=!1},orchestraId:D.orchestraId,selectItem:D.classGroupIdList,onConfirm:function(t){D.classGroupIdList=t}},null)]}}),i(l,{show:D.startTimeStatus,"onUpdate:show":function(t){return D.startTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[i(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=f(D.startTime.join("-")||new Date).toDate()}},null)]}}),i(l,{show:D.endTimeStatus,"onUpdate:show":function(t){return D.endTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[i(C,{minDate:D.endTimeMinDate,formatter:m,onCancel:function(){return D.endTimeStatus=!1},onConfirm:function(t){D.endTime=t.selectedValues,D.endTimeStatus=!1}},null)]}}),i(y,{title:"提示",show:a.dialogStatus,"onUpdate:show":function(t){return a.dialogStatus=t},message:a.dialogMessage,confirmButtonText:"确定",onConfirm:function(){t.back()}},null)])}}}))}}}))}();