嘉禾二期设备管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.1 KiB

2 years ago
<template>
<div>
<div class="box">
<div>
{{ time }}
2 years ago
</div>
<div>
{{ $moment().format('yyyy/MM/DD') }}
</div>
<div>
{{ $moment().format('dddd') }}
</div>
<div>
{{temp}} {{text}}
2 years ago
</div>
</div>
<div class="htitle">
2 years ago
{{ userInfo.dept_name }}实业公司能耗监测系统
2 years ago
</div>
</div>
</template>
<script>
import { getWeather } from "@/api/energySourcesProvince/energySourcesProvince"
2 years ago
import { mapGetters } from "vuex";
2 years ago
export default {
data() {
return {
2 years ago
time: '',
timeFun: null,
temp:'',
text:'',
2 years ago
};
},
2 years ago
computed:{
...mapGetters(["userInfo", "permission"]),
},
2 years ago
created() {
getWeather().then(res => {
this.temp = res.data.now.temp
this.text = res.data.now.text
})
2 years ago
this.timeFun = setInterval(() => {
this.time = this.$moment().format('HH:mm:ss')
2 years ago
}, 1000)
// this.timeFun()
2 years ago
},
methods: {
},
beforeDestroyed() {
clearInterval(this.timeFun)
2 years ago
},
};
</script>
<style lang="scss" scoped>
.box {
width: 7.5rem;
height: 0.54rem;
display: flex;
color: #85AADD;
box-sizing: border-box;
position: absolute;
top: 0.16rem;
left: 0.24rem;
div {
vertical-align: sub;
}
div:nth-child(1) {
font-size: 0.3rem;
font-family: Microsoft YaHei;
font-weight: bold;
}
div:nth-child(2) {
font-size: 0.2rem;
line-height: 0.48rem;
margin-left: 0.2rem;
}
div:nth-child(3) {
font-size: 0.2rem;
line-height: 0.48rem;
margin-left: 0.14rem;
}
div:nth-child(4) {
font-size: 0.2rem;
line-height: 0.48rem;
margin-left: 0.36rem;
}
}
.htitle {
position: absolute;
top: 0.18rem;
left: 7.2rem;
width: 4.82rem;
height: 0.46rem;
text-align: center;
font-size: 0.34rem;
font-family: Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
text-shadow: 3px 4px 2px rgba(0, 0, 0, 0.2);
background: linear-gradient(-12deg, #C9E7FF 0%, #ECFCFF 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>