var $url="/cms/contents/contentsLayerAdd",data=utils.init({checkedLevels:null,form:{siteId:utils.getQueryInt("siteId"),channelId:utils.getQueryInt("channelId"),titles:null,checkedLevel:null}}),methods={apiGet:function(){var t=this;utils.loading(this,!0),$api.get($url,{params:{siteId:this.form.siteId,channelId:this.form.channelId}}).then(function(e){var i=e.data;t.checkedLevels=i.checkedLevels,t.form.checkedLevel=i.checkedLevel}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},apiSubmit:function(){var t=this;utils.loading(this,!0),$api.post($url,this.form).then(function(e){e.data;utils.closeLayer(),parent.$vue.apiList(t.form.channelId,1,"批量添加成功！",!0)}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},btnSubmitClick:function(){var t=this;this.$refs.form.validate(function(e){e&&t.apiSubmit()})},btnCancelClick:function(){utils.closeLayer()}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});