接口定义
This commit is contained in:
		
							parent
							
								
									f041e2a8bb
								
							
						
					
					
						commit
						b3a208e8a6
					
				| @ -12,3 +12,28 @@ interface Head { | |||||||
|   resultMessage: string; |   resultMessage: string; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | export interface TimeInfo { | ||||||
|  |   mode: string; | ||||||
|  |   url: string; | ||||||
|  |   paraKdid: string; | ||||||
|  |   kdid: string; | ||||||
|  |   carid: string; | ||||||
|  |   ksdd: string; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export interface Carinfo { | ||||||
|  |   carId: string; | ||||||
|  |   examinationRoomId: string; | ||||||
|  |   plateNo?: string; | ||||||
|  |   isNeedCheck: string; | ||||||
|  |   examSubject:number| string; | ||||||
|  | } | ||||||
|  | export interface examinerLoginInfo{ | ||||||
|  |   carId?: string; | ||||||
|  |   examinationRoomId?: string; | ||||||
|  |   examinerName?: string; | ||||||
|  |   examinerPwd?: string; | ||||||
|  |   username?: string; | ||||||
|  |   kgxm?:string; | ||||||
|  |   ksyh?:string; | ||||||
|  | } | ||||||
| @ -8,6 +8,7 @@ import { DwMapData, PassData, RealNumData, StackValueData, WarnFlagData, WarnFla | |||||||
| import { BaseInfoType } from '../model/Common'; | import { BaseInfoType } from '../model/Common'; | ||||||
| import { CarCheckDataType, CarConfigurationParams, CarInfoType } from '../model/CarCheck'; | import { CarCheckDataType, CarConfigurationParams, CarInfoType } from '../model/CarCheck'; | ||||||
| import { BusinessError } from '@ohos.base'; | import { BusinessError } from '@ohos.base'; | ||||||
|  | import { Carinfo } from '../model'; | ||||||
| 
 | 
 | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| @ -39,7 +40,7 @@ struct Index { | |||||||
|   @State devPath: string = "/dev/ttyS3" |   @State devPath: string = "/dev/ttyS3" | ||||||
|   @State stopFlag: boolean = false |   @State stopFlag: boolean = false | ||||||
|   @State fromIndex: boolean = false |   @State fromIndex: boolean = false | ||||||
|   @State carInfo: CarInfoType = {} |   @State carInfo: Carinfo = {} | ||||||
|   private vocObj: ESObject; |   private vocObj: ESObject; | ||||||
| 
 | 
 | ||||||
|   // private AccountTable = new AccountTable(()=>{},CommonConstants); |   // private AccountTable = new AccountTable(()=>{},CommonConstants); | ||||||
|  | |||||||
| @ -8,6 +8,8 @@ import { UserLoginType } from '../model/ExaminerLogin'; | |||||||
| import { BusinessError } from '@ohos.base'; | import { BusinessError } from '@ohos.base'; | ||||||
| import { CarCheckDataType } from '../model/CarCheck'; | import { CarCheckDataType } from '../model/CarCheck'; | ||||||
| import { examinerLogin } from '../api/login'; | import { examinerLogin } from '../api/login'; | ||||||
|  | import { examinerLoginInfo,Carinfo } from '../model/index' | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| @ -93,7 +95,7 @@ struct Index { | |||||||
|                     if (this.limit) { |                     if (this.limit) { | ||||||
|                       return |                       return | ||||||
|                     } |                     } | ||||||
|                     const carInfo: CarCheckDataType = AppStorage.get('carInfo') |                     const carInfo: Carinfo = AppStorage.get('carInfo') | ||||||
|                     const param: UserLoginType = { |                     const param: UserLoginType = { | ||||||
|                       carId: carInfo.carId as string, |                       carId: carInfo.carId as string, | ||||||
|                       examinationRoomId: carInfo.examinationRoomId as string, |                       examinationRoomId: carInfo.examinationRoomId as string, | ||||||
| @ -127,7 +129,7 @@ struct Index { | |||||||
|                         }, router.RouterMode.Single); |                         }, router.RouterMode.Single); | ||||||
| 
 | 
 | ||||||
|                         console.log('res11', JSON.stringify(res)) |                         console.log('res11', JSON.stringify(res)) | ||||||
|                         const examinerLoginInfo: ESObject = res.examinerLoginRsp.body |                         const examinerLoginInfo: examinerLoginInfo = res.examinerLoginRsp.body | ||||||
|                         examinerLoginInfo.username = this.inputTextArr[0] |                         examinerLoginInfo.username = this.inputTextArr[0] | ||||||
|                         AppStorage.setOrCreate('examinerLoginInfo', examinerLoginInfo) |                         AppStorage.setOrCreate('examinerLoginInfo', examinerLoginInfo) | ||||||
|                       }).catch((err: BusinessError) => { |                       }).catch((err: BusinessError) => { | ||||||
|  | |||||||
| @ -20,14 +20,13 @@ import imageBtn from './compontents/imageBtn'; | |||||||
| import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | ||||||
| import { BaseInfoType } from '../model/Common'; | import { BaseInfoType } from '../model/Common'; | ||||||
| import { CarCheckDataType } from '../model/CarCheck'; | import { CarCheckDataType } from '../model/CarCheck'; | ||||||
|  | import { Carinfo, TimeInfo } from '../model'; | ||||||
| 
 | 
 | ||||||
| // import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | // import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | ||||||
| 
 | 
 | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| struct Index { | struct Index { | ||||||
|   @State carNum: string = '' |  | ||||||
|   @State version: string = '' |  | ||||||
|   @State url: string = '' |   @State url: string = '' | ||||||
|   @State hasAuth: boolean = false; |   @State hasAuth: boolean = false; | ||||||
|   @State dialogVisiable: boolean = false; |   @State dialogVisiable: boolean = false; | ||||||
| @ -41,7 +40,7 @@ struct Index { | |||||||
|   @State loading: boolean = false |   @State loading: boolean = false | ||||||
|   @State initParamFlag: boolean = false |   @State initParamFlag: boolean = false | ||||||
|   @State fd: number = -1; |   @State fd: number = -1; | ||||||
|   @State carInfo: CarCheckDataType = {}; |   @State carInfo: Carinfo = {}; | ||||||
|   @State num: number = 0; |   @State num: number = 0; | ||||||
|   fileHelper = null; |   fileHelper = null; | ||||||
|   errorDialog: CustomDialogController = new CustomDialogController({ |   errorDialog: CustomDialogController = new CustomDialogController({ | ||||||
| @ -61,7 +60,7 @@ struct Index { | |||||||
|   private interval = -1; |   private interval = -1; | ||||||
|   // private vocObj = null; |   // private vocObj = null; | ||||||
|   private avPlayer |   private avPlayer | ||||||
|   private timeInfo |   private timeInfo:TimeInfo | ||||||
|   private workerInstance = null; |   private workerInstance = null; | ||||||
|   private context = getContext(this) as common.UIAbilityContext; |   private context = getContext(this) as common.UIAbilityContext; | ||||||
| 
 | 
 | ||||||
| @ -217,7 +216,7 @@ struct Index { | |||||||
|               .width('30%') |               .width('30%') | ||||||
|               .margin({ bottom: 10 }) |               .margin({ bottom: 10 }) | ||||||
| 
 | 
 | ||||||
|             Text('授权信息:' + (this.hasAuth ? '已授权' : '未授权')) |             Text('授权信息:' + (this.baseInfo.hasAuth ? '已授权' : '未授权')) | ||||||
|               .fontColor('#CCAE7A') |               .fontColor('#CCAE7A') | ||||||
|               .fontSize(18 * this.ratio) |               .fontSize(18 * this.ratio) | ||||||
|               .width('30%') |               .width('30%') | ||||||
| @ -523,7 +522,7 @@ struct Index { | |||||||
|   async onPageShow() { |   async onPageShow() { | ||||||
|     console.log('ttttt', 1111) |     console.log('ttttt', 1111) | ||||||
|     this.singlePlay = AppStorage.get('singlePlay') |     this.singlePlay = AppStorage.get('singlePlay') | ||||||
|     this.baseInfo = AppStorage.get('baseInfo') as baseInfo |     this.baseInfo = AppStorage.get('baseInfo') as BaseInfoType | ||||||
|     await this.userAuth(); |     await this.userAuth(); | ||||||
|     if (this.singlePlay == undefined || this.singlePlay == null) { |     if (this.singlePlay == undefined || this.singlePlay == null) { | ||||||
|       // setVideoParam() |       // setVideoParam() | ||||||
| @ -614,9 +613,7 @@ struct Index { | |||||||
|       AppStorage.setOrCreate('distanceClass', distanceClass) |       AppStorage.setOrCreate('distanceClass', distanceClass) | ||||||
|       console.info('surenjun', 'distanceClass=>初始化完成') |       console.info('surenjun', 'distanceClass=>初始化完成') | ||||||
|     } |     } | ||||||
|     this.carNum = this.carInfo.plateNo; | 
 | ||||||
|     this.version = this.baseInfo.version; |  | ||||||
|     this.hasAuth = this.baseInfo.hasAuth; |  | ||||||
|     setTimeout(() => { |     setTimeout(() => { | ||||||
|       this.initParamFlag = true |       this.initParamFlag = true | ||||||
|     }, 3000) |     }, 3000) | ||||||
|  | |||||||
| @ -30,6 +30,7 @@ import { judgeConfig } from './judgeSDK/utils/judgeConfig'; | |||||||
| import FileUtil from '../common/utils/File'; | import FileUtil from '../common/utils/File'; | ||||||
| 
 | 
 | ||||||
| import SignDisplayCom from './compontents/signDisplayCom'; | import SignDisplayCom from './compontents/signDisplayCom'; | ||||||
|  | import { Carinfo } from '../model/api'; | ||||||
| 
 | 
 | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| @ -137,7 +138,7 @@ struct Index { | |||||||
|   @State popTimer: number = 0; |   @State popTimer: number = 0; | ||||||
|   @State carlist: string = '' |   @State carlist: string = '' | ||||||
|   @State errorMsg: string = '' |   @State errorMsg: string = '' | ||||||
|   @State carInfo: object = {} |   @State carInfo: Carinfo = {} | ||||||
|   @State isErrorMsgEnd: boolean = false |   @State isErrorMsgEnd: boolean = false | ||||||
|   @State disConnectErrorOpen: boolean = false |   @State disConnectErrorOpen: boolean = false | ||||||
|   private context = getContext(this) as common.UIAbilityContext; |   private context = getContext(this) as common.UIAbilityContext; | ||||||
|  | |||||||
| @ -23,7 +23,7 @@ import FileUtil from '../common/utils/File'; | |||||||
| import DB, { ColumnType } from '../common/database/DbSql'; | import DB, { ColumnType } from '../common/database/DbSql'; | ||||||
| import { LabelBlockType, QKParamType, SckType, SystemParamType, User } from '../model'; | import { LabelBlockType, QKParamType, SckType, SystemParamType, User } from '../model'; | ||||||
| import { BusinessError } from '@ohos.base'; | import { BusinessError } from '@ohos.base'; | ||||||
| 
 | import {Carinfo,examinerLoginInfo} from '../model/index' | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| struct UserInfo { | struct UserInfo { | ||||||
| @ -74,6 +74,20 @@ struct UserInfo { | |||||||
|   @State faceFlag: string = '0'; |   @State faceFlag: string = '0'; | ||||||
|   @State FaceOpenStatue: string = '0'; //是否开启人脸识别 |   @State FaceOpenStatue: string = '0'; //是否开启人脸识别 | ||||||
|   @State faceCatchImg: string = '' |   @State faceCatchImg: string = '' | ||||||
|  |   @State carInfo: Carinfo = { | ||||||
|  |     carId: '', | ||||||
|  |     examinationRoomId: '', | ||||||
|  |     plateNo: '', | ||||||
|  |     isNeedCheck: '', | ||||||
|  |     examSubject:'' | ||||||
|  |   } | ||||||
|  |   @State examinerLoginInfo: examinerLoginInfo = { | ||||||
|  |     carId: '', | ||||||
|  |     examinationRoomId: '', | ||||||
|  |     plateNo: '', | ||||||
|  |     isNeedCheck: '', | ||||||
|  |     examSubject:'' | ||||||
|  |   } | ||||||
|   @State systemParam: SystemParamType = { |   @State systemParam: SystemParamType = { | ||||||
|     Param341: true, |     Param341: true, | ||||||
|     Param803Str: '0', |     Param803Str: '0', | ||||||
|  | |||||||
| @ -7,7 +7,7 @@ import { string2Bytes } from '../../common/utils/tools'; | |||||||
| import { takePhoto } from '../../service/videoService'; | import { takePhoto } from '../../service/videoService'; | ||||||
| import { GlobalConfig } from '../../config/index'; | import { GlobalConfig } from '../../config/index'; | ||||||
| import { VideoConfigData } from '../../mock'; | import { VideoConfigData } from '../../mock'; | ||||||
| import { VideoConfig } from '../../model'; | import { Carinfo, VideoConfig } from '../../model'; | ||||||
| import App from '@system.app'; | import App from '@system.app'; | ||||||
| 
 | 
 | ||||||
| @Component | @Component | ||||||
| @ -30,7 +30,7 @@ export default struct FaceCompare { | |||||||
|   @State showControls: boolean = false |   @State showControls: boolean = false | ||||||
|   @State isAutoPlay: boolean = true |   @State isAutoPlay: boolean = true | ||||||
|   @State signNum: number = 0; |   @State signNum: number = 0; | ||||||
|   @State carinfo: object = {}; |   @State carinfo: Carinfo = {}; | ||||||
|   @State param: VideoConfig = VideoConfigData |   @State param: VideoConfig = VideoConfigData | ||||||
|   private times = 1; //人脸比对失败次数, 超过3次将不会自动比对,需要点击重新打开重新触发 |   private times = 1; //人脸比对失败次数, 超过3次将不会自动比对,需要点击重新打开重新触发 | ||||||
|   private vocObj = null; |   private vocObj = null; | ||||||
|  | |||||||
| @ -8,6 +8,7 @@ import { MarkRule, SYSSET } from '../../judgeSDK/api/judgeSDK.d'; | |||||||
| import { uploadExamProgressData, writeObjectOut } from '../../../api/judge'; | import { uploadExamProgressData, writeObjectOut } from '../../../api/judge'; | ||||||
| import JudgeTask from '../../judgeSDK/utils/judgeTask'; | import JudgeTask from '../../judgeSDK/utils/judgeTask'; | ||||||
| import FilePhoto from '../../judgeSDK/utils/filePhoto'; | import FilePhoto from '../../judgeSDK/utils/filePhoto'; | ||||||
|  | import { Carinfo } from '../../../model/api'; | ||||||
| 
 | 
 | ||||||
| interface SEL { | interface SEL { | ||||||
|   fontColor: string |   fontColor: string | ||||||
| @ -55,7 +56,13 @@ export default struct DeductedPopup { | |||||||
|   @State manualMarkRules: MarkRule[] = [] |   @State manualMarkRules: MarkRule[] = [] | ||||||
|   @State lineBg: Array<string> = ['#4D4136', '#26231E'] |   @State lineBg: Array<string> = ['#4D4136', '#26231E'] | ||||||
|   @State selectedLine: number = undefined |   @State selectedLine: number = undefined | ||||||
|   @State carInfo: object = {} |   @State carInfo: object = { | ||||||
|  |     carId: '', | ||||||
|  |     examinationRoomId: '', | ||||||
|  |     plateNo: '', | ||||||
|  |     isNeedCheck: '', | ||||||
|  |     examSubject:'', | ||||||
|  |   } | ||||||
|   @State singlePlay: boolean = false |   @State singlePlay: boolean = false | ||||||
|   private closePopup: Function = () => { |   private closePopup: Function = () => { | ||||||
|   } |   } | ||||||
| @ -209,7 +216,7 @@ export default struct DeductedPopup { | |||||||
|   //项目开始 |   //项目开始 | ||||||
|   async beginProject() { |   async beginProject() { | ||||||
|     //项目开始 //过程照片 //扣分 //结束考试 |     //项目开始 //过程照片 //扣分 //结束考试 | ||||||
|     const carInfo = this.carInfo; |     const carInfo:Carinfo= this.carInfo; | ||||||
|     const { examSubject,plateNo } = carInfo; |     const { examSubject,plateNo } = carInfo; | ||||||
|     const {serialNumber,lsh,idCard,ksxl,kslx,ksdd} = this |     const {serialNumber,lsh,idCard,ksxl,kslx,ksdd} = this | ||||||
|     const time = await getCurrentTime(); |     const time = await getCurrentTime(); | ||||||
| @ -268,8 +275,8 @@ export default struct DeductedPopup { | |||||||
|     const {serialNumber,lsh,idCard,ksdd,kfdmArr} = this; |     const {serialNumber,lsh,idCard,ksdd,kfdmArr} = this; | ||||||
|     const kfLen = kfdmArr.length; |     const kfLen = kfdmArr.length; | ||||||
|     const kf = kfdmArr[kfLen -1]; |     const kf = kfdmArr[kfLen -1]; | ||||||
|     const carInfo = this.carInfo; |     const carInfo:Carinfo = this.carInfo; | ||||||
|     const { examSubject} = carInfo; |     const { examSubject} = this.carInfo; | ||||||
|     const time = await getCurrentTime(); |     const time = await getCurrentTime(); | ||||||
|     const kfData = { |     const kfData = { | ||||||
|       xtlb: '17', jkxlh: serialNumber, jkid: '17C53', |       xtlb: '17', jkxlh: serialNumber, jkid: '17C53', | ||||||
| @ -317,7 +324,7 @@ export default struct DeductedPopup { | |||||||
|   //考试结束 |   //考试结束 | ||||||
|   async endFn() { |   async endFn() { | ||||||
|     const {serialNumber,lsh,idCard,score,getPhoto} = this; |     const {serialNumber,lsh,idCard,score,getPhoto} = this; | ||||||
|     const carInfo = this.carInfo; |     const carInfo:Carinfo = this.carInfo; | ||||||
|     const { examSubject,plateNo } = carInfo; |     const { examSubject,plateNo } = carInfo; | ||||||
|     const time = await getCurrentTime(); |     const time = await getCurrentTime(); | ||||||
|     const photoBase64 = await getPhoto(); |     const photoBase64 = await getPhoto(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user