加入6107设备页面、蓝牙配对模式修复首次进入找不到设备的问题
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
<view class="vehicle-list" v-if="vehicles.length>0">
|
||||
<view v-for="(item, index) in vehicles" :key="index">
|
||||
<view class="vehicle-item" @click="alltypeInfo(item)">
|
||||
<image src="/static/images/common/bip.6.png" mode="" class="IMG"></image>
|
||||
<image :src="item.img" mode="aspectFit" class="IMG"></image>
|
||||
</view>
|
||||
<view class="plate-number">{{ item.typeName }}</view>
|
||||
</view>
|
||||
@ -25,13 +25,88 @@
|
||||
data() {
|
||||
return {
|
||||
vehicles: [],
|
||||
typeImgs: [{
|
||||
"Name": "HBY018A",
|
||||
"sigName": "018A",
|
||||
"url": "/static/images/common/018A.png"
|
||||
},
|
||||
{
|
||||
"Name": "HBY102",
|
||||
"sigName": "102",
|
||||
"url": "/static/images/common/HBY102.png"
|
||||
},
|
||||
{
|
||||
"Name": "BJQ6075",
|
||||
"sigName": "6075",
|
||||
"url": "/static/images/common/BJQ6075.png"
|
||||
},
|
||||
{
|
||||
"Name": "HBY100",
|
||||
"sigName": "100",
|
||||
"url": "/static/images/common/HBY100J.png"
|
||||
},
|
||||
{
|
||||
"Name": "BJQ4877",
|
||||
"sigName": "4877",
|
||||
"url": "/static/images/common/BJQ4877.png"
|
||||
},
|
||||
{
|
||||
"Name": "BJQ7307",
|
||||
"sigName": "7307",
|
||||
"url": "/static/images/common/7307.png"
|
||||
},
|
||||
{
|
||||
"Name": "BJQ7305",
|
||||
"sigName": "7305",
|
||||
"url": "/static/images/common/7305.png"
|
||||
},
|
||||
{
|
||||
"Name": "HBY650",
|
||||
"sigName": "650",
|
||||
"url": "/static/images/common/HBY650.png"
|
||||
},
|
||||
{
|
||||
"Name": "BJQ6155",
|
||||
"sigName": "6155",
|
||||
"url": "/static/images/common/HBY6155.png"
|
||||
},
|
||||
{
|
||||
"Name": "HBY670",
|
||||
"sigName": "670",
|
||||
"url": "/static/images/common/HBY670.png"
|
||||
},
|
||||
{
|
||||
"Name": "HBY210",
|
||||
"sigName": "210",
|
||||
"url": "/static/images/common/210.png"
|
||||
},
|
||||
{
|
||||
"Name": "BJQ6170",
|
||||
"sigName": "6170",
|
||||
"url": "/static/images/common/bip.6.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTab() {
|
||||
deviceTypeList({}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.vehicles = res.data
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
var item = res.data[i];
|
||||
|
||||
item.img="/static/images/common/bip.6.png";
|
||||
let f=this.typeImgs.find(v=>{
|
||||
if(item.typeName.toLowerCase()===v.Name.toLowerCase()){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if(f){
|
||||
item.img=f.url;
|
||||
}
|
||||
}
|
||||
this.vehicles = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user