济菏高速业务端
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.

391 lines
9.9 KiB

1 year ago
<template>
<div style="width: 100%;height: 100%;">
6 months ago
<div class="btnBox">
<div class="btnItem" @click="bbbbb">添加点位</div>
<div class="btnItem" @click="ccccc">删除图层</div>
<div class="btnItem" @click="ddddd">操作桩号</div>
</div>
<!-- <component :is="mapContainer" ref="MapContainerRef" @update:isGisCompleted="(data) => { this.isGisCompleted = data; }" /> -->
<div class="BMapContainer">
<gisMap2d ref="gisMap2d"
:mapZoom = "mapZoom"
:mapCenter="mapCenter"
radarSliderBottom="33%"
radarSliderRight="14%"
mapBoxHeight="100vh" @clickPointEvent="clickPointEvent" widgetBoxDisplay="none"></gisMap2d>
</div>
<div class="Home">
<section class="content">
<!-- 左侧 -->
<div class="content-l">
<!-- -->
<FocusedMonitoring class="card-menu" style="height: 288px;" />
<!-- -->
<RoadAndEvents ref="RoadAndEventsRef" :isGisCompleted="isGisCompleted" :mapContainer="mapContainer" style="flex:1" class="card-menu" />
</div>
<div class="content-m">
</div>
<div class="home-icons" >
1 year ago
<HomeFilter class="item" />
<HomeFrame class="item" />
6 months ago
<HomeVector class="item" v-hasPermi="['business:home:exportOperationalReport']" />
1 year ago
<HomeWord class="item" />
6 months ago
<HomeFrameControl class="item" v-hasPermi="['business:home:batchControl']" />
<HomeWeather class="item" />
<HomeWeatherLayer class="item" />
<HomeTraffic class="item" />
</div>
<div class="content-r">
<ConditionStatistics class="right card-menu" style="height: 100%;" />
</div>
</section>
<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" />
1 year ago
</div>
<div class="footer-content">
<Thumbnail ref="Thumbnail" />
</div>
</footer>
</div>
1 year ago
</div>
</template>
<script>
import FocusedMonitoring from "./components/FocusedMonitoring/index.vue";
import Thumbnail from "./components/Thumbnail/index.vue";
import ConditionStatistics from "./components/ConditionStatistics/index.vue";
10 months ago
1 year ago
import AMapContainer from "./components/AMapContainer/index.vue";
import HomeFilter from "./components/HomeFilter/index.vue";
import HomeFrame from "./components/HomeFrame/index.vue";
import HomeVector from "./components/HomeVector/index.vue";
1 year ago
import HomeWord from "./components/HomeWord/index.vue";
import HomeFrameControl from "./components/HomeFrameControl/index.vue";
import HomeVectorControl from "./components/HomeVectorControl/index.vue";
import HomeWeather from "./components/HomeWeather/index.vue";
import HomeWeatherLayer from "./components/HomeWeatherLayer/index.vue";
import HomeTraffic from "./components/HomeTraffic/index.vue";
import RoadAndEvents from "./components/RoadAndEvents/index.vue";
1 year ago
import Button from "@screen/components/Buttons/Button.vue";
import Vue from "vue";
10 months ago
import BMapContainer from "./components/BMapContainer/index.vue";
import { gisMap2d } from 'gis-map-universal'
const lnglat = [117.16515148266497,35.2797674572588]
1 year ago
6 months ago
import pointsObj_new from './assets/data'
1 year ago
export default {
1 year ago
name: "Home",
1 year ago
components: {
gisMap2d,
1 year ago
FocusedMonitoring,
ConditionStatistics,
Thumbnail,
RoadAndEvents,
AMapContainer,
10 months ago
BMapContainer,
Button,
HomeFilter,
HomeFrame,
HomeVector,
HomeFrameControl,
HomeVectorControl,
1 year ago
HomeWord,
HomeWeather,
HomeWeatherLayer,
HomeTraffic
1 year ago
},
data() {
return {
1 year ago
selectedDevice: null,
isGisCompleted: false,
mapContainer:'BMapContainer',
mapBoxHeight: '100vh',
mapZoom: '7.5', // 默认值'7.5' String类型
mapCenter: lnglat, //默认值[118.75, 36.46] Array类型
6 months ago
ttt:null
1 year ago
};
},
1 year ago
provide() {
return {
10 months ago
// 2024-06-04更新地图==========================================
getMap: () => {
return this.$refs.gisMap2d //.getMapInstance();
},
setMapZoomAndCenter: (zoom,lnglat) => {
this.$refs.gisMap2d.setMapZoomAndCenter(zoom,lnglat);
},
1 year ago
activeDeviceTypes: Vue.observable([]),
};
1 year ago
},
async mounted() {
// this.$refs.gisMap2d.zoomInBylatlon(
// lnglat,7.5
// );
// Vue.prototype.map2d = this.$refs.gisMap2d;
Vue.prototype.mapIns = this.$refs.gisMap2d;
this.isGisCompleted = true;
this.$root.$on('refresh-gismap', this.refreshLayer);
},
1 year ago
methods: {
refreshLayer(layers){
console.log(layers,'更新图标')
6 months ago
//this.$refs.gisMap2d.addPointByArr(
// {pointList:[]}, // 点位数据数组(按以下规范组装)
// 'jhlayers', // 当前添加的数据 唯一标识(删除该图层时也会用到)//./事件专题/交通事故.svg
// true // 当前新加图层是否启用聚合效果
//);
if(layers){
this.ttt=layers;
}
this.$refs.gisMap2d.addPointByArr(
6 months ago
pointsObj_new,//JSON.parse(JSON.stringify(layers)),
"jhlayers1111",
true
);
},
debug(){
this.$refs.Thumbnail.debug()
},
1 year ago
handleShrink(e) {
const translateXElement = e.target.parentElement.parentElement;
1 year ago
const result =
(e.target.style.transform.match(/[-0-9]+/)?.[0] || -90) * -1;
e.target.style.transform = `rotate(${result}deg)`;
1 year ago
if (
translateXElement.style.transform !== `translateY(calc(100% - 36px))`
) {
translateXElement.style.transform = `translateY(calc(100% - 36px))`;
translateXElement.style.position = `absolute`;
translateXElement.style.bottom = `0px`;
} else {
1 year ago
translateXElement.style.transform = `translateY(0)`;
translateXElement.style.position = `relative`;
}
1 year ago
},
6 months ago
bbbbb() {
6 months ago
console.log(this.ttt)
6 months ago
this.$refs.gisMap2d.addPointByArr(
// this.pointsObj,
pointsObj_new,
6 months ago
"jhlayers1111",
6 months ago
true
);
},
ccccc() {
6 months ago
this.$refs.gisMap2d.removeLayerByName("jhlayers1111");
6 months ago
},
ddddd() {
6 months ago
this.$refs.gisMap2d.pileIsShow("jhlayers1111", this.isShow);
6 months ago
// this.$refs.gisMap2d.pileIsShow("customLayer222", this.isShow);
this.isShow = !this.isShow;
},
clickPointEvent(obj) {
if(obj && obj.otherInfo){
obj.otherInfo.config.markerClick?.(obj.otherInfo.extData, obj.otherInfo.config?.item);
}
// console.log(obj); //此处可以拿到点位的所有字段信息
},
setMapZoomAndCenter(zoom,lnglat){
this.$refs.gisMap2d.zoomInBylatlon(lnglat,zoom)
},
showRoadConditions(visible){
if(visible){
// TODO 展示云图
} else {
// TODO 隐藏云图
}
}
1 year ago
},
};
1 year ago
</script>
1 year ago
<style lang="scss" scoped>
.BMapContainer {
position: absolute;
z-index: 0;
width: 100%;
height: 100%;
transform-origin: left top;
background-color: #103253 !important;
transition: all 0.15s linear;
::v-deep {
.el-loading-mask {
user-select: none;
.el-loading-spinner {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.el-loading-text,
.el-icon-place {
color: #59d1fe;
font-size: 15px;
}
.el-icon-place {
font-size: 18px;
animation: 1.2s infinite jump;
}
}
}
}
}
1 year ago
.Home {
1 year ago
width: 100%;
1 year ago
height: 100%;
1 year ago
// height: 100%;
// z-index: 6;
display: flex;
flex-direction: column;
justify-content: space-between;
1 year ago
// gap: 30px;
1 year ago
padding: 19px 31px 0 25px;
1 year ago
// justify-content: center;
1 year ago
1 year ago
.card-menu {
1 year ago
transition: all 0.24s linear;
1 year ago
}
.content {
width: 100%;
display: flex;
justify-content: space-between;
height: 62vh;
1 year ago
.content-l {
width: 480px;
1 year ago
overflow: hidden;
display: flex;
flex-direction: column;
overflow: hidden;
height: 100%;
gap: 10px;
1 year ago
}
.content-m {
1 year ago
display: flex;
gap: 9px;
flex: 1;
}
1 year ago
.home-icons {
display: flex;
gap: 0px;
flex-direction: column;
z-index: 0;
margin-right: 10px;
.item {
padding-top: 15px;
1 year ago
}
}
1 year ago
.content-r {
width: 480px;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: flex-end;
overflow: hidden;
height: 100%;
1 year ago
}
}
.footer {
width: 100%;
// margin: auto;
pointer-events: none;
overflow: hidden;
height: min-content;
will-change: height;
bottom: 0;
z-index: 0;
1 year ago
>div {
1 year ago
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;
1 year ago
span {
font-size: 16px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #2ad9fd;
}
i {
1 year ago
transition: all 0.24s linear;
1 year ago
cursor: pointer;
}
// img {
// display: inline-block;
// margin-left: 11px;
// width: 16px;
// height: 13px;
// cursor: pointer;
// }
1 year ago
}
.footer-content {
width: 100%;
height: 200px;
1 year ago
background: #005570;
border-top: 1px solid #003354;
}
}
}
6 months ago
.btnBox {
display: flex;
align-items: center;
justify-content: space-between;
width: 44%;
position: absolute;
z-index: 999;
top: 5px;
left: 5px;
}
.btnItem {
6 months ago
user-select: none;
6 months ago
border: 1px #fff solid;
padding: 3px;
border-radius: 3px;
color: #fff;
background: linear-gradient(to right, #237d9a, #074055);
cursor: pointer;
}
1 year ago
</style>