Browse Source

增加地图路况图层

wangqin
王钦 8 months ago
parent
commit
33874f5179
  1. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue
  2. 34
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue
  3. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/index.vue

18
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue

@ -53,6 +53,16 @@ export default {
Vue.prototype.mapIns = this.aMapIns;
//
this.trafficLayer = new this.AMap.TileLayer.Traffic({
zIndex: 99999999999,
zooms: [7, 22],
visible: false,
});
this.trafficLayer.setMap(this.aMapIns);
this.trafficLayer.hide();
this.aMapIns.on("complete", () => { //map
this.loading = false;
this.$emit("update:isGisCompleted", true);
@ -211,6 +221,14 @@ export default {
mapIns: this.aMapIns,
};
},
showRoadConditions(visible){
if(visible){
this.trafficLayer.show();
} else {
this.trafficLayer.hide();
}
}
},
// unmounted() {
beforeDestroy() {

34
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue

@ -1,7 +1,7 @@
<template>
<Card class="CrowdnessIndicatorRankings border" title="拥挤度指标排名情况">
<div class="map">
<AMapContainer v-if="delayLoad" style="z-index: 9" />
<AMapContainer ref="AMapContainerRef" v-if="delayLoad" style="z-index: 9" />
</div>
<div class="right border">
<div
@ -10,7 +10,17 @@
:key="item.key"
@click="handleClick(item)"
>
<ElPopover trigger="manual" :value="isActive(item)" placement="left">
<div
v-if="item.key === 'bar'"
class="label"
slot="reference"
:style="{
backgroundImage: `url(${require(`./images/${item.key}${
isActive(item) ? '-active' : ''
}.svg`)})`,
}"
/>
<ElPopover v-else trigger="manual" :value="isActive(item)" placement="left">
<div v-if="item.key === 'weather'" class="weather">
<span>天气{{ weatherData.text }}</span>
<span>能见度{{ weatherData.vis }}公里</span>
@ -18,7 +28,7 @@
<span>风力{{ weatherData.windScale }}</span>
</div>
<div
v-if="item.key === 'pie'"
v-else-if="item.key === 'pie'"
class="statistics"
id="statChartRef"
></div>
@ -62,23 +72,23 @@ export default {
},
{
key: "camera",
label: "摄像机",
label: "附近相机",
},
{
key: "bar",
label: "柱状图",
label: "线路通行情况",
},
{
key: "level",
label: "天气",
},
{
key: "car",
label: "天气",
label: "情报板",
},
// {
// key: "car",
// label: "",
// },
{
key: "pie",
label: "统计",
label: "断面车流量",
},
],
delayLoad: true,
@ -104,6 +114,8 @@ export default {
);
statChart.setOption(StatChartOption);
});
} else if (item.key === 'bar'){
this.$refs.AMapContainerRef.showRoadConditions(findIndex === -1)
}
},
getWeatherForecast() {

20
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/index.vue

@ -23,14 +23,14 @@ const components = files.keys().reduce((components, key) => {
}, {});
const originGridArea = {
EventInformation: "1 / 1 / span 9 / 1", // 1
DispatchLiaison: "10 / 1 / span 9 / 2", // 2
TrafficControl: "19 / 1 / span 7 / 2", //3
CrowdnessIndicatorRankings: "1 / 2 / span 11 / 2", // / 1
DisposalProcess: "12 / 2 / span 14 / 2", //2
RealTimeVideo: "1 / 3 / span 7 / 3", //1
ReleaseInformation: "8 / 3 / span 7 / 3", //2
DeviceControl: "15 / 3 / span 11 / 3", //3
EventInformation: "1 / 1 / span 12 / 1", // 1
DispatchLiaison: "13 / 1 / span 11 / 2", // 2
TrafficControl: "24 / 1 / span 10 / 2", //3
CrowdnessIndicatorRankings: "1 / 2 / span 12 / 2", // / 1
DisposalProcess: "13 / 2 / span 21 / 2", //2
RealTimeVideo: "1 / 3 / span 9 / 3", //1
ReleaseInformation: "10 / 3 / span 7 / 3", //2
DeviceControl: "17 / 3 / span 17 / 3", //3
// DisposalPlan: "17 / 1 / span 9 / 2", //
};
@ -78,11 +78,11 @@ export default {
if(['设备设施隐患','非法上路','施工建设','服务区异常'].includes(result.data.eventName)){
const gridArea = {...originGridArea}
//
gridArea['DispatchLiaison'] = '10 / 1 / span 16 / 2'
gridArea['DispatchLiaison'] = '10 / 1 / span 20 / 2'
delete gridArea.TrafficControl;
if(['设备设施隐患','非法上路'].includes(result.data.eventName)){
//
gridArea['RealTimeVideo'] = '1 / 3 / span 13 / 3'
gridArea['RealTimeVideo'] = '1 / 3 / span 17 / 3'
delete gridArea.ReleaseInformation;
}

Loading…
Cancel
Save