import{n as r,_ as a}from"./index.13f93d3a.js";const c={name:"me-move-file",data(){return{folders:[]}},methods:{goBack(){this.$router.go(-1)}},mounted(){const s=this.$t("common.failure");this.$axios.get("/api/folder/folder_list",{params:{type:this.type}}).then(t=>{const{code:e,msg:i,data:o=[]}=t.data;e==0?this.folders=o:this.$message.error(i||s)}).catch(()=>{this.$message.error(s)})},methods:{goBack(){this.$router.go(-1)},moveFile({id:s}){const t=this.$t("common.failure");this.$axios.post("/api/folder/move_file",{folder_id:s,product_ids:this.ids}).then(e=>{const{code:i,msg:o}=e.data;i==0?(this.$message.success(o),this.goBack()):this.$message.error(o||t)}).catch(()=>{this.$message.error(t)})}},computed:{ids(){const{ids:s}=this.$route.query;return s},type(){const{type:s}=this.$route.query;return parseInt(s)}}};var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"me-move-file"},[e("div",{staticClass:"top"},[e("div",{staticClass:"back",on:{click:t.goBack}},[e("img",{attrs:{src:a,alt:"back icon"}})]),e("b",[t._v(t._s(t.$t("me.profile.moveFile.title")))])]),e("div",{staticClass:"files"},[e("ul",t._l(t.folders,function(i){return e("li",{staticClass:"file-item",on:{click:function(o){return t.moveFile(i)}}},[i.images&&i.images.length?e("img",{attrs:{src:i.images[0]}}):e("div",{staticClass:"default-images"}),e("b",[t._v(t._s(i.name))])])}),0)]),e("div",{staticClass:"button"},[e("router-link",{attrs:{to:{path:"/me/createDoc",query:{type:t.type}}}},[e("div",{staticClass:"icon-plus"},[e("i",{staticClass:"el-icon-plus"})]),e("b",[t._v(t._s(t.$t("me.profile.createDocTitle")))])])],1)])},n=[],m=r(c,l,n,!1,null,"387fbfcc",null,null);const d=m.exports;export{d as default};
