chunk-24a14014.7b8d10c7.js 3.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24a14014"],{"210c":function(t,a,e){},"26d6":function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t._self._c;return a("a-layout",{staticClass:"system-layout layout"},[a("a-layout-header",{staticClass:"system_header"},[a("div",{staticClass:"left_cover"}),a("div",{staticClass:"right_cover"}),a("img",{staticClass:"page_title",attrs:{src:e("f773"),alt:""}})]),a("a-layout-content",{staticClass:"system-content"},[a("div",{staticClass:"content_header"}),a("a-row",{staticClass:"row",attrs:{gutter:20}},[a("a-col",{attrs:{span:8}},[a("a-spin",{attrs:{spinning:t.dataStateLoading}},[a("div",{staticClass:"panel small_box"},[a("span",{staticClass:"title"},[t._v("数据服务器")]),a("div",{staticClass:"state"},[t._v(" "+t._s(t.dataState)+" ")]),a("div",{staticClass:"btn_chart",on:{click:t.getMysqlDeviceState}},[t._v("\n 刷新 \n ")])])])],1),a("a-col",{attrs:{span:8}},[a("a-spin",{attrs:{spinning:t.trainStateLoading}},[a("div",{staticClass:"panel small_box"},[a("span",{staticClass:"title"},[t._v("训练服务器")]),a("div",{staticClass:"state"},[t._v(" "+t._s(t.trainState)+" ")]),a("div",{staticClass:"btn_chart",on:{click:t.getTrainingDeviceState}},[t._v("\n 刷新\n ")])])])],1),a("a-col",{attrs:{span:8}},[a("a-spin",{attrs:{spinning:t.webStateLoading}},[a("div",{staticClass:"panel small_box"},[a("span",{staticClass:"title"},[t._v("web服务器")]),a("div",{staticClass:"state"},[t._v(" "+t._s(t.webState)+" ")]),a("div",{staticClass:"btn_chart"},[t._v("\n 刷新\n ")])])])],1)],1)],1)],1)},n=[],s=e("0fea"),c={components:{},data:function(){return{dataState:"未启动",dataStateLoading:!1,trainState:"未启动",trainStateLoading:!1,webState:"正常",webStateLoading:!0}},mounted:function(){var t=this;this.initPageSize(),window.addEventListener("resize",(function(){t.initPageSize()}),!1);var a=this;a.getMysqlDeviceState(),a.getTrainingDeviceState()},methods:{initPageSize:function(){var t=document.documentElement,a=100*t.clientWidth/2560;this.size=a,t.style.fontSize=a+"px"},getMysqlDeviceState:function(){var t=this;t.dataStateLoading=!0,t.checkId=null,Object(s["c"])("/admin/device/mysql",{id:this.id}).then((function(a){if(t.webStateLoading=!1,200==a.code)return t.$nextTick((function(){t.dataState="正常",t.dataStateLoading=!1})),void(t.checkId&&(t.checkId=null,clearTimeout(t.checkId)));t.dataState="未启动",t.checkId=setTimeout((function(){t.checkId=null,t.getMysqlDeviceState()}),3e3)})).catch((function(a){t.dataState="未启动",t.webState="未启动",t.webStateLoading=!0,t.checkId=setTimeout((function(){t.checkId=null,t.getMysqlDeviceState()}),3e3)}))},getTrainingDeviceState:function(){var t=this;t.checkId2=null,t.trainStateLoading=!0,Object(s["c"])("/admin/device/train",{id:this.id}).then((function(a){if(t.webStateLoading=!1,200==a.code)return t.trainState="正常",t.trainStateLoading=!1,void(t.checkId2&&(t.checkId2=null,clearTimeout(t.checkId2)));t.trainState="未启动",t.checkId2=setTimeout((function(){t.checkId2=null,t.getTrainingDeviceState()}),3e3)})).catch((function(a){t.trainState="未启动",t.webState="未启动",t.webStateLoading=!0,t.checkId2=setTimeout((function(){t.checkId2=null,t.getTrainingDeviceState()}),3e3)}))}}},l=c,d=(e("a752"),e("2877")),o=Object(d["a"])(l,i,n,!1,null,null,null);a["default"]=o.exports},a752:function(t,a,e){"use strict";e("210c")},f773:function(t,a,e){t.exports=e.p+"img/title.a2e3ff58.png"}}]);