yangteng 11 meses atrás
pai
commit
49f2c75991

+ 1
- 1
manifest.json Ver arquivo

@@ -73,7 +73,7 @@
"requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"],
"plugins": {
"issuer-plugin": {
"version": "dev-604af333551579b2530b6618e6e72ba4",
"version": "dev-77e73031102e639429892ac2a7f542f7",
"provider": "wxa2d9acdd1054e69b"
}
}

+ 31
- 1
subpackage/carPark/etc/etcDeviceInfo.vue Ver arquivo

@@ -163,7 +163,7 @@
} from "@/utils/util/fileData.js";
import {
getVehicleType
} from "@/subpackage/after-sale/js/vehicleType.js"
} from "@/subpackage/carPark/js/vehicleType.js"
import {
getVehiclePlateColor
} from "@/datas/vehiclePlateColor.js"
@@ -388,6 +388,35 @@
let arr = [cmd.OBU_DF01, cmd.OBU_00B400000A + rand + cmd.OBU_4F00];
bluetoothUtil.transCmd(arr, '20', function(res) {
console.log("解密信息kc没问题",res);
let str2 = res[1].substring(res[1].length - 4, res[1].length);
if (str2 == "9000") {
console.log("===========", obu.num, res[1].substring(0, res[1].length -
4))
decryptObuVehicleInfo(obu.num, res[1].substring(0, res[1].length - 4),
function(res) {
console.log("obu信息", '车辆类型', res, res.substring(28, 30),
HexToInt(res.substring(28, 30)));
obu.approvedCount = HexToInt(res.substring(48, 54));
obu.axleCount = HexToInt(res.substring(42, 44));
obu.axleDistance = HexToInt(res.substring(44, 48));
obu.engineNum = HexToStrig(res.substring(86, 118));
obu.type = getVehicleType(HexToInt(res.substring(28, 30)));
obu.userType = HexToInt(res.substring(30, 32)) == 1 ?
"个人用户" :
"单位用户";
obu.vehiclePlate = HexToStrig(res.substring(0, 24), 2);
//获取车牌颜色
obu.vehiclePlateColor = getVehiclePlateColor(HexToInt(res
.substring(24, 28)));
obu.vin = HexToStrig(res.substring(54, 86));
obu.wheelCount = HexToInt(res.substring(40, 42));
obu.outsideDimensions = HexToInt(res.substring(32, 36)) +
"x" +
HexToInt(res.substring(36, 38)) + "x" + HexToInt(res
.substring(38, 40))
tools.hideLoadingAlert();
});
}
})
return;
let str = res[1].substring(res[1].length - 4, res[1].length);
@@ -441,6 +470,7 @@
//断开蓝牙
bluetoothUtil.disconnectDevice();
tools.showToastAlert("蓝牙已断开");
console.log('蓝牙已断开=========')
return;
}

+ 49
- 0
subpackage/carPark/js/vehicleType.js Ver arquivo

@@ -0,0 +1,49 @@
//车辆类型
export const vehicleType = [
{
id: 1,
title: '一型客车'
},
{
id: 2,
title: '二型客车'
},
{
id: 3,
title: '三型客车'
},
{
id: 4,
title: '四型客车'
},
{
id: 11,
title: '一型货车'
},
{
id: 12,
title: '二型货车'
},
{
id: 13,
title: '三型货车'
},
{
id: 14,
title: '四型货车'
},
{
id: 15,
title: '五型货车'
},
{
id: 16,
title: '六型货车'
}
];
//获取车辆类型
export const getVehicleType = (id=1) => {
let types = vehicleType.filter(item => item.id == id);
return types[0] ? types[0].title : '';
}


Carregando…
Cancelar
Salvar