FastBee/docker/data/nginx/vue/static/js/chunk-25c3f40d.eef7224c.js
2025-07-07 09:21:15 +08:00

1 line
2.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25c3f40d"],{f1ef: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",{staticStyle:{"padding-top":"10px"}},[a("dv-capsule-chart",{staticStyle:{width:"430px",height:"230px"},attrs:{config:t.config}})],1)},i=[],u=a("f5de"),c={data:function(){return{static:{},config:{},timer:null,mqtt:this.$store.state.user.mqtt}},created:function(){this.statisticMqtt()},mounted:function(){},beforeDestroy:function(){this.clearData()},methods:{statisticMqtt:function(){var t=this;this.mqtt?Object(u["d"])().then((function(e){t.static=e.data,t.config={data:[{name:"今日接收",value:t.static["today_received"]},{name:"今日发送",value:t.static["today_send"]},{name:"订阅总数",value:t.static["subscribe_total"]},{name:"发布消息",value:t.static["send_total"]},{name:"接收消息",value:t.static["receive_total"]},{name:"认证次数",value:t.static["auth_total"]},{name:"认证成功",value:t.static["auth_total"]}],unit:"次数",showValue:!0},t.switper()})):(this.config={data:[{name:"今日接收",value:6e3},{name:"今日发送",value:5e3},{name:"订阅总数",value:4e3},{name:"发布消息",value:3e3},{name:"接收消息",value:2e3},{name:"认证次数",value:1e3},{name:"认证成功",value:1e3}],unit:"次数",showValue:!0},this.switper())},clearData:function(){this.timer&&(clearInterval(this.timer),this.timer=null)},switper:function(){var t=this;if(!this.timer){var e=function(e){t.statisticMqtt()};this.timer=setInterval(e,6e4)}}}},s=c,r=a("2877"),o=Object(r["a"])(s,n,i,!1,null,null,null);e["default"]=o.exports},f5de:function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return u})),a.d(e,"b",(function(){return c})),a.d(e,"d",(function(){return s}));var n=a("b775");function i(t){return Object(n["a"])({url:"/iot/mqtt/clients",method:"get",params:t})}function u(t){return Object(n["a"])({url:"/iot/mqtt/client/out",method:"get",params:t})}function c(){return Object(n["a"])({url:"/bashBoard/stats",method:"get"})}function s(t){return Object(n["a"])({url:"/bashBoard/metrics",method:"get",params:t})}}}]);