50 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-01-05 11:11:15 +08:00
import {
examJudgeSetLogCallback,
examJudgeBeginExam,
examJudgeInit,
examJudgeRealExam,
examJudgeSetRealExamCallback,
examJudgeMapSetParam,
examJudgeMapSetDrawing,
examJudgeMapSetScaling
} from './api/index'
2024-01-31 14:35:16 +08:00
import systemTime from '@ohos.systemDateTime';
2024-01-05 11:11:15 +08:00
import FileUtil from '../../common/utils/File'
import FileModel from './utils/file-model'
import {testRealExam} from './dataTest/index'
const judgeTag = 'SURENJUN_JUDGE'
export default class JudgeImg {
private judgeUI
private modelPath:string
private fileModel:FileModel
private fileUtil:FileUtil
private plcData:any
constructor(judgeUI) {
this.modelPath = 'models/model_enc'
this.judgeUI = judgeUI
this.fileUtil = new FileUtil(judgeUI.context)
this.fileModel = new FileModel(judgeUI.context)
this.init()
}
async init(){
const isJudgeInitBool = globalThis.isJudgeInitBool;
2024-01-31 14:35:16 +08:00
const {judgeUI} = this;
2024-01-05 11:11:15 +08:00
console.info(judgeTag,'1.进入评判入口')
await examJudgeMapSetParam(640, 480); //设置参数宽、高
await examJudgeMapSetScaling(120); //设置缩放比例一般默认填100就是100%的意思) 数字越大视野越大数字越小视野越小不能为0
judgeUI.draw = true
}
2024-01-31 14:35:16 +08:00
//获取评判初始化数据
getInitInfo = () =>{
2024-01-05 11:11:15 +08:00
}
}