|
|
|
<template>
|
|
|
|
<div class='Home'>
|
|
|
|
<AMapContainer ref="AMapContainerRef" />
|
|
|
|
<section class="content">
|
|
|
|
<!-- 左侧 -->
|
|
|
|
<div class="content-l">
|
|
|
|
<!-- 上 -->
|
|
|
|
<FocusedMonitoring class="card-menu" />
|
|
|
|
|
|
|
|
<!-- 下 -->
|
|
|
|
<RoadAndEvents class="content-l-b card-menu" @onClickItem="onClickItem" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 右侧 -->
|
|
|
|
<ConditionStatistics class="content-r card-menu" />
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<InfoBoard :visible.sync="isShowInfoBoard" :device="selectedDevice"></InfoBoard>
|
|
|
|
|
|
|
|
<footer class="footer card-menu">
|
|
|
|
<div class="footer-title">
|
|
|
|
<span>济菏高速缩略图</span>
|
|
|
|
<i class="el-icon-s-fold" style="color: #2AD9FD; transform: rotate(-90deg);" @click.stop="handleShrink" />
|
|
|
|
<!-- <img src="@screen/images/icon/icon-vector.png" @click.stop="handleShrink" /> -->
|
|
|
|
</div>
|
|
|
|
<div class="footer-content">
|
|
|
|
<Thumbnail />
|
|
|
|
</div>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import FocusedMonitoring from "./components/FocusedMonitoring/index.vue";
|
|
|
|
import Thumbnail from "./components/Thumbnail/index.vue";
|
|
|
|
import ConditionStatistics from "./components/ConditionStatistics/index.vue";
|
|
|
|
import RoadAndEvents from "./components/RoadAndEvents/index.vue";
|
|
|
|
import AMapContainer from "./components/AMapContainer/index.vue";
|
|
|
|
|
|
|
|
import InfoBoard from "./components/InfoBoard"
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'Home',
|
|
|
|
components: {
|
|
|
|
FocusedMonitoring,
|
|
|
|
ConditionStatistics,
|
|
|
|
Thumbnail,
|
|
|
|
RoadAndEvents,
|
|
|
|
AMapContainer,
|
|
|
|
InfoBoard
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
isShowInfoBoard: false,
|
|
|
|
selectedDevice:null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
getMap: () => this.$refs.AMapContainerRef.getMapInstance()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleShrink(e) {
|
|
|
|
const translateXElement = e.target.parentElement.parentElement;
|
|
|
|
|
|
|
|
const result = (e.target.style.transform.match(/[-0-9]+/)?.[0] || -90) * -1
|
|
|
|
|
|
|
|
e.target.style.transform = `rotate(${result}deg)`;
|
|
|
|
if (translateXElement.style.transform !== `translateY(calc(100% - 36px))`) {
|
|
|
|
translateXElement.style.transform = `translateY(calc(100% - 36px))`
|
|
|
|
translateXElement.style.position = `absolute`;
|
|
|
|
translateXElement.style.bottom = `0px`;
|
|
|
|
} else {
|
|
|
|
translateXElement.style.transform = `translateY(0)`
|
|
|
|
translateXElement.style.position = `relative`;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onClickItem(item) {
|
|
|
|
if (item.title.includes("情报板")) {
|
|
|
|
this.isShowInfoBoard = true;
|
|
|
|
this.selectedDevice = {
|
|
|
|
"id": 904,
|
|
|
|
"iotDeviceId": "81221-65535",
|
|
|
|
"groupId": null,
|
|
|
|
"productId": 0,
|
|
|
|
"stakeMarkId": "k71+600",
|
|
|
|
"direction": "1",
|
|
|
|
"deviceName": "大学城入口站前板",
|
|
|
|
"deviceType": 2,
|
|
|
|
"installationDate": null,
|
|
|
|
"productionDate": null,
|
|
|
|
"durableYears": null,
|
|
|
|
"installationSite": null,
|
|
|
|
"useState": null,
|
|
|
|
"otherConfig": "{\"screenSize\":\"160*80\"}",
|
|
|
|
"remark": null,
|
|
|
|
"createTime": "2024-01-17T22:50:56.000+08:00",
|
|
|
|
"updateTime": null,
|
|
|
|
"longitude": null,
|
|
|
|
"latitude": null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
|
|
.Home {
|
|
|
|
height: 100%;
|
|
|
|
z-index: 6;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 30px;
|
|
|
|
padding: 19px 31px 0 25px;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
.card-menu {
|
|
|
|
transition: all .24s linear;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
width: 100%;
|
|
|
|
// margin: auto;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
// flex: 1;
|
|
|
|
height: min-content;
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
>div {
|
|
|
|
pointer-events: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content-l {
|
|
|
|
width: 461px;
|
|
|
|
overflow: hidden;
|
|
|
|
pointer-events: none;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 24px;
|
|
|
|
overflow: hidden;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
>div {
|
|
|
|
pointer-events: all;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content-l-b {
|
|
|
|
height: 332px;
|
|
|
|
max-height: 332px;
|
|
|
|
flex: 0.81;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.content-r {
|
|
|
|
width: 459px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
width: 100%;
|
|
|
|
// margin: auto;
|
|
|
|
pointer-events: none;
|
|
|
|
overflow: hidden;
|
|
|
|
height: min-content;
|
|
|
|
will-change: height;
|
|
|
|
bottom: 0;
|
|
|
|
|
|
|
|
>div {
|
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
|
|
|
// position: fixed;
|
|
|
|
// bottom: 0;
|
|
|
|
.footer-title {
|
|
|
|
width: 164px;
|
|
|
|
height: 36px;
|
|
|
|
border-radius: 11px 11px 0px 0px;
|
|
|
|
opacity: 1;
|
|
|
|
border: 1px solid #2ad9fd;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
overflow: hidden;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
gap: 15px;
|
|
|
|
|
|
|
|
span {
|
|
|
|
font-size: 16px;
|
|
|
|
font-family: PingFang SC, PingFang SC;
|
|
|
|
font-weight: 500;
|
|
|
|
color: #2ad9fd;
|
|
|
|
}
|
|
|
|
|
|
|
|
i {
|
|
|
|
transition: all .24s linear;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
// img {
|
|
|
|
// display: inline-block;
|
|
|
|
// margin-left: 11px;
|
|
|
|
// width: 16px;
|
|
|
|
// height: 13px;
|
|
|
|
// cursor: pointer;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-content {
|
|
|
|
width: 100%;
|
|
|
|
height: 224px;
|
|
|
|
background: #005570;
|
|
|
|
border-top: 1px solid #003354;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|