|
|
|
|
|
|
|
|
state.changeColor = true; |
|
|
state.changeColor = true; |
|
|
state.phoneType = 0 |
|
|
state.phoneType = 0 |
|
|
state.isTakePhotoModeShow = false |
|
|
state.isTakePhotoModeShow = false |
|
|
console.log("图片地址val", val.tempImagePath) |
|
|
|
|
|
state.form.vehPosImgUrl = val.tempImagePath |
|
|
|
|
|
// uploadFile(val.tempImagePath, imageType, etcCarOcrCard).then((data) => { |
|
|
|
|
|
// // uploadFile(val.tempImagePath, state.choiceIndex, ocrAllQuery).then((data) => { |
|
|
|
|
|
// console.log('输出内容=====================', state.choiceIndex) |
|
|
|
|
|
// if (state.choiceIndex === "3") { |
|
|
|
|
|
// if (data.plate_a.length > 8) { |
|
|
|
|
|
// state.form.vehicleIdNum = data.plate_a.substring(0, 8); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// state.form.vehicleIdNum = data.plate_a; |
|
|
|
|
|
// } |
|
|
|
|
|
// state.form.man = data.man; |
|
|
|
|
|
// state.form.vehicleType = data.vehicle; |
|
|
|
|
|
// state.form.character = data.character; |
|
|
|
|
|
// state.form.vin = data.vin; |
|
|
|
|
|
// state.form.engineNum = data.engine; |
|
|
|
|
|
// state.form.register = data.register; |
|
|
|
|
|
// state.form.issueDate = data.issue; |
|
|
|
|
|
// state.form.vehPosImgUrl = data.imageUrl; |
|
|
|
|
|
// state.form.vehicleModel = data.model; |
|
|
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
// state.form.approvedCount = data.apc; |
|
|
|
|
|
// state.form.approvedCountShow = data.apc; |
|
|
|
|
|
// state.form.maintenaceMass = data.unladen; |
|
|
|
|
|
// state.form.maintenaceMassShow = data.unladen; |
|
|
|
|
|
// // 91接口差 |
|
|
|
|
|
// // // #ifdef MP-WEIXIN |
|
|
|
|
|
// // state.form.vehicleDimensions = data.overall.replaceAll("×", "X"); |
|
|
|
|
|
// // // #endif |
|
|
|
|
|
// // // #ifdef MP-ALIPAY |
|
|
|
|
|
// // state.form.vehicleDimensions = data.overall.replace(/×/g, "X"); |
|
|
|
|
|
// // // #endif |
|
|
|
|
|
|
|
|
|
|
|
// // let arr = data.overall.split("×"); |
|
|
|
|
|
// // #ifdef MP-WEIXIN |
|
|
|
|
|
// state.form.vehicleDimensions = data.overall.replaceAll("x", "X"); |
|
|
|
|
|
// // #endif |
|
|
|
|
|
// // #ifdef MP-ALIPAY |
|
|
|
|
|
// state.form.vehicleDimensions = data.overall.replace(/x/g, "X"); |
|
|
|
|
|
// // #endif |
|
|
|
|
|
|
|
|
|
|
|
// let arr = data.overall.split("x"); |
|
|
|
|
|
// state.outlineL = arr[0]; //外廓 长 |
|
|
|
|
|
// state.outlineW = arr[1]; //外廓 宽 |
|
|
|
|
|
// state.outlineH = arr[2].substring(0, arr[2].length - 2); //外廓 高 |
|
|
|
|
|
// state.form.totalMass = data.gross; |
|
|
|
|
|
// state.form.totalMassShow = data.gross; |
|
|
|
|
|
// state.form.vehNegImgUrl = data.imageUrl; |
|
|
|
|
|
// state.form.permittedWeight = data.alc ? data.alc : 0; |
|
|
|
|
|
// state.form.permittedTowWeight = data.towing ? data.towing : 0; |
|
|
|
|
|
// console.log('=====================', state.form.vehNegImgUrl, state) |
|
|
|
|
|
// } |
|
|
|
|
|
// state.isTakePhotoModeShow = false |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
uploadFile(val.tempImagePath, imageType, etcCarOcrCard).then((data) => { |
|
|
|
|
|
// uploadFile(val.tempImagePath, state.choiceIndex, ocrAllQuery).then((data) => { |
|
|
|
|
|
console.log('输出内容=====================', state.choiceIndex) |
|
|
|
|
|
if (state.choiceIndex === "3") { |
|
|
|
|
|
if (data.plate_a.length > 8) { |
|
|
|
|
|
state.form.vehicleIdNum = data.plate_a.substring(0, 8); |
|
|
|
|
|
} else { |
|
|
|
|
|
state.form.vehicleIdNum = data.plate_a; |
|
|
|
|
|
} |
|
|
|
|
|
state.form.man = data.man; |
|
|
|
|
|
state.form.vehicleType = data.vehicle; |
|
|
|
|
|
state.form.character = data.character; |
|
|
|
|
|
state.form.vin = data.vin; |
|
|
|
|
|
state.form.engineNum = data.engine; |
|
|
|
|
|
state.form.register = data.register; |
|
|
|
|
|
state.form.issueDate = data.issue; |
|
|
|
|
|
state.form.vehPosImgUrl = data.imageUrl; |
|
|
|
|
|
state.form.vehicleModel = data.model; |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
state.form.approvedCount = data.apc; |
|
|
|
|
|
state.form.approvedCountShow = data.apc; |
|
|
|
|
|
state.form.maintenaceMass = data.unladen; |
|
|
|
|
|
state.form.maintenaceMassShow = data.unladen; |
|
|
|
|
|
// 91接口差 |
|
|
|
|
|
// // #ifdef MP-WEIXIN |
|
|
|
|
|
// state.form.vehicleDimensions = data.overall.replaceAll("×", "X"); |
|
|
|
|
|
// // #endif |
|
|
|
|
|
// // #ifdef MP-ALIPAY |
|
|
|
|
|
// state.form.vehicleDimensions = data.overall.replace(/×/g, "X"); |
|
|
|
|
|
// // #endif |
|
|
|
|
|
|
|
|
|
|
|
// let arr = data.overall.split("×"); |
|
|
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
|
|
state.form.vehicleDimensions = data.overall.replaceAll("x", "X"); |
|
|
|
|
|
// #endif |
|
|
|
|
|
// #ifdef MP-ALIPAY |
|
|
|
|
|
state.form.vehicleDimensions = data.overall.replace(/x/g, "X"); |
|
|
|
|
|
// #endif |
|
|
|
|
|
|
|
|
|
|
|
let arr = data.overall.split("x"); |
|
|
|
|
|
state.outlineL = arr[0]; //外廓 长 |
|
|
|
|
|
state.outlineW = arr[1]; //外廓 宽 |
|
|
|
|
|
state.outlineH = arr[2].substring(0, arr[2].length - 2); //外廓 高 |
|
|
|
|
|
state.form.totalMass = data.gross; |
|
|
|
|
|
state.form.totalMassShow = data.gross; |
|
|
|
|
|
state.form.vehNegImgUrl = data.imageUrl; |
|
|
|
|
|
state.form.permittedWeight = data.alc ? data.alc : 0; |
|
|
|
|
|
state.form.permittedTowWeight = data.towing ? data.towing : 0; |
|
|
|
|
|
console.log('=====================', state.form.vehNegImgUrl, state) |
|
|
|
|
|
} |
|
|
|
|
|
state.isTakePhotoModeShow = false |
|
|
|
|
|
}) |
|
|
console.log("图片地址val", val.tempImagePath) |
|
|
console.log("图片地址val", val.tempImagePath) |
|
|
} |
|
|
} |
|
|
const takePhotoMode = (index) => { |
|
|
const takePhotoMode = (index) => { |