1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3716560c"],{"1dfb":function(t,e,n){"use strict";n("881a")},"881a":function(t,e,n){},"96d7":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t._self._c;return e("page-layout",[e("a-card",{attrs:{bordered:!1}},[e("detail-list",{attrs:{title:"服务器状态"}},t._l(t.baseInfo,(function(n,a){return e("detail-list-item",{key:a,attrs:{term:n.name}},[t._v(t._s(n.value))])})),1),e("div",{staticClass:"tool_bar"},t._l(t.buttonList,(function(n,a){return e("a-button",{key:a,attrs:{type:"primary",loading:t.clickIndex==a},on:{click:function(e){return t.handleClick(a)}}},[t._v(t._s(n))])})),1)],1)],1)},s=[],i=n("b445"),r=n("c16f"),o=n("0fea"),c=r["default"].Item,u={components:{PageLayout:i["default"],DetailList:r["default"],DetailListItem:c},data:function(){return{baseInfo:{},buttonList:["启动","关闭"],urlList:["/admin/server/start","/admin/server/shutdown","/admin/server/restart"],clickIndex:-1}},mounted:function(){this.getBaseInfo()},methods:{getBaseInfo:function(){var t=this,e="/admin/server/state";Object(o["c"])(e,{}).then((function(e){200==e.code&&(t.baseInfo=e.result)}))},handleClick:function(t){var e=this;this.clickIndex=0;var n=this.urlList[t];Object(o["j"])(n,{}).then((function(t){e.clickIndex=null,200==t.code?(e.$message.info(t.message),e.getBaseInfo()):(e.getBaseInfo(),e.$message.warn(t.message))}))}}},l=u,d=(n("1dfb"),n("2877")),f=Object(d["a"])(l,a,s,!1,null,"0f3ad8d8",null);e["default"]=f.exports}}]);
|