|
|
@@ -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; |
|
|
|
} |