import{d,ah as m,r as p,$ as c,c as e,aj as f,ak as u,m as h}from"./index.332c7f08.js";import{s as i}from"./index.module.b9eeb1f8.js";import{L as g}from"./index.b186dfda.js";import{I as S}from"./index.96a8db5e.js";import{s as w}from"./function-call.3db51140.js";import"./use-tab-status.9d769af8.js";import"./ImagePreview.e5b44a77.js";import"./index.1e2dfe6e.js";var k=d({name:"photo-detail",setup(){const o=m(),t=p({isEdit:!1,isLoading:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20}}),l=async()=>{try{if(t.isLoading)return;t.isLoading=!0;const s=await h.post("/api-school/orchestraPhoto/page",{data:{...t.params,orchestraPhotoAlbumId:o.query.photoId}});t.listState.loading=!1;const a=s.data||{};if(t.list.length>0&&a.current===1)return;const r=a.rows||[];t.list=t.list.concat(r),t.listState.finished=a.current>=a.pages,t.params.page=a.current+1,t.listState.dataShow=t.list.length>0,t.isLoading=!1}catch{t.listState.dataShow=!1,t.listState.finished=!0,t.isLoading=!1}},n=s=>{const a=t.list.map(r=>r.fileUrl);w({images:a,startPosition:s,closeable:!0})};return c(()=>{l(),document.title=o.query.name||""}),()=>e("div",{class:[i.phoneDetail,!t.listState.dataShow&&"emptyRootContainer"]},[e(f,{title:o.query.name||""},null),t.listState.dataShow?e(g,{finished:t.listState.finished,finishedText:" ",onLoad:l,immediateCheck:!1},{default:()=>[e("div",{class:i.phoneContainer,style:{paddingTop:"12px"}},[t.list.map((s,a)=>e("div",{class:[i.item],onClick:()=>{n(a)}},[e(S,{class:i.img,src:s.fileUrl,fit:"cover"},null)]))])]}):e(u,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u7247"},null)])}});export{k as default};