diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index 3f697a41..40f6b3fc 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -47,7 +47,7 @@ export const eventMap = { cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.(); - cacheRemoveFunc.DriveTestEquipment_Camera_Remove = setMarkToMap.call( + cacheRemoveFunc.DriveTestEquipment_Camera_Remove = await setMarkToMap.call( this, item, data, @@ -96,13 +96,17 @@ export const eventMap = { cacheRemoveFunc.Driving_Guidance_Remove?.(); - cacheRemoveFunc.Driving_Guidance_Remove = setMarkToMap.call( + let noneLocation = true; + + cacheRemoveFunc.Driving_Guidance_Remove = await setMarkToMap.call( this, item, data, (item) => { const { lng, lat } = PilePointJSON[item.stakeMarkId] || {}; + if (lng && lat) noneLocation = false; + return { lnglat: [lng, lat], }; @@ -114,6 +118,8 @@ export const eventMap = { }; } ); + + if (noneLocation) Message.warning("匹配到诱导设备位置!"); // cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.(); }, }; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index eb721cfe..f6671b09 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -1,4 +1,5 @@ import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.js"; +import { Message } from "element-ui"; /** * @typedef {Object} Point @@ -24,6 +25,8 @@ export async function setMarkerCluster(map, points, markerFun) { let hasClick = false; + if (!points.length) Message.warning("匹配到对应坐标点"); + const markerCluster = new AMap.MarkerCluster(map, points, { // gridSize: 15, maxZoom: 15, @@ -94,7 +97,7 @@ export async function setMarkerCluster(map, points, markerFun) { * @param {*} _markerClick marker 点击 * @returns */ -export function setMarkToMap(item, data, resolveMarker, _markerClick) { +export async function setMarkToMap(item, data, resolveMarker, _markerClick) { const { mapIns } = this.getMap(); if (!mapIns) return Message.error("地图加载失败!"); @@ -118,7 +121,7 @@ export function setMarkToMap(item, data, resolveMarker, _markerClick) { _markerClick(extData, e); }; - const markerCluster = setMarkerCluster( + const markerCluster = await setMarkerCluster( mapIns, data.map((item) => { const { lnglat, content } = resolveMarker(item); @@ -153,7 +156,11 @@ export function setMarkToMap(item, data, resolveMarker, _markerClick) { markerClick ); - mapIns.setFitView(markerCluster.U, false, [360, 360, 360, 360]); + mapIns.setZoom(9); + + setTimeout(() => { + mapIns.setFitView([...markerCluster.U], false, [0, 0, 0, 0]); + }); return () => markerCluster.setMap(null); } diff --git a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss index 60159e30..148fe407 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss +++ b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss @@ -282,14 +282,11 @@ div.el-scrollbar { } body { - input.el-input__inner { + input.el-input__inner, + textarea.el-textarea__inner { background-color: #0d5f79; color: #fff; border-radius: 2px; - border: 0; - height: 100%; - min-height: fit-content; - line-height: unset; &::placeholder { color: #fff; @@ -298,6 +295,10 @@ body { div.el-input { input.el-input__inner { + border: 0; + height: 100%; + min-height: fit-content; + line-height: unset; font-size: 12px; } @@ -311,7 +312,6 @@ body { textarea.el-textarea__inner { background: #0a3e54; border-radius: 5px; - opacity: 1; border: 1px solid rgba(98, 224, 254, 0.6); }