Portal/potal_admin/up-portal-admin-1.0.1/js/chunk-087adc13.0cfb58d2.js

1 line
35 KiB
JavaScript
Raw Normal View History

2025-03-10 17:41:02 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-087adc13","chunk-7ad94374","chunk-0e845220","chunk-4b0f4e10","chunk-2a92f033","chunk-225827c8","chunk-57238282"],{"00cc":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"content"},[r("div",{staticClass:"main"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{class:[t.isFullScreen?"cols":"","col"],attrs:{span:8}},[r("div",{staticClass:"grid-content"},[r("admin-people")],1)]),r("el-col",{class:[t.isFullScreen?"cols":"","col"],attrs:{span:8}},[r("div",{staticClass:"grid-content"},[r("admin-floor")],1)]),r("el-col",{class:[t.isFullScreen?"cols":"","col"],attrs:{span:8}},[r("div",{staticClass:"grid-content"},[r("academic-visitor")],1)])],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{class:[t.isFullScreen?"cols":"","col"],attrs:{span:8}},[r("div",{staticClass:"grid-content"},[r("admin-temperature")],1)]),r("el-col",{class:[t.isFullScreen?"cols":"","col"],attrs:{span:8}},[r("div",{staticClass:"grid-content"},[r("academic-sensors")],1)]),r("el-col",{class:[t.isFullScreen?"cols":"","col"],attrs:{span:8}},[r("div",{staticClass:"grid-content"},[r("AcademicTraffic")],1)])],1)],1)])},i=[],o=(r("8e6e"),r("ac6a"),r("456d"),r("ade3")),n=(r("5750"),r("3731"),r("5946"),r("5adc"),r("5117"),r("9363"),r("93d8"),r("2016"),r("bfd5"),r("8136"),r("2f62"));function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var l={components:{},computed:c({},Object(n["b"])(["isFullScreen"])),data:function(){return{}},mounted:function(){},methods:{}},u=l,d=(r("86f7"),r("2877")),f=Object(d["a"])(u,a,i,!1,null,"822fb216",null);e["default"]=f.exports},"0a26":function(t,e,r){"use strict";r("517f")},"18de":function(t,e,r){"use strict";r("6762"),r("2fdb"),r("6b54"),r("ac6a");e["a"]={data:function(){return{uwbCount:0,keyArr:["1f","2f","3f","4f","5f"],series:[],total:0,uwbLabelTypeList:{},uwbLabel:{studentUwb:"学生",teacherUwb:"教师",visitorUwb:"访客",other:"其它"}}},created:function(){var t=this;this.uwbCount=0,this.initUwbLabelType().then((function(){t.initUwbWebsocket()}))},activated:function(){var t=this,e=setInterval((function(){t.initUwbLabelType()}),6e4);this.$once("hook:beforeDestroy",(function(){clearInterval(e)})),this.$once("hook:deactivated",(function(){clearInterval(e)}))},methods:{initUwbLabelType:function(){var t=this;return this.$http({url:"/system/index/uwbLabelType",method:"get"}).then((function(e){var r=e.data;if(0!=r.code)return t.$message.error(r.msg);t.uwbLabelTypeList=r.data}))},initUwbWebsocket:function(){var t=this,e=this;try{var r=new WebSocket(window.GLOBAL_CONFIG.UWB_WEBSOCKET);r.onopen=function(){console.log("websocket连接成功");var t=JSON.stringify({type:1,map_id:"14"});r.send(t)},r.onclose=function(){console.log("websocket连接已关闭")},r.onerror=function(){console.log("websocket连接失败")},r.onmessage=function(e){if("heartbeat"!=e.data){var r=JSON.parse(e.data),a=t.uwbLabelTypeList,i={studentUwb:[],teacherUwb:[],visitorUwb:[],other:[]};r.forEach((function(t){var e=t.tid.toString();a.studentUwb.includes(e)?i.studentUwb.push(t):a.teacherUwb.includes(e)?i.teacherUwb.push(t):a.visitorUwb.includes(e)?i.visitorUwb.push(t):i.other.push(t)}));var o=[],n=function(e){var r={};i[e].forEach((function(t){r[t.floor]?r[t.floor]++:r[t.floor]=1}));for(var a=t.keyArr,n=[],s=0;s<a.length;s++)n.push(r[a[s]]||"");o.push({name:t.uwbLabel[e],type:"bar",stack:"总人数",barMaxWidth:20,barMinHeight:20,label:{show:!0,position:"inside"},data:n})};for(var s in i)n(s);JSON.stringify