|
@@ -215,15 +215,19 @@ export default {
|
|
throw new Error('设置默认参数')
|
|
throw new Error('设置默认参数')
|
|
}
|
|
}
|
|
// 判断是否存在无牌车
|
|
// 判断是否存在无牌车
|
|
- const vehicleNo = vehicles[0].vehicleNo
|
|
|
|
|
|
+ const noUnVehicles = vehicles.filter(elm => elm.vehicleNo.indexOf('临') < 0)
|
|
|
|
+ if(!noUnVehicles.length) {
|
|
|
|
+ throw new Error('设置默认参数')
|
|
|
|
+ }
|
|
|
|
+ const vehicleNo = noUnVehicles[0].vehicleNo
|
|
if(vehicleNo.indexOf('临') > -1) {
|
|
if(vehicleNo.indexOf('临') > -1) {
|
|
throw new Error('设置默认参数')
|
|
throw new Error('设置默认参数')
|
|
}
|
|
}
|
|
// 设置车牌类型
|
|
// 设置车牌类型
|
|
- this.setVehicleNoType(vehicleNo, vehicles)
|
|
|
|
|
|
+ this.setVehicleNoType(vehicleNo, noUnVehicles)
|
|
// 赋值
|
|
// 赋值
|
|
- this.numArr = vehicles[0].vehicleNo.split('');
|
|
|
|
- this.vehicleNumber = vehicles[0].vehicleNo;
|
|
|
|
|
|
+ this.numArr = vehicleNo.split('');
|
|
|
|
+ this.vehicleNumber = vehicleNo;
|
|
} catch (e) {
|
|
} catch (e) {
|
|
// 设置默认参数
|
|
// 设置默认参数
|
|
this.numArr = '浙,A,,,,,'.split(',')
|
|
this.numArr = '浙,A,,,,,'.split(',')
|