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.90c82f08.js","./index-legacy.f1d613e0.js","./index-legacy.c223b3ce.js","./index-legacy.84457c4c.js","./toolsValidate-legacy.95a8e7c1.js","./index-legacy.60a83644.js","./index-legacy.55839436.js","./index-legacy.f3e5e283.js","./index-legacy.3c5580aa.js","./index-legacy.dc8d6058.js","./index-legacy.92c1b9d6.js","./index-legacy.c8871c95.js","./index-legacy.537e6dca.js","./icon_teacher-legacy.07765f44.js","./index-legacy.789a0824.js","./use-tab-status-legacy.bafe466c.js","./index-legacy.b10d0450.js","./index-legacy.f7f96215.js","./Checker-legacy.1b485b9f.js","./index-legacy.eb4bc59e.js","./index-legacy.e4343e46.js","./Picker-legacy.aeff9f1a.js","./index-legacy.fe10c814.js","./index-legacy.64e3b474.js","./index-legacy.f9492e3a.js","./utils-legacy.8e06f916.js"],(function(t){"use strict";var n,a,o,r,i,s,u,c,l,d,f,m,p,h,g,y,_,j,b,v,x,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.aj,u=t.q,c=t.B,l=t.f,d=t.e,f=t.P,m=t.ai,p=t.a_,h=t.m,g=t.g,y=t.o},function(t){_=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=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?v(t):""};return r((function(){V()})),function(){return i("div",{class:F.batchAdjust},[i(s,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},[u("请选择班级")]):i("div",null,[u("已选"),i("span",{style:{padding:"0 4px"}},[D.classGroupIdList.length]),u("个班级")])])}}),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),u("提前")]}}),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),u("延后")]}})]}})}}),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"}},[u("天")])}})]}}),i(b,{position:"bottom"},{default:function(){return[i("div",{class:["btnGroup btnMore"],style:{marginTop:"20px"}},[i(c,{color:"#ccc",round:!0,onClick:function(){l().isApp?d({api:"back"}):t.back()}},{default:function(){return[u("取消")]}}),i(c,{color:"#FF8057",round:!0,onClick:G,disabled:a.submitLoading,loading:a.submitLoading},{default:function(){return[u("下一步")]}})])]}}),i(f,{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(x,{onClose:function(){return D.classStatus=!1},orchestraId:D.orchestraId,selectItem:D.classGroupIdList,onConfirm:function(t){D.classGroupIdList=t}},null)]}}),i(f,{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=m(D.startTime.join("-")||new Date).toDate()}},null)]}}),i(f,{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:p,onCancel:function(){return D.endTimeStatus=!1},onConfirm:function(t){D.endTime=t.selectedValues,D.endTimeStatus=!1}},null)]}}),i(_,{title:"提示",show:a.dialogStatus,"onUpdate:show":function(t){return a.dialogStatus=t},message:a.dialogMessage,confirmButtonText:"确定",onConfirm:function(){t.back()}},null)])}}}))}}}))}();
|