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>
......
......@@ -10,14 +10,26 @@
</div>
<div class="main pie-main">
<glsx-image class="bg-img" src="detail-bg.png" />
<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="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.tips }}</span>
<span class="value" v-else>{{ pieList.length ? pieList[0].advise : '--' }}</span>
<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
*/
......@@ -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}`
......
......@@ -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}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!