var $url="/cms/settings/settingsContentTag",data=utils.init({siteId:utils.getQueryInt("siteId"),page:1,perPage:PER_PAGE,total:null,tagNames:null,panel:!1,form:null}),methods={apiList:function(t){var i=this;utils.loading(this,!0),$api.get($url,{params:{siteId:this.siteId,page:this.page,perPage:this.perPage}}).then(function(t){var a=t.data;i.total=a.total,i.tagNames=a.tagNames}).catch(function(t){utils.error(t)}).then(function(){utils.loading(i,!1),t&&utils.success(t)})},apiDelete:function(t){var i=this;utils.loading(this,!0),$api.delete($url,{data:{siteId:this.siteId,page:this.page,perPage:this.perPage,tagName:t}}).then(function(t){t.data;i.apiList("内容标签删除成功！")}).catch(function(t){utils.loading(i,!1),utils.error(t)})},apiSubmit:function(){var t=this;utils.loading(this,!0),$api.post($url,this.form).then(function(i){i.data;t.apiList("内容标签添加成功！"),t.panel=!1}).catch(function(i){utils.loading(t,!1),utils.error(i)})},btnAddClick:function(){this.panel=!0,this.form={siteId:this.siteId,tagNames:[]}},btnDeleteClick:function(t){var i=this;utils.alertDelete({title:"删除内容标签",text:"此操作将删除内容标签 "+t+"，确定吗？",callback:function(){i.apiDelete(t)}})},btnSubmitClick:function(){var t=this;this.$refs.form.validate(function(i){i&&t.apiSubmit()})},btnCancelClick:function(){this.panel=!1},handleSizeChange:function(t){this.perPage=t,this.apiList()},handleCurrentChange:function(t){this.page=t,this.apiList()}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiList()}});