From 7d77a60897750639434df0f33edf3abc076f237e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com>
Date: Tue, 14 Feb 2023 11:32:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/views/basecar/car/index.vue | 64 +++++--------------
.../vehicleMonitoring/index.vue | 10 ++-
2 files changed, 26 insertions(+), 48 deletions(-)
diff --git a/ruoyi-ui/src/views/basecar/car/index.vue b/ruoyi-ui/src/views/basecar/car/index.vue
index 24b2275..41e9d68 100644
--- a/ruoyi-ui/src/views/basecar/car/index.vue
+++ b/ruoyi-ui/src/views/basecar/car/index.vue
@@ -33,10 +33,10 @@
{{ t('option.edit') }}
@@ -44,22 +44,22 @@
{{ t('option.remove') }}
{{ t('option.export') }}
@@ -68,45 +68,14 @@
-
-
-
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -124,9 +93,9 @@
@@ -319,6 +288,7 @@ function handleBang(row){
/** 提交按钮 */
function submitForm() {
+ console.log(form)
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.id != undefined) {
diff --git a/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue
index 23c118e..630f732 100644
--- a/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue
+++ b/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue
@@ -129,13 +129,21 @@ const setMarker = async () => {
}
const setLine = async () => {
+ let path = [[116.478935, 39.997761], [103.85094, 35.987496], [106.205794, 38.458831], [108.983569, 34.285675], [111.761777, 40.875595]]
let polyline = new AMap.Polyline({
- path: [[116.478935, 39.997761], [103.85094, 35.987496], [106.205794, 38.458831], [108.983569, 34.285675], [111.761777, 40.875595]],
+ path:path,
showDir: true,
strokeColor: '#77DDFF', // 线颜色--浅蓝色
strokeWeight: 6, // 线宽
lineJoin: 'round', // 折线拐点的绘制样式
})
+ let distance = Math.round(AMap.GeometryUtil.distanceOfLine(path));
+ let text = new AMap.Text({
+ position: new AMap.LngLat(path[path.length-1][0],path[path.length-1][1]),
+ text: '路径长' + distance + '米',
+ offset: new AMap.Pixel(0, 0)
+ })
+ map.add(text);
map.add(polyline);
}