From 824fa513365224925c362f0374605aa1b3aedc68 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, 28 Feb 2023 15:14:41 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=A6=E8=BE=86=E7=9B=91?=
=?UTF-8?q?=E6=B5=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../realTimeMonitoring/vehicleMonitoring.js | 2 +-
ruoyi-ui/src/utils/request.js | 9 +
.../vehicleMonitoring/index.vue | 159 +++---------------
3 files changed, 38 insertions(+), 132 deletions(-)
diff --git a/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js b/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js
index 7f77d03..381fd12 100644
--- a/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js
+++ b/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js
@@ -4,7 +4,7 @@ import request from '@/utils/request'
export function getCarGpsList(query) {
return request({
url: '/basecar/car/getCarGpsList',
- method: 'post',
+ method: 'get',
params: query
})
}
diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index ddc5fcb..5678897 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -47,6 +47,15 @@ service.interceptors.request.use(config => {
config.params = {};
config.url = url;
}
+ if (config.method === 'post') {
+ config.data = typeof config.data === 'object' ? JSON.stringify({
+ ...config.data,
+ lang
+ }) : JSON.stringify({
+ ...JSON.parse(config.data || '{}'),
+ lang
+ });
+ }
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
const requestObj = {
url: config.url,
diff --git a/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue
index 6137cfb..a9199dc 100644
--- a/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue
+++ b/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue
@@ -1,153 +1,52 @@