chunk-60b9e396.601a360a.js 7.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60b9e396"],{8647:function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"a",(function(){return l}));var n=a("b775");function r(t){return Object(n["a"])({url:"/monitor/online/list",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/monitor/online/"+t,method:"delete"})}},b249:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"queryForm",attrs:{model:t.queryParams,size:"small",inline:!0,"label-width":"auto"}},[a("el-form-item",{attrs:{label:this.$t("el.datepicker.startTime"),prop:"startTime"}},[a("el-date-picker",{attrs:{clearable:"",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.queryParams.startTime,callback:function(e){t.$set(t.queryParams,"startTime",e)},expression:"queryParams.startTime"}})],1),a("el-form-item",{attrs:{label:this.$t("el.datepicker.endTime"),prop:"endTime"}},[a("el-date-picker",{attrs:{clearable:"",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.queryParams.endTime,callback:function(e){t.$set(t.queryParams,"endTime",e)},expression:"queryParams.endTime"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:t.handleQuery}},[t._v(t._s(t.$t("ss")))])],1)],1),a("el-col",{staticClass:"card-box",attrs:{span:24}},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.tabName,callback:function(e){t.tabName=e},expression:"tabName"}},[a("el-tab-pane",{attrs:{label:this.$t("ztztlsjl"),name:"totalTabe"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"max-height":"220",data:t.totalHisList}},[a("el-table-column",{attrs:{label:this.$t("tdmc"),prop:"productChName",width:"130"}}),a("el-table-column",{attrs:{label:this.$t("tdh"),prop:"productChId","show-overflow-tooltip":!0,width:"100"}}),a("el-table-column",{attrs:{label:this.$t("dy")+"(V)",prop:"productChVoltage","show-overflow-tooltip":!0,width:"100"}}),a("el-table-column",{attrs:{label:this.$t("dl")+"(A)",prop:"productChCurrent",width:"100"}}),a("el-table-column",{attrs:{label:this.$t("gl")+"(W)",prop:"productChPower",align:"center",width:"100"}}),a("el-table-column",{attrs:{label:this.$t("pl"),align:"center",prop:"productChPowerFreq",width:"180"}}),a("el-table-column",{attrs:{label:this.$t("hdl")+"(kWh)",align:"center",prop:"productChConsumption",width:"130"}}),a("el-table-column",{attrs:{label:this.$t("glys"),align:"center",prop:"productChPowerFactor",width:"180"}}),a("el-table-column",{attrs:{label:this.$t("zt"),align:"center",prop:"productChStatus",width:"100"}})],1),a("pagination",{attrs:{total:t.total,page:t.queryParams.pageNum,limit:t.queryParams.pageSize},on:{"update:page":function(e){return t.$set(t.queryParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.queryParams,"pageSize",e)},pagination:t.totalHisList}})],1),a("el-tab-pane",{attrs:{label:this.$t("tdztlsjl"),name:"channelTabe"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"max-height":"220",data:t.channelHistList}},[a("el-table-column",{attrs:{label:this.$t("tdmc"),prop:"productChName",width:"130"}}),a("el-table-column",{attrs:{label:this.$t("tdh"),prop:"productChId","show-overflow-tooltip":!0,width:"100"}}),a("el-table-column",{attrs:{label:this.$t("dy")+"(V)",prop:"productChVoltage","show-overflow-tooltip":!0,width:"100"}}),a("el-table-column",{attrs:{label:this.$t("dl")+"(A)",prop:"productChCurrent",width:"100"}}),a("el-table-column",{attrs:{label:this.$t("gl")+"(W)",prop:"productChPower",align:"center",width:"100"}}),a("el-table-column",{attrs:{label:this.$t("pl"),align:"center",prop:"productChPowerFreq",width:"180"}}),a("el-table-column",{attrs:{label:this.$t("hdl")+"(kWh)",align:"center",prop:"productChConsumption",width:"130"}}),a("el-table-column",{attrs:{label:this.$t("glys"),align:"center",prop:"productChPowerFactor",width:"180"}}),a("el-table-column",{attrs:{label:this.$t("zt"),align:"center",prop:"productChStatus",width:"100"}})],1),a("pagination",{attrs:{total:t.total,page:t.queryParams.pageNum,limit:t.queryParams.pageSize},on:{"update:page":function(e){return t.$set(t.queryParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.queryParams,"pageSize",e)},pagination:t.channelHistList}})],1)],1)],1)],1)},r=[],l=a("ade3"),i=(a("b0c0"),a("8647")),o=a("7ba4"),s={name:"Online",data:function(){return Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])({loading:!0,total:0,dateRange:[],channelHistList:[],totalHisList:[],title:""},"total",0),"open",!1),"form",{}),"channelLoadTypes",["空调","服务器","交换机","路由器","计算机","显示器","灯","其他"]),"queryParams",{startTime:"",pageNum:"",pageSize:"",endTime:"",productChName:"",productChId:"",token:"",type:""}),"usertoken",""),"tabName","totalTabe")},created:function(){this.usertoken=this.$store.state.user.usertoken;var t=new Date;this.queryParams.endTime=this.getNowDateTime(t),t.setHours(t.getHours()-6),this.queryParams.startTime=this.getNowDateTime(t),this.handleQuery()},methods:{getNowDateTime:function(t){var e=t.getFullYear(),a=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,n=t.getDate()<10?"0"+t.getDate():t.getDate(),r=t.getHours()<10?"0"+t.getHours():t.getHours(),l=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return e+"-"+a+"-"+n+" "+r+":"+l+":"+i},handleClick:function(t,e){this.tabName=t.name,this.handleQuery()},queryChannelStatus:function(){var t=this;this.loading=!0,this.queryParams.token=this.usertoken,this.queryParams.type="listQuery","channelTabe"==this.tabName?Object(o["c"])(this.queryParams).then((function(e){t.channelList=e.data})).catch((function(){})):Object(o["i"])(this.queryParams).then((function(e){t.channelList=e.data})).catch((function(){})),this.loading=!1},handleUpdate:function(t){this.form=t,this.open=!0,this.title=this.$t("xg")},handleQuery:function(){this.queryChannelStatus()},resetQuery:function(){this.queryParams.endTime="",this.queryParams.startTime="",this.handleQuery()},handleCommand:function(t,e){var a=this,n={};switch(n.token=this.usertoken,n.productChId=e.productChId,t){case"channelopen":n.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(o["c"])(n)})).then((function(){a.$modal.msgSuccess(a.$t("zxcg"))})).catch((function(){}));break;case"channelclose":n.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){Object(o["c"])(n)})).then((function(){a.$modal.msgSuccess(a.$t("zxcg"))})).catch((function(){}));break;default:break}},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){var a={};a.token=t.usertoken,a.type="save",a.productChName=t.form.productChName,a.productChId=t.form.productChId,a.ChannelLoadType=t.form.ChannelLoadType,t.loading=!0,Object(o["c"])(a).then((function(e){t.open=!1,t.queryChannelStatus()}))}}))},cancel:function(){this.open=!1},handleForceLogout:function(t){var e=this;this.$modal.confirm(this.$t("sfqztc")+t.userName+this.$t("yhm")).then((function(){return Object(i["a"])(t.tokenId)})).then((function(){e.getList(),e.$modal.msgSuccess(e.$t("qtcg"))})).catch((function(){}))}}},c=s,u=a("2877"),h=Object(u["a"])(c,n,r,!1,null,null,null);e["default"]=h.exports}}]);