import{n as d,r as m,_}from"./index.13f93d3a.js";import{W as g}from"./index.77c2652a.js";const f={name:"me-folder",components:{Waterfall:g},data(){return{images:[],limit:5,page:1,totalPage:1}},mounted(){this.getImages()},methods:{goBack(){this.$router.go(-1)},loadData(a){this.getImages({page:a,newload:!1})},onSelected(a){const e=a[0],{image:t}=e,s=this.$t("common.failure");this.$axios.post("/api/folder/edit_folder",{images:[t],id:this.id}).then(o=>{const{code:r,msg:i}=o.data;r==0?(this.$message.success(i),this.$router.push({path:"/me/docSetting",query:{id:this.id}})):this.$message.error(i||s)}).catch(()=>{this.$message.error(s)})},getImages({page:a=this.page,newload:e=!0}={}){const t=this.$t("common.failure");this.$axios.get("/api/folder/image_list",{params:{page:a,limit:this.limit,folder_id:this.id,go:5}}).then(s=>{const{code:o,msg:r,data:i={}}=s.data;if(o==0){const{items:l=[],page:n,totalPage:c}=i;this.page=n,this.images=e?l:m(this.images,l),this.totalPage=c}else this.$message.error(r||t)}).catch(()=>{this.$message.error(t)})}},computed:{id(){const{id:a}=this.$route.query;return parseInt(a)},folderName(){const{name:a}=this.$route.query;return a}}};var h=function(){var e=this,t=e._self._c;return t("div",{staticClass:"me-folder"},[t("div",{staticClass:"top"},[t("div",{staticClass:"back",on:{click:e.goBack}},[t("img",{attrs:{src:_,alt:"back icon"}})]),t("b",[e._v(e._s(e.folderName))])]),t("div",{staticClass:"pictures"},[e.images.length?t("Waterfall",{attrs:{data:e.images,page:e.page,totalPage:e.totalPage},on:{loadData:e.loadData,selected:e.onSelected}}):e._e()],1)])},u=[],p=d(f,h,u,!1,null,"a2ff71cb",null,null);const y=p.exports;export{y as default};
