Compare commits

...

10 Commits

Author SHA1 Message Date
chaiyapeng 1e97ff6504 fix:修改背景图和项目名称 2024-10-12 09:23:41 +08:00
chaiyapeng 77698cef0e Merge remote-tracking branch 'origin/master' 2024-10-11 22:11:50 +08:00
chaiyapeng 512a0bd2fb fix:修改背景图和项目名称 2024-10-11 22:11:38 +08:00
wxy d32509d544 Merge remote-tracking branch 'origin/master' 2024-10-11 21:59:00 +08:00
wxy 9925006c56 在车辆轨迹组件中添加数据获取提示
在尝试获取车辆轨迹数据后,现在会显示一个提示,展示获取到的车辆经度信息。
2024-10-11 21:57:43 +08:00
chaiyapeng 07165fec7c Merge remote-tracking branch 'origin/master' 2024-10-11 14:58:28 +08:00
wxy 8cd6aa7a01 传递车辆识别码(carVin)作为查询参数。 2024-09-29 20:31:28 +08:00
wxy dbfd9652f9 在HTML头部嵌入高德地图API脚本,用于初始化地图服务。fix(car/trajectory): 设置正确的间隔时间并修复carVin属性格式- 修正了定时器设置,将每隔10秒调用fetchData方法,以确保数据获取频率符合预期。
- 修正了carVin属性的格式,移除了不必要的空格,保持代码的一致性和清洁性。
2024-09-29 20:26:28 +08:00
wxy 0a61d647fa 在HTML头部嵌入高德地图API脚本,用于初始化地图服务。 2024-09-29 20:09:17 +08:00
wxy 0932ed3cd2 ```调整fetchData方法的定时器间隔为2秒
在`index.vue`的`created`钩子中,更新了定时器的间隔时间,从之前的10秒调整为2秒,以提高数据获取的频率。
```
2024-09-29 10:14:36 +08:00
7 changed files with 24 additions and 40 deletions

View File

@ -9,6 +9,8 @@
<title><%= webpackConfig.name %></title>
<!--[if lt IE 11]>
<script>window.location.href = '/html/ie.html';</script><![endif]-->
<script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=bec0cf8516dae626fd99eb46944e3843"></script>
<style>
html,
body,

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -31,6 +31,13 @@
</el-table-column>
<el-table-column width="150" align="center" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-takeaway-box"
@click="cs(scope.row)"
>自己測試用*
</el-button>
<el-button
size="mini"
type="text"
@ -192,6 +199,14 @@ import {listManager , getManagerId , addManager,updateManager,delManager} from "
};
},
methods: {
cs(row){
const carVin = row.carVin;
alert(carVin);
this.$router.push({
path: `/vehicleManagement/record`,
query: { carVin }
});
},
//
findStrategy(row){
findStrategyList(3).then(res=>{

View File

@ -69,20 +69,21 @@ export default {
map: null,
polyline: null,
carMarker: null,
carVin: this.$route.query.carVin || null ,
carVin: this.$route.query.carVin || null,
intervalId: null,
data: {}, //
};
},
created() {
// fetchData
this.intervalId = setInterval(this.fetchData, 1000); // 1000010
this.intervalId = setInterval(this.fetchData, 10000); // 1000010
},
methods: {
async fetchData() {
try {
const res = await getDataByRedis(this.carVin);
this.data = res.data;
alert(res.data.longitude);
//
this.updateCarMarker();
@ -128,40 +129,6 @@ export default {
}
},
},
// methods: {
// fetchData() {
// getDataByRedis(this.carVin).then(res=>{
// this.data = res.data
// })
// },
// initMap() {
// this.map = new AMap.Map('map', {
// center: [116.397428, 39.90923], //
// zoom: 13, //
// });
//
// // 线
// this.polyline = new AMap.Polyline({
// map: this.map,
// path: [], //
// strokeColor: "#FF0000", // 线
// strokeWeight: 5, // 线
// });
//
// //
// setInterval(this.updateTrajectory, 1100);
// },
// updateTrajectory() {
// //
// const newPoint = [this.data.longitude, this.data.latitude];
// // 线
// const path = this.polyline.getPath();
// path.push(newPoint);
// this.polyline.setPath(path);
// //
// this.map.setCenter(newPoint);
// },
// },
mounted() {
this.initMap();
},

View File

@ -1,7 +1,7 @@
<template>
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">智慧车辆系统</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
@ -162,7 +162,7 @@ export default {
justify-content: center;
align-items: center;
height: 100%;
background-image: url("../assets/images/login-background.jpg");
background-image: url("../assets/images/car.jpg");
background-size: cover;
}

View File

@ -1,7 +1,7 @@
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">智慧车辆系统</h3>
<el-form-item prop="deptId">
<el-select v-model="registerForm.deptId" placeholder="企业" type="deptId">
<el-option v-for="i in firm" :label="i.deptName" :value="i.deptId" :key="i.deptId"></el-option>
@ -160,7 +160,7 @@ export default {
justify-content: center;
align-items: center;
height: 100%;
background-image: url("../assets/images/login-background.jpg");
background-image: url("../assets/images/car.jpg");
background-size: cover;
}