Compare commits
2 Commits
a1d348f1c2
...
e573544b5c
| Author | SHA1 | Date | |
|---|---|---|---|
| e573544b5c | |||
| e5baf451a6 |
@ -91,7 +91,7 @@ export default class TcpClient {
|
||||
let promise = this.tcp.connect({
|
||||
address: {
|
||||
address: this.oppositeIp, port: parseInt(this.oppositeIpPort), family: 1
|
||||
}, timeout: 6000
|
||||
}, timeout: 1000 * 15
|
||||
});
|
||||
promise.then(() => {
|
||||
this.tcp.setExtraOptions({
|
||||
|
||||
@ -62,7 +62,7 @@ struct Index {
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private serviceExtProxy: IdlServiceExtProxy
|
||||
@State judgeVersion: string = ""
|
||||
private version: string = "2025.05.09.01"
|
||||
private version: string = judgeConfig.version
|
||||
|
||||
@Styles
|
||||
commStyle(){
|
||||
|
||||
@ -3,8 +3,9 @@ import Judge from '../../judgeSDK/utils/judgeReal';
|
||||
import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import {
|
||||
examJudgeMapSetScaling
|
||||
examJudgeMapSetScaling, examJudgeVersion
|
||||
} from '../../judgeSDK/api'
|
||||
import { judgeConfig } from '../../judgeSDK/utils/judgeConfig';
|
||||
|
||||
interface RoadDataType {
|
||||
name: string,
|
||||
@ -30,6 +31,8 @@ export default struct RealTime {
|
||||
@State ratio: number = 1
|
||||
@State lane: Object = {}
|
||||
@State timer:number = 0
|
||||
@State version: string = ""
|
||||
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
@ -67,22 +70,28 @@ export default struct RealTime {
|
||||
|
||||
Column() {
|
||||
if (this.draw) {
|
||||
XComponent({
|
||||
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称,注意这个ID要和C++侧一致,不能变
|
||||
type: 'surface',
|
||||
libraryname: 'JudgeSdk'
|
||||
// libraryname: 'judgesdk'
|
||||
})
|
||||
.width(this.widthNumber)
|
||||
.height(this.heightNumber)
|
||||
.onLoad(() => {
|
||||
apiJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹,false:表示结束绘制
|
||||
})
|
||||
.onDestroy(() => {
|
||||
apiJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制
|
||||
this.draw = false;
|
||||
clearInterval(globalThis.realTimer)
|
||||
Stack({ alignContent: Alignment.TopEnd }) {
|
||||
XComponent({
|
||||
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称,注意这个ID要和C++侧一致,不能变
|
||||
type: 'surface',
|
||||
libraryname: 'JudgeSdk'
|
||||
})
|
||||
.width(this.widthNumber)
|
||||
.height(this.heightNumber)
|
||||
.onLoad(() => {
|
||||
apiJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹,false:表示结束绘制
|
||||
})
|
||||
.onDestroy(() => {
|
||||
apiJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制
|
||||
this.draw = false;
|
||||
clearInterval(globalThis.realTimer)
|
||||
})
|
||||
|
||||
}.width(this.widthNumber)
|
||||
.height(this.heightNumber)
|
||||
Row() {
|
||||
Text(this.version).margin({ right: 10 }).fontSize(14).fontColor(0x333333)
|
||||
}
|
||||
} else {
|
||||
Column() {
|
||||
}
|
||||
@ -109,6 +118,8 @@ export default struct RealTime {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
async aboutToAppear() {
|
||||
this.version = (await examJudgeVersion()) + "/" + judgeConfig.version
|
||||
|
||||
const judge = new Judge(this)
|
||||
let timer = setInterval(()=>{
|
||||
this.lane = globalThis.laneData;
|
||||
|
||||
@ -745,7 +745,7 @@ export default class Judge {
|
||||
const sdkver = await examJudgeVersion();
|
||||
const initInfo = {
|
||||
sdkver,
|
||||
appver: globalThis.version,
|
||||
appver: judgeConfig.version,
|
||||
kskm: examSubject * 1,
|
||||
kchp: plateNo,
|
||||
kchm: carId * 1,
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
//考试回放开关
|
||||
export const judgeConfig = {
|
||||
// 外壳版本号
|
||||
version: "2025.05.15.01",
|
||||
//本地目录开关
|
||||
isTrajectoryOpen: false,
|
||||
//是否开启拍照
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user