Commit 0d1f8894 by 前端

Merge branch 'v1.99' into 'master'

上线合并

See merge request !55
2 parents 5f4a7c52 4315ff61
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2024-11-28 16:37:15
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2024-12-30 15:11:15
* @LastEditors: limin
* @LastEditTime: 2026-07-16 15:09:26
* @FilePath: \oEshield\src\pages\monitor\alarmAnalysis.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -95,10 +95,14 @@
<div class="use-car-box">
<div class="title">
用车行为分析
<div
<!-- <div
class="detail-btn"
v-if="pieList && pieList.length"
@click="goDetailPage()"
> -->
<div
class="detail-btn"
@click="goDetailPage()"
>
风险评估详情
</div>
......@@ -792,4 +796,4 @@ export default {
.line-charts {
padding-left: 10px;
}
</style>
\ No newline at end of file
</style>
......@@ -10,14 +10,26 @@
</div>
<div class="main pie-main">
<glsx-image class="bg-img" src="detail-bg.png" />
<ParCharts class="pie-wrap" ref="pieChartsRef" :configObj="configObj" id="pie-chart" height="220px" :list="pieList" />
<div class="pie-ctnr">
<ParCharts class="pie-wrap" ref="pieChartsRef" :configObj="configObj" id="pie-chart" height="220px" :list="pieList" />
<div class="pie-empty" v-if="!pieList.length">
<glsx-image class="img" src="empty-data.png" />
<span class="tip">暂无风险评估数据</span>
</div>
</div>
<div class="analyze-wrap">
<div class="info-item" v-for="(item, index) in analyzeInfoList" :key="index">
<label class="label" for="">{{ item }}</label>
:
<span class="value" v-if="item == '用量分析'">{{ dosageInfo.tips }}</span>
<span class="value" v-else>{{ pieList.length ? pieList[0].advise : '--' }}</span>
<div class="analyze-empty" v-if="showAnalyzeEmpty">
<glsx-image class="img" src="empty-data.png" />
<span class="tip">暂无状态/预警/用量分析建议</span>
</div>
<template v-else>
<div class="info-item" v-for="(item, index) in analyzeInfoList" :key="index">
<label class="label" for="">{{ item }}</label>
:
<span class="value" v-if="item == '用量分析'">{{ dosageInfo && dosageInfo.tips ? dosageInfo.tips : '暂无数据' }}</span>
<span class="value" v-else>{{ pieList[0] && pieList[0].advise ? pieList[0].advise : '暂无数据' }}</span>
</div>
</template>
</div>
</div>
</div>
......@@ -258,6 +270,13 @@ export default {
]
}
},
computed: {
showAnalyzeEmpty() {
const hasPieAdvise = !!(this.pieList && this.pieList[0] && this.pieList[0].advise)
const hasDosageTips = !!(this.dosageInfo && this.dosageInfo.tips)
return !hasPieAdvise && !hasDosageTips
}
},
mounted() {},
created() {
this.pageQuery = this.$route.query
......@@ -915,17 +934,61 @@ export default {
height: 259px;
top: 20px;
}
.pie-ctnr {
width: 300px;
height: 270px;
position: relative;
flex-shrink: 0;
}
.pie-wrap {
width: 300px;
height: 270px;
background: #fff;
}
.pie-empty {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background: rgba(255, 255, 255, 0.92);
/deep/ .img{
width: 86px;
height: 86px;
}
.tip{
font-weight: 400;
font-size: 14px;
color: #999999;
}
}
.analyze-wrap {
margin-left: 55px;
display: flex;
justify-content: center;
align-items: left;
flex-direction: column;
.analyze-empty {
width: 100%;
min-height: 176px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
/deep/ .img{
width: 86px;
height: 86px;
}
.tip{
font-weight: 400;
font-size: 14px;
color: #999999;
}
}
}
}
.base-info-main {
......
......@@ -210,6 +210,7 @@ export default {
{ field: "vin", title: "车架号" },
{ field: "sn", title: "设备号" },
{ field: "sourceStr", title: "设备类型" },
{ field: "deviceStateStr",title: "设备状态"},
{ field: "activeDate", title: "激活时间" },
{ field: "finalGpsTime", title: "最后GPS定位时间" },
{ field: "finalGpsAddress", title: "最后GPS定位地址", width: "300px" },
......@@ -317,12 +318,22 @@ export default {
"drawingManagerAddEventListener",
"rectanglecomplete",
function (e) {
console.log(e);
_this.rectangle = e;
let bounds = e.getBounds();
_this.calculateWidthHeight(bounds);
// 恢复地图拖动/滚轮
mapService.mapInstance.enableDragging();
}
);
MAP.invoke(
"drawingManagerAddEventListener",
"overlaycancel",
function (e) {
mapService.mapInstance.enableDragging();
}
);
// 绘制期间禁用地图拖动/滚轮,避免冲突
mapService.mapInstance.disableDragging();
MAP.invoke("setDrawingMode", "rectangle");
// if (_this.mouseTool) {
// _this.mouseTool.rectangle({
......@@ -623,7 +634,7 @@ export default {
_this.goFullPage();
return false;
}
try {
_this.loading = true;
delete params.paths;
let left = await this.convertCoordinate(params.leftLngLat);
......@@ -631,7 +642,6 @@ export default {
params.leftLngLat = `${left.lng},${left.lat}`;
params.rightLngLat = `${right.lng},${right.lat}`;
let res = await GER_REGIONAL_SEARCH(params);
console.log(res, "res");
_this.loading = false;
if (res.code != 200) {
showToast({
......@@ -643,6 +653,11 @@ export default {
_this.deviceList = list;
_this.hideFooter = false;
_this.addMarkers(list, true);
} catch (error) {
console.log(error);
} finally {
_this.loading = false;
}
},
// 在地图上画行政区域
......
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2024-12-06 14:10:32
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-01-16 11:18:23
* @LastEditors: limin
* @LastEditTime: 2026-07-17 10:15:15
* @FilePath: \oEshield\src\utils\mapBService.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -52,7 +52,7 @@ MapService.prototype = {
mapapi.invoke("Point", 116.404, 39.915),
params.zoom || 13
);
// 添加比例尺
mapapi.invoke("ScaleControl")
// 距离测量
......@@ -68,20 +68,20 @@ MapService.prototype = {
// self.geolocation = new AMap.Geolocation();
// });
// mapapi.invoke("enableScrollWheelZoom");
});
})
// self.map = map;
// return self.map;
},
toggleMapType: function(type) {
var self = this;
console.log(type,888)
if (type) {
// 构造官方卫星、路网图层
......@@ -258,7 +258,7 @@ MapService.prototype = {
},
createCircle: function(lnglatXY, map, radius) {
let that=this,
Circle= that.map.invoke('Circle', lnglatXY, radius, {
Circle= that.map.invoke('Circle', lnglatXY, radius, {
strokeColor: '#094',
fillColor: '#094',
strokeWeight: 1,
......@@ -269,7 +269,7 @@ MapService.prototype = {
},
createPoint: function(lnglatXY, map) {
let that=this,
Circle= that.map.invoke('Circle', lnglatXY, 3, {
Circle= that.map.invoke('Circle', lnglatXY, 3, {
strokeColor: '#094',
fillColor: '#094',
strokeWeight: 3,
......@@ -284,17 +284,17 @@ MapService.prototype = {
enableAutoPan:!!isInfoAutoMove
})
marker.openInfoWindow = infoWindow;
if (clipboard) {
clipboard.destroy();
}
if (isInfoOpen) {
infoWindow.redraw();
}
//给Marker绑定单击事件
// marker.addEventListener('click', markerClick);
self.map.invoke('markerAddEventListener','click',markerClick)
......@@ -313,12 +313,12 @@ MapService.prototype = {
console.log(e,'err')
});
})
function markerClick(e) {
//infoWindow.setContent(e.target.content);
self.map.invoke("mapOpenInfoWindow", infoWindow,e.target.getPosition())
// infoWindow.open(map, e.target.getPosition());
}
return infoWindow;
......@@ -372,7 +372,7 @@ MapService.prototype = {
// 基站
baseBtn && (baseBtn.onclick = function(e) {
if (info.eLocateType === 'bsLocation') return;
info.eLocateType = 'bsLocation'
eLocation = info[info.eLocateType];
......@@ -511,9 +511,9 @@ MapService.prototype = {
// 跳转到风险评估页面 无线设备不显示按钮 info.deviceCompose=010/020/011/012/013/022,需要有风险评估按钮出现
let riskBtn = infoDiv.querySelector('[data-risk]');
if (riskBtn) {
if (info.deviceCompose != '010' && info.deviceCompose != '020' && info.deviceCompose != '011' && info.deviceCompose != '012' && info.deviceCompose != '013' && info.deviceCompose != '022') {
riskBtn.classList.add('resident_btn_hidden');
}
// if (info.deviceCompose != '010' && info.deviceCompose != '020' && info.deviceCompose != '011' && info.deviceCompose != '012' && info.deviceCompose != '013' && info.deviceCompose != '022') {
// riskBtn.classList.add('resident_btn_hidden');
// }
riskBtn.onclick = function() {
let id = localStorage.getItem('vehicleId');
queryCode = `vehicleId=${id}`
......@@ -715,7 +715,7 @@ MapService.prototype = {
if (n && info.licensePlate) {
_html += `<p><i class="icon_info_plate"></i>车牌号: <span class="des copy-btn" aria-label="${info.licensePlate}">${info.licensePlate || '--'}</span></p>`;
}
}
console.log(info,'info')
_html += `<p class="" aria-label="${info.sn}"><i class="icon icon-info_device"></i> 设备号:<span class="des copy-btn" aria-label="${info.sn}(${info.isSource === '1' ? '有线' : '无线'})"> ${info.sn} (${info.isSource === '1' ? '有线' : '无线'})</span>
......@@ -725,7 +725,7 @@ MapService.prototype = {
<i class="text" data-battery-text></i>
</span></p>
<p><i class="icon icon-info_device_status"></i> 设备状态: <span class="des copy-btn" data-status aria-label=""></span></p>
<p data-alarm>
<p data-alarm>
<button type="button" class="el-button el-button--mini el-button--primary" data-alarmoff>断电</button>
<button type="button" class="el-button el-button--mini el-button--primary" data-alarmlight>光感</button>
</p>
......@@ -781,8 +781,8 @@ MapService.prototype = {
<a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
</p>
<p>
<i class="icon icon-info_type"></i>
定位类型:
<i class="icon icon-info_type"></i>
定位类型:
<a class="locate-btn active" id="locateTypeGps">GPS</a>
<a class="locate-btn" id="locateTypeBase">基站</a>
</p>
......@@ -984,4 +984,4 @@ MapService.prototype = {
const mapService = new MapService();
export default mapService
\ No newline at end of file
export default mapService
......@@ -82,12 +82,12 @@ MapService.prototype = {
// 地图上设置图层
self.map.remove(self.mixLayers);
/*self.map.plugin(["AMap.MapType"],function(){
//地图类型切换
var type = new window.AMap.MapType({
defaultType: self.type
});
self.map.addControl(type);
/*self.map.plugin(["AMap.MapType"],function(){
//地图类型切换
var type = new window.AMap.MapType({
defaultType: self.type
});
self.map.addControl(type);
});*/
}
},
......@@ -323,14 +323,14 @@ MapService.prototype = {
// console.error('Action:', e.action)
// console.error('Trigger:', e.trigger)
// })
// if (isInfoOpen) {
// infoWindow.open(map, marker.getPosition())
// }
// //给Marker绑定单击事件
// marker.on('click', markerClick)
// function markerClick(e) {
// //infoWindow.setContent(e.target.content);
// infoWindow.open(map, e.target.getPosition())
......@@ -531,9 +531,9 @@ MapService.prototype = {
// 跳转到风险评估页面 无线设备不显示按钮 info.deviceCompose=010/020/011/012/013/022,需要有风险评估按钮出现
let riskBtn = infoDiv.querySelector('[data-risk]');
if (riskBtn) {
if (info.deviceCompose != '010' && info.deviceCompose != '020' && info.deviceCompose != '011' && info.deviceCompose != '012' && info.deviceCompose != '013' && info.deviceCompose != '022') {
riskBtn.classList.add('resident_btn_hidden');
}
// if (info.deviceCompose != '010' && info.deviceCompose != '020' && info.deviceCompose != '011' && info.deviceCompose != '012' && info.deviceCompose != '013' && info.deviceCompose != '022') {
// riskBtn.classList.add('resident_btn_hidden');
// }
riskBtn.onclick = function() {
let id = localStorage.getItem('vehicleId');
queryCode = `vehicleId=${id}`
......@@ -743,7 +743,7 @@ MapService.prototype = {
<i class="text" data-battery-text></i>
</span></p>
<p><i class="icon icon-info_device_status"></i> 设备状态: <span class="des copy-btn" data-status aria-label=""></span></p>
<p data-alarm>
<p data-alarm>
<button type="button" class="el-button el-button--mini el-button--primary" data-alarmoff>断电</button>
<button type="button" class="el-button el-button--mini el-button--primary" data-alarmlight>光感</button>
</p>
......@@ -797,7 +797,7 @@ MapService.prototype = {
// <i class="text" data-battery-text></i>
// </span></p>
// <p><i class="icon icon-info_device_status"></i> 设备状态: <span class="des" data-status></span></p>
// <p data-alarm>
// <p data-alarm>
// <button type="button" class="el-button el-button--mini el-button--primary" data-alarmoff>断电</button>
// <button type="button" class="el-button el-button--mini el-button--primary" data-alarmlight>光感</button>
......@@ -806,12 +806,12 @@ MapService.prototype = {
// <p><i class="icon icon-info_location"></i> 最后上点地址: <span class="des adr" data-transferAddress>${info.transferAddress}</span>
// <a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
// </p>
// <p><i class="icon icon-info_type"></i> 定位类型:
// <p><i class="icon icon-info_type"></i> 定位类型:
// ${info.wifiType===1?
// (info.eLocateSingle?
// (info.eLocateType==='gpsLocation'?
// `<span class="el-button-group">
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
// </span>`:
// `<span class="el-button-group">
......@@ -820,7 +820,7 @@ MapService.prototype = {
// </span>`
// ):
// `<span class="el-button-group">
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini" data-base>基站</button>
// <button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
// </span>`
......@@ -829,7 +829,7 @@ MapService.prototype = {
// (info.eLocateType==='gpsLocation'?`<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button> `:
// `<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>`):
// `<span class="el-button-group">
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini" data-base>基站</button>
// </span>`
// }
......@@ -858,8 +858,8 @@ MapService.prototype = {
<a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
</p>
<p>
<i class="icon icon-info_type"></i>
定位类型:
<i class="icon icon-info_type"></i>
定位类型:
<a class="locate-btn active" id="locateTypeGps">GPS</a>
<a class="locate-btn" id="locateTypeBase">基站</a>
</p>
......@@ -1043,4 +1043,4 @@ MapService.prototype = {
const mapService = new MapService();
export default mapService
\ No newline at end of file
export default mapService
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!