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