| | |
| | | <meta charset="UTF-8"> |
| | | <title>ASRS监控</title> |
| | | <link href="css/monitor.css" rel="stylesheet"> |
| | | <!-- <link href="css/Pacifico.css" rel="stylesheet">--> |
| | | <script src="js/jquery-3.3.1.min.js"></script> |
| | | <script src="js/vincent.js"></script> |
| | | <script src="js/echarts/echarts.min.js"></script> |
| | | <script src="https://api.map.baidu.com/api?v=2.0&ak=pnkdgjAQGCS0nwjFnBjbprCtPrNNvDBe" type="text/javascript"></script> |
| | | <script src="js/echarts/bmap.min.js"></script> |
| | | <script src="js/jquery.countup.min.js"></script> |
| | | <script src="js/jquery.waypoints.min.js"></script> |
| | | <style> |
| | | span.counter { |
| | | display:block; |
| | | margin:20px auto; |
| | | font-size:64px; |
| | | font-family:'Pacifico',serif |
| | | } |
| | | |
| | | /*.div1 {*/ |
| | | /* width:200px;*/ |
| | | /* height:200px;*/ |
| | | /* overflow:hidden;*/ |
| | | /* margin:auto;*/ |
| | | /* position:relative;*/ |
| | | /* font-family:'Pacifico',serif*/ |
| | | /*}*/ |
| | | /*@keyframes anis {*/ |
| | | /* 100% {*/ |
| | | /* transform:translateY(-200px)*/ |
| | | /* }*/ |
| | | /*}img {*/ |
| | | /* position:absolute;*/ |
| | | /* }*/ |
| | | /*.div2 {*/ |
| | | /* animation:anis 10s linear infinite;*/ |
| | | /*}*/ |
| | | /*.div2:hover {*/ |
| | | /* animation-play-state:paused;*/ |
| | | /*}*/ |
| | | |
| | | </style> |
| | | </head> |
| | |
| | | <!--中--> |
| | | <div class="container-element-middle"> |
| | | <div class="map-board"> |
| | | <div id="map"> |
| | | <div class="inside"> |
| | | <div class="image-border image-border1"></div> |
| | | <div class="image-border image-border2"></div> |
| | | <div class="image-border image-border3"></div> |
| | | <div class="image-border image-border4"></div> |
| | | |
| | | |
| | | <!-- 中上 --> |
| | | <div class="demo"> |
| | | <span class="counter">5.00</span> |
| | | </div> |
| | | |
| | | <!-- 中左 --> |
| | | <div class="div1"> |
| | | <div class="div2"> |
| | | <p>111111111111111111111</p> |
| | | <p>211111111111111111111</p> |
| | | <p>311111111111111111111</p> |
| | | <p>411111111111111111111</p> |
| | | <p>511111111111111111111</p> |
| | | <p>611111111111111111111</p> |
| | | <p>711111111111111111111</p> |
| | | <p>2211111111111111111111</p> |
| | | <p>331111111111111111111</p> |
| | | <p>441111111111111111111</p> |
| | | <p>551111111111111111111</p> |
| | | <p>661111111111111111111</p> |
| | | <p>771111111111111111111</p> |
| | | <p>881111111111111111111</p> |
| | | <p>991111111111111111111</p> |
| | | <p>001111111111111111111</p> |
| | | </div> |
| | | </div> |
| | | <!-- 中右 --> |
| | | </div> |
| | | </div> |
| | | <div class="station-list"> |
| | | <div class="outside"> |
| | | <div class="inside"> |
| | | <div class="image-border image-border1"></div> |
| | | <div class="image-border image-border2"></div> |
| | | <div class="image-border image-border3"></div> |
| | | <div class="image-border image-border4"></div> |
| | | <div class="station-name">A</div> |
| | | </div> |
| | | </div> |
| | | <div class="outside"> |
| | | <div class="inside"> |
| | | <div class="image-border image-border1"></div> |
| | | <div class="image-border image-border2"></div> |
| | | <div class="image-border image-border3"></div> |
| | | <div class="image-border image-border4"></div> |
| | | <div class="station-name">B</div> |
| | | </div> |
| | | </div> |
| | | <div class="outside"> |
| | | <div class="inside"> |
| | | <div class="image-border image-border1"></div> |
| | | <div class="image-border image-border2"></div> |
| | | <div class="image-border image-border3"></div> |
| | | <div class="image-border image-border4"></div> |
| | | <div class="station-name">C</div> |
| | | </div> |
| | | </div> |
| | | <div class="outside"> |
| | | <div class="inside"> |
| | | <div class="image-border image-border1"></div> |
| | | <div class="image-border image-border2"></div> |
| | | <div class="image-border image-border3"></div> |
| | | <div class="image-border image-border4"></div> |
| | | <div class="station-name">D</div> |
| | | </div> |
| | | </div> |
| | | </ul> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <!--右--> |
| | |
| | | </div> |
| | | </body> |
| | | <script> |
| | | $('.counter').countUp(); |
| | | // 遮罩 |
| | | let closeBtn = document.getElementById('closeBtn'); |
| | | let detailModal = document.getElementById('detail-modal'); |
| | |
| | | detailModal.style.display = 'none'; |
| | | }; |
| | | var data = []; |
| | | var chart = echarts.init(document.getElementById('map')); |
| | | var lastStationId = null; |
| | | var defalutName = '递递叭叭充电桩监控平台'; |
| | | var lastName = defalutName; |
| | | function reload(stationId){ |
| | | data = []; |
| | | let center = [120.307658, 30.372121]; |
| | | let param = { |
| | | stationId: stationId |
| | | }; |
| | | http.post("http://localhost:8080/admin/stations.action", param, function (res) { |
| | | res.data.list.map(item => { |
| | | data.push({ |
| | | name: item.name, |
| | | stationId: item.stationId, |
| | | value: [item.lon, item.lat] |
| | | }) |
| | | }); |
| | | option = { |
| | | backgroundColor: 'transparent', |
| | | title: { |
| | | text: '', |
| | | subtext: '', |
| | | sublink: '', |
| | | left: 'center', |
| | | textStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | tooltip : { |
| | | trigger: 'item' |
| | | }, |
| | | bmap: { |
| | | center: stationId==null?center:data[0].value, |
| | | zoom: stationId==null?12:18, |
| | | roam: true, // 是否可缩放 |
| | | }, |
| | | series : [ |
| | | { |
| | | name: '', |
| | | type: 'effectScatter', |
| | | coordinateSystem: 'bmap', |
| | | data: data, |
| | | symbolSize: function () { |
| | | return 18; |
| | | }, |
| | | showEffectOn: 'emphasis', |
| | | rippleEffect: { |
| | | brushType: 'stroke' |
| | | }, |
| | | hoverAnimation: true, |
| | | label: { // 标签 |
| | | formatter: '{b}', |
| | | position: 'right', |
| | | show: false |
| | | }, |
| | | itemStyle: { |
| | | color: '#f4e925', |
| | | shadowBlur: 10, |
| | | shadowColor: '#333' |
| | | }, |
| | | zlevel: 1 |
| | | }, |
| | | ] |
| | | }; |
| | | |
| | | chart.setOption(option); |
| | | |
| | | var bMap = chart.getModel().getComponent('bmap').getBMap(); |
| | | bMap.setMapStyle({ |
| | | style : "midnight", |
| | | }); |
| | | |
| | | if (stationId != null) { |
| | | lastStationId = stationId; |
| | | lastName = data[0].name; |
| | | } else { |
| | | lastStationId = null; |
| | | lastName = defalutName; |
| | | } |
| | | |
| | | }, 'form'); |
| | | } |
| | | |
| | | reload(); |
| | | |
| | | chart.on('click', function (param) { |
| | | reload(param.data.stationId); |
| | | $('.title').html(param.data.name); |
| | | }); |
| | | |
| | | // 返回 |
| | | $('.button-left').click(function () { |
| | | reload(); |
| | | $('.title').html(defalutName); |
| | | }); |
| | | // 刷新 |
| | | $('.button-right').click(function () { |
| | | detailModal.style.display = 'block'; |
| | | // reload(lastStationId); |
| | | // $('.title').html(lastName); |
| | | }); |
| | | |
| | | |
| | | // 折线图 |
| | | let lineCharts = echarts.init(document.getElementById('line-charts')); |