index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  1. <template>
  2. <div id="containerMap" class="containerMap">
  3. <div class="alarm_list">
  4. <span class="alarm_list_item" v-for="item in alarm_list"><img :src="alarm_type[item.code].icon"/><span>{{ alarm_type[item.code].name }}</span><span class="alarm_item_brager" :style="{'background-color':alarm_type[item.code].bg}">{{ item.count }}</span></span>
  5. </div>
  6. <div class="houselist">
  7. <span class="item" @click="toHouse(item)" v-for="item in houselist" :style="{'background-color':alarm_type[item.alarmtype].bg}" >
  8. <el-tooltip :content="item.name" placement="top" class="custom-tooltip">
  9. <span class="item">{{ item.code }}</span>
  10. </el-tooltip>
  11. </span>
  12. </div>
  13. <div class="left">
  14. <div class="area">
  15. <div class="title"><span class="line"></span><span>事件分布统计占比</span><span class="stat_rate">(月)</span></div>
  16. <div class="echartsdiv" ref="echarts01"></div>
  17. </div>
  18. <div class="area">
  19. <div class="title"><span class="line"></span><span>事件趋势</span><span class="stat_rate">(月)</span></div>
  20. <div class="echartsdiv" ref="echarts02"></div>
  21. </div>
  22. <div class="area">
  23. <div class="title"><span class="line"></span><span>流程督办</span><span class="stat_rate">(月)</span></div>
  24. <div class="toolsbtn">
  25. <div class="toolsbtn_item active">总量</div>
  26. <div class="toolsbtn_item">闭单量</div>
  27. <div class="toolsbtn_item">未闭单量</div>
  28. </div>
  29. <div class="echartsdiv" ref="echarts03" style="height: calc(100% - 69px);"></div>
  30. </div>
  31. </div>
  32. <div ref="infoWindowContent" v-show="showInfoWindow" @click="inHouse">
  33. <div class="infoWindowContent">
  34. <div class="linkpoint lefttoppoint"></div>
  35. <div class="linkpoint righttoppoint"></div>
  36. <div class="linkpoint leftbottompoint"></div>
  37. <div class="linkpoint rightbottompoint"></div>
  38. <div class="camername">{{ currentHouse.camername }}</div>
  39. </div>
  40. </div>
  41. <house ref="houseComp" />
  42. </div>
  43. </template>
  44. <script setup>
  45. import AMapLoader from '@amap/amap-jsapi-loader';
  46. import {shallowRef,onMounted} from "vue";
  47. import * as echarts from "echarts";
  48. import House from './components/housecamer.vue'
  49. const map = shallowRef(null);
  50. const AMap = ref();
  51. const echarts01 = ref(null);
  52. const echarts02 = ref(null);
  53. const echarts03 = ref(null);
  54. const echars01data = ref(null);
  55. const echars02data = ref(null);
  56. const echars03data = ref(null);
  57. const infoWindowContent = ref(null);
  58. const showInfoWindow = ref(false);
  59. const currentHouseCode = ref('');
  60. const currentHouse = ref({});
  61. const houseComp = ref(null);
  62. let infoWindow = null;
  63. let geocoder = null;
  64. const alarm_type=ref({
  65. "none":{
  66. name:'行为合规',
  67. bg:'#2488fe',
  68. icon:'/images/ico_alarm_none.png'
  69. },
  70. "smoke":{
  71. name:'吸烟告警',
  72. bg:'#ef911c',
  73. icon:'/images/ico_alarm_smoke.png'
  74. },
  75. "fire":{
  76. name:'异常烟火',
  77. icon:'/images/ico_alarm_fire.png',
  78. bg:'#de4a4a'
  79. },
  80. "temp":{
  81. name:'环境异常',
  82. bg:'#12c9b5',
  83. icon:'/images/ico_alarm_temp.png'
  84. },
  85. "person":{
  86. name:'人员入侵',
  87. icon:'/images/ico_alarm_person.png',
  88. bg:'#833dd9'
  89. }
  90. })
  91. const alarm_list = ref([{
  92. code:"none",
  93. count:0
  94. },{
  95. code:"smoke",
  96. count:0
  97. },{
  98. code:"fire",
  99. count:0
  100. },{
  101. code:"temp",
  102. count:0
  103. },{
  104. code:"person",
  105. count:0
  106. }]);
  107. const houselist=ref([{
  108. name:"自贡中心仓库",
  109. code:"zg",
  110. city:"510300",
  111. addr:"自贡市沿滩区金川路东段28号高新仓储物流园一期",
  112. lnglat:[0,0],
  113. alarmtype:"none",
  114. },{
  115. name:"成都中心仓库",
  116. code:"cd",
  117. city:"510100",
  118. addr:"简阳市石桥镇羊羊小镇大华国际B1栋13楼1322号",
  119. lnglat:[0,0],
  120. alarmtype:"smoke",
  121. camername:"1-10002号摄像头",
  122. }]);
  123. const initHouseLoca=()=>{
  124. for (let index = 0; index < houselist.value.length; index++) {
  125. const element = houselist.value[index];
  126. let address = element.addr;
  127. getGeoLocation(index,address);
  128. }
  129. }
  130. const toHouse=(item)=>{
  131. if(item.lnglat[0]==0||item.lnglat[1]==0) return;
  132. map.value.setCenter(item.lnglat);
  133. }
  134. const inHouse=()=>{
  135. houseComp.value.load(currentHouse,alarm_type.value);
  136. }
  137. const getGeoLocation=(houseind,address)=> {
  138. geocoder.getLocation(address, function(status, result) {
  139. if (status === 'complete' && result.info === 'OK') {
  140. const lnglat = result.geocodes[0].location; // 经纬度对象
  141. houselist.value[houseind].lnglat=[lnglat.getLng(),lnglat.getLat()];
  142. //console.log('经度:', lnglat.getLng(), '纬度:', lnglat.getLat());
  143. addMarker(houselist.value[houseind],lnglat); // 添加标记到地图上
  144. } else {
  145. console.error('获取位置失败');
  146. }
  147. });
  148. }
  149. const addMarker=(houseinfo,lnglat) =>{
  150. // 创建自定义 Marker 的 HTML 内容
  151. const customMarkerContent = document.createElement('div');
  152. customMarkerContent.id = houseinfo.code;
  153. customMarkerContent.className = 'custom-marker'; // 可以添加一些 CSS 类来美化 Marker
  154. customMarkerContent.innerHTML = '<div class="icon1"></div><div class="icon2"></div><div class="icon '+houseinfo.alarmtype+'"><img src='+alarm_type.value[houseinfo.alarmtype].icon+'></div><div class="housename">'+houseinfo.name+'<img src="/images/aowllow_up.png"></div>'; // 设置内容为红色的方块,显示一个 "X"
  155. customMarkerContent.style.cursor = 'pointer'; // 设置鼠标样式为指针,表示可点击
  156. const marker = new AMap.value.Marker({
  157. position: lnglat, // 经纬度对象
  158. content:customMarkerContent,
  159. map: map.value, // 添加到哪个地图实例
  160. extData:houseinfo,
  161. });
  162. marker.on('click',function(e){
  163. if(currentHouseCode.value!='' && currentHouseCode.value!=e.target.dom.firstChild.id){
  164. document.getElementById(currentHouseCode.value).className = "custom-marker";
  165. }
  166. let classnames=document.getElementById(e.target.dom.firstChild.id).className;
  167. if(classnames.indexOf("active")==-1){
  168. if(infoWindow!=null) infoWindow.close();
  169. showInfoWindow.value=true;
  170. currentHouseCode.value=e.target.dom.firstChild.id;
  171. document.getElementById(currentHouseCode.value).className = "custom-marker active";
  172. let extdata = e.target.getExtData();
  173. currentHouse.value = extdata;
  174. infoWindow.setContent(infoWindowContent.value)
  175. infoWindow.open(map.value,e.target.getPosition());
  176. }else{
  177. document.getElementById(currentHouseCode.value).className = "custom-marker";
  178. infoWindow.close();
  179. showInfoWindow.value=false;
  180. currentHouseCode.value="";
  181. }
  182. });
  183. map.value.setCenter(lnglat);
  184. }
  185. const initMap = () => {
  186. window._AMapSecurityConfig = {
  187. securityJsCode: "f3a3cf317c5749d8b2fce022f63def43",
  188. }
  189. AMapLoader.load({
  190. key: 'cf0ede1d8833ccb51fb6b084e23a7b5e', // 申请好的Web端开发者Key,首次调用 load 时必填
  191. version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
  192. plugins: ['AMap.Scale', 'AMap.ToolBar','AMap.Geocoder','AMap.LngLat'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
  193. Loca:{
  194. version:'2.0.0'
  195. }
  196. })
  197. .then((res) => {
  198. AMap.value = res
  199. // 上来就显示的中心点 北京 116.397, 39.918
  200. var lnglat = new res.LngLat(116.397, 39.918);
  201. map.value = new res.Map('containerMap', {
  202. //设置地图容器id
  203. viewMode: '2D', //是否为3D地图模式
  204. zoom: 8, //初始化地图级别
  205. mapStyle:"amap://styles/dark",//深色模式
  206. center: lnglat, //初始化地图中心点位置
  207. })
  208. // 初始化地理编码服务
  209. geocoder = new AMap.value.Geocoder({
  210. radius: 1000, // 范围,默认:1000
  211. extensions: "all" // 返回地址描述对应的详细信息
  212. });
  213. infoWindow = new AMap.value.InfoWindow({
  214. isCustom:true,
  215. offset: new AMap.value.Pixel(220,-28),
  216. autoMove:true,
  217. closewhenClickMap:true,
  218. });
  219. map.value.clearMap() // 清除地图覆盖物
  220. // 地图是否可拖拽和缩放
  221. map.value.setStatus({
  222. dragEnable: true, // 是否可拖拽
  223. zoomEnable: true, // 是否可缩放
  224. })
  225. initHouseLoca();
  226. })
  227. .catch((e) => {
  228. console.log('error', e)
  229. })
  230. }
  231. const initData = ()=>{
  232. //模拟数据
  233. echars01data.value=[{
  234. code:"none",
  235. name:alarm_type.value["none"].name,
  236. value:5,
  237. rate:Math.round(5/12*100)
  238. },
  239. {
  240. code:"smoke",
  241. name:alarm_type.value["smoke"].name,
  242. value:1,
  243. rate:Math.round(1/12*100)
  244. },
  245. {
  246. code:"fire",
  247. name:alarm_type.value["fire"].name,
  248. value:2,
  249. rate:Math.round(2/12*100)
  250. },
  251. {
  252. code:"temp",
  253. name:alarm_type.value["temp"].name,
  254. value:Math.round(1/12*100),
  255. rate:0
  256. },
  257. {
  258. code:"person",
  259. name:alarm_type.value["person"].name,
  260. value:3,
  261. rate:Math.round(4/12*100)
  262. },
  263. ];
  264. echars02data.value=[
  265. {date:"01",value:"2"},{date:"02",value:"0"},{date:"03",value:"1"},{date:"04",value:"3"},{date:"05",value:"0"},{date:"06",value:"0"},
  266. ,{date:"07",value:"0"},{date:"08",value:"0"},{date:"09",value:"0"},{date:"10",value:"1"},{date:"11",value:"0"},{date:"12",value:"0"}
  267. ];
  268. echars03data.value=[
  269. {date:"01",value:"2"},{date:"02",value:"0"},{date:"03",value:"1"},{date:"04",value:"3"},{date:"05",value:"0"},{date:"06",value:"0"},
  270. ,{date:"07",value:"0"},{date:"08",value:"0"},{date:"09",value:"0"},{date:"10",value:"1"},{date:"11",value:"0"},{date:"12",value:"0"}
  271. ];
  272. loadEchars01();
  273. loadEchars02();
  274. loadEchars03();
  275. }
  276. const loadEchars01=()=>{
  277. let chartData = {
  278. roseChart: true,
  279. colorArr: ['#2186fd', '#dd4949', '#ee901b', '#11c8b4',"#823cd8"],
  280. data:echars01data.value
  281. };
  282. let arr = chartData.data.map(item => item.value);
  283. function sum(arr) {
  284. return eval(arr.join("+"));
  285. };
  286. let legendObj = {};
  287. for (let i = 0; i < chartData.data.length; i++) {
  288. legendObj['d' + i] = {
  289. width: 10,
  290. height: 10,
  291. lineHeight: (chartData.setFont || 16) * 2,
  292. borderRadius: 10,
  293. backgroundColor: `rgb(${chartData.colorArr[i]})`,
  294. };
  295. legendObj['p' + i] = {
  296. fontSize: chartData.setFont || 16,
  297. padding: [0, 0, 0, 20],
  298. color: `rgb(${chartData.colorArr[i]})`,
  299. };
  300. }
  301. let option = {
  302. backgroundColor: '#00000000',
  303. color: chartData.colorArr,
  304. grid: {
  305. left: 5,
  306. right: 5,
  307. bottom: 5,
  308. top: 5,
  309. containLabel: true
  310. },
  311. title: {
  312. show: true,
  313. text: '{a|总量}\n{b|' + sum(arr) + '}',
  314. x: '30%',
  315. y: '43%',
  316. textStyle: {
  317. rich: {
  318. a: {
  319. align: 'center',
  320. fontSize: 12,
  321. color: '#fff',
  322. padding: [0, 0, 10, 0],
  323. },
  324. b: {
  325. align: 'center',
  326. fontSize: 14,
  327. color: '#fff'
  328. },
  329. },
  330. }
  331. },
  332. legend: {
  333. height: '100%',
  334. icon: 'circle',
  335. orient: 'vertical',
  336. right: 10,
  337. bottom: 'center',
  338. itemWidth: 0,
  339. itemHeight: 0,
  340. itemGap: 10,
  341. textStyle: {
  342. rich: {
  343. n: {
  344. padding: [0, 0, 0, 10],
  345. lineHeight: chartData.setFont || 12,
  346. fontSize: chartData.setFont || 12,
  347. color: "#fff",
  348. },
  349. ...legendObj
  350. }
  351. },
  352. formatter: function (name) {
  353. let index = 0;
  354. let d = chartData.data.filter((item, i) => {
  355. if (item.name == name) {
  356. index = i;
  357. return item;
  358. }
  359. });
  360. let p = d[0].value / sum(arr) * 100;
  361. return `{d${index}|}{n|${name}}`;
  362. },
  363. },
  364. tooltip: {
  365. trigger: 'item',
  366. formatter: '{b}:{c}({d}%)'
  367. },
  368. series: [{
  369. type: 'pie',
  370. clockwise: false,
  371. startAngle: 90,
  372. radius: ['35%', '55%'],
  373. center: ['35%', '50%'],
  374. hoverAnimation: false,
  375. roseType: chartData.roseChart ? 'radius' : false,
  376. data: chartData.data,
  377. itemStyle: {
  378. color: (param) => {
  379. let i = param.dataIndex;
  380. return chartData.colorArr[i]
  381. },
  382. opacity: .9
  383. },
  384. label: {
  385. show: false
  386. },
  387. labelLine: {
  388. show: false
  389. }
  390. }]
  391. };
  392. echarts.init(echarts01.value).setOption(option);
  393. }
  394. const loadEchars02=()=>{
  395. const dataX = [];
  396. const y = [];
  397. echars02data.value.map(item=>{
  398. dataX.push(item.date);
  399. y.push(item.value);
  400. })
  401. let option = {
  402. backgroundColor: '#00000000',
  403. grid: {
  404. left: 5,
  405. right: 5,
  406. bottom: 5,
  407. top: 15,
  408. containLabel: true
  409. },
  410. tooltip: { // 提示框组件
  411. trigger: 'axis', // 触发类型
  412. textStyle: {
  413. fontSize: 12 // 文字像素
  414. },
  415. },
  416. xAxis: {
  417. data: dataX, // 数据
  418. min: 0, // 最小值
  419. type: 'category',
  420. boundaryGap: true, // 开始和结尾是否隔开
  421. axisLabel: {
  422. textStyle: {
  423. color: '#5d646b', // 文字颜色
  424. fontSize: 12 // 文字像素
  425. }
  426. },
  427. axisLine: {
  428. show: false // 是否显示坐标轴轴线
  429. },
  430. axisTick: {
  431. show: false // 去除刻度线
  432. }
  433. },
  434. yAxis: {
  435. type: 'value',
  436. name: "单位:次",
  437. min: 0, // 最小值
  438. axisLine: {
  439. show: false
  440. },
  441. axisLabel: {
  442. textStyle: {
  443. color: '#5d646b', // 文字颜色
  444. fontSize: 12 // 文字像素
  445. }
  446. },
  447. // y轴分割线的颜色
  448. splitLine: {
  449. lineStyle: {
  450. color: '#575f66', // 分割线的颜色
  451. type: 'dashed',
  452. }
  453. }
  454. },
  455. series: [
  456. {
  457. type: 'line',
  458. symbolSize: 8, // 设置拐点大小
  459. symbol:'circle',
  460. label: {
  461. show: true, // 线条折点处显示值
  462. position: 'top', // 标签的位置
  463. color: "#5d646b", // 文字颜色
  464. fontSize: 12, // 文字像素
  465. },
  466. // 填充颜色设置
  467. areaStyle: {
  468. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  469. { offset: 1, color: 'rgba(72,115,255,0.2)' }, //开始的颜色
  470. { offset: 0, color: 'rgba(234,233,255,0.2)' } //结束的颜色
  471. ]),
  472. },
  473. // 设置拐点颜色以及边框
  474. itemStyle: {
  475. color: '#2084fa'
  476. },
  477. lineStyle: {
  478. width: 2, // 线的宽度
  479. },
  480. tooltip: {
  481. valueFormatter: function (value) {
  482. return value;
  483. }
  484. },
  485. data: y
  486. },
  487. ]
  488. };
  489. echarts.init(echarts02.value).setOption(option);
  490. }
  491. const loadEchars03=()=>{
  492. var gain = 0.9;
  493. var gap = 0;
  494. let maxvalue=0;
  495. //柱子数据
  496. var data = [];
  497. var dataX = [];
  498. echars03data.value.map(item=>{
  499. dataX.push(item.date);
  500. data.push(item.value);
  501. if (maxvalue.length>1){
  502. maxvalue = Math.max(maxvalue,item.value);
  503. }
  504. })
  505. maxvalue =maxvalue+2;
  506. var option = {
  507. backgroundColor: '',
  508. tooltip: {
  509. trigger: 'axis',
  510. axisPointer: {
  511. type: 'shadow',
  512. label: {
  513. show: true
  514. }
  515. }
  516. },
  517. grid: {
  518. left: '3%',
  519. top: '10%',
  520. right: '2%',
  521. bottom: '5%',
  522. containLabel: true
  523. },
  524. xAxis: [
  525. {
  526. type: 'category',
  527. axisTick: {
  528. show: false
  529. },
  530. axisLine: {
  531. lineStyle: {
  532. color: 'rgba(160,160,160,0.3)'
  533. }
  534. },
  535. axisLabel: {
  536. textStyle:{
  537. fontSize:12,
  538. color:'#5a6268'
  539. }
  540. },
  541. data: dataX
  542. },
  543. {
  544. type: 'category',
  545. axisLine: {
  546. show: false
  547. },
  548. axisTick: {
  549. show: false
  550. },
  551. axisLabel: {
  552. show: true,
  553. textStyle:{
  554. fontSize:12,
  555. color:'#fff'
  556. }
  557. },
  558. splitArea: {
  559. show: false
  560. },
  561. splitLine: {
  562. show: false
  563. },
  564. data: []
  565. }
  566. ],
  567. yAxis: {
  568. type: 'value',
  569. nameTextStyle: {
  570. color: '#ffffff',
  571. fontSize: 12
  572. },
  573. axisTick: {
  574. show: false
  575. },
  576. axisLine: {
  577. show: false
  578. },
  579. splitLine: {
  580. lineStyle: {
  581. color: '#575f66', // 分割线的颜色
  582. type: 'dashed',
  583. }
  584. },
  585. axisLabel: {
  586. textStyle: {
  587. color: '#5a6268',
  588. fontSize: 12
  589. }
  590. }
  591. },
  592. series: [
  593. {
  594. type: 'bar',
  595. xAxisIndex: 1,
  596. itemStyle: {
  597. normal: {
  598. show: true,
  599. color: "#2186fd00",
  600. barBorderRadius: 50,
  601. borderWidth: 0,
  602. borderColor: '#333'
  603. }
  604. },
  605. barWidth: '30%',
  606. data: [maxvalue, maxvalue, maxvalue, maxvalue,maxvalue, maxvalue, maxvalue, maxvalue,maxvalue, maxvalue, maxvalue, maxvalue]
  607. },
  608. {
  609. type: 'bar',
  610. itemStyle: {
  611. normal: {
  612. show: true,
  613. color: "#2186fd",
  614. barBorderRadius: 50,
  615. borderWidth: 0,
  616. borderColor: '#333'
  617. }
  618. },
  619. label: {
  620. normal: {
  621. show: true,
  622. position: 'top',
  623. textStyle: {
  624. fontSize: 12
  625. }
  626. }
  627. },
  628. barWidth: '30%',
  629. data: data
  630. }
  631. ]
  632. };
  633. echarts.init(echarts03.value).setOption(option);
  634. }
  635. onMounted(() => {
  636. const userinfo = JSON.parse(sessionStorage.getItem("user")||'{}');
  637. if (userinfo.userName!=null) {
  638. let tmplst =[];
  639. for (let index = 0; index < houselist.value.length; index++) {
  640. const element = houselist.value[index];
  641. if(userinfo.userName=='admin'|| userinfo.userName=='sc'|| element.code==userinfo.userName){
  642. tmplst.push(element)
  643. }
  644. }
  645. houselist.value = tmplst;
  646. }
  647. initMap();
  648. initData();
  649. })
  650. </script>
  651. <style>
  652. .custom-tooltip .el-tooltip__popper {
  653. background-color: #484e58 !important; /* 修改为你的颜色 */
  654. }
  655. .custom-marker{
  656. display: grid;
  657. color: #fff;
  658. font-size: 12px;
  659. .icon1,.icon2{
  660. display: none;
  661. }
  662. .housename{
  663. width: 140px;
  664. margin-left: -55px;
  665. text-align: center;
  666. background: #484e58;
  667. margin-top: 42px;
  668. padding: 3px 5px;
  669. border-radius: 18px;
  670. position: relative;
  671. position: absolute;
  672. z-index: 1;
  673. img{
  674. position: absolute;
  675. left: 50%;
  676. width: 10px;
  677. height: 6px;
  678. margin-left: -4px;
  679. top: -6px;
  680. }
  681. }
  682. .icon{
  683. border : 1px solid #fff;
  684. width: 32px;
  685. height: 32px;
  686. border-radius: 50%;
  687. display: flex;
  688. justify-content: center;
  689. justify-items: center;
  690. position: absolute;
  691. z-index: 1;
  692. img{
  693. width: 24px;
  694. height: 24px;
  695. margin-top: 4px;
  696. }
  697. }
  698. .none{
  699. background-color: #2287fe;
  700. }
  701. .fire{
  702. background-color: #dd4949;
  703. }
  704. .smoke{
  705. background-color: #ef911c;
  706. }
  707. .temp{
  708. background-color: #12c9b5;
  709. }
  710. .person{
  711. background-color: #833dd9;
  712. }
  713. }
  714. .custom-marker.active{
  715. display: grid;
  716. color: #fff;
  717. font-size: 12px;
  718. .icon1,.icon2{
  719. display: block;
  720. position: absolute;
  721. z-index: 0;
  722. }
  723. .icon1{
  724. width: 90px;
  725. height: 90px;
  726. background: transparent;
  727. border: 2px solid #4b3c2a;
  728. border-radius: 50%;
  729. left: -29px;
  730. top: -29px;
  731. }
  732. .icon2{
  733. width: 60px;
  734. height: 60px;
  735. background: #9a6523;
  736. border-radius: 50%;
  737. top: -14px;
  738. left: -14px;
  739. }
  740. .housename{
  741. width: 140px;
  742. margin-left: -55px;
  743. text-align: center;
  744. background: #484e58;
  745. margin-top: 70px;
  746. padding: 3px 5px;
  747. border-radius: 18px;
  748. position: relative;
  749. position: absolute;
  750. z-index: 1;
  751. img{
  752. position: absolute;
  753. left: 50%;
  754. width: 10px;
  755. height: 6px;
  756. margin-left: -4px;
  757. top: -6px;
  758. }
  759. }
  760. .icon{
  761. border : 1px solid #fff;
  762. width: 32px;
  763. height: 32px;
  764. border-radius: 50%;
  765. display: flex;
  766. justify-content: center;
  767. justify-items: center;
  768. position: absolute;
  769. z-index: 1;
  770. img{
  771. width: 24px;
  772. height: 24px;
  773. margin-top: 4px;
  774. }
  775. }
  776. .none{
  777. background-color: #2287fe;
  778. }
  779. .fire{
  780. background-color: #dd4949;
  781. }
  782. .smoke{
  783. background-color: #ef911c;
  784. }
  785. .temp{
  786. background-color: #12c9b5;
  787. }
  788. .person{
  789. background-color: #833dd9;
  790. }
  791. }
  792. .infoWindowContent{
  793. border: 2px solid #fff;
  794. position: relative;
  795. width: 380px;
  796. height: 260px;
  797. border-radius: 5px;
  798. background: #0000003b;
  799. .camername{
  800. height: 26px;
  801. width: auto;
  802. line-height: 16px;
  803. position: absolute;
  804. left: 5px;
  805. top: 5px;
  806. font-size: 12px;
  807. background-color: #0000004f;
  808. color: #fff;
  809. padding: 5px 15px;
  810. border-radius: 20px;
  811. }
  812. .linkpoint{
  813. width: 10px;
  814. height: 10px;
  815. position: absolute;
  816. border: 3px solid #fff;
  817. z-index: 1;
  818. border-radius: 50%;
  819. }
  820. .lefttoppoint{
  821. top: -8px;
  822. left: -8px;
  823. }
  824. .righttoppoint{
  825. top: -8px;
  826. right: -8px;
  827. }
  828. .leftbottompoint{
  829. bottom: -8px;
  830. left: -8px;
  831. }
  832. .rightbottompoint{
  833. bottom: -8px;
  834. right: -8px;
  835. }
  836. }
  837. </style>
  838. <style lang='scss' scoped>
  839. .containerMap{
  840. width: 100%;
  841. height: calc(100vh - 60px);
  842. position: relative;
  843. .alarm_list{
  844. position: absolute;
  845. z-index: 10;
  846. display: flex;
  847. left: 75px;
  848. top: 40px;
  849. .alarm_list_item{
  850. position: relative;
  851. margin: 0 5px;
  852. padding: 6px 20px;
  853. border-radius: 30px;
  854. color: #fff;
  855. background-color: #455b6d;
  856. img{
  857. width: 24px;
  858. height: 24px;
  859. vertical-align: middle;
  860. }
  861. .alarm_item_brager{
  862. position: absolute;
  863. font-weight: bold;
  864. width: 24px;
  865. height: 24px;
  866. border-radius: 50%;
  867. text-align: center;
  868. line-height: 24px;
  869. top: -13px;
  870. right: 0;
  871. font-size: 12px;
  872. }
  873. }
  874. }
  875. .houselist{
  876. position: absolute;
  877. bottom: 20px;
  878. left: 75px;
  879. display: flex;
  880. z-index: 10;
  881. color: #fff;
  882. .item{
  883. cursor: pointer;
  884. border-radius: 3px;
  885. margin: 3px;
  886. padding:5px 5px;
  887. text-align: center;
  888. font-weight: bold;
  889. .item:hover{
  890. padding:20px 5px;
  891. }
  892. }
  893. }
  894. .left{
  895. position: fixed;
  896. right: 0;
  897. top: 60px;
  898. z-index: 10;
  899. width: 300px;
  900. background-color:#03030366;
  901. height: calc(100% - 60px);
  902. .area{
  903. height: 33.3%;
  904. width: 100%;
  905. .title{
  906. background-color: #192733;
  907. font-size: 14px;
  908. font-weight: bold;
  909. color: #fff;
  910. height: 35px;
  911. line-height: 15px;
  912. padding: 10px;
  913. display: flex;
  914. .line{
  915. width: 5px;
  916. height: 15px;
  917. background-color: #fff;
  918. border-radius: 5px;
  919. margin-right: 10px;
  920. }
  921. .stat_rate{
  922. color: #47576a;
  923. font-size: 12px;
  924. margin-left: 5px;
  925. }
  926. }
  927. .toolsbtn{
  928. height: 24px;
  929. width: 100%;
  930. display: flex;
  931. margin-top: 10px;
  932. margin-left: 10px;
  933. line-height: 15px;
  934. margin-right: 2px;
  935. cursor: pointer;
  936. .toolsbtn_item{
  937. display: inline-block;
  938. padding: 5px 10px;
  939. background-color: #262f38;
  940. color: #686f75;
  941. font-size: 12px;
  942. }
  943. .toolsbtn_item.active,.toolsbtn_item:hover{
  944. background-color: #2184fa;
  945. color: #fff;
  946. }
  947. }
  948. .echartsdiv{
  949. height: calc(100% - 35px);
  950. width: 100%;
  951. }
  952. }
  953. }
  954. }
  955. </style>