batch-adjust-legacy.939e79ac.js 8.9 KB

1
  1. !function(){function t(t,e,n,a,o,i,r){try{var u=t[i](r),s=u.value}catch(c){return void n(c)}u.done?e(s):Promise.resolve(s).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 u(e){t(r,o,i,u,s,"next",e)}function s(e){t(r,o,i,u,s,"throw",e)}u(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.5f9666b4.js","./index-legacy.da787cdf.js","./index-legacy.716db4d0.js","./index-legacy.dc9d3f42.js","./toolsValidate-legacy.95a8e7c1.js","./index-legacy.e8462254.js","./index-legacy.e96cb8ba.js","./index-legacy.1f24a6b5.js","./index-legacy.b6ba0003.js","./index-legacy.c898c258.js","./index-legacy.355c349b.js","./index-legacy.91f80f2a.js","./index-legacy.226c817e.js","./index-legacy.812ec873.js","./index-legacy.85e16f70.js","./icon_teacher-legacy.07765f44.js","./index-legacy.4e015ad0.js","./index-legacy.185ff5a4.js","./use-tab-status-legacy.feb57916.js","./index-legacy.607b8638.js","./index-legacy.54610f12.js","./Checker-legacy.3dea4053.js","./index-legacy.892caf3d.js","./index-legacy.9bcfff34.js","./Picker-legacy.71aa652a.js","./index-legacy.7fb4d035.js","./index-legacy.8f20f3d1.js","./index-legacy.42a30b51.js","./utils-legacy.3a4c6ad6.js"],(function(t){"use strict";var n,a,o,i,r,u,s,c,d,l,f,m,p,h,g,y,_,b,j,x,v,w,T,S,A,L,k,I,C;return{setters:[function(t){n=t.r,a=t.d,o=t.ag,i=t.$,r=t.c,u=t.aj,s=t.q,c=t.B,d=t.f,l=t.e,f=t.P,m=t.ai,p=t.b2,h=t.m,g=t.g,y=t.o},function(t){_=t.O},function(t){b=t.O},function(t){j=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(){},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,h.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:g.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 y("请选择班级"),e.abrupt("return");case 4:if(D.startTime.join("-")){e.next=7;break}return y("请选择课程开始日期"),e.abrupt("return");case 7:if(D.endTime.join("-")){e.next=10;break}return y("请选择课程结束日期"),e.abrupt("return");case 10:if(D.adjustDay){e.next=13;break}return y("请输入调整天数"),e.abrupt("return");case 13:return a.submitLoading=!0,e.next=16,h.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 i((function(){V()})),function(){return r("div",{class:F.batchAdjust},[r(u,null,null),r(w,{inset:!0},{default:function(){return[r(T,{isLink:!0,onClick:function(){return D.orchestraStatus=!0},valueClass:["van-ellipsis"]},{title:function(){return"乐团名称"},value:function(){return D.orchestraName}}),r(T,{isLink:!0,onClick:function(){D.classStatus=!0}},{title:function(){return"班级"},value:function(){return r("div",{class:F.value},[D.classGroupIdList.length<=0?r("div",{class:F.tips},[s("请选择班级")]):r("div",null,[s("已选"),r("span",{style:{padding:"0 4px"}},[D.classGroupIdList.length]),s("个班级")])])}}),r(S,{isLink:!0,label:"课程开始日期",placeholder:"请选择课程开始日期",readonly:!0,inputAlign:"right",modelValue:D.startTime.join("-"),onClick:function(){D.startTimeStatus=!0}},null),r(S,{isLink:!0,label:"课程结束日期",placeholder:"请选择课程结束日期",readonly:!0,inputAlign:"right",modelValue:D.endTime.join("-"),onClick:function(){D.endTimeStatus=!0}},null),r(T,{title:"调整方式"},{value:function(){return r(A,{"checked-color":"#FF8057",modelValue:D.changeType,"onUpdate:modelValue":function(t){return D.changeType=t},direction:"horizontal"},{default:function(){return[r(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[r(L,{class:F.radioItem,name:1},null),s("提前")]}}),r(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[r(L,{class:F.radioItem,name:0},null),s("延后")]}})]}})}}),r(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 r("span",{style:{paddingLeft:"6px"}},[s("天")])}})]}}),r(j,{position:"bottom"},{default:function(){return[r("div",{class:["btnGroup btnMore"]},[r(c,{color:"#ccc",round:!0,onClick:function(){d().isApp?l({api:"back"}):t.back()}},{default:function(){return[s("取消")]}}),r(c,{color:"#FF8057",round:!0,onClick:G,disabled:a.submitLoading,loading:a.submitLoading},{default:function(){return[s("下一步")]}})])]}}),r(f,{show:D.orchestraStatus,"onUpdate:show":function(t){return D.orchestraStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[r(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)]}}),r(b,{modelValue:D.classStatus,"onUpdate:modelValue":function(t){return D.classStatus=t},position:"bottom",style:{background:"#f6f6f6"},destroy:!0},{default:function(){return[r(v,{onClose:function(){return D.classStatus=!1},orchestraId:D.orchestraId,selectItem:D.classGroupIdList,onConfirm:function(t){D.classGroupIdList=t}},null)]}}),r(f,{show:D.startTimeStatus,"onUpdate:show":function(t){return D.startTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[r(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=m(D.startTime.join("-")||new Date).toDate()}},null)]}}),r(f,{show:D.endTimeStatus,"onUpdate:show":function(t){return D.endTimeStatus=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[r(C,{minDate:D.endTimeMinDate,formatter:p,onCancel:function(){return D.endTimeStatus=!1},onConfirm:function(t){D.endTime=t.selectedValues,D.endTimeStatus=!1}},null)]}}),r(_,{title:"提示",show:a.dialogStatus,"onUpdate:show":function(t){return a.dialogStatus=t},message:a.dialogMessage,confirmButtonText:"确定",onConfirm:function(){t.back()}},null)])}}}))}}}))}();