1 |
- import{d as g,ah as f,ag as v,r as _,$ as y,c as t,aj as w,q as x,ak as I,P as q,m as n,g as c}from"./index.3b0304e1.js";import{i as L}from"./icon-or.620acfd8.js";import{O as d}from"./index.454c666f.js";import{O as S}from"./index.7c4783e6.js";import{C}from"./index.ead63c4f.js";import{C as N}from"./index.ff3f298b.js";import{L as k}from"./index.179b8d2a.js";import{P as D}from"./index.49feb9e9.js";import"./use-tab-status.e36e4d74.js";import"./Picker.66dfa715.js";import"./index.c9ab1bb5.js";import"./index.ce8d626c.js";import"./index.409ae793.js";const G="_phoneDetail_ivqxi_1",P="_photoWrap_ivqxi_6",O="_photoItem_ivqxi_16",A="_gridImg_ivqxi_21",b="_iconNew_ivqxi_35",R="_iconImage_ivqxi_45",F="_gridName_ivqxi_49",H="_gridDes_ivqxi_56",T="_cellGroup_ivqxi_62",U="_select_ivqxi_66",V="_icon_ivqxi_35";var a={phoneDetail:G,photoWrap:P,photoItem:O,gridImg:A,iconNew:b,iconImage:R,gridName:F,gridDes:H,cellGroup:T,select:U,icon:V},oe=g({name:"photo-detail",props:{orchestraId:{type:String,default:""}},setup(W){const h=f(),p=v(),e=_({refreshing:!1,loading:!1,finished:!1,pages:{page:1,rows:20},list:[],schoolStatus:!1,schoolList:[],school:{}}),i=async()=>{var o;e.refreshing&&(e.pages.page=1,e.finished=!1,e.list=[]),e.loading=!0;try{const s=await n.post(`${c.platformApi}/orchestraPhotoAlbum/page`,{data:{...e.pages,schoolId:e.school.id},hideLoading:!0});Array.isArray((o=s==null?void 0:s.data)==null?void 0:o.rows)&&(e.list=e.list.concat(s.data.rows),e.pages.page+=1,s.data.rows.length||(e.finished=!0))}catch{e.finished=!0}e.loading=!1,setTimeout(()=>{e.refreshing=!1},500)},u=async()=>{var o;try{const s=await n.post("/api-teacher/school/teacherSchoolPage",{data:{teacherId:c.user.data.id,page:1,rows:999}});Array.isArray((o=s.data)==null?void 0:o.rows)&&(e.schoolList=s.data.rows.map(l=>({name:l.schoolName||"",id:l.schoolId||""})),e.school=e.schoolList[0]||{})}catch{}};return y(async()=>{await u(),await i(),document.title=h.query.name||""}),()=>t("div",null,[t(d,{onGetHeight:o=>{document.documentElement.style.setProperty("--header-height",o+"px")}},{default:()=>[t(w,null,null)]}),e.schoolList.length>0&&t(d,{offsetTop:"var(--header-height)",onGetHeight:o=>{document.documentElement.style.setProperty("--header-cellGroup",o+"px")}},{default:()=>[t("div",{style:{overflow:"hidden"}},[t(C,{inset:!0,class:a.cellGroup},{default:()=>[t(N,{class:a.select,center:!0,isLink:!0,onClick:()=>e.schoolStatus=!0},{icon:()=>t("img",{class:a.icon,src:L},null),title:()=>t("div",{class:"van-ellipsis"},[e.school.name])})]})])]}),t(S,{modelValue:e.refreshing,"onUpdate:modelValue":o=>e.refreshing=o,onRefresh:()=>i()},{default:()=>[t("div",{class:[a.phoneDetail]},[!e.loading&&!!e.list.length&&t(k,{loading:e.loading,finished:e.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u6570\u636E",onLoad:i,immediateCheck:!1},{default:()=>[t("div",{class:a.photoWrap},[e.list.map((o,s)=>t("div",{class:a.photoItem,onClick:()=>{p.push({path:"/photo-list",query:{id:o.id,name:o.name}})}},[t("div",{class:a.gridImg,style:o.coverUrl?{backgroundImage:`url(${o.coverUrl})`,backgroundSize:"cover"}:""},[o.newFlag?t("i",{class:a.iconNew},null):""]),t("div",{class:a.gridName},[o.name]),t("div",{class:a.gridDes},[o.photoCount,x("\u5F20")])]))])]}),!e.loading&&!e.list.length&&t("div",{class:"emptyRootContainer",style:{minHeight:"78%"}},[t(I,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u518C"},null)]),t(q,{show:e.schoolStatus,"onUpdate:show":o=>e.schoolStatus=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[t(D,{columns:e.schoolList,columnsFieldNames:{text:"name",value:"id"},onCancel:()=>e.schoolStatus=!1,onConfirm:({selectedValues:o})=>{var r;const s=o[0]||"";if(e.schoolStatus=!1,s==((r=e.school)==null?void 0:r.id))return;const l=e.schoolList.find(m=>m.id==s)||{};e.school=l,e.pages.page=1,e.list=[],e.finished=!1,i()}},null)]})])]})])}});export{oe as default};
|