<template> <div class="top-container" > <div :style="{backgroundImage:'url('+top+')'}" class="top"/> <div class="title">安防综合管理平台</div> <clock class="clock"/> <div style="position: absolute;top:5px;left:450px;display: flex"> <el-button type="primary" circle style="width: 28px;height: 28px;padding-top: 4px;padding-left: 4px;" @click="shj('1')"> <el-image :src="require('@/assets/images/1.png')" mode="fill" style="width: 20px;height: 20px;" /> </el-button> <el-button type="primary" circle style="width: 28px;height: 28px;margin-left: 10px;padding-top: 4px;padding-left: 4px;" @click="shj('2')"> <el-image :src="require('@/assets/images/2.png')" mode="fill" style="width: 20px;height: 20px;" /> </el-button> </div> <div class="sys"> <svg-icon icon-class="next-circle"/> </div> </div> </template> <script> import Clock from '@/components/Clock' import { repostSocket } from '@/api/common' export default { name: 'Top', components: { Clock }, data() { return { top: require('@/assets/popup/top.png') } }, methods: { shj(num) { const params = { type: 'shj-page', message: num } repostSocket(params).then(response => { if (response.code === 200) { } }) } } } </script> <style scoped> .top-container{ width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(5, 30, 61, 0.53),rgba(5, 30, 61, 0.53), #0D3F7E00); overflow: hidden; -moz-user-select: none; /*火狐*/ -webkit-user-select: none; /*webkit浏览器*/ -ms-user-select: none; /*IE10*/ -khtml-user-select: none; /*早期浏览器*/ user-select: none; } .top{ width: 100%; height: 200%; margin-top: -40px; background-repeat: no-repeat; -webkit-background-size: 100% 100%; background-size: 100% 100%; overflow: hidden; } .title{ position: absolute; top: 0px; left: 0px; color: white; font-weight: bold; font-family: 黑体; font-size: 28px; width: 100%; margin-top: 2px; text-align: center; letter-spacing: 5px; overflow: hidden; } .clock{ position: absolute; top:5px; left:30px; } .sys{ position: absolute; width: 215px; height: 30px; top:5px; right:0px; color: #d1ffff; font-weight: bold; font-family: 黑体; letter-spacing: 2px; font-size: 18px; text-shadow: 0 0 5px #d1ffff; } </style>