From e86b3edfe6d0cad7d744828a65ca1330e84fdcde Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 18 Oct 2023 10:51:57 +0800
Subject: [PATCH] Merge branch 'feature_1.0'
---
src/views/list/road.vue | 86 +++++++++++++++++++++++++++++-------------
1 files changed, 59 insertions(+), 27 deletions(-)
diff --git a/src/views/list/road.vue b/src/views/list/road.vue
index f5fc431..474d86c 100644
--- a/src/views/list/road.vue
+++ b/src/views/list/road.vue
@@ -2,17 +2,10 @@
<div style="display: flex; overflow: hidden">
<div class="left">
<div class="left-one">
- <a-range-picker
- v-model="timevalue"
- show-time
- @ok="change1()"
- valueFormat="yyyy-MM-DD HH:MM:SS"
- style="width: 175px"
- />
<a-select
ref="select"
v-model="carvalue"
- style="width: 180px; margin-left: 10px"
+ style="width: 180px"
placeholder="������������������"
>
<a-select-option
@@ -22,6 +15,14 @@
>{{ item.name }}</a-select-option
>
</a-select>
+ <a-range-picker
+ v-model="timevalue"
+ :show-time="{ format: 'HH:mm' }"
+ @ok="change1()"
+ format="YYYY-MM-DD HH:mm"
+ style="width: 175px; margin-left: 10px"
+ />
+
<a-button type="primary" style="margin-left: 10px" @click="selectCar"
>������</a-button
>
@@ -29,7 +30,16 @@
>������</a-button
>
</div>
-
+ <div class="left-five">
+ <a-input
+ style="width: 300px; margin-left: 0px"
+ v-model="selectLuName"
+ placeholder="���������������������"
+ />
+ <a-button type="primary" style="margin-left: 10px" @click="selectLu"
+ >������</a-button
+ >
+ </div>
<div class="left-two">
<a-table
:dataSource="dataSource"
@@ -113,22 +123,22 @@
<div>
<div>
<span style="font-size: 17.5px; color: black; margin-left: 50px"
- >������ :</span
+ >������������ :</span
>
<a-input
style="width: 300px; margin-left: 15px"
- placeholder="���������������"
+ placeholder="���������������������"
v-model="startLu"
/>
</div>
- <div style="margin-top: 10px; margin-left: 50px">
+ <!-- <div style="margin-top: 10px; margin-left: 50px">
<span style="font-size: 17.5px; color: black">������ :</span>
<a-input
style="width: 300px; margin-left: 15px"
placeholder="���������������"
v-model="endLu"
/>
- </div>
+ </div> -->
</div>
</a-modal>
<div class="right">
@@ -158,6 +168,7 @@
import axios from "axios";
import { jsonp } from 'vue-jsonp'
import any = jasmine.any;
+import { da } from "date-fns/locale";
@Component({
@@ -190,12 +201,8 @@
private tableLoading: boolean = false;
private columns: any[] = [
{
- title: "������",
+ title: "������������",
dataIndex: "startPoint"
- },
- {
- title: "������",
- dataIndex: "endPoint"
},
{
title: "������",
@@ -208,9 +215,15 @@
private startLu:any=''
private endLu:any=''
private insertCarLu(){
+ if(this.carvalue==='������������������'){
+ this.$message.warning('���������������������������!')
+ return
+ }
+
post('coordinate/interCruiserRoad',{
startPoint:this.startLu,
- endPoint:this.endLu
+ mac:this.carvalue
+
}).then((res)=>{
console.log(res);
this.$message.success(res.data.message)
@@ -220,6 +233,7 @@
this.selectLu()
})
}
+
private opRender(text: string, record: any, index: number) {
return (
<div style="width:180px">
@@ -310,7 +324,6 @@
time2:this.timevalue[1],
mac:this.carvalue,
}).then((res)=>{
- console.log(res);
this.carDate=[]
this.pointshow=true
this.setMarker(res)
@@ -321,7 +334,6 @@
coordinateId:this.recordid,
data:this.dataList
}).then((res)=>{
- console.log(res);
this.$message.success(res.data.message)
this.upa=''
this.dataList=[]
@@ -406,9 +418,9 @@
private carDataList:any=[]
private starttime:any=''
private endtime:any=''
+ private InfoWindow = null
private startstate:any='none'
private setMarker(res) {
- console.log(res);
const that=this
that.carDate=[]
that.carDataList=[]
@@ -418,8 +430,6 @@
for(var i=0;i<res.data.data.data.length;i++){
that.carDataList.push(res.data.data.data[i])
}
- console.log(that.carDate,'that.carDate');
- console.log(that.carDataList,'that.carDataList');
that.map.clearOverlays()
let bPoints = []
let aPoints = []
@@ -432,11 +442,22 @@
bPoints.push(statePoint)
that.marker[i] = new BMapGL.Marker(statePoint,{icon:myIcon});
that.marker[i].customData = {data: that.carDate[i].data,state: that.carDate[i].state};
+ var infoWindow ='';
+ //that.marker[i].name = that.carDate[i].time;
+ that.marker[i].on('mouseover', function (e) {
+ infoWindow = new BMapGL.InfoWindow("������������:"+that.carDate[i].time);
+ that.map.openInfoWindow(infoWindow, statePoint);
+ })
+
+ that.marker[i].on('mouseout', function (e) {
+ that.map.closeInfoWindow(infoWindow, statePoint);
+ })
+ // that.marker.setTitle(that.carDate[i].time);
+
//������������������marker
that.map.addOverlay(that.marker[i]);
// if(that.check===false){
that.marker[i].addEventListener("click",function(){
- console.log(that.carDate[i].data,'that.carDate[i].data');
switch(that.carDate[i].state){
case '1':
that.marker[i].setIcon(new BMapGL.Icon(require("@/assets/fb259ce2e368f6853a58b91d6f6b293.png"), new BMapGL.Size(50, 50)
@@ -478,6 +499,7 @@
// }
}
+
for (let i = 0; i < that.carDataList.length; i++) {
// console.log(that.carDataList[i],'that.carDataList[i]');
//������������point
@@ -531,15 +553,22 @@
}
}
}
+
private setZoom(bPoints) {
var view = this.map.getViewport(eval(bPoints));
var mapZoom = view.zoom;
var centerPoint = view.center;
this.map.centerAndZoom(centerPoint, mapZoom);
}
-
+ private selectLuName:any=null
private selectLu(){
+ var macType = null
+ if(this.carvalue!=='������������������'){
+ macType = this.carvalue;
+ }
get('coordinate/selectCruiserRoad',{
+ name:this.selectLuName,
+ mac:macType
}).then((res)=>{
this.dataSource=res.data.data
})
@@ -577,8 +606,11 @@
height: 60px;
border-bottom: 1px dashed gray;
}
+.left-five {
+ margin-top: 20px;
+}
.left-two {
- margin-top: 30px;
+ margin-top: 10px;
}
.BMap_Marker.BMap_noprint {
width: 23px;
--
Gitblit v1.8.0