var $url="/cms/contents/contentsLayerReference",data=utils.init({siteId:utils.getQueryInt("siteId"),channelId:utils.getQueryInt("channelId"),contentId:utils.getQueryInt("contentId"),page:utils.getQueryInt("page"),content:null,sourceName:null,form:{siteId:null,channelId:null,contentId:null,title:null}}),methods={apiGet:function(){var t=this;utils.loading(this,!0),$api.get($url,{params:{siteId:this.siteId,channelId:this.channelId,contentId:this.contentId}}).then(function(n){var e=n.data;t.content=e.content,t.sourceName=e.sourceName,t.form.siteId=t.siteId,t.form.channelId=t.channelId,t.form.contentId=t.contentId,t.form.title=e.content.title}).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(n){n.data;utils.success("引用内容编辑成功!"),parent.$vue.apiList(t.channelId,t.page),utils.closeLayer()}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},btnEditOriginalClick:function(){utils.addTab("编辑内容",utils.getCmsUrl("editor",{siteId:this.siteId,channelId:this.content.sourceId,contentId:this.content.referenceId,page:this.page,tabName:parent.utils.getTabName(),reloadChannelId:this.channelId})),utils.closeLayer()},btnSubmitClick:function(){var t=this;this.$refs.form.validate(function(n){n&&t.apiSubmit()})},btnCancelClick:function(){utils.closeLayer()}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});