(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cd6e0fb4"],{"2ba3":function(e,t,n){"use strict";n("852d")},"81d3":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"add-folder"},[n("van-nav-bar",{attrs:{fixed:"","left-arrow":"","left-text":"返回","right-text":"保存",title:"新增文件夹"},on:{"click-left":function(t){return e.$router.go(-1)},"click-right":e.handleSave}}),n("van-cell-group",{attrs:{inset:""}},[n("van-field",{attrs:{label:"文件夹名称",placeholder:"请输入文件夹名称"},model:{value:e.folderForm.name,callback:function(t){e.$set(e.folderForm,"name",t)},expression:"folderForm.name"}}),n("van-field",{attrs:{"is-link":"",readonly:"",label:"上级文件夹",placeholder:"请选择上级文件夹"},on:{click:function(t){e.show=!0}},model:{value:e.parentName,callback:function(t){e.parentName=t},expression:"parentName"}}),n("van-field",{attrs:{type:"password",label:"阅读密码",placeholder:"请输入阅读密码"},model:{value:e.folderForm.password,callback:function(t){e.$set(e.folderForm,"password",t)},expression:"folderForm.password"}})],1),n("van-popup",{attrs:{round:"",position:"bottom"},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[n("van-cascader",{attrs:{"active-color":"#5A8DEE",title:"请选择上级文件夹",options:e.treeList,"field-names":e.props},on:{close:function(t){e.show=!1},finish:e.onFinish},model:{value:e.folder,callback:function(t){e.folder=t},expression:"folder"}})],1)],1)},o=[],a=(n("b0c0"),n("dfbe")),i={name:"AddFolder",data:function(){return{show:!1,folderForm:{},parentName:"",folder:void 0,treeList:[],props:{text:"name",value:"id",children:"children"}}},mounted:function(){var e=this;this.$route.query.id&&Object(a["e"])(this.$route.query.id).then((function(t){e.folderForm=t.data,Object(a["e"])(e.folderForm.parentId).then((function(t){e.parentName=t.data.name}))})),this.$route.query.parentId&&Object(a["e"])(this.$route.query.parentId).then((function(t){e.folderForm.parentId=t.data.id,e.parentName=t.data.name})),this.getTreeList()},methods:{handleSave:function(){var e=this;this.folderForm.name?this.folderForm.parentId?this.folderForm.id?Object(a["i"])(this.folderForm).then((function(t){e.$toast("修改文件夹成功"),e.$router.go(-1)})):Object(a["a"])(this.folderForm).then((function(t){e.$toast("新增文件夹成功"),e.$router.go(-1)})):this.$toast("请选择上级文件夹"):this.$toast("请输入文件夹名称")},onFinish:function(e){var t=e.selectedOptions;this.show=!1,this.parentName=t[t.length-1].name,this.folderForm.parentId=t[t.length-1].id},getTreeList:function(){var e=this;Object(a["h"])().then((function(t){e.treeList=t.data}))}}},d=i,l=(n("2ba3"),n("2877")),u=Object(l["a"])(d,r,o,!1,null,"3a8e159b",null);t["default"]=u.exports},"852d":function(e,t,n){},dfbe:function(e,t,n){"use strict";n.d(t,"f",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"i",(function(){return s})),n.d(t,"c",(function(){return f}));var r=n("b775");function o(e){return Object(r["a"])({url:"/note/"+e,method:"get"})}function a(e){return Object(r["a"])({url:"/note",method:"post",data:e})}function i(e){return Object(r["a"])({url:"/note/"+e,method:"delete"})}function d(e){return Object(r["a"])({url:"/note/folder/list",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/note/folder/treeList",method:"get",params:e})}function u(e){return Object(r["a"])({url:"/note/folder/"+e,method:"get"})}function c(e){return Object(r["a"])({url:"/note/folder",method:"post",data:e})}function s(e){return Object(r["a"])({url:"/note/folder",method:"put",data:e})}function f(e){return Object(r["a"])({url:"/note/folder/"+e,method:"delete"})}}}]);