mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
1 line
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-780d27a9"],{"2bb2":function(e,t,r){},"8cb9":function(e,t,r){"use strict";r("2bb2")},"93bb":function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return g}));r("5530");var a=r("1da1"),n=(r("96cf"),r("d3b7"),r("99af"),r("bc3a")),o=r.n(n),i={ENC:!1,baseUrl:"http://locolhost:8888",code:401},c=i,s=(r("a18c"),c.baseUrl);o.a.CancelToken;o.a.interceptors.request.use((function(e){var t=localStorage.getItem("token");return e.headers.common["Content-Type"]="application/json;charset=utf-8",e.headers.common["token"]=t,e}),(function(e){return console.log(e),Promise.reject(e)})),o.a.interceptors.response.use((function(e){return 200!==e.status?Promise.reject(e):(e.data.code,c.code,e.data)}),(function(e){var t={success:!1,msg:"未知异常,请联系管理员!"};return Promise.reject(t)}));var u={headers:{enc:c.ENC}},l=function(e){return e},b=function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t,r){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,r=l(r),e.next=4,o.a.get("".concat(s).concat(t),{params:r,headers:u.headers},u);case 4:return a=e.sent,e.abrupt("return",a);case 8:return e.prev=8,e.t0=e["catch"](0),e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,r){return e.apply(this,arguments)}}(),m=function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t,r){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.a.get(t,{params:r});case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e["catch"](0),e.abrupt("return",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}(),g=function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t,r){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,r=l(r),e.next=4,o.a.post("".concat(s).concat(t),r,u);case 4:return a=e.sent,e.abrupt("return",a);case 8:return e.prev=8,e.t0=e["catch"](0),e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,r){return e.apply(this,arguments)}}()},e100:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var a=r("93bb"),n={big1:"/bigscreen/countUserNum",big2:"/bigscreen/countDeviceNum",big3:"/bigscreen/sbtx",big4:"/bigscreen/alarmNum",big5:"/bigscreen/ssyj",big6:"/bigscreen/installationPlan",big7:"/bigscreen/ranking",big8:"/bigscreen/centermap"},o=function(e,t){return a["a"](n[e],t)}},f1ef:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.pageflag?r("Echart",{ref:"charts",staticClass:"right_top_inner",attrs:{id:"rightTop",options:e.option}}):r("Reacquire",{staticStyle:{"line-height":"200px"},on:{onclick:e.getData}},[e._v(" 重新获取 ")])},n=[],o=r("e100"),i={data:function(){return{option:{},pageflag:!1,timer:null}},created:function(){this.getData()},mounted:function(){},beforeDestroy:function(){this.clearData()},methods:{clearData:function(){this.timer&&(clearInterval(this.timer),this.timer=null)},getData:function(){var e=this;this.pageflag=!0,Object(o["a"])("big4").then((function(t){e.timer||console.log("报警次数",t),t.success?(e.countUserNumData=t.data,e.$nextTick((function(){e.init(t.data.dateList,t.data.numList,t.data.numList2),e.switper()}))):(e.pageflag=!1,e.$Message({text:t.msg,type:"warning"}))}))},switper:function(){var e=this;if(!this.timer){var t=function(t){e.getData()};this.timer=setInterval(t,this.$store.state.settings.echartsAutoTime);var r=this.$refs.charts.chart;r.on("mouseover",(function(t){e.clearData()})),r.on("mouseout",(function(r){e.timer=setInterval(t,e.$store.state.settings.echartsAutoTime)}))}},init:function(e,t,r){this.option={xAxis:{type:"category",data:e,boundaryGap:!1,splitLine:{show:!0,lineStyle:{color:"rgba(31,99,163,.2)"}},axisLine:{lineStyle:{color:"rgba(31,99,163,.1)"}},axisLabel:{color:"#7EB7FD",fontWeight:"500"}},yAxis:{type:"value",splitLine:{show:!0,lineStyle:{color:"rgba(31,99,163,.2)"}},axisLine:{lineStyle:{color:"rgba(31,99,163,.1)"}},axisLabel:{color:"#7EB7FD",fontWeight:"500"}},tooltip:{trigger:"axis",backgroundColor:"rgba(0,0,0,.6)",borderColor:"rgba(147, 235, 248, .8)",textStyle:{color:"#FFF"}},grid:{show:!0,left:"10px",right:"30px",bottom:"10px",top:"28px",containLabel:!0,borderColor:"#1F63A3"},series:[{data:t,type:"line",smooth:!0,symbol:"none",name:"报警1次数",color:"rgba(252,144,16,.7)",areaStyle:{normal:{color:new echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(252,144,16,.7)"},{offset:1,color:"rgba(252,144,16,.0)"}],!1)}},markPoint:{data:[{name:"最大值",type:"max",valueDim:"y",symbol:"rect",symbolSize:[60,26],symbolOffset:[0,-20],itemStyle:{color:"rgba(0,0,0,0)"},label:{color:"#FC9010",backgroundColor:"rgba(252,144,16,0.1)",borderRadius:6,padding:[7,14],borderWidth:.5,borderColor:"rgba(252,144,16,.5)",formatter:"报警1:{c}"}},{name:"最大值",type:"max",valueDim:"y",symbol:"circle",symbolSize:6,itemStyle:{color:"#FC9010",shadowColor:"#FC9010",shadowBlur:8},label:{formatter:""}}]}},{data:r,type:"line",smooth:!0,symbol:"none",name:"报警2次数",color:"rgba(9,202,243,.7)",areaStyle:{normal:{color:new echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(9,202,243,.7)"},{offset:1,color:"rgba(9,202,243,.0)"}],!1)}},markPoint:{data:[{name:"最大值",type:"max",valueDim:"y",symbol:"rect",symbolSize:[60,26],symbolOffset:[0,-20],itemStyle:{color:"rgba(0,0,0,0)"},label:{color:"#09CAF3",backgroundColor:"rgba(9,202,243,0.1)",borderRadius:6,borderColor:"rgba(9,202,243,.5)",padding:[7,14],formatter:"报警2:{c}",borderWidth:.5}},{name:"最大值",type:"max",valueDim:"y",symbol:"circle",symbolSize:6,itemStyle:{color:"#09CAF3",shadowColor:"#09CAF3",shadowBlur:8},label:{formatter:""}}]}}]}}}},c=i,s=(r("8cb9"),r("2877")),u=Object(s["a"])(c,a,n,!1,null,"62edadb8",null);t["default"]=u.exports}}]); |