index-ac12bbce.js 10 KB

1
  1. import{d as D,O as T,o as z,w as Y,g as t,i as P,R as x,I as A,S as m,h as r,T as k,P as L,B as S,N as R,a as f,f as U}from"./index-1d4a9afa.js";import{M as F}from"./index-6b314488.js";import{D as j}from"./drop-down-modal-3282bbb5.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-78bb2c80.js";import{S as K,b as y,a as i}from"./index-fc00eb76.js";import{C as g}from"./index-b8090118.js";import{C as w}from"./index-a27d7671.js";import{M as Q}from"./index-8fc031c0.js";import{i as X}from"./icon-edit-9f02937c.js";import{D as W,a as C}from"./index-ab43c325.js";import{L as J}from"./index-5807759e.js";import{I as _}from"./index-c272bcfa.js";import{F as q}from"./index-dbc03ded.js";import"./index-6d1e9935.js";import"./index-22c9ea74.js";import"./use-tab-status-a36febbc.js";import"./toolsValidate-2f258ec3.js";const Z="_siteManagement_14s70_1",$="_iconSetting_14s70_4",tt="_siteItem_14s70_13",et="_overhide_14s70_18",ot="_cellGroup_14s70_24",st="_orchestraName_14s70_27",at="_iconMusic_14s70_34",lt="_address_14s70_39",it="_iconEdit_14s70_48",nt="_red_14s70_52",rt="_iconTeacher_14s70_55",ct="_username_14s70_61",ut="_classname_14s70_67",pt="_photoGroup_14s70_73",ht="_photoTitle_14s70_79",dt="_photoList_14s70_99",mt="_photoDown_14s70_102",ft="_photoUp_14s70_103",gt="_showPhoto_14s70_112",wt="_photo_14s70_73",Mt="_photoMore_14s70_130",_t="_photoEmpty_14s70_145",vt="_iconEmpty_14s70_151",Pt="_popupContainer_14s70_156",At="_field_14s70_167",o={siteManagement:Z,iconSetting:$,siteItem:tt,overhide:et,cellGroup:ot,orchestraName:st,iconMusic:at,address:lt,iconEdit:it,red:nt,iconTeacher:rt,username:ct,classname:ut,photoGroup:pt,photoTitle:ht,photoList:dt,photoDown:mt,photoUp:ft,showPhoto:gt,photo:wt,photoMore:Mt,photoEmpty:_t,iconEmpty:vt,popupContainer:Pt,field:At},St="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAclBMVEUAAAAzMzMyMjIiIiIzMzMyMjIyMjIzMzM0NDQwMDAzMzMyMjI0NDQzMzMzMzMzMzMzMzMzMzMyMjIyMjIzMzMzMzMyMjIvLy8xMTE0NDQzMzM0NDQzMzMzMzMxMTEyMjIxMTEzMzMyMjIzMzM0NDQzMzP2nEYQAAAAJXRSTlMA5/oEjtPrrhIm2GsOpZVD8sjCs4pmRxAJIuE7clc0KznMmX5OwCq0PgAAAZlJREFUSMfdVVmShDAIHWPco632Ftdevf8Vh1D2oBLLmvKv+Uo9IMCDkJ9vEzcpa2chdZm4a/bXYrBKcV1xCIYVCez2F6PLlynlBr1YC4hBk3E8Azi2lZGAwlEcVw4oEo6HPuBnW+gzKPyQwRJgz7Xm6oFKLtFIAHqws3EAlYgW4JHYs/N9tFxS/SXRtFK2jcvC29PUrTOgOK22FEhEjANQedRibwx6XVCofKI6gjOJH1GTfGrSiSLqGA3rIKjxEGvK+fSxrwSNywutDkgE+r5o0ETFWdO5sQ/H5huPXDPe75O+vM2ldzyiBuQ9obbBY4qUUjUPYuOBmRO1KZ4gsMAkRucnOTzRaExQQLLcYf4mMuZARpRSSQ6lSYk5N5OiO3O+fexvptBuWjSjVRm40CPHhXFXU1p54yTuFYxxw60jZ43joxHipIoyy0qBExvOR4MPXw+9Jsl7NnxsvHuH7J2ejzd/QKEUA4qQIXtA9neuOpmmslPsif5rCexcM9uLbP+q3F7GPPL6uvfcfR/K9pe191Pc/na/TH4BcvpP6mwMXy8AAAAASUVORK5CYII=",E=""+new URL("icon-empty-d78ba1a6.png",import.meta.url).href,yt=D({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2,3,4,5]}},setup(u,{slots:h}){const c=T({loading:!1});return z(()=>{c.loading=u.show}),Y(()=>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:o.siteItem},[t(g,{class:o.cellGroup},{default:()=>[t(w,{center:!0},{icon:()=>t(y,{class:o.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:o.username},{icon:()=>t(y,{class:o.iconTeacher},null),title:()=>t("div",null,[t(i,{rowWidth:"40%"},null),t(i,{rowWidth:"40%",style:{marginTop:"4px"}},null)])})]}),t(g,{class:o.cellGroup},{default:()=>[t("div",{class:[o.photoGroup]},[t("div",{class:[o.photoUp,o.showPhoto]},[t("h3",null,[t(i,{class:o.photoTitle,rowWidth:"30%"},null)]),t("div",{class:o.photoList},[t(i,{class:o.photo},null),t(i,{class:o.photo},null),t(i,{class:o.photo},null)])]),t("div",{class:[o.photoDown,o.showPhoto]},[t("h3",null,[t(i,{class:o.photoTitle,rowWidth:"30%"},null)]),t("div",{class:o.photoList},[t(i,{class:o.photo},null),t(i,{class:o.photo},null),t(i,{class:o.photo},null)])])])]})]))]),default:()=>h.default&&h.default()})}}),bt=D({name:"site-management",setup(){const u=R(),h=P(),c=P(),e=T({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:{}}),I=(s=4)=>{const a=[];for(let l=0;l<s;l++){const p=m().subtract(l,"week").startOf("week").add(1,"day"),n=m().subtract(l,"week").endOf("week").add(1,"day");a.push({text:p.format("YYYY/MM/DD")+" - "+n.format("YYYY/MM/DD"),value:[p.format("YYYY-MM-DD"),n.format("YYYY-MM-DD")]})}e.timeColumns=a,e.titleTimeValue=a[0].value},v=s=>{s.value&&s.value.toggle()},V=s=>{if(s==="orchestra"){let a="";return e.orchestraColumns.forEach(l=>{e.titleOrchestraValue===l.value&&(a=l.text)}),a}},M=async()=>{try{if(e.isClick)return;e.isClick=!0;const{data:s}=await f.post("/api-web/classGroup/teachingPointCourse",{data:{...e.params,startTime:e.titleTimeValue[0]||null,endTime:e.titleTimeValue[1]||null}}),a=s||{};e.listState.refreshing?e.list=a.rows||[]:e.list=e.list.concat(a.rows||[]),e.listState.finished=a.pageNo>=a.totalPage,e.params.page=a.pageNo+1}catch(s){e.listState.finished=!0}finally{setTimeout(()=>{e.listState.dataShow=e.list.length>0,e.listState.refreshing=!1,e.listState.loading=!1,e.isClick=!1},500)}},N=async()=>{try{const{data:s}=await f.post("/api-web/classGroup/teachingPointRemind");e.pointCourseStatus=s||!1}catch(s){}},O=async()=>{try{const{data:s}=await f.get("/api-web/cooperationOrgan/musicGroupPage");(s||[]).forEach(a=>{e.orchestraColumns.push({text:a.name,value:a.id})})}catch(s){}},G=async()=>{try{if(!e.siteName){U("请输入场地名称");return}await f.post("/api-web/classGroup/teachingPointCourseSchedule",{hideLoading:!1,data:{courseScheduleId:e.selectSite.courseId,teachingPoint:e.siteName}}),e.showAddressPopup=!1,e.listState.refreshing=!0,d()}catch(s){}},d=()=>{e.params.page=1,M()};return z(async()=>{O(),I(),await M(),N()}),()=>t("div",{class:o.siteManagement},[t(F,{position:"top"},{default:()=>[t(x,null,{right:()=>t(A,{class:o.iconSetting,name:St,dot:e.pointCourseStatus,onClick:()=>{u.push("/site-settings")}},null)}),t(W,null,{default:()=>[t(C,{ref:h,modelValue:e.titleTimeValue,"onUpdate:modelValue":s=>e.titleTimeValue=s,options:e.timeColumns,onChange:()=>{e.list=[],e.listState.dataShow=!0,d()}},null),t(C,{ref:c,title:V("orchestra")},{default:()=>[t(j,{selectValues:e.titleOrchestraValue,columns:e.orchestraColumns,open:c.value.state.showPopup,onDropDownClose:()=>v(c),onDropDownConfirm:s=>{e.titleOrchestraValue=s[0],v(c),e.params.musicGroupId=e.titleOrchestraValue||"",e.list=[],e.listState.dataShow=!0,d()}},null)]})]})]}),t(yt,{show:e.listState.loading,"onUpdate:show":s=>e.listState.loading=s},{default:()=>[t(Q,{modelValue:e.listState.refreshing,"onUpdate:modelValue":s=>e.listState.refreshing=s,onRefresh:()=>d(),style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>[t(J,{finished:e.listState.finished,finishedText:" ",style:{overflow:"hidden",marginBottom:"18px"},onLoad:M,immediateCheck:!1},{default:()=>[e.listState.dataShow?e.list.map(s=>{const a=s.signPhoto?s.signPhoto.split(","):[],l=s.signOutPhoto?s.signOutPhoto.split(","):[];return t("div",{class:o.siteItem},[t(g,{class:o.cellGroup,border:!1},{default:()=>[t(w,{border:!1,center:!0},{title:()=>t("div",{class:o.orchestraName},[t("img",{src:B,class:o.iconMusic},null),t("p",{class:o.overhide},[s.musicGroupName])]),default:()=>s.courseStatus==="OVER"?t("p",{class:[o.address],onClick:()=>{s.teachingPoint||(e.selectSite=s,e.siteName=s.teachingPoint,e.showAddressPopup=!0)}},[t("p",{class:[o.overhide,s.teachingPoint?"":o.red]},[s.teachingPoint||"未设置场地"]),s.teachingPoint?"":t(A,{name:X,class:o.iconEdit},null)]):t("p",{class:[o.address,o.overhide]},[s.teachingPoint])}),t(w,{center:!0,class:o.username},{icon:()=>t(_,{src:s.teacherAvatar||b,class:o.iconTeacher,fit:"cover"},null),title:()=>t("div",null,[t("div",{class:o.classname},[s.courseName]),t("div",{class:o.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(g,{class:o.cellGroup,border:!1},{default:()=>[t("div",{class:[o.photoGroup]},[t("div",{class:o.photoUp},[t("h3",null,[t("span",{class:o.photoTitle},[r("课前照片")])]),s.signPhoto?t("div",{class:o.photoList},[a.map((p,n)=>n<=2&&t("div",{class:o.photo,onClick:()=>{e.imagePreview=a,e.imageShow=!0,e.startPosition=n}},[t(_,{src:p},null),a.length>3&&n===2?t("div",{class:o.photoMore},[r("+"),a.length-3]):""]))]):t("div",{class:o.photoEmpty},[t("img",{src:E,class:o.iconEmpty},null),t("p",null,[r("未上传照片~")])])]),t("div",{class:o.photoDown},[t("h3",null,[t("span",{class:o.photoTitle},[r("课后照片")])]),s.signOutPhoto?t("div",{class:o.photoList},[l.map((p,n)=>n<=2&&t("div",{class:o.photo,onClick:()=>{e.imagePreview=l,e.imageShow=!0,e.startPosition=n}},[t(_,{src:p+"@base@tag=imgScale&w=120",fit:"cover"},null),l.length>3&&n===2?t("div",{class:o.photoMore},[r("+"),l.length-3]):""]))]):t("div",{class:o.photoEmpty},[t("img",{src:E,class:o.iconEmpty},null),t("p",null,[r("未上传照片~")])])])])]})])}):t(k,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})]})]}),t(H,{show:e.imageShow,"onUpdate:show":s=>e.imageShow=s,images:e.imagePreview,startPosition:e.startPosition},null),t(L,{show:e.showAddressPopup,"onUpdate:show":s=>e.showAddressPopup=s,round:!0,onClose:()=>{e.siteName="",e.selectSite={}}},{default:()=>[t("div",{class:o.popupContainer},[t("h2",null,[r("设置场地")]),t(q,{placeholder:"请输入场地名称",modelValue:e.siteName,"onUpdate:modelValue":s=>e.siteName=s,border:!1,class:o.field,maxlength:15,autocomplete:"off"},null),t("div",{class:["btnGroupPopup"]},[t(S,{round:!0,onClick:()=>{e.showAddressPopup=!1}},{default:()=>[r("取消")]}),t(S,{type:"primary",round:!0,onClick:G},{default:()=>[r("确定")]})])])]})])}});export{bt as default};