webpackJsonp([24],{KW8P:function(t,e,a){(t.exports=a("bKW+")(!1)).push([t.i,"\n.thumb[data-v-98604dac] {\n    width: 48px;\n    height: 48px;\n    vertical-align: middle;\n    border-radius: 5px;\n}\n",""])},clut:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("D6Ug"),l={name:"sysAddons",data:function(){return{listLoading:!1,tableData:[],pages:{keywords:"",page:1,total:0},delVisible:!1,delIndex:""}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=this;this.listLoading=!0,s.a.getAddons().then(function(e){t.tableData=e.data,t.listLoading=!1},function(e){t.listLoading=!1,e.data.msg&&t.$message.error(e.data.msg)})},handleInstall:function(t){var e=this,a={name:t};s.a.installAddons(a).then(function(t){1==t.code?e.$message.success(t.msg):e.$message.warning(t.msg),e.tableData=[],e.fetchData()},function(t){t.data.msg&&e.$message.error(t.data.msg)})},handleDelete:function(t,e){this.delIndex=t,this.delVisible=!0},deleteRow:function(){var t=this,e={id:this.tableData[this.delIndex].id};s.a.uninstallAddons(e).then(function(e){1==e.code?t.$message.success(e.msg):t.$message.warning(e.msg),t.delVisible=!1,t.tableData=[],t.fetchData()},function(e){e.data.msg&&t.$message.error(e.data.msg)})},handleManage:function(t,e){var a={title:t,url:e};this.$router.push({name:"sysAddonsView",query:a})}}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{type:"selection",width:"30"}}),t._v(" "),a("el-table-column",{attrs:{label:"图标",width:"200"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("img",{staticClass:"thumb",attrs:{src:t.row.icon}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"title",label:"名称",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"标识",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"desc",label:"描述"}}),t._v(" "),a("el-table-column",{attrs:{prop:"author",label:"作者",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"version",label:"版本",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.id?t._e():a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"安装",placement:"top"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){t.handleInstall(e.row.name)}}},[a("i",{staticClass:"fa fa-puzzle-piece"})])],1),t._v(" "),e.row.admin_url?a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"管理",placement:"top"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){t.handleManage(e.row.title,e.row.admin_url)}}},[a("i",{staticClass:"fa fa-cog"})])],1):t._e(),t._v(" "),e.row.id?a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"卸载",placement:"top"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){t.handleDelete(e.$index,e.row.id)}}},[a("i",{staticClass:"fa fa-trash"})])],1):t._e()]}}])})],1),t._v(" "),a("el-dialog",{attrs:{title:"提示",visible:t.delVisible,width:"300px"},on:{"update:visible":function(e){t.delVisible=e}}},[a("div",{staticClass:"del-dialog-cnt"},[t._v("是否确定卸载此插件？")]),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.deleteRow}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var n=a("XAIM")(l,i,!1,function(t){a("zCsj")},"data-v-98604dac",null);e.default=n.exports},zCsj:function(t,e,a){var s=a("KW8P");"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);a("6imX")("72b15066",s,!0)}});