智慧物流-晋恒通-横屏
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.
 
 
 
 

125 lines
2.5 KiB

<template>
<div class="top-wrap">
<div class="left-wrap">
<!-- 这个空div有样式作用 -->
<div>
<div>40%</div>
<div>70</div>
</div>
</div>
<h3 class="title">现海园区5号仓库</h3>
<div class="right-wrap">
<div class="time">{{ time }}</div>
<div class="fire"></div>
<div class="water"></div>
</div>
</div>
</template>
<script lang="ts">
import {
defineComponent,
getCurrentInstance,
onMounted,
reactive,
toRefs,
} from "vue";
export default defineComponent({
setup() {
const { ctx } = getCurrentInstance();
const now = ctx.$dayjs().format("MM月DD日 HH:mm:ss");
const data = reactive({
time: now,
});
onMounted(() => {
setInterval(() => {
data.time = ctx.$dayjs().format("MM月DD日 HH:mm:ss");
}, 1000);
});
return { ...toRefs(data) };
},
});
</script>
<style scoped>
.top-wrap {
width: 100%;
height: 100rem;
display: flex;
align-items: center;
background: url("../assets/img/bg-top.png") no-repeat left top;
background-size: 100%;
position: relative;
z-index: 4;
color: #fff;
}
.top-wrap:after {
content: "";
display: block;
position: absolute;
left: 0;
bottom: 4rem;
transform: translate3d(0, 100%, 0);
height: 10rem;
width: 100%;
background: url("../assets/img/border-top.png") no-repeat left top;
background-size: contain;
}
.top-wrap .title {
flex: 1;
font-family: FZCHSJW, FZCHSJW--GB1-0;
color: #fff;
font-size: 36rem;
font-weight: bold;
letter-spacing: 4rem;
text-align: center;
}
.top-wrap .left-wrap {
position: absolute;
left: 30rem;
top: 0;
height: 100rem;
display: flex;
align-items: center;
font-size: 17rem;
}
.top-wrap .left-wrap:before {
content: "";
display: block;
width: 42rem;
height: 42rem;
background: url("../assets/img/cloud.png") no-repeat center;
background-size: contain;
margin-right: 20rem;
}
.top-wrap .right-wrap {
position: absolute;
right: 30rem;
top: 0;
height: 100rem;
display: flex;
align-items: center;
font-size: 17rem;
}
.top-wrap .right-wrap .time {
font-size: 26rem;
font-weight: bold;
}
.top-wrap .right-wrap .fire,
.top-wrap .right-wrap .water {
width: 42rem;
height: 42rem;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
margin-left: 40rem;
}
.top-wrap .right-wrap .fire {
background-image: url("../assets/img/fire.png");
}
.top-wrap .right-wrap .water {
background-image: url("../assets/img/water.png");
}
</style>