index-legacy.d2aa0ce9.js 6.5 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._title_wbqc3_1{display:flex;align-items:center;padding:.32rem .34667rem;font-size:.48rem;font-weight:500;color:#333}._title_wbqc3_1 i{display:inline-block;width:.10667rem;height:.34667rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._cellGroup_wbqc3_17{margin:0 .34667rem .21333rem;border-radius:.26667rem;overflow:hidden}._cellGroup_wbqc3_17 .van-cell{font-size:.42667rem;padding:.48rem .32rem}._cellGroup_wbqc3_17 .van-cell__value{color:#333}._cellGroup_wbqc3_17 ._tips_wbqc3_29{color:#c8c9cc}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.b1009ea0.js","./index-legacy.ad813f4d.js","./index-legacy.4e015ad0.js","./toolsValidate-legacy.95a8e7c1.js","./create-legacy.9418bfea.js","./index-legacy.47711590.js","./index-legacy.148f784c.js","./index-legacy.3a3e070a.js","./index-legacy.918b8c74.js","./index-legacy.ab2ce923.js","./icon_teacher-legacy.07765f44.js","./index-legacy.fad72574.js","./use-tab-status-legacy.91417466.js","./index-legacy.8fb0ec91.js","./index-legacy.d39f6f47.js","./Checker-legacy.9bbda964.js","./index-legacy.fecc738b.js","./index-legacy.11f1ea5f.js","./index-legacy.761bf286.js","./index-legacy.38b799d5.js","./Picker-legacy.95f03705.js","./index-legacy.ac7c51db.js","./index-legacy.fab451f1.js","./index-legacy.10d8486a.js","./utils-legacy.6e8de97c.js"],(function(e){"use strict";var t,a,i,n,s,l,c,r,o,m,u,d,f,p,g,y,b,h,_,x,T,j,H,M;return{setters:[function(e){t=e.d,a=e.ag,i=e.r,n=e.$,s=e.c,l=e.aj,c=e.F,r=e.q,o=e.ai,m=e.o,u=e.B,d=e.P,f=e.m,p=e.g},function(e){g=e.O},function(e){y=e.O},function(e){b=e.f},function(e){h=e.v},function(e){_=e.f},function(e){x=e.P},function(e){T=e.C},function(e){j=e.F},function(e){H=e.C},function(e){M=e.T},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var Y={title:"_title_wbqc3_1",cellGroup:"_cellGroup_wbqc3_17",tips:"_tips_wbqc3_29"};e("default",t({name:"practice-detail",setup(){const e=a(),t=i({selectItem:{},currentTime:[],minHour:0,minMinute:0,maxHour:24,maxMinute:60,firstTime:null,lastTime:null}),I=e=>{if(1===e.columnIndex)return;const a=Number(e.selectedValues[0]);a===t.minHour?(t.minMinute=Number(t.firstTime.format("mm")),t.maxMinute=60):a===t.maxHour?(console.log(a,"hour"),t.minMinute=0,t.maxMinute=Number(t.lastTime.format("mm"))):(t.minMinute=0,t.maxMinute=60)},w=async()=>{if(!(()=>{const e=_.classPracticeList;let t=!1,a="";return e.forEach((e=>{console.log(e),t||e.trainTimer||(t=!0,a="请输入训练时长"),t||e.startTime||(t=!0,a="请选择开始时间"),t||e.times||(t=!0,a="请输入课时数"),!t&&e.classIdList.length<=0&&(t=!0,a="请选择训练班级")})),t&&m(a),t})())try{const t=_.classPracticeList,a=[];t.forEach((e=>{a.push({classGroupIdList:e.classIdList,courseNum:e.times,startTime:o(e.startTime).format("HH:mm:ss"),endTime:o(e.endTime).format("HH:mm:ss"),singleCourseTime:e.trainTimer})}));const i={week:_.week,schoolId:p.user.data.school.id,skipHoliday:!!_.skipHoliday,type:"PRACTISE",startDate:o(_.trainStartDate).format("YYYY-MM-DD"),trainingPlanClassList:a};console.log(i);const{data:n}=await f.post("/api-school/orchestra/trainingPlanList",{hideLoading:!1,data:{...i}});_.selectOrchestraId=null,_.selectClassGroupId=null,_.planList={orchestra:[],classes:{},course:{}},console.log(n,"date"),e.push({path:"/course-preview",query:{cacheId:n}})}catch{}},L=e=>e&&e>=1?h(e):"";return n((()=>{(async()=>{const{data:e}=await f.get("/api-school/sysParamConfig/queryByParamNameList",{params:{paramNames:"course_start_time,course_end_time"}});(e||[]).forEach((e=>{console.log(e.paramValue,"paramValue");const a=o(_.trainStartDate).format("YYYY-MM-DD");if("course_start_time"===e.paramName){const i=o(a+" "+e.paramValue);t.minHour=Number(i.format("HH")),t.minMinute=Number(i.format("mm")),t.firstTime=i}else if("course_end_time"===e.paramName){const i=o(a+" "+e.paramValue);t.maxHour=Number(i.format("HH")),t.lastTime=i}}))})()})),()=>s("div",{class:Y.practiceDetail},[s(l,null,null),_.classPracticeList.map((e=>s(c,null,[s("div",{class:Y.title},[s("i",null,null),b[e.classType]]),s(T,{inset:!0,class:Y.cellGroup},{default:()=>[s(j,{label:"训练时长",placeholder:"请输入训练时长",inputAlign:"right",modelValue:e.trainTimer,"onUpdate:modelValue":[t=>e.trainTimer=t,t=>{console.log(t),e.startTime=null}],formatter:L,maxlength:3,type:"tel",center:!0},{extra:()=>s("span",{style:{paddingLeft:"6px"}},[r("分钟")])}),s(j,{label:"开始时间",placeholder:"请选择开始时间",inputAlign:"right",readonly:!0,isLink:!0,center:!0,modelValue:e.startTime?o(e.startTime).format("HH:mm"):"",onClick:()=>{e.trainTimer?(t.selectItem=e,_.timerStatus=!0):m("请输入训练时长")}},null),s(j,{label:"课时数",placeholder:"请输入课时数",inputAlign:"right",modelValue:e.times,"onUpdate:modelValue":t=>e.times=t,formatter:L,maxlength:2,center:!0,type:"tel"},{extra:()=>s("span",{style:{paddingLeft:"6px"}},[r("课时")])}),s(H,{title:"训练班级",isLink:!0,center:!0,onClick:()=>{t.selectItem=e,_.classStatus=!0}},{value:()=>s("div",{class:Y.value},[e.classIdList.length<=0?s("div",{class:Y.tips},[r("请选择训练班级")]):s("div",null,[r("已选"),s("span",{style:{padding:"0 4px"}},[e.classIdList.length]),r("个班级")])])})]})]))),s(y,{position:"bottom"},{default:()=>[s("div",{class:"btnGroup"},[s(u,{type:"primary",block:!0,round:!0,onClick:w},{default:()=>[r("下一步")]})])]}),s(g,{modelValue:_.classStatus,"onUpdate:modelValue":e=>_.classStatus=e,position:"bottom",style:{background:"#f6f6f6"},destroy:!0},{default:()=>[s(x,{onClose:()=>_.classStatus=!1,classType:t.selectItem.classType,selectItem:t.selectItem.classIdList,onConfirm:e=>{t.selectItem.classIdList=e}},null)]}),s(d,{show:_.timerStatus,"onUpdate:show":e=>_.timerStatus=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[s(M,{modelValue:t.currentTime,"onUpdate:modelValue":e=>t.currentTime=e,minHour:t.minHour,minMinute:t.minMinute,maxHour:t.maxHour,maxMinute:t.maxMinute,onChange:I,onCancel:()=>_.timerStatus=!1,onConfirm:e=>(e=>{const a=o(o(t.lastTime).format("YYYY-MM-DD")+" "+e.selectedValues.join(":")+":00").add(t.selectItem.trainTimer,"minute");a.isAfter(t.lastTime)?m("开始时间超过可选时间范围"):(t.selectItem.startTime=o(o(t.lastTime).format("YYYY-MM-DD")+" "+e.selectedValues.join(":")+":00").format("YYYY-MM-DD HH:mm:ss"),t.selectItem.endTime=a.format("YYYY-MM-DD HH:mm:ss"),_.timerStatus=!1)})(e)},null)]})])}}))}}}))}();