import{d as c,ah as u,ag as p,r as g,$ as h,c as e,aj as m,q as d,ak as f,m as v,g as y}from"./index.8f93de0e.js";import{s}from"./index.module.94179db9.js";import{O as I}from"./index.a9a604b9.js";import{L as k}from"./index.1e20fccc.js";import"./use-tab-status.69e46758.js";var w=c({name:"photo-detail",props:{orchestraId:{type:String,default:""}},setup(n){const i=u(),r=p();console.log("\u{1F680} ~ route",i);const a=g({loading:!1,finished:!1,pages:{page:1,rows:20},list:[]}),l=async()=>{var t;if(!a.loading){a.loading=!0;try{const o=await v.post(`${y.platformApi}/orchestraPhotoAlbum/page`,{data:{...a.pages,orchestraId:n.orchestraId||i.query.orchestraId,parentId:i.query.id}});Array.isArray((t=o==null?void 0:o.data)==null?void 0:t.rows)?(a.list=a.list.concat(o.data.rows),a.pages.page+=1,a.finished=!o.data.next):a.finished=!0}catch{a.finished=!0}a.loading=!1}};return h(()=>{l(),document.title=i.query.name||""}),()=>e("div",null,[e(I,null,{default:()=>[e(m,{title:i.query.name||"\u76F8\u518C"},null)]}),e("div",{class:s.phoneDetail},[!a.loading&&!!a.list.length&&e(k,{loadingText:" ",finished:a.finished,finishedText:" ",onLoad:l,immediateCheck:!1},{default:()=>[e("div",{class:s.photoWrap},[a.list.map((t,o)=>e("div",{class:s.photoItem,onClick:()=>{r.push({path:"/photo-list-detail",query:{photoId:t.id}})}},[e("div",{class:s.imgSection},[e("div",{class:s.gridImg,style:t.coverUrl?{backgroundImage:`url(${t.coverUrl})`,backgroundSize:"cover"}:""},null)]),e("div",{class:s.gridName},[t.name||""]),e("div",{class:s.gridDes},[t.photoCount||0,d("\u5F20")])])),a.list.map((t,o)=>e("div",{class:s.photoItem,onClick:()=>{r.push({path:"/photo-list-detail",query:{photoId:t.id}})}},[e("div",{class:s.imgSection},[e("div",{class:s.gridImg,style:t.coverUrl?{backgroundImage:`url(${t.coverUrl})`,backgroundSize:"cover"}:""},null)]),e("div",{class:s.gridName},[t.name||""]),e("div",{class:s.gridDes},[t.photoCount||0,d("\u5F20")])]))])]}),!a.loading&&!a.list.length&&e(f,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u518C"},null)])])}});export{w as default};
