bonus-ui/src/views/screen/cityScreen/components/topIconsTwo/index.vue

120 lines
2.5 KiB
Vue
Raw Normal View History

2025-09-14 19:34:02 +08:00
<template>
<div class="content">
<div class="iconItem">
<div class="item-box" style="right: -12%;">
<div class="title">今日入库</div>
<div class="num">
2025-09-15 17:50:00 +08:00
<span style="font-weight: 600;">{{enterNum}}</span>
2025-09-14 19:34:02 +08:00
<span class="unit"></span>
</div>
</div>
</div>
<div class="iconItem">
<div class="item-box" style="right: 8%;">
<div class="title">今日出库</div>
<div class="num">
2025-09-15 17:50:00 +08:00
<span style="font-weight: 600;">{{outNum}}</span>
2025-09-14 19:34:02 +08:00
<span class="unit"></span>
</div>
</div>
</div>
</div>
</template>
<script>
2025-09-15 17:50:00 +08:00
import { getBasicHeadApi } from "@/api/screen/cityScreen";
2025-09-14 19:34:02 +08:00
export default {
data() {
return {
2025-09-15 17:50:00 +08:00
enterNum:0,
outNum:0,
2025-09-14 19:34:02 +08:00
}
},
2025-09-15 17:50:00 +08:00
created() {},
2025-09-14 19:34:02 +08:00
mounted() {
2025-09-15 17:50:00 +08:00
this.getBasicHeader()
2025-09-14 19:34:02 +08:00
},
methods: {
2025-09-15 17:50:00 +08:00
getBasicHeader(){
getBasicHeadApi({companyId:sessionStorage.getItem('companyId')}).then(response => {
if(response.code==200){
this.enterNum=response.data.enterNum
this.outNum=response.data.outNum
}
});
}
2025-09-14 19:34:02 +08:00
},
}
</script>
<style lang="scss" scoped>
.content{
width: 100%;
height: 100%;
background-image: url("../../../../../assets/cityScreen/topIconsBg2.png");
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.iconItem{
width: 50%;
height: 100%;
margin-right: 6%;
// border: 1px solid red;
position: relative;
}
.item-box{
width: 70%;
height: 100%;
position: absolute;
right: 0%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.title{
color: #fff;
font-size: 32px;
margin-right: 15%;
}
.num{
color: #FCFAC4;
font-size: 32px;
margin-right: 25%;
margin-top: 5%;
}
.unit{
font-size: 24px;
color: #ccc;
margin-left: 10px;
}
2025-09-15 17:50:00 +08:00
@media screen and (min-width: 1080px) {
2025-09-14 19:34:02 +08:00
.title{
font-size: 12px;
}
.num{
font-size: 12px;
}
.unit{
font-size: 10px;
margin-left: 2px;
}
}
@media screen and (min-width: 3000px) {
.title{
font-size: 32px;
}
.num{
font-size: 32px;
}
.unit{
font-size: 24px;
margin-left: 10px;
}
}
</style>