1 |
- import{ao as W,d as E,ai as t,c as e,aj as F,a5 as v,r as I,Z as U,$ as Q,q as w,B as k,o as T,P as G,ag as x,ah as J,R as K,F as O,m as M,g as V,f as R,e as q}from"./index.332c7f08.js";import{c as X}from"./index.b28db9f5.js";import{O as b}from"./index.ed5fc819.js";import{i as j}from"./isSameOrBefore.c25d5b8a.js";import{C as Z}from"./index.97c682f1.js";import{C as H}from"./index.324108a5.js";import{C as p}from"./index.91135ff9.js";import{S as z}from"./index.4aa8e076.js";import{T as _}from"./index.165ec231.js";import{T as $}from"./teacher-list.7f97b004.js";import{O as ee}from"./index.d7c1b6ac.js";import{O as te}from"./index.a8f5f4b5.js";import{T as ae}from"./index.98482791.js";import{F as P}from"./index.1ed6273e.js";import"./index.7c580591.js";import"./use-tab-status.9d769af8.js";import"./index.1e2dfe6e.js";import"./utils.4b86e8c9.js";import"./Picker.e56f94bd.js";import"./index.656e257f.js";import"./icon_teacher.df08d662.js";import"./index.d2064f3d.js";import"./index.b186dfda.js";import"./index.96a8db5e.js";const se="_courseInfo_6hkyu_1";var S={courseInfo:se};const re="_calendarContainer_1u0cy_1",oe="_calendar_1u0cy_1",ie="_subtitle_1u0cy_11",ne="_right_1u0cy_22",le="_today_1u0cy_26",ce="_disabled_1u0cy_29";var Y={calendarContainer:re,calendar:oe,subtitle:ie,right:ne,today:le,disabled:ce},B="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAArtJREFUWEfVmc9LVFEUxz/nGZpKrewPKCGCkqJFiyhaWeNCFwW+kTDcRQW1CSJSuWVoi1ZCRZsIEvQtCrJFkauodeQiCiPaCFFKwYgzTdC78eaHjuOM837MU+4sZ+753s87c949P64Q4aNVdwtu83Es6wS4+0H2Am0IO3KymiVgEfQcWB9x3TdYmbeiXqTDbithDLXqS4A7gKYHoTmQhiaDMA3WY1GTrwLZAoGAtbJPA8PAwaAbVVk/C9wS5Tzzq+cLWI/Y7fyT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zBA69bTF2ykPw8pLzn5E8WWEsK1Wp1tVar7Q4Gg9t2u32vSjdl3VgaLDCkgF5AafR6vSvHcXbCMHwIguCw0WhcKxkSL0JFhDTGxQC9AeSgPPr9/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=E({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(F,{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?ue:B,size:22,class:[Y.right],onClick:this.onPrevMonth},null),e(v,{name:B,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+QSGLrPoCQVogNieJ2TkBULEuhYlxRo94qwBK8ZubgYXT1CstA21pLe04QcStbQFabRVcyKwHOWQ0Y5DQXcFoGUg01VxAxlc5DLIdTU6CeRs1ORhm18xg0qEOpAm2IEj5K5ZCRDilNHa2VIbjiNMPDMg1VbQgkI1xLZBEtVLSpHauGWF8hanYBA4tLb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bvgdsQOufhb/yDcvyQAKP4bHNjtX0vyC2DZBoiWmX47vg/OiqZTteN7bCUCY0krzK0JABLSd78BlwenvCCneaQQlm+EwmKY+AeOdEP/aWsTltpVVRMn17DbZsOKzRlsHWLy3h/gUIflBYeXVm+FaClcH4fD7fDHGSlMtkL2PQ515LAvXgM1d6epY6xb2aAJlT7cCQPn3Z5Y1moCfdYFFy8ovJZBMsypgkc3ZtF+CNQrQ/DBm3BNtK5SkZTD56y8aR2kne4OlWbmw/LnIFLkUsdbIXtovBcOtEFywqdF9WpdFRuqaGFbWqG0VgljA/k3+Rd6oacdxv7K7rThrOjhfGh6yhcGMJr84GOQCN/hTkic82lpfdK7pBoan4RZ6jBJcsWyOyiK7DvZY3aGQWcy8fvtxdDQArX3ZHFQ/C9H6d/PQF/MVOzKIIyPmYDhPLM+ldRATR2U1WYGYkpkHqXFf9PqZYMBNN1ex6SgpssLK7ko/N+v9P4FIRycXEnBlNcAAAAASUVORK5CYII=",Ye=E({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=I({calendarDate:null,selectTimeStatus:!1,selectTime:null,useTimer:[],useTimerFormat:[],usedTimer:[],minMinute:0,maxMinute:59}),g=(n,c)=>(n==="hour"&&(c.text+="\u65F6"),n==="minute"&&(c.text+="\u5206"),c),h=(n,c)=>{if(n==="hour"){const l=[];return c.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 c},C=n=>{if(n.columnIndex===1)return;const c=Number(n.selectedValues[0]);let l=0;a.useTimerFormat.forEach(m=>{c===m.startHour?l=m.startMinute:c===m.endHour&&(l=m.endMinute)}),a.minMinute=l,a.maxMinute=59},N=n=>{const c=[];return n.forEach(l=>{c.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"))})}),c},o=n=>{const c=n.selectedValues,l=t(a.calendarDate).hour(c[0]).minute(c[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,()=>{u()});const u=()=>{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)||[],c=[],l=[];n.forEach(y=>{y.enable?c.push(y):l.push(y)}),a.useTimer=[...c];const m=N(c);if(a.useTimerFormat=m,a.usedTimer=[...l],console.log(N(c),"onFormatTimer"),console.log(a.useTimer,a.usedTimer,"onUseTimer"),m.length>0){const y=m[0];a.minMinute=y.startMinute,a.maxMinute=59}};return Q(()=>{u()}),()=>e("div",{class:A.timer},[e(F,{title:"\u8BAD\u7EC3\u65F6\u95F4",desotry:!1},null),a.useTimer&&a.useTimer.length>0&&e(H,{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,[w("\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(H,{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,[w("\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(H,{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(k,{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:()=>[w("\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=E({name:"course-adjust",setup(){const i=x(),d=J(),s=I({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=I({classDate:"",teacherName:"",teacherId:"",courseScheduleId:"",startTime:"",endTime:""}),a=K({}),g=async()=>{if(s.cacheId){const{data:u}=await M.get("/api-school/courseSchedule/detailCache",{params:{courseScheduleId:s.id,cacheId:s.cacheId}});a.value={...u},s.arrangeType=u.arrangeType||"STANDARD",r.classDate=u.classDate,r.teacherName=u.teacherName,r.teacherId=u.teacherId,r.courseScheduleId=u.id,r.startTime=u.startTime,r.endTime=u.endTime,s.calendarDate=u.classDate;return}const{data:o}=await M.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:u}=await M.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=u||[]}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()},N=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 M.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:S.courseWrap},[e(F,{border:!1},null),e("div",{class:S.courseInfo},[e(H,{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(P,{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(P,{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(k,{color:"#ccc",round:!0,class:S.unpassBtn,onClick:()=>C()},{default:()=>[w("\u53D6\u6D88")]}),e(k,{color:"#FF8057",round:!0,class:S.unpassBtn,onClick:()=>N()},{default:()=>[w("\u786E\u8BA4\u8C03\u6574")]})])]}),e(b,{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(u=>{t(u.calendarDate).isSame(o)&&(s.timerList={...u},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(b,{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(b,{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};
|