|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
>
|
|
|
|
|
{{ item.carName }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="no-data" v-show="searchText">{{ searchText }}</div>
|
|
|
|
|
<div class="no-data" v-show="searchText">车辆不存在</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-collapse-transition>
|
|
|
|
|
</div>
|
|
|
|
@ -65,7 +65,7 @@ export default {
|
|
|
|
|
timer: null,
|
|
|
|
|
time2: null,
|
|
|
|
|
searchList: [],
|
|
|
|
|
searchText: "",
|
|
|
|
|
searchText: false,
|
|
|
|
|
searchQuery: {
|
|
|
|
|
carPlate: undefined, //车牌
|
|
|
|
|
plateColor: undefined, //车辆颜色
|
|
|
|
@ -477,15 +477,16 @@ export default {
|
|
|
|
|
// 清除轮询定时器
|
|
|
|
|
if (this.timer) clearInterval(this.timer);
|
|
|
|
|
const result = await getCarByCarplate(this.searchQuery);
|
|
|
|
|
if (result.list) {
|
|
|
|
|
this.searchText = "";
|
|
|
|
|
if (result.rspCode > 0) {
|
|
|
|
|
this.searchText = false;
|
|
|
|
|
if (result.list[0].stateCn.includes("离线")) {
|
|
|
|
|
this.$modal.msgError(`该车${result.list[0].stateCn}!`);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.searchList = result.list;
|
|
|
|
|
} else {
|
|
|
|
|
this.searchText = result.rspDesc;
|
|
|
|
|
this.searchText = true;
|
|
|
|
|
this.searchList = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.show = true;
|
|
|
|
@ -506,7 +507,7 @@ export default {
|
|
|
|
|
inputClear() {
|
|
|
|
|
if (this.timer) clearInterval(this.timer);
|
|
|
|
|
this.searchList = [];
|
|
|
|
|
this.searchText = "";
|
|
|
|
|
this.searchText = false;
|
|
|
|
|
this.searchQuery = {
|
|
|
|
|
carPlate: undefined, //车牌
|
|
|
|
|
plateColor: undefined, //车辆颜色
|
|
|
|
|