113 lines
2.6 KiB
Vue
113 lines
2.6 KiB
Vue
|
|
|
||
|
|
|
||
|
|
<template>
|
||
|
|
<div class="system-title">
|
||
|
|
<div class="header-content">
|
||
|
|
<div class="time"><a-icon type="clock-circle" style="margin-right: 10px;" />{{ time }}</div>
|
||
|
|
<div class="tq">{{ tq }}</div>
|
||
|
|
<p class="_title">{{ title }}一体化平台</p>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
<script>
|
||
|
|
import {mapState} from "vuex";
|
||
|
|
import moment from "moment";
|
||
|
|
export default {
|
||
|
|
name: "SystemTitle",
|
||
|
|
computed: {
|
||
|
|
...mapState({
|
||
|
|
title: state => state.system.title,
|
||
|
|
info: state => state.system.info,
|
||
|
|
}),
|
||
|
|
tq () {
|
||
|
|
if (this.info) {
|
||
|
|
const weather = this.info?.weather || {}
|
||
|
|
return `${weather.location || ''}: ${weather.windDirection || ''};${weather.temperature || ''}℃`
|
||
|
|
}
|
||
|
|
return ''
|
||
|
|
}
|
||
|
|
},
|
||
|
|
data () {
|
||
|
|
return {
|
||
|
|
time: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||
|
|
}
|
||
|
|
},
|
||
|
|
mounted() {
|
||
|
|
setInterval(() => {
|
||
|
|
this.time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||
|
|
}, 1000)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
<style scoped lang="less">
|
||
|
|
.system-title {
|
||
|
|
width: 100%;
|
||
|
|
display: flex;
|
||
|
|
flex-flow: row;
|
||
|
|
justify-content: center;
|
||
|
|
background-size: 100% 100%;
|
||
|
|
pointer-events: auto;
|
||
|
|
z-index: 2;
|
||
|
|
.header-content {
|
||
|
|
width: 100%;
|
||
|
|
background: url("~/assets/images/new/标题.png") center top no-repeat;
|
||
|
|
background-size: 100% 100%;
|
||
|
|
height: 78px;
|
||
|
|
box-sizing: border-box;
|
||
|
|
padding-top: 5px;
|
||
|
|
position: relative;
|
||
|
|
.time {
|
||
|
|
position: absolute;
|
||
|
|
left: 20px;
|
||
|
|
top: 5px;
|
||
|
|
/** 文本1 */
|
||
|
|
font-size: 20px;
|
||
|
|
font-weight: 400;
|
||
|
|
letter-spacing: 0px;
|
||
|
|
line-height: 23.44px;
|
||
|
|
color: rgba(255, 255, 255, 1);
|
||
|
|
text-align: left;
|
||
|
|
vertical-align: top;
|
||
|
|
}
|
||
|
|
.tq {
|
||
|
|
position: absolute;
|
||
|
|
right: 20px;
|
||
|
|
top: 5px;
|
||
|
|
/** 文本1 */
|
||
|
|
font-size: 20px;
|
||
|
|
font-weight: 400;
|
||
|
|
letter-spacing: 0px;
|
||
|
|
line-height: 23.44px;
|
||
|
|
color: rgba(255, 255, 255, 1);
|
||
|
|
text-align: left;
|
||
|
|
vertical-align: top;
|
||
|
|
}
|
||
|
|
._title{
|
||
|
|
width: 100%;
|
||
|
|
font-family: AlimamaShuHeiTi-Bold;
|
||
|
|
font-size: 25px;
|
||
|
|
color: #D8F0FF;
|
||
|
|
letter-spacing: 7.68px;
|
||
|
|
text-align: center;
|
||
|
|
text-shadow: 0 0 11px #000000;
|
||
|
|
font-weight: 700;
|
||
|
|
margin: 0;
|
||
|
|
&.sub {
|
||
|
|
font-size: 18px;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
.subtitle {
|
||
|
|
width: 100%;
|
||
|
|
font-family: AlimamaShuHeiTi-Bold;
|
||
|
|
font-size: 16px;
|
||
|
|
color: #D8F0FF;
|
||
|
|
letter-spacing: 7.68px;
|
||
|
|
text-align: center;
|
||
|
|
text-shadow: 0 0 11px #000000;
|
||
|
|
font-weight: 700;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|