Commit 33daadfd authored by xxx's avatar xxx

1

parent 5e94f224
......@@ -2225,7 +2225,7 @@ var HttpReq = function(){
params:param,
})
},
//获取地图车辆轨迹——获取轨迹列表
//获取地图车辆轨迹——获取停车时间以及地点轨迹列表
mineAlarmHistoryCountQuery: function(param){
return request({
url: '/api/mineAlarmHistory/Count',
......@@ -2233,6 +2233,14 @@ var HttpReq = function(){
params:param,
})
},
//获取地图车辆轨迹——获取轨迹播放时间列表
apiMineAlarmHistoryTongJiQuery: function(param){
return request({
url: '/api/mineAlarmHistory/TongJi',
method: 'get',
params:param,
})
},
//获取地图车辆轨迹——获取所有实时坐标
getAllNewTimeCarTrajectoryQuery: function(param){
return request({
......
......@@ -94,6 +94,7 @@ export default {
that.deviceId = equipmentName;
that.carNumber = number;
that.carPlaySpeed = speed;
console.log(that.carPlaySpeed);
that.stopPointData = stopPointData;
that.leadTime = leadTimeShow;
//获取历史轨迹
......
......@@ -17,9 +17,7 @@
</el-form-item>
<el-form-item label="*车牌号" style="display: inline-block;">
<el-select v-model="query.number" placeholder="请选择车牌号">
<el-option v-for="(obj,index) in carInformationData" :label="obj.number" :value="obj.number" :key="index"></el-option>
</el-select>
<el-cascader v-model="carInforValue" :options="carInformationData" @change="handleChange"></el-cascader>
</el-form-item>
<el-button type="success" icon="el-icon-search" @click="toSearch" style="display: inline-block;">搜索</el-button>
......@@ -58,8 +56,8 @@
<div class="trajectoryTableView">
<div style="font-size:20px;font-weight: 600;">播放时间列表</div>
<el-table :data="playtimeTableData" border height="58.5vh">
<el-table-column prop="date" label="启动时间" align="center"></el-table-column>
<el-table-column prop="name" label="停车时间" align="center"></el-table-column>
<el-table-column prop="bTime" label="启动时间" align="center"></el-table-column>
<el-table-column prop="eTime" label="停车时间" align="center"></el-table-column>
</el-table>
</div>
<div class="tishiTextStyle" v-if="tishiTextShow">请选择车辆查看轨迹</div>
......@@ -84,6 +82,7 @@ export default {
return {
//地图图片
configUrl: basePathUrl + 'config/config.json',
carInforValue:[],
query:{
number:'',
bTime:'',
......@@ -91,7 +90,7 @@ export default {
},
carInformationData:[],
shuaxinTimer:null,
playSpeedNum:5,
playSpeedNum:1,
tishiTextShow:true,
//停车时间以及地点数据
trajectoryTableData:[],
......@@ -191,11 +190,11 @@ export default {
}
})
//获取右侧播放时间列表
// HttpReq.truckDispatching.mineAlarmHistoryCountQuery({number:this.query.number,bTime:this.query.bTime,eTime:this.query.eTime}).then((res1) => {
// if(res1.code == 200){
// }
// })
HttpReq.truckDispatching.apiMineAlarmHistoryTongJiQuery({number:this.query.number,bTime:this.query.bTime,eTime:this.query.eTime}).then((res1) => {
if(res1.code == 200){
this.playtimeTableData = res1.data;
}
})
}else{
this.$notify({
title: '暂无该车辆轨迹信息!',
......@@ -208,13 +207,12 @@ export default {
},
// 重置搜索
clearLimit(){
this.query = {
number:'',
bTime:'',
eTime:'',
};
this.playSpeedNum = 5;
this.query = {number:'',bTime:'',eTime:''};
this.carInforValue = [];
this.playSpeedNum = 1;
this.trajectoryTableData = [];
this.playtimeTableData = [];
this.trajectoryTimePoint = '';
this.loadData();
this.tishiTextShow = true;
this.shuaxinTimer = new Date().getTime();
......@@ -224,20 +222,42 @@ export default {
//获取数据
loadData() {
this.$nextTick(()=>{
//获取车队
let arr1 = [];
HttpReq.truckDispatching.carFleetQuery({size:9999}).then((res1) => {
if(res1.code == 200){
//获取车辆信息
HttpReq.truckDispatching.carInformationQuery({size:9999}).then((res) => {
if(res.code == 200){;
this.carInformationData = res.data.content;
HttpReq.truckDispatching.carInformationQuery({size:9999}).then((res2) => {
if(res2.code == 200){
res1.data.content.forEach((item1,index1)=>{
let obj1 = {};
obj1.value = item1.name;
obj1.label = item1.name;
obj1.children = [];
res2.data.content.forEach((item2,index2)=>{
if(item1.name == item2.road){
let obj2 = {};
obj2.value = item2.number;
obj2.label = item2.number;
obj1.children.push(obj2);
}
})
arr1.push(obj1);
})
this.carInformationData = arr1;
}
})
}
})
})
},
//改变倍速
changeSpeed(num){
let that = this;
let numSpeed1 = 5 / parseFloat(num);
this.playSpeedNum = parseFloat(numSpeed1);
let numSpeed1 = parseFloat(num);
this.playSpeedNum = parseFloat(num);
if(this.query.number == '' || this.query.bTime == '' || this.query.eTime == ''){
return;
}else{
......@@ -274,6 +294,14 @@ export default {
})
}
},
//选择车辆级联器
handleChange(){
if(this.carInforValue.length == 2){
this.query.number = this.carInforValue[1];
}else{
this.query.number = '';
}
},
// 地图构造完成回调
onMapload(map) {
// 以下为演示代码
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment