2025-03-26 13:43:47 +08:00
|
|
|
|
import FileUtils from '../../../utils/FileUtils';
|
|
|
|
|
|
import { examJudgeMapSetParam, examJudgeMapSetScaling } from '../api/index';
|
2024-01-05 11:11:15 +08:00
|
|
|
|
|
2025-03-26 13:43:47 +08:00
|
|
|
|
import FileModel from './fileModel';
|
2024-01-05 11:11:15 +08:00
|
|
|
|
|
|
|
|
|
|
const judgeTag = 'SURENJUN_JUDGE'
|
|
|
|
|
|
|
|
|
|
|
|
export default class JudgeImg {
|
|
|
|
|
|
private judgeUI
|
2025-03-26 13:43:47 +08:00
|
|
|
|
private modelPath: string
|
|
|
|
|
|
private fileModel: FileModel
|
|
|
|
|
|
private fileUtil: FileUtils
|
|
|
|
|
|
private plcData: any
|
2024-01-05 11:11:15 +08:00
|
|
|
|
|
|
|
|
|
|
constructor(judgeUI) {
|
|
|
|
|
|
this.modelPath = 'models/model_enc'
|
|
|
|
|
|
this.judgeUI = judgeUI
|
2025-03-26 13:43:47 +08:00
|
|
|
|
this.fileUtil = new FileUtils(judgeUI.context)
|
2024-01-05 11:11:15 +08:00
|
|
|
|
this.fileModel = new FileModel(judgeUI.context)
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-26 13:43:47 +08:00
|
|
|
|
async init() {
|
2025-02-13 15:30:48 +08:00
|
|
|
|
const isJudgeInitBool = AppStorage.get('isJudgeInitBool');
|
2025-03-26 13:43:47 +08:00
|
|
|
|
const { judgeUI } = this;
|
2024-07-05 09:34:03 +08:00
|
|
|
|
|
2024-07-10 19:39:13 +08:00
|
|
|
|
//TODO 临时处理
|
2025-03-26 13:43:47 +08:00
|
|
|
|
setTimeout(async () => {
|
|
|
|
|
|
console.info(judgeTag, '1.进入评判入口')
|
2024-07-10 19:39:13 +08:00
|
|
|
|
await examJudgeMapSetParam(640, 480); //设置参数宽、高
|
2024-08-12 10:19:31 +08:00
|
|
|
|
await examJudgeMapSetScaling(100); //设置缩放比例,一般默认填100(就是100%的意思) ,数字越大视野越大,数字越小视野越小,不能为0
|
2024-07-10 19:39:13 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
|
judgeUI.draw = true
|
2024-07-05 09:34:03 +08:00
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-31 14:35:16 +08:00
|
|
|
|
//获取评判初始化数据
|
2025-03-26 13:43:47 +08:00
|
|
|
|
getInitInfo = () => {
|
2024-01-05 11:11:15 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|