Home.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. <template>
  2. <div class="home">
  3. <div v-wechat-title="$route.meta.title" ></div>
  4. <div class="btn" @click="btn2" >消防互联网</div>
  5. <el-row class="contentClass contnetLift">
  6. <template>
  7. <info class="info" :resInfo="data.info" :websocket="data.winfo" />
  8. <!-- <access-control class="accessControl" v-else-if="item.styleValue === 2" :key="item.styleValue" :resInfo="item"></access-control> -->
  9. <parking-lot class="parkingLot" :resInfo="data.parkingLot" :websocket="data.wparkingLot" />
  10. <monitor class="monitor" @monitorChange="monitorChange" v-if="monitorStatus"/>
  11. <!-- <conference-room class="conferenceRoom" v-else-if="item.styleValue === 5" :key="item.styleValue" :resInfo="item"></conference-room>
  12. <give-an-alarm class="giveAnAlarm" v-else-if="item.styleValue === 6" :key="item.styleValue" :resInfo="item"></give-an-alarm> -->
  13. </template>
  14. </el-row>
  15. <el-row class="contnetCenter" >
  16. <iframe src="https://www.thingjs.com/s/cd7b1592538e0f4a9572c55e?params=105b0f77fd24654d4eebc434e9" frameborder="0" id="iframe" ></iframe>
  17. </el-row>
  18. <el-row class="contentClass contnetRight">
  19. <energy class="energy" @energyClick="energyClick" />
  20. <el-row :gutter="6">
  21. <el-col :span="12">
  22. <access-control class="accessControl" :resInfo="data.accessControl" :websocket="data.waccessControl" />
  23. </el-col>
  24. <el-col :span="12">
  25. <emergencyDisasterPrevention class="emergencyDisasterPrevention" :resInfo="data.emergencyDisasterPrevention" />
  26. </el-col>
  27. </el-row>
  28. <computerRoom class="computerRoom" :resInfo="data.computerRoom" :websocket="data.wcomputerRoom" style="margin-top:-10px" />
  29. <giveAnAlarm class="giveAnAlarm" :websocket="data.wgiveAnAlarm" @giveAnAlarmClick="giveAnAlarmClick" />
  30. </el-row>
  31. <SpringFrame v-if="springFrameState" :resInfo="item" :close2="item.close" @close="SpringFrameChange" />
  32. </div>
  33. </template>
  34. <script>
  35. // 党校
  36. import info from "../components/SD-school/info"; // 综合信息统计
  37. import accessControl from "../components/SD-school/access-control"; // 门禁进出入统计
  38. import parkingLot from "../components/SD-school/parking-lot"; // 停车场统计
  39. import monitor from "../components/SD-school/monitor"; // 视频监控
  40. import emergencyDisasterPrevention from "../components/SD-school/emergency-disaster-prevention" //应急防灾
  41. import computerRoom from "../components/SD-school/computer-room"; // 机房温度
  42. // import conferenceRoom from "../components/SD-school/conference-room"; // 会议室统计
  43. import giveAnAlarm from "../components/SD-school/give-an-alarm"; // 综合告警列表
  44. import energy from "../components/SD-school/energy"; // 能源
  45. import { Message } from 'element-ui'
  46. import SpringFrame from "../components/SD-school/Spring-frame"; // 弹框
  47. import axios from 'axios'
  48. import { encrypt } from '../util/jsencrypt';
  49. import {
  50. accessControlAllApi,
  51. movingRing,
  52. emergencyDisasterPreventionApi,
  53. infoApi,
  54. tbDevice,
  55. nodes,
  56. parkingInfo,
  57. goldResult,
  58. btRoomGet,
  59. } from "@/plugins/api";
  60. export default {
  61. name: "Home",
  62. components: {
  63. info,
  64. parkingLot,
  65. monitor,
  66. emergencyDisasterPrevention,
  67. accessControl,
  68. computerRoom,
  69. giveAnAlarm,
  70. SpringFrame,
  71. energy
  72. },
  73. data() {
  74. return {
  75. // isLeft: true,
  76. // isRight: true,
  77. // resList:[],
  78. // imageList:[],
  79. monitorStatus:true,
  80. data:{//主页各系统板块初始数据及websocket数据
  81. "accessControl":[],
  82. "parkingLot":[],
  83. "computerRoom":[],
  84. "emergencyDisasterPrevention":[],
  85. "parkingLot":[],
  86. "info":[],
  87. "giveAnAlarm":undefined,
  88. "winfo":[],
  89. "wparkingLot":[],
  90. "wemergencyDisasterPrevention":[],
  91. "waccessControl":[],
  92. "wcomputerRoom":[],
  93. "wgiveAnAlarm":[],
  94. "computerRoom":[]
  95. },
  96. springFrameState:true,//弹框
  97. item:{ //弹框下各系统板块
  98. "warningState":false,
  99. "meetingState":false,
  100. "equipmentState":false,
  101. "videoState":false,
  102. "xinfaState":false,
  103. "baState":false,
  104. "entranceGuardState":false,
  105. "vehicleInformationState":false,
  106. "yongtianState":false,
  107. "energyState":false,
  108. "roomState":false,
  109. "computerRoomState":false,
  110. "warningMessage":{},
  111. "equipmentMessage":{},
  112. "videoMessage":{
  113. name:undefined,
  114. code:undefined
  115. },
  116. "xinfaMessage":{},
  117. "time":null,
  118. "close":false,
  119. "xinfaMessage":{},
  120. "baMessage":{},
  121. "entranceGuardMessage":{},
  122. "vehicleInformationMessage":undefined,
  123. "yongtianMessage":undefined,
  124. "energyMessage":undefined,
  125. "roomMessage":undefined,
  126. "computerRoomMessage":undefined
  127. // "alertMessage":{ //
  128. // name:null,
  129. // data:{}
  130. // },
  131. // "time":false
  132. // "music":false
  133. },
  134. };
  135. },
  136. created() {
  137. this.getData()
  138. this.getComputerRoom()//机房数据单独获取
  139. //this.ceshi() //测试宿舍设备
  140. //this.ceshi() //测试机房设备
  141. },
  142. mounted() {
  143. var that = this;
  144. window.addEventListener("message",function (event) {
  145. var isDOM = typeof event.data === "object";
  146. // // 监听父窗口发送过来的数据向服务器发送post请求
  147. var data = event.data;
  148. // console.log(data)
  149. if (isDOM == true) {
  150. if ("param" in data == true) {
  151. let name = data.param.name
  152. if (name === "1楼会议室" && data.param.id === "109") { //会议室弹框开启
  153. that.SpringFrameChange()
  154. setTimeout(()=>{
  155. that.springFrameState = true
  156. that.item.meetingState = true
  157. },2)
  158. }else if (name === "停车位") { //车位信息弹框开启
  159. that.SpringFrameChange()
  160. setTimeout(()=>{
  161. that.springFrameState = true
  162. that.item.vehicleInformationState = true
  163. that.item.vehicleInformationMessage = (data.param.id).split('-')[0] + (data.param.id).split('-')[1]
  164. },2)
  165. }else if (name === "停车系统") { //向三位模型传输全部停车位状态
  166. parkingInfo().then(Response =>{
  167. if(Response.status == "SUCCESS"){
  168. let myframe = document.getElementById("iframe"); //获取iframe
  169. let arr = JSON.parse(Response.data)
  170. myframe.contentWindow.postMessage({ name: "停车系统" , data: Response.data}, "*");
  171. }
  172. })
  173. }else if (name.indexOf("摄像头")>-1) {
  174. nodes({"name":(data.param.id).split('·')[1],"pageNo":1,"pageSize":10}).then(res =>{ //获取code
  175. that.SpringFrameChange()
  176. setTimeout(()=>{
  177. that.springFrameState = true
  178. that.item.videoState = true
  179. that.item.videoMessage.name = (data.param.id).split('·')[1]
  180. that.item.videoMessage.code = res.data.list[0].indexCode
  181. },2)
  182. })
  183. }else if(data.param.id =="B1" || data.param.id =="F1" || data.param.id =="F2" || data.param.id =="F3" || data.param.id =="F4"
  184. || data.param.id =="F5" || data.param.id =="F6" || data.param.id =="F7" || data.param.id =="F8" || data.param.id =="F9"
  185. || data.param.id =="F10" || data.param.id =="F11" || data.param.id =="F12" || data.param.id =="F13"){ //楼层id过滤
  186. }else if(name === "宿舍" || name === "卫生间" || name === "淋浴间"){
  187. let id = (data.param.id).split("/")[0]
  188. let params = {
  189. "page_util":{
  190. "page_index":1,
  191. "page_size":2
  192. },
  193. "room_no":"",
  194. }
  195. params.room_no = id
  196. let arr = []
  197. arr.num = params.room_no
  198. goldResult({url:"http://10.108.35.110:2016/api/v2/base/getrooominfo",param:JSON.stringify(params)}).then(res =>{ //设备信息查询
  199. let data = JSON.parse((res.data.split('\">')[1]).split('</string>')[0])
  200. if(data.return_code == "-1"){
  201. Message({
  202. message:data.return_msg,
  203. type: 'error'
  204. });
  205. }else{
  206. arr.roomStatus = data.data.list[0].original_room_state_code
  207. arr.hotelCode = "ff80808179c6599a0179c65caf9a0001"
  208. let url = "http://www.limark.net:81/api/hotel/control/device/list.do?" + "hotelCode=ff80808179c6599a0179c65caf9a0001" + "&roomNo=" + id
  209. btRoomGet({url:url}).then(res =>{
  210. // console.log(url,res)
  211. if(JSON.parse(res.data).return_code == "-1"){
  212. Message({
  213. message:JSON.parse(res.data).return_msg,
  214. type: 'error'
  215. });
  216. }else{
  217. arr.data = JSON.parse(res.data)
  218. that.SpringFrameChange()
  219. setTimeout(()=>{
  220. that.springFrameState = true
  221. that.item.roomState = true
  222. that.item.roomMessage = arr
  223. },2)
  224. }
  225. })
  226. }
  227. })
  228. }else{
  229. // }else if((data.param.id).length>7){
  230. tbDevice(data.param.id).then(res =>{ //设备信息查询
  231. that.SpringFrameChange()
  232. setTimeout(()=>{
  233. let name = data.param.name
  234. if(res.data){
  235. if(res.data.manufacturer == 2){//永天设备
  236. //console.log("永天设备")
  237. that.springFrameState = true
  238. that.item.yongtianState = true
  239. that.item.yongtianMessage = res.data
  240. }else if(res.data.manufacturer == 3){//信发
  241. //console.log("信发")
  242. that.springFrameState = true
  243. that.item.xinfaState = true
  244. that.item.xinfaMessage = res.data
  245. }else if(res.data.manufacturer == 4 ){//ba
  246. //console.log("ba设备")
  247. that.springFrameState = true
  248. that.item.baState = true
  249. that.item.baMessage = res.data
  250. }else if(res.data.manufacturer == 5){//门禁
  251. //console.log("门禁设备")
  252. that.springFrameState = true
  253. that.item.entranceGuardState = true
  254. that.item.entranceGuardMessage = res.data
  255. }else if(res.data.manufacturer == 6){//机房各设备
  256. //console.log("机房各设备")
  257. that.springFrameState = true
  258. that.item.computerRoomState = true
  259. that.item.computerRoomMessage = res.data
  260. }else{
  261. //console.log("除永天设备、信发、摄像头、ba、门禁外设备")
  262. that.springFrameState = true
  263. that.item.equipmentState = true
  264. that.item.equipmentMessage = res.data
  265. }
  266. }else{
  267. //console.log("永天、信发、ba、门禁外设备 数据为空")
  268. that.springFrameState = true
  269. that.item.equipmentState = true
  270. that.item.equipmentMessage = res.data
  271. }
  272. },2)
  273. })
  274. }
  275. // else{
  276. // console.log("三维响应id为常规响应,未绑定设备")
  277. // }
  278. }
  279. }
  280. },false)
  281. },
  282. methods: {
  283. ceshi(){
  284. //let id = (data.param.id).split("/")[0]
  285. let params = {
  286. "page_util":{
  287. "page_index":1,
  288. "page_size":2
  289. },
  290. "room_no":"",
  291. }
  292. params.room_no = "402"
  293. let arr = []
  294. arr.num = params.room_no
  295. goldResult({url:"http://10.108.35.110:2016/api/v2/base/getrooominfo",param:JSON.stringify(params)}).then(res =>{ //设备信息查询
  296. let data = JSON.parse((res.data.split('\">')[1]).split('</string>')[0])
  297. let roomStatus = data.data.list[0].original_room_state_code
  298. arr.roomStatus = data.data.list[0].original_room_state_code
  299. arr.hotelCode = "ff80808179c6599a0179c65caf9a0001"
  300. let params2 = {
  301. hotelCode:"ff80808179c6599a0179c65caf9a0001",
  302. roomNo:"402"
  303. }
  304. let url = "http://www.limark.net:81/api/hotel/control/device/list.do?" + "hotelCode=ff80808179c6599a0179c65caf9a0001" + "&roomNo=" + "402"
  305. btRoomGet({url:url}).then(res =>{
  306. arr.data = JSON.parse(res.data)
  307. let that = this
  308. that.SpringFrameChange()
  309. setTimeout(()=>{
  310. that.springFrameState = true
  311. that.item.roomState = true
  312. that.item.roomMessage = arr
  313. },2)
  314. })
  315. })
  316. },
  317. btn2(){
  318. let parmas = encrypt(123)
  319. let url = window.location.host
  320. window.location.href = `http://10.108.34.2/fire/company.html?params=${parmas}`
  321. },
  322. mouseclick(event){
  323. if (event.button == 0) {
  324. } else if (event.button == 1) {
  325. }else if (event.button == 2) {
  326. console.log("右键");
  327. }
  328. },
  329. postMsg(newValue) {
  330. var myframe = document.getElementById("iframe"); //获取iframe
  331. myframe.contentWindow.postMessage({ state: false, name: "门禁" }, "*"); //childDomain是子页面的源(协议+主机+端口号)
  332. },
  333. getData(){
  334. setInterval(() =>{//机房数据定时获取
  335. this.getComputerRoom()
  336. },10*60*1000)
  337. let myDate = new Date();
  338. let y = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
  339. let mo = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
  340. let d = myDate.getDate(); //获取当前日(1-31)
  341. let h = myDate.getHours(); //获取当前小时数(0-23)
  342. let m = myDate.getMinutes(); //获取当前分钟数(0-59)
  343. let s = myDate.getSeconds(); //获取当前秒数(0-59)
  344. if(mo<10){
  345. mo = "0" + mo
  346. }
  347. if(d<10){
  348. d = "0" + d
  349. }
  350. if(h<10){
  351. h = "0" + h
  352. }
  353. if(m<10){
  354. m = "0" + m
  355. }
  356. if(s<10){
  357. s = "0" + s
  358. }
  359. let startTime = y + "-" + mo + "-" + d + " 00:00:00"
  360. let endTime = y + "-" + mo + "-" + d + " " + h + ":" + m +":" +s
  361. accessControlAllApi({startTime:startTime,endTime:endTime}).then(res =>{ // 门禁进出入统计
  362. this.data.accessControl = res.data
  363. })
  364. emergencyDisasterPreventionApi({sysCode:2}).then(res =>{ //应急防灾
  365. this.data.emergencyDisasterPrevention = res.data
  366. })
  367. // parkingLotApi().then(res =>{ //停车场统计
  368. // this.data.parkingLot = res.data
  369. // })
  370. infoApi().then(res =>{ //综合信息统计 告警信息饼形图
  371. this.data.info = res.data
  372. })
  373. // console.log(this.$store.state.wsUrl)
  374. // console.log("ws://" + this.$store.state.wsUrl + "/top/WS/alarmPush")
  375. if ("WebSocket" in window) {
  376. this.ws = new WebSocket("ws://" + this.$store.state.wsUrl + "/top/WS/alarmPush");
  377. console.log(this.ws)
  378. this.ws.onopen = ()=> {
  379. console.log("websocket连接成功");
  380. this.sendWs({aa:22});
  381. };
  382. this.ws.onmessage = (res) => { //接收websocket消息
  383. console.log(res)
  384. let data = JSON.parse(res.data)
  385. console.log(data)
  386. if(data.describe == "parkingLotALL"){ //停车总数
  387. this.data.wparkingLot = data
  388. }else if(data.describe == "meeting"){ //会议数据
  389. this.item.meetingState = true
  390. }else if(data.describe == "emergencyDisasterPreventionALL"){ //应急防灾总数
  391. this.data.emergencyDisasterPrevention = data.data
  392. }else if(data.describe == "accessControlAll"){ //门禁总数
  393. this.data.waccessControl = data
  394. }else if(data.describe == "computerRoom"){ //机房温度
  395. computerRoomApi().then(res =>{
  396. this.data.computerRoom = res.data
  397. })
  398. }else if(data.describe == "infoAdd"){ //手推告警记录
  399. infoApi().then(res =>{ //综合信息统计 告警信息
  400. this.data.info = res.data
  401. })
  402. this.data.wgiveAnAlarm = data
  403. }else if(data.describe == "accessControlSwitch"){ //三维建筑门禁开关
  404. let state = JSON.parse(res.data).data.state
  405. var myframe = document.getElementById("iframe"); //获取iframe
  406. myframe.contentWindow.postMessage({ state: state, name: "门禁" , id: "F13XCMJ2"}, "*"); //childDomain是子页面的源(协议+主机+端口号)
  407. }else{ //综合信息统计 、综合列表告警
  408. infoApi().then(res =>{ //综合信息统计 告警信息
  409. this.data.info = res.data
  410. })
  411. this.data.wgiveAnAlarm = data
  412. }
  413. };
  414. this.ws.onclose = ()=> { //关闭websocket
  415. // 关闭 websocket
  416. //console.log("连接已关闭...");
  417. //断线重新连接
  418. setTimeout(() => {
  419. this.getData();
  420. }, 1000 * 60);
  421. }
  422. } else {
  423. // 浏览器不支持 WebSocket
  424. alert("您的浏览器不支持 WebSocket!");
  425. }
  426. },
  427. //机房数据获取
  428. getComputerRoom(){
  429. movingRing({url:"http://10.108.56.30:80/html5/GETTAGVAL/WSD1_R1.温湿度1_温度,WSD1_R1.温湿度1_湿度",deviceId:"WSD1_R1_1"}).then(res =>{ // 机房温度、湿度平均值
  430. let arr1 = res.data.split("|")
  431. let arrData = []
  432. for(let i = 0;i<arr1.length;i++){
  433. arrData.push(arr1[i].split(",")[1])
  434. }
  435. movingRing({url:"http://10.108.56.30:80/html5/GETTAGVAL/WSD1_R1.温湿度2_温度,WSD1_R1.温湿度2_湿度",deviceId:"WSD1_R1_2"}).then(res2 =>{ // 机房温度、湿度平均值
  436. let arr2 = res2.data.split("|")
  437. for(let i = 0;i<arr2.length;i++){
  438. arrData.push(arr2[i].split(",")[1])
  439. }
  440. this.data.computerRoom = arrData
  441. })
  442. })
  443. },
  444. sendWs(val){
  445. if (this.ws && this.ws.readyState == 1) {
  446. this.ws.send(JSON.stringify(val));
  447. // console.log('发送成功')
  448. } else {
  449. setTimeout(() => {
  450. this.sendWs(val);
  451. }, 100);
  452. }
  453. },
  454. giveAnAlarmClick(val){ //告警列表数据传值
  455. setTimeout(()=>{
  456. this.springFrameState = false
  457. },0)
  458. setTimeout(()=>{
  459. let myframe = document.getElementById("iframe"); //获取iframe
  460. myframe.contentWindow.postMessage({ name: "告警" , id: val.deviceId}, "*"); //childDomain是子页面的源(协议+主机+端口号)
  461. this.item.warningMessage = val
  462. this.item.warningState = true
  463. this.springFrameState = true
  464. },1)
  465. },
  466. energyClick(val){ //告警列表数据传值
  467. setTimeout(()=>{
  468. this.springFrameState = false
  469. },0)
  470. setTimeout(()=>{
  471. this.item.energyMessage = val
  472. this.item.energyState = true
  473. this.springFrameState = true
  474. },1)
  475. },
  476. water(){
  477. },
  478. monitorChange(){
  479. this.monitorStatus = false
  480. setTimeout(()=>{
  481. this.monitorStatus = true
  482. },1)
  483. },
  484. SpringFrameChange(){
  485. this.springFrameState = false
  486. this.item.warningState = false
  487. this.item.meetingState = false
  488. this.item.equipmentState = false
  489. this.item.videoState = false
  490. this.item.xinfaState = false
  491. this.item.baState = false
  492. this.item.vehicleInformationState = false
  493. this.item.entranceGuardState = false
  494. this.item.yongtianState = false
  495. },
  496. // roomBox(val){
  497. // val === 'left' ? this.isLeft = !this.isLeft : (this.isRight = !this.isRight)
  498. // },
  499. // changeImage(val){
  500. // this.imageList.unshift(...val)
  501. // },
  502. footerImage(val){
  503. this.footerList.unshift(...val)
  504. this.footerList = this.footerList.slice(0,7)
  505. }
  506. },
  507. };
  508. </script>
  509. <style lang="scss" scoped>
  510. .home {
  511. width:100%;
  512. height:100%;
  513. .btn{
  514. position: absolute;
  515. z-index: 10;
  516. right:20px;
  517. top:-40px;
  518. }
  519. .iframe{
  520. position: absolute;
  521. width:100%;
  522. height:100%;
  523. z-index: -1;
  524. top:0;
  525. left:0;
  526. right:0
  527. }
  528. width: 100%;
  529. height: 100%;
  530. display: flex;
  531. justify-content: space-between;
  532. padding: 20px 0 20px 15px;
  533. box-sizing: border-box;
  534. position: relative;
  535. iframe{
  536. position: absolute;
  537. left: 0;
  538. top: 0;
  539. width: 100%;
  540. height: 100%;
  541. }
  542. .contentBox{
  543. width: 100%;
  544. height: 100%;
  545. display: flex;
  546. justify-content: space-between;
  547. }
  548. .contentClass {
  549. width: 25%;
  550. min-width: 500px;
  551. height: 102%;
  552. display: flex;
  553. flex-direction: column;
  554. position: relative;
  555. }
  556. .contnetCenter{
  557. flex: 1;
  558. }
  559. .info {
  560. width: 100%;
  561. height: 40%;
  562. }
  563. .accessControl {
  564. width: 100%;
  565. height: 28%;
  566. }
  567. .monitor {
  568. width: 100%;
  569. height: 32%;
  570. }
  571. .parkingLot,
  572. .conferenceRoom,
  573. .giveAnAlarm,
  574. .equipment,
  575. .giveAnAlarmAf,
  576. .warningInfo,
  577. .screenEquipment,
  578. .currentState,
  579. .monitorInfo {
  580. width: 100%;
  581. height: 31%;
  582. overflow: hidden;
  583. // flex: 1;
  584. }
  585. .emergencyDisasterPrevention,.computerRoom{
  586. width: 100%;
  587. height:25%;
  588. }
  589. .contnetRight{
  590. margin-left:15px;
  591. }
  592. .contnetCenter{
  593. height:100.4%;
  594. border-radius: 6px;
  595. }
  596. .accessControl{
  597. height:20%;
  598. }
  599. .energy{
  600. height:35%;
  601. }
  602. .giveAnAlarm{
  603. height:45%;
  604. }
  605. }
  606. </style>