1 |
- import{ao as W,d as b,ai as t,c as e,aj as I,a5 as v,r as B,Z as U,$ as Q,q as E,B as H,o as T,P as G,ag as x,ah as J,R as K,F as O,m as N,g as V,f as R,e as q}from"./index.5f7ffb46.js";import{c as X}from"./index.b28db9f5.js";import{O as S}from"./index.59b9f984.js";import{i as j}from"./isSameOrBefore.6d8d79ab.js";import{C as Z}from"./index.47129549.js";import{C as M}from"./index.052b3caa.js";import{C as p}from"./index.abd668f7.js";import{S as z}from"./index.61ab9823.js";import{T as _}from"./index.b9737213.js";import{T as $}from"./teacher-list.76159bbc.js";import{O as ee}from"./index.7790de2a.js";import{O as te}from"./index.95a99ca5.js";import{T as ae}from"./index.ab2541bb.js";import{F as k}from"./index.6438a25f.js";import"./index.6bbd7daa.js";import"./use-tab-status.69b57a37.js";import"./index.99e0cf1f.js";import"./utils.0f86fc1f.js";import"./Picker.148c9d83.js";import"./index.de1f78a6.js";import"./icon_teacher.df08d662.js";import"./index.ec2a7822.js";import"./index.9ef28852.js";import"./index.276a5d68.js";const se="_courseInfo_6hkyu_1";var F={courseInfo:se};const re="_calendarContainer_1u0cy_1",oe="_calendar_1u0cy_1",ie="_subtitle_1u0cy_11",ne="_right_1u0cy_22",le="_today_1u0cy_26",ue="_disabled_1u0cy_29";var Y={calendarContainer:re,calendar:oe,subtitle:ie,right:ne,today:le,disabled:ue},P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAArtJREFUWEfVmc9LVFEUxz/nGZpKrewPKCGCkqJFiyhaWeNCFwW+kTDcRQW1CSJSuWVoi1ZCRZsIEvQtCrJFkauodeQiCiPaCFFKwYgzTdC78eaHjuOM837MU+4sZ+753s87c949P64Q4aNVdwtu83Es6wS4+0H2Am0IO3KymiVgEfQcWB9x3TdYmbeiXqTDbithDLXqS4A7gKYHoTmQhiaDMA3WY1GTrwLZAoGAtbJPA8PAwaAbVVk/C9wS5Tzzq+cLWI/Y7fyTB6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A69bTF2ykPw8pLzn5E8WWEsK1Wp1tVar7Q4Gg9t2u32vSjdl3VgaLDCkgF5AafR6vSvHcXbCMHwIguCw0WhcKxkSL0JFhDTGxQC9AeSgPPr9/oiINmMDj8Ph8KDVapmEhiy+Eg8jK0ASysPzvGPXdS8YA6ahUQFfEuANE5mh0+mclkqlM0vQyBgPANaWA/tZRNC+7x8Y0vQzgI1XNYvQ7wDW1q9I+JagPwHsxtsb5YCbttAC9A+AjQRcFujRaLTfbDZvFDwUWgcGFO/pMAzvyuXy1r8F7na7J8Vi8TwB/NfAAtgn3/f3dCRhLehEsEEQ7Gvk5CjorKQ1C7BQVJTWjBcOS7AAjgqH0dJsERbAUWnGMJKLLcOOmx8Aa+vY87wj13Uv2U7NYNMT6ZdtL7VlwTfwhmEjObANPP7Q3SJ5juNsE9GjBdiJLRKAtTahlUplrV6v78xyEwroXG3zAZy7gxRtaSh0YGlL/jyqShYbr34KLyJ9GJjYztVx6zw9rXygnUDn6soggc7VpQwbL7m59uKDPDcXi6LsNNOr218W/TW6/mbABgAAAABJRU5ErkJggg==",L={exports:{}};(function(i,d){(function(s,r){i.exports=r()})(W,function(){return function(s,r,a){r.prototype.isToday=function(){var g="YYYY-MM-DD",h=a();return this.format(g)===h.format(g)}}})})(L);var me=L.exports;t.extend(me);t.extend(j);var de=b({name:"calendar",props:{calendarDate:{type:String,default:""},list:{type:Array,default:()=>[]},onSelect:{type:Function,default:i=>{}},prevMonth:{type:Function,default:i=>{}},nextMonth:{type:Function,default:i=>{}},toDayMonth:{type:Function,default:i=>{}},selectDay:{type:Function,default:i=>{}},onDestory:{type:Function,default:()=>{}}},data(){return{minDate:new Date,maxDate:new Date,currentDate:t().toDate(),subtitle:"",dayList:[],selectDays:[]}},computed:{arrowStatus(){return!t().isBefore(t(this.currentDate),"month")},selectDayTitle(){return t(this.currentDate).format("YYYY-MM-DD")},todayStatus(){return console.log(this.calendarDate),this.calendarDate?t().isSame(t(this.calendarDate),"month"):!1}},watch:{calendarDate(){this.subtitle=t(this.calendarDate||new Date).format("YYYY\u5E74MM\u6708"),this.maxDate=t(this.calendarDate||new Date).endOf("month").toDate(),this.minDate=t(this.calendarDate||new Date).toDate(),this.currentDate=t(this.calendarDate||new Date).toDate()}},mounted(){this.subtitle=t(this.calendarDate||new Date).format("YYYY\u5E74MM\u6708"),this.maxDate=t(this.calendarDate||new Date).endOf("month").toDate(),this.minDate=t(this.calendarDate||new Date).toDate(),this.currentDate=t(this.calendarDate||new Date).toDate(),console.log(this.list,"this.list"),console.log(this.calendarDate,"calendarDate")},methods:{formatter(i){const d=t(i.date).format("YYYY-MM-DD");let s=!1;return this.list.forEach(r=>{r.calendarDate===d&&(s=!0)}),s&&t(t().format("YYYY-MM-DD")).isSameOrBefore(t(i.date))?(i.bottomInfo="\u53EF\u9009",t(d).isSame(this.calendarDate)?i.type="selected":i.type=""):i.type="disabled",d===t().format("YYYY-MM-DD")&&(i.className="today"),i},onPrevMonth(){if(this.arrowStatus)return;const i=t(this.currentDate).subtract(1,"month");this._monthChange(i),this.prevMonth&&this.prevMonth(this.minDate)},onToday(){const i=t();this._monthChange(i),this.toDayMonth&&this.toDayMonth(this.minDate)},onNextMonth(){const i=t(this.currentDate).add(1,"month");this._monthChange(i),this.nextMonth&&this.nextMonth(this.minDate)},_monthChange(i){const d=t().toDate(),s=i.startOf("month").toDate();this.minDate=t(d).isAfter(s)?d:s,this.maxDate=i.endOf("month").toDate(),this.currentDate=i.toDate(),this.subtitle=i.format("YYYY\u5E74MM\u6708")},onDateSelect(i){this._dayChange(i),this.onSelect&&this.onSelect(i)},_dayChange(i){this.currentDate=i,this.$emit("update:calendarDate",t(i).format("YYYY-MM-DD"))}},unmounted(){this.onDestory()},render(){return e("div",{class:Y.calendarContainer},[e(I,{title:"\u8BAD\u7EC3\u65E5\u671F",border:!1,background:"transparent",desotry:!1},null),e(Z,{class:Y.calendar,showTitle:!1,poppable:!1,showConfirm:!1,showMark:!1,firstDayOfWeek:1,rowHeight:62,minDate:this.minDate,maxDate:this.maxDate,defaultDate:t(this.calendarDate||"").toDate(),color:"var(--van-primary)",formatter:this.formatter,onSelect:this.onDateSelect},{"top-info":()=>e("div",{class:Y.topInfo},null),subtitle:()=>e("div",{class:Y.subtitle},[e("span",null,[this.subtitle]),e("div",null,[e(v,{name:this.arrowStatus?ce:P,size:22,class:[Y.right],onClick:this.onPrevMonth},null),e(v,{name:P,size:22,onClick:this.onNextMonth},null)])])})])}});const he="_selectTimer_16p3k_1",Ae="_cellGroup_16p3k_8",fe="_cellTitle_16p3k_13",De="_cellIcon_16p3k_17",pe="_cellTimers_16p3k_21",ge="_noTime_16p3k_46";var A={selectTimer:he,cellGroup:Ae,cellTitle:fe,cellIcon:De,cellTimers:pe,noTime:ge},Te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABPRJREFUWEfNmMtvG1UUxr87M/b4/Ujs2EmaNo6TNMVIRagrtggESCxQ+QNYFFUpSYWUtBUIpEogJEhDQYG0iC4q2NIVEhIgNgixoUIU6pLESRyaJjHOw3Zsx3E8MxeNH4nt8czYSiUyO3vOPed3v3PuufcOQd0TSW+GIDDnAPocgOMA7PU2h/ydBvAQID+Ck24N2NvD1f5I5Uc4HDbyXV2TFHQYAHvIoM0OFwnIjfzq6lgoFNqTBxWBijDdXd9RSp9t1tPjtCOE/JRfWX1JhioCzScSUxR05HEGadUXAfms3+0eJaWaIfeaTRMFsCBS3BcpohKwToEd+U8AFkLhJQQBhuBJFgiypJSC5h4RHD1NIonEdYC+qTdGjvmHIOHbPQlxSc+69L6DAV42MniKY5oEI5+QSGLrPoCQVogNieJ2TkBULEuhYlxRo94qwBK8ZubgYXT1CstA21pLe04QcStbQFabRVcyKwHOWQ0Y5DQXcFoGUg01VxAxlc5DLIdTU6CeRs1ORhm18xg0qEOpAm2IEj5K5ZCRDilNHa2VIbjiNMPDMg1VbQgkI1xLZBEtVLSpHauGWF8hanYBA4tLbmv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gdsQOufhb/yDcvyQAKP4bHNjtX0vyC2DZBoiWmX47vg/OiqZTteN7bCUCY0krzK0JABLSd78BlwenvCCneaQQlm+EwmKY+AeOdEP/aWsTltpVVRMn17DbZsOKzRlsHWLy3h/gUIflBYeXVm+FaClcH4fD7fDHGSlMtkL2PQ515LAvXgM1d6epY6xb2aAJlT7cCQPn3Z5Y1moCfdYFFy8ovJZBMsypgkc3ZtF+CNQrQ/DBm3BNtK5SkZTD56y8aR2kne4OlWbmw/LnIFLkUsdbIXtovBcOtEFywqdF9WpdFRuqaGFbWqG0VgljA/k3+Rd6oacdxv7K7rThrOjhfGh6yhcGMJr84GOQCN/hTkic82lpfdK7pBoan4RZ6jBJcsWyOyiK7DvZY3aGQWcy8fvtxdDQArX3ZHFQ/C9H6d/PQF/MVOzKIIyPmYDhPLM+ldRATR2U1WYGYkpkHqXFf9PqZYMBNN1ex6SgpssLK7ko/N+v9P4FIRycXEnBlNcAAAAASUVORK5CYII=",Ye=b({name:"timer",props:{timerList:{type:Object,default:()=>{}},times:{type:Number,default:120}},emits:["close","confirm"],setup(i,{slots:d,attrs:s,emit:r}){t().format("YYYY-MM-DD HH:mm:ss");const a=B({calendarDate:null,selectTimeStatus:!1,selectTime:null,useTimer:[],useTimerFormat:[],usedTimer:[],minMinute:0,maxMinute:59}),g=(n,u)=>(n==="hour"&&(u.text+="\u65F6"),n==="minute"&&(u.text+="\u5206"),u),h=(n,u)=>{if(n==="hour"){const l=[];return u.forEach(m=>{a.useTimerFormat.forEach(f=>{var D;m.value>=f.startHour&&m.value<=f.endHour&&m.value!=((D=l[l.length-1])==null?void 0:D.value)&&l.push(m)})}),l}return u},C=n=>{if(n.columnIndex===1)return;const u=Number(n.selectedValues[0]);let l=0;a.useTimerFormat.forEach(m=>{u===m.startHour?l=m.startMinute:u===m.endHour&&(l=m.endMinute)}),a.minMinute=l,a.maxMinute=59},w=n=>{const u=[];return n.forEach(l=>{u.push({startHour:Number(t(l.startTime).format("HH")),startMinute:Number(t(l.startTime).format("mm")),endHour:Number(t(l.endTime).format("HH")),endMinute:Number(t(l.endTime).format("mm"))})}),u},o=n=>{const u=n.selectedValues,l=t(a.calendarDate).hour(u[0]).minute(u[1]).second(0),m=t(l).minute(i.times+t(l).minute());let f=!1;if(a.useTimer.forEach(D=>{t(l).valueOf()>=t(D.startTime).valueOf()&&t(m).valueOf()<=t(D.endTime).valueOf()&&(f=!0)}),!f){T("\u60A8\u9009\u62E9\u7684\u65F6\u95F4\u8D85\u8FC7\u53EF\u6392\u8BFE\u65F6\u95F4\u8303\u56F4");return}a.selectTime=l.toDate(),a.selectTimeStatus=!1};U(()=>i.timerList,()=>{c()});const c=()=>{var f,D;console.log(i.timerList,"timerList"),a.calendarDate=(f=i.timerList)==null?void 0:f.calendarDate;const n=((D=i.timerList)==null?void 0:D.timeDetailList)||[],u=[],l=[];n.forEach(y=>{y.enable?u.push(y):l.push(y)}),a.useTimer=[...u];const m=w(u);if(a.useTimerFormat=m,a.usedTimer=[...l],console.log(w(u),"onFormatTimer"),console.log(a.useTimer,a.usedTimer,"onUseTimer"),m.length>0){const y=m[0];a.minMinute=y.startMinute,a.maxMinute=59}};return Q(()=>{c()}),()=>e("div",{class:A.timer},[e(I,{title:"\u8BAD\u7EC3\u65F6\u95F4",desotry:!1},null),a.useTimer&&a.useTimer.length>0&&e(M,{inset:!0,class:A.cellGroup,style:{marginTop:"12px"}},{default:()=>[e(p,null,{icon:()=>e(v,{name:Te,class:A.cellIcon},null),title:()=>e("div",{class:A.cellTimers},[e("h3",null,[E("\u53EF\u6392\u8BFE\u65F6\u95F4\u6BB5")]),e("div",null,[a.useTimer.map(n=>e("span",null,[`${t(n.startTime).format("HH:mm")}~${t(n.endTime).format("HH:mm")}`]))])])})]}),a.usedTimer&&a.usedTimer.length>0&&e(M,{inset:!0,class:A.cellGroup,style:{marginTop:"12px"}},{default:()=>[e(p,null,{icon:()=>e(v,{name:Ce,class:A.cellIcon},null),title:()=>e("div",{class:A.cellTimers},[e("h3",null,[E("\u51B2\u7A81\u65F6\u95F4")]),e("div",null,[a.usedTimer.map(n=>e("span",null,[`${t(n.startTime).format("HH:mm")}~${t(n.endTime).format("HH:mm")}`]))])])})]}),e(M,{inset:!0,class:A.cellGroup},{default:()=>[e(p,{center:!0,title:"\u8BAD\u7EC3\u5F00\u59CB\u65F6\u95F4",titleClass:A.cellTitle,value:a.selectTime?t(a.selectTime).format("HH:mm"):"",isLink:!0,onClick:()=>a.selectTimeStatus=!0},{icon:()=>e(v,{name:ye,class:A.cellIcon},null)})]}),e(z,{position:"bottom"},{default:()=>[e("div",{class:"btnGroup"},[e(H,{round:!0,block:!0,type:"primary",onClick:()=>{if(!a.selectTime){T("\u8BF7\u9009\u62E9\u8BAD\u7EC3\u5F00\u59CB\u65F6\u95F4");return}r("confirm",a.selectTime),r("close")}},{default:()=>[E("\u786E\u8BA4")]})])]}),e(G,{show:a.selectTimeStatus,"onUpdate:show":n=>a.selectTimeStatus=n,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(_,{minMinute:a.minMinute,maxMinute:a.maxMinute,formatter:g,filter:h,onChange:C,onConfirm:o,onCancel:()=>a.selectTimeStatus=!1},null)]})])}}),qe=b({name:"course-adjust",setup(){const i=x(),d=J(),s=B({id:d.query.id,cacheId:d.query.cacheId,showPopoverTime:!1,showPopoverCourseTime:!1,showPopoverTeacher:!1,currentDate:[],currentCourseDate:[],teachers:[],calendarList:[],calendarDate:null,trainStartTime:null,timerList:{},trainTimer:0,selectItem:{},arrangeType:"STANDARD",isBack:d.query.isBack,dialogStatus:!1,dialogMessage:""}),r=B({classDate:"",teacherName:"",teacherId:"",courseScheduleId:"",startTime:"",endTime:""}),a=K({}),g=async()=>{if(s.cacheId){const{data:c}=await N.get("/api-school/courseSchedule/detailCache",{params:{courseScheduleId:s.id,cacheId:s.cacheId}});a.value={...c},s.arrangeType=c.arrangeType||"STANDARD",r.classDate=c.classDate,r.teacherName=c.teacherName,r.teacherId=c.teacherId,r.courseScheduleId=c.id,r.startTime=c.startTime,r.endTime=c.endTime,s.calendarDate=c.classDate;return}const{data:o}=await N.get(`/api-school/courseSchedule/detail/${s.id}`,{});a.value={...o},r.classDate=a.value.classDate,r.teacherId=a.value.teacherId,r.teacherName=a.value.teacherName,r.courseScheduleId=a.value.id,r.startTime=a.value.startTime,r.endTime=a.value.endTime,s.calendarDate=o.classDate},h=async o=>{try{const{data:c}=await N.post("/api-school/orchestra/calendarDateQuery",{data:{teacherId:r.teacherId,schoolId:V.user.data.school.id,courseScheduleId:r.courseScheduleId,cacheId:s.cacheId,skipHoliday:!1,calendarDate:t(o).format("YYYY-MM-DD")}});s.calendarList=c||[]}catch{}};Q(async()=>{await g(),await h(r.classDate),s.calendarList.forEach(o=>{t(o.calendarDate).isSame(r.classDate)&&(s.timerList={...o})})});const C=async()=>{R().isApp&&!s.cacheId&&s.isBack!="true"?q({api:"back"}):i.back()},w=async()=>{console.log(r);try{if(!r.classDate){T("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u5F00\u59CB\u65E5\u671F");return}if(!r.startTime){T("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u5F00\u59CB\u65F6\u95F4");return}const o=await N.post("/api-school/courseSchedule/adjust",{hideLoading:!1,data:{...r,cacheId:s.cacheId}});o.code===999?(s.dialogStatus=!0,s.dialogMessage=o.message):C()}catch(o){T(o.message)}console.log("\u8BFE\u7A0B\u8C03\u6574")};return()=>e(O,null,[e("div",{class:F.courseWrap},[e(I,{border:!1},null),e("div",{class:F.courseInfo},[e(M,{inset:!0,border:!1},{default:()=>[e(p,{title:"\u4E50\u56E2\u540D\u79F0",value:a.value.orchestraName},null),e(p,{title:"\u8BFE\u7A0B\u7C7B\u578B"},{value:()=>a.value.type?e(ae,{type:"primary",size:"large"},{default:()=>[X[a.value.type]]}):""}),e(p,{title:"\u6388\u8BFE\u8001\u5E08",value:r.teacherName,onClick:()=>{s.showPopoverTeacher=!0},"is-link":!0},null),e(k,{label:"\u4E0A\u8BFE\u65E5\u671F",inputAlign:"right",readonly:!0,isLink:!0,placeholder:"\u8BF7\u9009\u62E9\u4E0A\u8BFE\u65E5\u671F",onClick:()=>s.showPopoverTime=!0,modelValue:r.classDate?t(r.classDate).format("YYYY-MM-DD"):""},null),e(k,{label:"\u4E0A\u8BFE\u65F6\u95F4",inputAlign:"right",readonly:!0,isLink:!0,placeholder:"\u8BF7\u9009\u62E9\u4E0A\u8BFE\u65F6\u95F4",modelValue:r.startTime?t(r.startTime).format("HH:mm"):"",onClick:()=>{let o=0;if((s.timerList.timeDetailList||[]).forEach(n=>{n.enable===!0&&(o+=1)}),o<=0){T("\u5F53\u524D\u6CA1\u6709\u53EF\u6392\u8BFE\u65F6\u95F4\u6BB5\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u8BFE\u7A0B\u5F00\u59CB\u65E5\u671F");return}s.showPopoverCourseTime=!0}},null),e(p,{title:"\u8BFE\u7A0B\u65F6\u957F",value:(a.value.singleCourseTime||0)+"\u5206\u949F"},null)]})]),e(ee,{position:"bottom"},{default:()=>[e("div",{class:["btnGroup btnMore"]},[e(H,{color:"#ccc",round:!0,class:F.unpassBtn,onClick:()=>C()},{default:()=>[E("\u53D6\u6D88")]}),e(H,{color:"#FF8057",round:!0,class:F.unpassBtn,onClick:()=>w()},{default:()=>[E("\u786E\u8BA4\u8C03\u6574")]})])]}),e(S,{modelValue:s.showPopoverTime,"onUpdate:modelValue":o=>s.showPopoverTime=o,position:"bottom",destroy:!0},{default:()=>[e(de,{list:s.calendarList,nextMonth:o=>h(o),prevMonth:o=>h(o),toDayMonth:o=>h(o),onSelect:o=>{s.showPopoverTime=!1,r.classDate=t(o).format("YYYY-MM-DD"),s.calendarList.forEach(c=>{t(c.calendarDate).isSame(o)&&(s.timerList={...c},setTimeout(()=>{s.showPopoverCourseTime=!0},100))}),r.startTime=""},onDestory:()=>{r.classDate?h(r.classDate):h()},calendarDate:s.calendarDate,"onUpdate:calendarDate":o=>s.calendarDate=o},null)]}),e(S,{modelValue:s.showPopoverCourseTime,"onUpdate:modelValue":o=>s.showPopoverCourseTime=o,position:"bottom",style:{background:"#F6F6F6"},destroy:!0},{default:()=>[e(Ye,{timerList:s.timerList,times:a.value.singleCourseTime||0,onClose:()=>s.showPopoverCourseTime=!1,onConfirm:o=>{r.startTime=t(o).format("YYYY-MM-DD HH:mm:ss"),r.endTime=t(o).add(a.value.singleCourseTime,"minute").format("YYYY-MM-DD HH:mm:ss")}},null)]}),e(S,{modelValue:s.showPopoverTeacher,"onUpdate:modelValue":o=>s.showPopoverTeacher=o,position:"bottom"},{default:()=>[e($,{courseType:a.value.type,removeTeacherId:r.teacherId,onClose:()=>s.showPopoverTeacher=!1,onSelect:o=>{r.teacherId!==o.id&&(r.classDate="",r.startTime="",r.endTime="",r.teacherId=o.id,r.teacherName=o.nickname,s.calendarDate="",h())}},null)]}),e(te,{title:"\u63D0\u793A",show:s.dialogStatus,"onUpdate:show":o=>s.dialogStatus=o,message:s.dialogMessage,confirmButtonText:"\u786E\u5B9A",onConfirm:()=>{C()}},null)])])}});export{qe as default};
|