Commit cfe5cd57 by zhangquan

紧急版本

1 parent b4ce31b0
...@@ -254,9 +254,10 @@ export default { ...@@ -254,9 +254,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pie-box { .pie-box {
background: #181C36; background: rgba(24 ,28, 54 ,0.9);
font-weight: 500; font-weight: 500;
font-size: 12px; font-size: 12px;
border-radius: 8px;
color: #A3A4AF; color: #A3A4AF;
text-align: center; text-align: center;
......
...@@ -3,44 +3,46 @@ ...@@ -3,44 +3,46 @@
<div id="alarmMap" class="map-container"></div> <div id="alarmMap" class="map-container"></div>
<div class="left-box" v-show="boxShow"> <div class="left-box" v-show="boxShow">
<!-- 饼图组件 --> <!-- 饼图组件 -->
<ParCharts class="pie" ref="pieChartsRef" id="pie-chart" height="250px" :list="pieList" /> <ParCharts class="pie" ref="pieChartsRef" id="pie-chart" height="220px" :list="pieList" />
<!-- 风险分析 --> <!-- 风险分析 -->
<div class="analy-box"> <div class="analy-box">
<div class="top-box"> <div class="top-box">
<template v-if="alarmData.data.length"> <template v-if="alarmData.data.length">
<div v-for="item in alarmData.data" :key="item" class="top-box-item"> <div v-for="item in alarmData.data" :key="item" class="top-box-item">
<div class="top-box-item-left">{{ item.alarmName }}</div> <div class="top-box-item-left">{{ item.alarmName }}</div>
<div class="top-box-item-right"> <div :class="['top-box-item-right', 'item'+item.alarmLevel]">
<div :class="['item', item.alarmLevel <= 5 ? 'item1' : 'item1-grey']"></div> <!-- <div :class="['item', item.alarmLevel <= 5 ? 'item1' : 'item1-grey']"></div>
<div :class="['item', item.alarmLevel <= 4 ? 'item2' : 'item-grey']"></div> <div :class="['item', item.alarmLevel <= 4 ? 'item2' : 'item-grey']"></div>
<div :class="['item', item.alarmLevel <= 3 ? 'item3' : 'item-grey']"></div> <div :class="['item', item.alarmLevel <= 3 ? 'item3' : 'item-grey']"></div>
<div :class="['item', item.alarmLevel <= 2 ? 'item4' : 'item-grey']"></div> <div :class="['item', item.alarmLevel <= 2 ? 'item4' : 'item-grey']"></div>
<div :class="['item', item.alarmLevel <= 1 ? 'item5' : 'item5-grey']"></div> <div :class="['item', item.alarmLevel <= 1 ? 'item5' : 'item5-grey']"></div> -->
</div> </div>
</div> </div>
</template> </template>
<template v-else> <div class="top-box-none" v-else>
<div class="top-box-item"> <div class="dask-bg">
<div class="top-box-item-left">防拆报警</div> <div class="top-box-item">
<div class="top-box-item-right-none"></div> <div class="top-box-item-left">防拆报警</div>
</div> <div class="top-box-item-right-none"></div>
<div class="top-box-item"> </div>
<div class="top-box-item-left">高危区域内长停</div> <div class="top-box-item">
<div class="top-box-item-right-none"></div> <div class="top-box-item-left">高危区域内长停</div>
</div> <div class="top-box-item-right-none"></div>
<div class="top-box-item"> </div>
<div class="top-box-item-left">双设备分离</div> <div class="top-box-item">
<div class="top-box-item-right-none"></div> <div class="top-box-item-left">双设备分离</div>
</div> <div class="top-box-item-right-none"></div>
<div class="top-box-item"> </div>
<div class="top-box-item-left">安装点长停</div> <div class="top-box-item">
<div class="top-box-item-right-none"></div> <div class="top-box-item-left">安装点长停</div>
<div class="top-box-item-right-none"></div>
</div>
</div> </div>
<div class="tips"> <div class="dask">
<div>车辆无警情</div> <div>车辆无警情</div>
<div>触发</div> <div>触发</div>
</div> </div>
</template> </div>
</div> </div>
<div class="middle-box"> <div class="middle-box">
<div><span class="dot dot-1"></span>安全</div> <div><span class="dot dot-1"></span>安全</div>
...@@ -66,6 +68,18 @@ ...@@ -66,6 +68,18 @@
</div> </div>
</div> </div>
<div class="right-box" v-show="boxShow"> <div class="right-box" v-show="boxShow">
<!-- 用车行为分析 -->
<div class="use-car-box">
<div class="title">用车行为分析</div>
<div class="line-charts" v-if="xAxisDataList.length">
<LineCharts id="useCarCharts" ref="useCarChartsRef" height="250px" :linetype="linetype" :dataList="useCarData"
:xAxisData="xAxisDataList" :lineChartsYear="lineChartsYear"></LineCharts>
</div>
<div v-else class="empty-box">
<img src="https://wx.glsx.com.cn/upload/biz/501829f0-6c34-443c-bf56-ae94072a6619.png" alt="">
<div>暂无里程数据</div>
</div>
</div>
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="detail-box"> <div class="detail-box">
<div class="title">基本信息</div> <div class="title">基本信息</div>
...@@ -99,7 +113,7 @@ ...@@ -99,7 +113,7 @@
<template v-if="basicData.deviceInformationVOList&&basicData.deviceInformationVOList.length"> <template v-if="basicData.deviceInformationVOList&&basicData.deviceInformationVOList.length">
<div class="detail-msg-right"> <div class="detail-msg-right">
<div class="detail-msg-desc" v-for="item in basicData.deviceInformationVOList"> <div class="detail-msg-desc" v-for="item in basicData.deviceInformationVOList">
<div>{{ item.sourceStr }}-{{ item.sn }}</div> <div class="sn">{{ item.sourceStr }}-{{ item.sn }}</div>
<div v-show="item.deviceStateStr">{{ item.deviceStateStr }}</div> <div v-show="item.deviceStateStr">{{ item.deviceStateStr }}</div>
<div>定位-{{ item.address || ' --' }}</div> <div>定位-{{ item.address || ' --' }}</div>
</div> </div>
...@@ -111,18 +125,7 @@ ...@@ -111,18 +125,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 用车行为分析 -->
<div class="use-car-box">
<div class="title">用车行为分析</div>
<div class="line-charts" v-if="xAxisDataList.length">
<LineCharts id="useCarCharts" ref="useCarChartsRef" height="250px" :linetype="linetype" :dataList="useCarData"
:xAxisData="xAxisDataList" :lineChartsYear="lineChartsYear"></LineCharts>
</div>
<div v-else class="empty-box">
<img src="https://wx.glsx.com.cn/upload/biz/501829f0-6c34-443c-bf56-ae94072a6619.png" alt="">
<div>暂无里程数据</div>
</div>
</div>
</div> </div>
<!-- 热力图 --> <!-- 热力图 -->
<div class="hot-box">“历史停留”热力图</div> <div class="hot-box">“历史停留”热力图</div>
...@@ -143,6 +146,7 @@ export default { ...@@ -143,6 +146,7 @@ export default {
components: { ParCharts, LineCharts }, components: { ParCharts, LineCharts },
data() { data() {
return { return {
resizeObserver: null,
AMap: null, AMap: null,
mapObj: null, mapObj: null,
mapLoading: false, mapLoading: false,
...@@ -173,9 +177,32 @@ export default { ...@@ -173,9 +177,32 @@ export default {
// window.AMap = AMap; // window.AMap = AMap;
_this.initMap(); _this.initMap();
}) })
this.resetWidth()
}, },
methods: { methods: {
resetWidth() {
const homePage = document.querySelector('.desktop-left-sider');
// 创建 ResizeObserver 对象
this.resizeObserver = new ResizeObserver(entries => {
console.log(111111)
// 当元素大小发生变化时执行的回调函数
for (let entry of entries) {
const width = entry.contentRect.width;
let myElement = document.querySelector('.main-container');
if(width==0) {
myElement.style.width = '100%';
myElement.style.left = '0';
}
if(width==200) {
myElement.style.width = 'calc(100% - 200px)';
myElement.style.left = '200px';
}
}
});
// 开始观察目标元素的大小变化
homePage && this.resizeObserver.observe(homePage);
},
initMap() { initMap() {
let check = () => { let check = () => {
this.checkMapLoaded && window.clearTimeout(this.checkMapLoaded); this.checkMapLoaded && window.clearTimeout(this.checkMapLoaded);
...@@ -320,6 +347,7 @@ export default { ...@@ -320,6 +347,7 @@ export default {
// }); // });
// }, // },
beforeDestroy() { beforeDestroy() {
this.resizeObserver.disconnect()
// this.checkLoadedTimeoutId && window.clearTimeout(this.checkLoadedTimeoutId); // this.checkLoadedTimeoutId && window.clearTimeout(this.checkLoadedTimeoutId);
}, },
}; };
...@@ -330,7 +358,7 @@ export default { ...@@ -330,7 +358,7 @@ export default {
position: fixed; position: fixed;
width: calc(100% - 200px); width: calc(100% - 200px);
height: calc(100% - 60px); height: calc(100% - 60px);
top: 60px; top:60px;
left: 200px; left: 200px;
background: #fff; background: #fff;
padding: 0; padding: 0;
...@@ -349,13 +377,13 @@ export default { ...@@ -349,13 +377,13 @@ export default {
.left-box { .left-box {
position: absolute; position: absolute;
top: 10px; top: 10px;
left: 40px; left: 26px;
z-index: 9999; z-index: 9999;
} }
.pie { .pie {
width: 340px; width: 300px;
height: 299px; height: 270px;
background: #181C36; background: #181C36;
box-shadow: 0 4px 6px 0 #00000014; box-shadow: 0 4px 6px 0 #00000014;
z-index: 9999; z-index: 9999;
...@@ -363,78 +391,96 @@ export default { ...@@ -363,78 +391,96 @@ export default {
.analy-box { .analy-box {
margin-top: 8px; margin-top: 8px;
width: 340px; width: 300px;
background: #181C36; max-height: 420px;
border-radius: 8px;
box-sizing: border-box;
overflow-y: auto;
overflow-x: hidden;
background: rgba(24 ,28, 54 ,0.9);
box-shadow: 0 4px 6px 0 #00000014; box-shadow: 0 4px 6px 0 #00000014;
box-sizing: border-box; box-sizing: border-box;
padding: 16px; padding: 30px 16px 16px;
z-index: 9999; z-index: 9999;
.top-box { .top-box {
margin: 16px 0;
position: relative; position: relative;
.top-box-none{
position: relative;
width: 100%;
height: 130px;
.dask-bg{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.dask{
position: absolute;
z-index: 2;
left: 0;
top: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
border-radius: 8px;
background-color: rgba(82, 89, 141, 0.2);
backdrop-filter: blur(10px);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 21px;
color: #FFFFFF;
}
}
&-item { &-item {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 16px; margin-bottom: 16px;
&-left { .top-box-item-left {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 12px;
color: #FFFFFF; color: #FFFFFF;
width: 120px; text-align: center;
width: 100px;
margin-right: 12px;
} }
&-right { .top-box-item-right {
display: flex; width: 140px;
height: 12px;
.item { border-radius: 6px;
width: 36px; background: #46495E;
height: 12px; }
} .item5 {
background: #4ED5D7;
.item1 { }
background: #4ED5D7;
border-radius: 6px 0 0 6px;
}
.item2 {
background: #58D068;
}
.item3 {
background: #F7D310;
}
.item4 {
background: #F38906;
}
.item5 { .item4 {
background: #F23204; background: #58D068;
border-radius: 0 6px 6px 0; }
}
.item1-grey { .item3 {
background: #46495E; background: #F7D310;
border-radius: 6px 0 0 6px; }
}
.item5-grey { .item2 {
background: #46495E; background: #F38906;
border-radius: 0 6px 6px 0; }
}
.item-grey { .item1 {
background: #46495E; background: #F23204;
}
} }
&-right-none { &-right-none {
width: 180px; width: 140px;
height: 12px; height: 12px;
background: #46495E; background: #7a87d3;
border-radius: 6px; border-radius: 6px;
} }
} }
...@@ -457,17 +503,18 @@ export default { ...@@ -457,17 +503,18 @@ export default {
.middle-box { .middle-box {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
width: 280px; width: 100%;
font-size: 10px; font-size: 10px;
color: #ffffffb3; color: #ffffffb3;
margin: auto; margin: 20px 0;
.dot { .dot {
width: 6px; width: 6px;
height: 6px; height: 6px;
border-radius: 3px; border-radius: 50%;
display: inline-block; display: inline-block;
margin-right: 2px; margin-right: 4px;
vertical-align: middle;
} }
.dot-1 { .dot-1 {
...@@ -500,11 +547,19 @@ export default { ...@@ -500,11 +547,19 @@ export default {
margin-top: 16px; margin-top: 16px;
&-left { &-left {
min-width: 100px; min-width: 84px;
text-align: right;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
color: #A3A4AF; color: #A3A4AF;
} }
&-right { &-right {
font-family: PingFangSC-Regular;
line-height: 17px;
font-weight: 400;
font-size: 12px;
color: #E5E5E8; color: #E5E5E8;
} }
} }
...@@ -515,13 +570,19 @@ export default { ...@@ -515,13 +570,19 @@ export default {
.right-box { .right-box {
position: absolute; position: absolute;
top: 10px; top: 10px;
right: 40px; right: 26px;
z-index: 9999; z-index: 9999;
} }
.detail-box { .detail-box {
width: 340px;
background: #181C36; margin-top: 8px;
width: 300px;
max-height: 420px;
overflow-y: auto;
overflow-x: hidden;
background: rgba(24 ,28, 54 ,0.9);
border-radius: 8px;
box-shadow: 0 4px 6px 0 #00000014; box-shadow: 0 4px 6px 0 #00000014;
z-index: 9999; z-index: 9999;
box-sizing: border-box; box-sizing: border-box;
...@@ -530,8 +591,8 @@ export default { ...@@ -530,8 +591,8 @@ export default {
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
color: #ffffff80; color: #158BFF;
margin-bottom: 24px; margin-bottom: 10px;
} }
.detail-msg { .detail-msg {
...@@ -539,30 +600,45 @@ export default { ...@@ -539,30 +600,45 @@ export default {
justify-content: space-between; justify-content: space-between;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
margin-bottom: 10px; margin-bottom: 8px;
&:last-child{
margin-bottom: 0;
}
&-left { &-left {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
color: #A3A4AF; color: #A3A4AF;
min-width: 100px; min-width: 72px;
text-align: right;
} }
&-right { &-right {
flex: 1; flex: 1;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
color: #E5E5E8; color: #E5E5E8;
text-align: left;
} }
&-desc { .detail-msg-desc {
color: #E5E5E8; color: #E5E5E8;
.sn{
color: #2994FF;
}
& div{
margin-bottom: 1px;
line-height: 17px;
}
} }
} }
} }
.use-car-box { .use-car-box {
margin-top: 8px; width: 300px;
width: 340px; height: 270px;
height: 264px; background: rgba(24 ,28, 54 ,0.9);
background: #181C36; border-radius: 8px;
box-sizing: border-box; box-sizing: border-box;
padding: 16px; padding: 16px;
box-shadow: 0 4px 6px 0 #00000014; box-shadow: 0 4px 6px 0 #00000014;
...@@ -571,7 +647,7 @@ export default { ...@@ -571,7 +647,7 @@ export default {
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
color: #ffffff80; color: #158BFF;
} }
.empty-box { .empty-box {
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</el-row> </el-row>
<ul class="monitor-list" style="max-height: calc(100vh - 380px)"> <ul class="monitor-list" style="max-height: calc(100vh - 380px)">
<template v-for="(sn, key) in monitorList.itemArr"> <template v-for="(sn, key) in monitorList.itemArr">
<li class="monitor-list-item" :key="sn" @click="openMapInfoWindow(sn, monitorList[sn].source)" v-if="key !== 'count' && <li class="monitor-list-item" :key="sn" @click="openMapInfoWindow(sn, monitorList[sn].source, monitorList[sn].vid)" v-if="key !== 'count' &&
monitorList[sn] && monitorList[sn] &&
(monitorList[sn].source == monitorFilterType || (monitorList[sn].source == monitorFilterType ||
monitorFilterType == '') monitorFilterType == '')
...@@ -476,6 +476,7 @@ export default { ...@@ -476,6 +476,7 @@ export default {
id: item.id, id: item.id,
source: item.source === "有线" ? "1" : "0", source: item.source === "有线" ? "1" : "0",
sourceType: item.source, sourceType: item.source,
vid: item.vid
}; };
}); });
...@@ -1168,7 +1169,8 @@ export default { ...@@ -1168,7 +1169,8 @@ export default {
terminate() { terminate() {
this._drawTimeoutId && window.clearTimeout(this._drawTimeoutId); this._drawTimeoutId && window.clearTimeout(this._drawTimeoutId);
}, },
openMapInfoWindow(sn, source) { openMapInfoWindow(sn, source, vid) {
localStorage.setItem('vehicleId', vid)
EventBus.$emit("uiMap.monitor.openInfoWindow", `${sn}:${source}`); EventBus.$emit("uiMap.monitor.openInfoWindow", `${sn}:${source}`);
}, },
downloadTpl() { downloadTpl() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!