// @ts-nocheck import { obtainCarExamInfo} from '../../api/index' import { dateFormat} from '../utils/tools' //获取设备信息 export async function getDeviceInfo() { // globalThis.deviceNo = 'J43405J003101'; //设备mac globalThis.deviceNo = 'FE-FC-FE-7C-5C-77'; //设备mac globalThis.diskId = '1231231231'; //硬盘号 globalThis.hasAuth = true; // // return null // return new Promise((resolve, reject) => { // getSyncData('DeviceInfoTable').then((result: Array) => { // if (result.length) { // globalThis.deviceNo = result[0].deviceId // this.deviceId = result[0].deviceId // resolve(result[0].deviceId) // } else { // resolve('') // } // }) // }) } //获取考车信息 export async function getCarInfo() { let date = new Date(); let params = { time: dateFormat(date), deviceNo: globalThis.deviceNo }; let res:any = await obtainCarExamInfo(params) if(!res.obtainCarExamInfoRsp.body){ this.errorMsg=decodeURI(res.examinerLoginRsp.head.resultMessage) }else { globalThis.carInfo=res.obtainCarExamInfoRsp.body // globalThis.carInfo.carId=res.obtainCarExamInfoRsp.body.carId globalThis.carInfo.plateNo = decodeURIComponent(globalThis.carInfo.plateNo) } return res }