1 |
- import{M as C}from"./index-cf657a5b.js";import{d as w,O as g,o as _,w as y,g as s,R as P,h as l,I as G,T as N,P as p,B as m,f as k,a as h}from"./index-e362c2e8.js";import{i as M}from"./icon-music-10132ef5.js";import{i as T}from"./icon-teacher-default-a5bec550.js";import{i as I}from"./icon-edit-9f02937c.js";import{S as b,b as f,a as n}from"./index-5276fe86.js";import{C as S}from"./index-7571fa92.js";import{C as c}from"./index-5c45ec33.js";import{M as E}from"./index-04aee2cb.js";import{L as x}from"./index-7861a26d.js";import{I as O}from"./index-85ccd873.js";import{F as A}from"./index-6c6fed8e.js";import{P as F}from"./index-14b5dea2.js";import"./use-tab-status-92e284d0.js";import"./index-f57b4c5f.js";const B="_searchGroup_14dui_1",L="_searchItem_14dui_5",U="_overhide_14dui_32",V="_cellGroup_14dui_38",W="_orchestraName_14dui_46",R="_iconMusic_14dui_53",D="_iconTeacher_14dui_58",H="_username_14dui_64",$="_classname_14dui_70",j="_popupContainer_14dui_76",q="_field_14dui_87",z="_addressShow_14dui_109",J="_address_14dui_109",K="_iconEdit_14dui_129",Q="_red_14dui_133",a={searchGroup:B,searchItem:L,overhide:U,cellGroup:V,orchestraName:W,iconMusic:R,iconTeacher:D,username:H,classname:$,popupContainer:j,field:q,addressShow:z,address:J,iconEdit:K,red:Q},X=w({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2,3,4,5,6]}},setup(e,{slots:r}){const i=g({loading:!1});return _(()=>{i.loading=e.show}),y(()=>e.show,()=>{i.loading=e.show}),()=>s(b,{loading:i.loading,style:"flex-wrap: wrap"},{template:()=>s("div",{style:{height:"calc(100vh - var(--header-height))",overflow:"hidden",width:"100%"}},[e.showCount.map(()=>s(S,{class:a.cellGroup},{default:()=>[s(c,{center:!0},{icon:()=>s(f,{class:a.iconMusic},null),title:()=>s("div",{style:{display:"flex",justifyContent:"space-between"}},[s(n,{rowWidth:"40%"},null),s(n,{style:{marginTop:0},rowWidth:"40%"},null)])}),s(c,{center:!0,class:a.username},{icon:()=>s(f,{class:a.iconTeacher},null),title:()=>s("div",null,[s(n,{rowWidth:"40%"},null),s(n,{rowWidth:"40%",style:{marginTop:"4px"}},null)])})]}))]),default:()=>r.default&&r.default()})}}),pe=w({name:"site-setting",setup(){const e=g({showPopup:!1,showOrchestraPopup:!1,siteName:"",orchestraName:"全部乐团",orchestraColumns:[{text:"全部乐团",value:""}],listState:{dataShow:!0,loading:!0,finished:!1,refreshing:!1},params:{musicGroupId:null,page:1,rows:20},isClick:!1,list:[],selectSite:{}}),r=t=>{e.selectSite=t,e.siteName=t.teachingPoint,e.showPopup=!0},i=async()=>{try{if(!e.siteName){k("请输入场地名称");return}await h.post("/api-web/classGroup/teachingPoint",{hideLoading:!1,data:{classGroupId:e.selectSite.classGroupId,teachingPoint:e.siteName}}),e.showPopup=!1,e.list=[],d()}catch(t){}},u=async()=>{try{if(e.isClick)return;e.isClick=!0;const{data:t}=await h.post("/api-web/classGroup/teachingPointClass",{data:e.params}),o=t||{};e.listState.refreshing?e.list=o.rows||[]:e.list=e.list.concat(o.rows||[]),e.listState.finished=o.pageNo>=o.totalPage,e.params.page=o.pageNo+1}catch(t){e.listState.finished=!0}finally{setTimeout(()=>{e.listState.dataShow=e.list.length>0,e.listState.refreshing=!1,e.listState.loading=!1,e.isClick=!1},300)}},d=()=>{e.params.page=1,u()},v=async()=>{try{const{data:t}=await h.get("/api-web/cooperationOrgan/musicGroupPage");(t||[]).forEach(o=>{e.orchestraColumns.push({text:o.name,value:o.id})})}catch(t){}};return _(()=>{v(),u()}),()=>s("div",{class:a.siteSetting},[s(C,{position:"top"},{default:()=>[s(P,null,null),s("div",{class:a.searchGroup},[s("div",{class:a.searchItem,onClick:()=>e.showOrchestraPopup=!0},[s("span",null,[e.orchestraName])])])]}),s(X,{show:e.listState.loading,"onUpdate:show":t=>e.listState.loading=t},{default:()=>[s(E,{modelValue:e.listState.refreshing,"onUpdate:modelValue":t=>e.listState.refreshing=t,onRefresh:()=>d(),style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>[s(x,{finished:e.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:u,immediateCheck:!1},{default:()=>[e.listState.dataShow?e.list.map(t=>s(S,{class:a.cellGroup,border:!1},{default:()=>[s(c,{border:!1,center:!0},{title:()=>s("div",{class:a.orchestraName},[s("img",{src:M,class:a.iconMusic},null),s("p",{class:a.overhide},[t.musicGroupName])])}),s("div",{class:a.addressShow},[s("div",{class:a.address,onClick:()=>r(t)},[s("p",{class:[a.overhide,t.teachingPoint?"":a.red]},[s("span",{style:{color:" var(--k-gray-1)"}},[l("场地名称:")]),t.teachingPoint||"未设置场地"]),s(G,{name:I,class:a.iconEdit},null)])]),s(c,{center:!0,class:a.username},{icon:()=>s(O,{src:t.teacherAvatar||T,class:a.iconTeacher,fit:"cover"},null),title:()=>s("div",null,[s("div",{class:a.classname},[t.classGroupName]),s("div",{class:a.name},[t.teacherName])])})]})):s(N,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})]})]}),s(p,{show:e.showPopup,"onUpdate:show":t=>e.showPopup=t,round:!0,onClose:()=>{e.siteName="",e.selectSite={}}},{default:()=>[s("div",{class:a.popupContainer},[s("h2",null,[l("设置场地")]),s(A,{placeholder:"请输入场地名称",modelValue:e.siteName,"onUpdate:modelValue":t=>e.siteName=t,border:!1,class:a.field,autocomplete:"off",maxlength:15,showWordLimit:!0},null),s("div",{class:["btnGroupPopup"]},[s(m,{round:!0,onClick:()=>{e.showPopup=!1}},{default:()=>[l("取消")]}),s(m,{type:"primary",round:!0,onClick:i},{default:()=>[l("确定")]})])])]}),s(p,{show:e.showOrchestraPopup,"onUpdate:show":t=>e.showOrchestraPopup=t,round:!0,position:"bottom"},{default:()=>[s(F,{columns:e.orchestraColumns,onCancel:()=>e.showOrchestraPopup=!1,onConfirm:({selectedOptions:t})=>{e.showOrchestraPopup=!1;const o=t[0];e.orchestraName=o.text,e.params.musicGroupId=o.value,e.list=[],e.listState.dataShow=!0,d()}},null)]})])}});export{pe as default};
|