1 |
- import{d as A,ag as _,$ as h,c as t,q as r,ai as m,o as l,B as k,P as y,b2 as C,R as d,aj as g,m as w,g as I}from"./index.5f7ffb46.js";import{O as T}from"./index.7790de2a.js";import{f as e,w as v,a as f}from"./create.b465b523.js";import{C as D}from"./index.052b3caa.js";import{C as E}from"./index.abd668f7.js";import{C as b}from"./index.d979c853.js";import{T as i}from"./index.ab2541bb.js";import{C as p}from"./index.13900508.js";import{F}from"./index.6438a25f.js";import{R as L,a as S}from"./index.ba71b8ca.js";import{P as N}from"./index.de1f78a6.js";import{D as x}from"./index.af85409e.js";import"./Checker.40bdbb46.js";import"./Picker.148c9d83.js";import"./index.6bbd7daa.js";import"./use-tab-status.69b57a37.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";import"./utils.0f86fc1f.js";const V="_tips_172qd_1",G="_icon_172qd_11",H="_informationBottom_172qd_15",M="_cellGroup_172qd_18",R="_classType_172qd_23",U="_radioSection_172qd_37",P="_radioItem_172qd_42";var o={tips:V,icon:G,informationBottom:H,cellGroup:M,classType:R,radioSection:U,radioItem:P},q=A({name:"practice",props:{address:{type:String,default:""}},setup(n){const u=_(),c=()=>{if(e.classList.length>0){e.status=!0;return}if(e.classType.length<=0){l("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u7C7B\u578B");return}if(!e.trainStartDate){l("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u5F00\u59CB\u65E5\u671F");return}if(!e.week){l("\u8BF7\u9009\u62E9\u5468\u6B21");return}if(!n.address){l("\u60A8\u6240\u5728\u7684\u5B66\u6821\u6682\u672A\u8BBE\u7F6E\u5730\u5740");return}const a=[];e.classType.forEach(s=>{a.push({classType:s,startTime:null,endTime:null,trainTimer:null,times:null,classIdList:[]})}),e.classPracticeList=a,u.push("/practice-detail")};return h(()=>{}),()=>t("div",{class:o.practice,style:{minHeight:"calc(100vh - var(--header-height) - var(--van-tabs-line-height))",overflow:"hidden"}},[t(D,{inset:!0,class:o.cellGroup},{default:()=>[t(E,{title:"\u8BFE\u7A0B\u7C7B\u578B",titleClass:o.classType},{value:()=>t(b,{"checked-color":"#FF8057",modelValue:e.classType,"onUpdate:modelValue":a=>e.classType=a,direction:"horizontal"},{default:()=>[t(i,{size:"large",type:"primary",color:e.classType.includes("SINGLE")?"#FF8057":"#EAEAEA",textColor:e.classType.includes("SINGLE")?"#FFF":"#AAA",class:o.radioSection},{default:()=>[t(p,{class:o.radioItem,name:"SINGLE"},null),r("\u58F0\u90E8\u8BFE")]}),t(i,{size:"large",type:"primary",color:e.classType.includes("MUSIC_THEORY")?"#FF8057":"#EAEAEA",textColor:e.classType.includes("MUSIC_THEORY")?"#FFF":"#AAA",class:o.radioSection},{default:()=>[t(p,{class:o.radioItem,name:"MUSIC_THEORY"},null),r("\u4E50\u7406\u8BFE")]}),t(i,{size:"large",type:"primary",color:e.classType.includes("INSTRUMENTAL_ENSEMBLE")?"#FF8057":"#EAEAEA",textColor:e.classType.includes("INSTRUMENTAL_ENSEMBLE")?"#FFF":"#AAA",class:o.radioSection},{default:()=>[t(p,{class:o.radioItem,name:"INSTRUMENTAL_ENSEMBLE"},null),r("\u5408\u594F\u8BFE")]})]})}),t(F,{label:"\u8BFE\u7A0B\u5F00\u59CB\u65E5\u671F",inputAlign:"right",placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u5F00\u59CB\u65E5\u671F",readonly:!0,isLink:!0,modelValue:e.trainStartDate?m(e.trainStartDate).format("YYYY\u5E74MM\u6708DD\u65E5"):"",onClick:()=>e.calendarTimeStatus=!0},null),t(F,{label:"\u8BFE\u7A0B\u5468\u6B21",inputAlign:"right",placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u5468\u6B21",readonly:!0,modelValue:v(e.week),onClick:()=>{if(!e.trainStartDate){l("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u5F00\u59CB\u65E5\u671F");return}}},null),t(E,{title:"\u8DF3\u8FC7\u8282\u5047\u65E5"},{value:()=>t(L,{"checked-color":"#FF8057",modelValue:e.skipHoliday,"onUpdate:modelValue":a=>e.skipHoliday=a,direction:"horizontal"},{default:()=>[t(i,{size:"large",type:"primary",color:e.skipHoliday!==1?"#EAEAEA":"#FF8057",textColor:e.skipHoliday!==1?"#AAA":"#FFF",class:o.radioSection,round:!0},{default:()=>[t(S,{class:o.radioItem,name:1},null),r("\u662F")]}),t(i,{size:"large",type:"primary",color:e.skipHoliday!==0?"#EAEAEA":"#FF8057",textColor:e.skipHoliday!==0?"#AAA":"#FFF",class:o.radioSection,round:!0},{default:()=>[t(S,{class:o.radioItem,name:0},null),r("\u5426")]})]})})]}),t(T,{position:"bottom",class:o.informationBottom},{default:()=>[t("div",{class:"btnGroup",style:{marginTop:"24px"}},[t(k,{type:"primary",block:!0,round:!0,onClick:c},{default:()=>[r("\u4E0B\u4E00\u6B65")]})])]}),t(y,{show:e.weekStatus,"onUpdate:show":a=>e.weekStatus=a,position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:()=>[t(N,{columns:f,onCancel:()=>e.weekStatus=!1,onConfirm:a=>{e.week=a.selectedValues[0],e.weekStatus=!1}},null)]}),t(y,{show:e.calendarTimeStatus,"onUpdate:show":a=>e.calendarTimeStatus=a,position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:()=>[t(x,{minDate:new Date,modelValue:e.classDate,"onUpdate:modelValue":a=>e.classDate=a,formatter:C,onCancel:()=>e.calendarTimeStatus=!1,onConfirm:a=>{e.calendarTimeStatus=!1,e.trainStartDate=a.selectedValues.join("-");const s=m(e.trainStartDate).day(),B=f[s===0?6:s-1];e.week=B.value}},null)]})])}});const z="_train_r2wxa_1";var Y={train:z},ce=A({name:"train-planning",setup(){const n=sessionStorage.getItem("trainType");d(n||"standard");const u=d(""),c=async()=>{try{const{data:s}=await w.get(`/api-school/school/detail/${I.user.data.school.id}`);u.value=s.address||""}catch{}},a=d(0);return h(()=>{c()}),()=>t("div",{class:Y.train},[t(T,{position:"top",onGetHeight:s=>{console.log(s,"height"),a.value=s,document.documentElement.style.setProperty("--header-height",s+"px")}},{default:()=>[t(g,{border:!1},null)]}),t(q,{address:u.value},null)])}});export{ce as default};
|