webpackJsonp([6],{G7Fe:function(t,a,s){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e={data:function(){return{list:[],page:0,size:0,total:0,loading:!0,installLoading:!1,installTip:"安装"}},components:{userinfo:s("FOXq").a},created:function(){this.getList(1)},methods:{getList:function(t){var a=this;a.get_json(a.$store.state.api+"usertemplate/page/"+t,function(t){a.list=t.data,a.page=t.page,a.size=t.size,a.total=t.total,a.loading=!1})},pageFn:function(t){this.loading=!0,this.getList(t),this.gotop()},app:function(t,a,s){20==a?this.jump_href(s):this.jump_router("/app/detail/"+t)},install:function(t){event.stopPropagation();var a=this;console.log(this.$refs),a.$refs[t][0].$el.innerText="安装中",a.$refs[t][0].disabled=!0,a.get_json(a.$store.state.api+"usertemplate/"+t+"/install/domain/"+document.domain,function(t){a.$message.success("安装成功！"),a.getList(a.page)})},uninstall:function(t){event.stopPropagation();var a=this;a.$confirm("您确定要卸载该应用吗？卸载后数据将全部会被清空！应用文件将被删除！","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.put_json(a.$store.state.api+"Plugin/"+t,{},function(t){a.$message.success("卸载成功！"),a.getList(a.page)})})}}},i={render:function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"main"},[s("div",{staticClass:"panel wizard-type1"},[s("div",{staticClass:"panel-heading bk-bg-primary"},[s("div",{staticClass:"list-articles"},[s("button",{staticClass:"btn btn-default release",attrs:{type:"button"}},[t._v("模板")]),t._v(" "),s("div",{staticClass:"pull-right"},[s("userinfo")],1)])]),t._v(" "),s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"applist"},[s("div",{staticClass:"report-data"},[s("div",{staticClass:"row"},t._l(t.list,function(a){return s("div",{staticClass:"col-sm-3"},[s("div",{staticClass:"item bs",on:{click:function(s){t.app(a.pluginId,a.status,a.plugin.path)}}},[s("div",{staticClass:"img pull-left ri-1"},[s("img",{attrs:{alt:"",src:a.template.fullpathThumbnail}})]),t._v(" "),s("div",{staticClass:"info pull-right text-right"},[s("span",[t._v(t._s(a.template.name))])]),t._v(" "),s("div",{staticClass:"clearfix"}),t._v(" "),s("p",[20==a.status?s("el-button",{staticClass:"pull-right",attrs:{type:"success",size:"mini",disabled:""}},[t._v("已安装")]):t._e(),t._v(" "),10==a.status?s("el-button",{ref:a.template.id,refInFor:!0,staticClass:"pull-right",attrs:{type:"success",size:"mini",loading:t.installLoading},on:{click:function(s){t.install(a.template.id)}}},[t._v("安装")]):t._e(),t._v(" "),s("span",[t._v(t._s(a.template.description))])],1)])])})),t._v(" "),s("br"),t._v(" "),0!=t.total?s("el-pagination",{attrs:{background:"",layout:"total , prev, pager, next","current-page":t.page,"page-size":t.size,total:t.total},on:{"update:currentPage":function(a){t.page=a},"current-change":t.pageFn}}):t._e()],1)])])])},staticRenderFns:[]};var n=s("VU/8")(e,i,!1,function(t){s("JoVq")},"data-v-2b6c1bf0",null);a.default=n.exports},JoVq:function(t,a){}});