|
|
|
+import{n,r as d,_ as m}from"./index.e0ae3743.js";import{W as u}from"./index.288ffcd2.js";const _={name:"me-arrange-doc",components:{Waterfall:u},data(){return{loading:!1,page:1,limit:5,totalPage:1,go:5,products:[],images:[]}},mounted(){this.getProducts()},methods:{rebuildData(a){return a.map(t=>t.map(e=>({...e.product})))},toMovefile(){this.$router.push({path:"/me/moveFile",query:{ids:this.images.map(a=>a.id).join(","),type:this.type}})},onSelected(a){this.images=a},loadData(a){this.getProducts({page:a,newload:!1})},getProducts({page:a=this.page,newload:t=!0}={}){const e=this.$t("common.failure");this.$axios.get("/api/product/collect_list",{params:{page:a,limit:this.limit,go:this.go}}).then(r=>{const{code:o,msg:i=e,data:l={}}=r.data,{items:s=[],totalPage:c}=l;o==0?(this.products=this.rebuildData(t?s:d(this.products,s)),this.page=a,this.totalPage=c):this.$message.error(i)}).catch(()=>{this.$message.error(e)})}},computed:{type(){const{type:a}=this.$route.query;return parseInt(a)},disabled(){return this.images.length===0}}};var p=function(){var t=this,e=t._self._c;return e("div",{staticClass:"me-arrange-doc"},[e("div",{staticClass:"top"},[e("div",{staticClass:"back"},[e("router-link",{attrs:{to:"/me/profile"}},[e("img",{attrs:{src:m,alt:"back icon"}})])],1),e("b",[t._v(t._s(t.$t("me.profile.arrangeDoc.title")))])]),e("div",{staticClass:"pictures"},[e("Waterfall",{attrs:{page:t.page,totalPage:t.totalPage,data:t.products},on:{loadData:t.loadData,selected:t.onSelected}})],1),e("div",{staticClass:"button"},[e("el-button",{staticClass:"complete",attrs:{disabled:t.disabled,type:"primary",round:""},on:{click:t.toMovefile}},[t._v(t._s(t.$t("common.complete")))])],1)])},g=[],h=n(_,p,g,!1,null,"0c5bae3f",null,null);const b=h.exports;export{b as default};
|