import{d as E,O as D,o as T,w as O,g as t,i as v,R as Y,I as P,S as m,h as r,T as k,P as F,B as S,N as L,a as f,f as R}from"./index-e362c2e8.js";import{M as U}from"./index-cf657a5b.js";import{D as j}from"./drop-down-modal-4b54f8a5.js";import{i as B}from"./icon-music-10132ef5.js";import{i as b}from"./icon-teacher-default-a5bec550.js";import{M as H}from"./index-35a6b258.js";import{S as K,b as A,a as i}from"./index-5276fe86.js";import{C as g}from"./index-7571fa92.js";import{C as w}from"./index-5c45ec33.js";import{M as Q}from"./index-04aee2cb.js";import{i as W}from"./icon-edit-9f02937c.js";import{D as X,a as C}from"./index-8b701a0f.js";import{L as J}from"./index-7861a26d.js";import{I as y}from"./index-85ccd873.js";import{F as q}from"./index-6c6fed8e.js";import"./index-14b5dea2.js";import"./index-f57b4c5f.js";import"./use-tab-status-92e284d0.js";import"./toolsValidate-2f258ec3.js";const Z="_siteManagement_1rxy6_1",$="_iconSetting_1rxy6_4",tt="_siteItem_1rxy6_13",ot="_overhide_1rxy6_18",et="_cellGroup_1rxy6_24",st="_orchestraName_1rxy6_30",at="_iconMusic_1rxy6_37",lt="_iconTeacher_1rxy6_42",it="_username_1rxy6_48",nt="_classname_1rxy6_54",rt="_photoGroup_1rxy6_60",ct="_photoGroupPoint_1rxy6_66",ut="_photoTitle_1rxy6_69",pt="_photoList_1rxy6_89",ht="_photoDown_1rxy6_92",dt="_photoUp_1rxy6_93",mt="_showPhoto_1rxy6_102",ft="_photo_1rxy6_60",gt="_photoMore_1rxy6_120",wt="_photoEmpty_1rxy6_135",Mt="_iconEmpty_1rxy6_141",yt="_popupContainer_1rxy6_146",_t="_field_1rxy6_157",vt="_addressShow_1rxy6_179",Pt="_address_1rxy6_179",St="_iconEdit_1rxy6_196",At="_red_1rxy6_200",e={siteManagement:Z,iconSetting:$,siteItem:tt,overhide:ot,cellGroup:et,orchestraName:st,iconMusic:at,iconTeacher:lt,username:it,classname:nt,photoGroup:rt,photoGroupPoint:ct,photoTitle:ut,photoList:pt,photoDown:ht,photoUp:dt,showPhoto:mt,photo:ft,photoMore:gt,photoEmpty:wt,iconEmpty:Mt,popupContainer:yt,field:_t,addressShow:vt,address:Pt,iconEdit:St,red:At},Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAclBMVEUAAAAzMzMyMjIiIiIzMzMyMjIyMjIzMzM0NDQwMDAzMzMyMjI0NDQzMzMzMzMzMzMzMzMzMzMyMjIyMjIzMzMzMzMyMjIvLy8xMTE0NDQzMzM0NDQzMzMzMzMxMTEyMjIxMTEzMzMyMjIzMzM0NDQzMzP2nEYQAAAAJXRSTlMA5/oEjtPrrhIm2GsOpZVD8sjCs4pmRxAJIuE7clc0KznMmX5OwCq0PgAAAZlJREFUSMfdVVmShDAIHWPco632Ftdevf8Vh1D2oBLLmvKv+Uo9IMCDkJ9vEzcpa2chdZm4a/bXYrBKcV1xCIYVCez2F6PLlynlBr1YC4hBk3E8Azi2lZGAwlEcVw4oEo6HPuBnW+gzKPyQwRJgz7Xm6oFKLtFIAHqws3EAlYgW4JHYs/N9tFxS/SXRtFK2jcvC29PUrTOgOK22FEhEjANQedRibwx6XVCofKI6gjOJH1GTfGrSiSLqGA3rIKjxEGvK+fSxrwSNywutDkgE+r5o0ETFWdO5sQ/H5huPXDPe75O+vM2ldzyiBuQ9obbBY4qUUjUPYuOBmRO1KZ4gsMAkRucnOTzRaExQQLLcYf4mMuZARpRSSQ6lSYk5N5OiO3O+fexvptBuWjSjVRm40CPHhXFXU1p54yTuFYxxw60jZ43joxHipIoyy0qBExvOR4MPXw+9Jsl7NnxsvHuH7J2ejzd/QKEUA4qQIXtA9neuOpmmslPsif5rCexcM9uLbP+q3F7GPPL6uvfcfR/K9pe191Pc/na/TH4BcvpP6mwMXy8AAAAASUVORK5CYII=",x=""+new URL("icon-empty-d78ba1a6.png",import.meta.url).href,xt=E({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2,3,4,5]}},setup(u,{slots:h}){const c=D({loading:!1});return T(()=>{c.loading=u.show}),O(()=>u.show,()=>{c.loading=u.show}),()=>t(K,{loading:c.loading,style:"flex-wrap: wrap"},{template:()=>t("div",{style:{height:"calc(100vh - var(--header-height))",overflow:"hidden"}},[u.showCount.map(()=>t("div",{class:e.siteItem},[t(g,{class:e.cellGroup},{default:()=>[t(w,{center:!0},{icon:()=>t(A,{class:e.iconMusic},null),title:()=>t("div",{style:{display:"flex",justifyContent:"space-between"}},[t(i,{rowWidth:"40%"},null),t(i,{style:{marginTop:0},rowWidth:"40%"},null)])}),t(w,{center:!0,class:e.username},{icon:()=>t(A,{class:e.iconTeacher},null),title:()=>t("div",null,[t(i,{rowWidth:"40%"},null),t(i,{rowWidth:"40%",style:{marginTop:"4px"}},null)])})]}),t(g,{class:e.cellGroup},{default:()=>[t("div",{class:[e.photoGroup]},[t("div",{class:[e.photoUp,e.showPhoto]},[t("h3",null,[t(i,{class:e.photoTitle,rowWidth:"30%"},null)]),t("div",{class:e.photoList},[t(i,{class:e.photo},null),t(i,{class:e.photo},null),t(i,{class:e.photo},null)])]),t("div",{class:[e.photoDown,e.showPhoto]},[t("h3",null,[t(i,{class:e.photoTitle,rowWidth:"30%"},null)]),t("div",{class:e.photoList},[t(i,{class:e.photo},null),t(i,{class:e.photo},null),t(i,{class:e.photo},null)])])])]})]))]),default:()=>h.default&&h.default()})}}),Kt=E({name:"site-management",setup(){const u=L(),h=v(),c=v(),o=D({isClick:!1,titleTimeValue:[],titleOrchestraValue:"",listState:{dataShow:!0,loading:!0,finished:!1,refreshing:!1},params:{startTime:null,endTime:null,musicGroupId:"",page:1,rows:20},timeColumns:[],orchestraColumns:[{text:"全部乐团",value:""}],imageShow:!1,startPosition:0,imagePreview:[],pointCourseStatus:!1,list:[],showAddressPopup:!1,siteName:"",selectSite:{}}),z=(s=4)=>{const a=[];for(let l=0;l{s.value&&s.value.toggle()},I=s=>{if(s==="orchestra"){let a="";return o.orchestraColumns.forEach(l=>{o.titleOrchestraValue===l.value&&(a=l.text)}),a}},M=async()=>{try{if(o.isClick)return;o.isClick=!0;const{data:s}=await f.post("/api-web/classGroup/teachingPointCourse",{data:{...o.params,startTime:o.titleTimeValue[0]||null,endTime:o.titleTimeValue[1]||null}}),a=s||{};o.listState.refreshing?o.list=a.rows||[]:o.list=o.list.concat(a.rows||[]),o.listState.finished=a.pageNo>=a.totalPage,o.params.page=a.pageNo+1}catch(s){o.listState.finished=!0}finally{setTimeout(()=>{o.listState.dataShow=o.list.length>0,o.listState.refreshing=!1,o.listState.loading=!1,o.isClick=!1},500)}},G=async()=>{try{const{data:s}=await f.post("/api-web/classGroup/teachingPointRemind");o.pointCourseStatus=s||!1}catch(s){}},V=async()=>{try{const{data:s}=await f.get("/api-web/cooperationOrgan/musicGroupPage");(s||[]).forEach(a=>{o.orchestraColumns.push({text:a.name,value:a.id})})}catch(s){}},N=async()=>{try{if(!o.siteName){R("请输入场地名称");return}await f.post("/api-web/classGroup/teachingPointCourseSchedule",{hideLoading:!1,data:{courseScheduleId:o.selectSite.courseId,teachingPoint:o.siteName}}),o.showAddressPopup=!1,o.listState.refreshing=!0,d()}catch(s){}},d=()=>{o.params.page=1,M()};return T(async()=>{V(),z(),await M(),G()}),()=>t("div",{class:e.siteManagement},[t(U,{position:"top"},{default:()=>[t(Y,null,{right:()=>t(P,{class:e.iconSetting,name:Ct,dot:o.pointCourseStatus,onClick:()=>{u.push("/site-settings")}},null)}),t(X,null,{default:()=>[t(C,{ref:h,modelValue:o.titleTimeValue,"onUpdate:modelValue":s=>o.titleTimeValue=s,options:o.timeColumns,onChange:()=>{o.list=[],o.listState.dataShow=!0,d()}},null),t(C,{ref:c,title:I("orchestra")},{default:()=>[t(j,{selectValues:o.titleOrchestraValue,columns:o.orchestraColumns,open:c.value.state.showPopup,onDropDownClose:()=>_(c),onDropDownConfirm:s=>{o.titleOrchestraValue=s[0],_(c),o.params.musicGroupId=o.titleOrchestraValue||"",o.list=[],o.listState.dataShow=!0,d()}},null)]})]})]}),t(xt,{show:o.listState.loading,"onUpdate:show":s=>o.listState.loading=s},{default:()=>[t(Q,{modelValue:o.listState.refreshing,"onUpdate:modelValue":s=>o.listState.refreshing=s,onRefresh:()=>d(),style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>[t(J,{finished:o.listState.finished,finishedText:" ",style:{overflow:"hidden",marginBottom:"18px"},onLoad:M,immediateCheck:!1},{default:()=>[o.listState.dataShow?o.list.map(s=>{const a=s.signPhoto?s.signPhoto.split(","):[],l=s.signOutPhoto?s.signOutPhoto.split(","):[];return t("div",{class:e.siteItem},[t(g,{class:e.cellGroup,border:!1},{default:()=>[t(w,{border:!1,center:!0},{title:()=>t("div",{class:e.orchestraName},[t("img",{src:B,class:e.iconMusic},null),t("p",{class:e.overhide},[s.musicGroupName])])}),t(w,{center:!0,class:e.username,border:!1},{icon:()=>t(y,{src:s.teacherAvatar||b,class:e.iconTeacher,fit:"cover"},null),title:()=>t("div",null,[t("div",{class:e.classname},[s.courseName]),t("div",{class:e.name},[s.teacherName,s.startClassTime&&s.endClassTime?t("span",{style:{paddingLeft:"6px"}},[m(s.startClassTime).format("MM-DD HH:mm")+"~"+m(s.endClassTime).format("HH:mm")]):""])])}),t("div",{class:e.addressShow},[s.courseStatus==="OVER"?t("p",{class:[e.address],onClick:()=>{s.teachingPoint||(o.selectSite=s,o.siteName=s.teachingPoint,o.showAddressPopup=!0)}},[t("p",{class:[s.teachingPoint?"":e.red]},[t("span",{style:{color:" var(--k-gray-1)"}},[r("场地名称:")]),s.teachingPoint||"未设置场地"]),s.teachingPoint?"":t(P,{name:W,class:e.iconEdit},null)]):t("p",{class:[e.address,e.overhide]},[s.teachingPoint])])]}),t(g,{class:e.cellGroup,border:!1},{default:()=>[t("div",{class:[e.photoGroup,s.teachingPoint&&e.photoGroupPoint]},[t("div",{class:e.photoUp},[t("h3",null,[t("span",{class:e.photoTitle},[r("课前照片")])]),s.signPhoto?t("div",{class:e.photoList},[a.map((p,n)=>n<=2&&t("div",{class:e.photo,onClick:()=>{o.imagePreview=a,o.imageShow=!0,o.startPosition=n}},[t(y,{src:p},null),a.length>3&&n===2?t("div",{class:e.photoMore},[r("+"),a.length-3]):""]))]):t("div",{class:e.photoEmpty},[t("img",{src:x,class:e.iconEmpty},null),t("p",null,[r("未上传照片~")])])]),t("div",{class:e.photoDown},[t("h3",null,[t("span",{class:e.photoTitle},[r("课后照片")])]),s.signOutPhoto?t("div",{class:e.photoList},[l.map((p,n)=>n<=2&&t("div",{class:e.photo,onClick:()=>{o.imagePreview=l,o.imageShow=!0,o.startPosition=n}},[t(y,{src:p,fit:"cover"},null),l.length>3&&n===2?t("div",{class:e.photoMore},[r("+"),l.length-3]):""]))]):t("div",{class:e.photoEmpty},[t("img",{src:x,class:e.iconEmpty},null),t("p",null,[r("未上传照片~")])])])])]})])}):t(k,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})]})]}),t(H,{show:o.imageShow,"onUpdate:show":s=>o.imageShow=s,images:o.imagePreview,startPosition:o.startPosition},null),t(F,{show:o.showAddressPopup,"onUpdate:show":s=>o.showAddressPopup=s,round:!0,onClose:()=>{o.siteName="",o.selectSite={}}},{default:()=>[t("div",{class:e.popupContainer},[t("h2",null,[r("设置场地")]),t(q,{placeholder:"请输入场地名称",modelValue:o.siteName,"onUpdate:modelValue":s=>o.siteName=s,border:!1,class:e.field,maxlength:15,autocomplete:"off",showWordLimit:!0},null),t("div",{class:["btnGroupPopup"]},[t(S,{round:!0,onClick:()=>{o.showAddressPopup=!1}},{default:()=>[r("取消")]}),t(S,{type:"primary",round:!0,onClick:N},{default:()=>[r("确定")]})])])]})])}});export{Kt as default};