Commit 750ae3d4 authored by xxx's avatar xxx

1

parent af14f022
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<script> <script>
import { httpGet, httpPostForJson, putForJson, httpDelForJson} from "@/common/httpBean.js" import { httpGet, httpPostForJson, putForJson, httpDelForJson} from "@/common/httpBean.js"
import {vehicleInformationQuery,vehicleRealTimeQuery} from "@/axios/api.js" import {vehicleInformationQuery,vehicleRealTimeQuery2} from "@/axios/api.js"
export default { export default {
data() { data() {
...@@ -100,13 +100,9 @@ export default { ...@@ -100,13 +100,9 @@ export default {
} }
} }
}); });
httpGet(vehicleRealTimeQuery,{number:byValue}).then((res) => { httpGet(vehicleRealTimeQuery2,{number:byValue}).then((res) => {
if(res.code == 200){ if(res.code == 200){
if(res.data.totalElements == 0){ this.realTimeData = res.data;
return
}else{
this.realTimeData = res.data.content[0];
}
} }
}); });
}, },
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<script> <script>
import { httpGet, httpPostForJson, putForJson, httpDelForJson} from "@/common/httpBean.js" import { httpGet, httpPostForJson, putForJson, httpDelForJson} from "@/common/httpBean.js"
import {vehicleRealTimeQuery} from "@/axios/api.js" import {vehicleRealTimeQuery2} from "@/axios/api.js"
export default { export default {
data() { data() {
...@@ -46,14 +46,10 @@ export default { ...@@ -46,14 +46,10 @@ export default {
this.showDecide = true; this.showDecide = true;
this.carnumber = carnumber; this.carnumber = carnumber;
//获取实时数据 //获取实时数据
httpGet(vehicleRealTimeQuery,{number:this.carnumber}).then((res) => { httpGet(vehicleRealTimeQuery2,{number:this.carnumber}).then((res) => {
if(res.code == 200){ if(res.code == 200){
if(res.data.totalElements == 0){
return
}else{
this.carInformationData2 = res.data.content[0]; this.carInformationData2 = res.data.content[0];
} }
}
}); });
}, },
carInCloseFn(){ carInCloseFn(){
......
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