feat:济南优化

This commit is contained in:
surenjun 2024-12-05 18:31:06 +08:00
parent cd245ac226
commit d28b9a2caa
8 changed files with 41 additions and 60 deletions

View File

@ -304,7 +304,6 @@ struct Index {
this.projectsObj[no2*1] = currentProject
this.projectsCenterObj[txt2] = currentProject
this.projects.push(currentProject);
console.info('surenjun kStringArr',JSON.stringify(kStringArr))
//真实监管下发考试项目
if(isInExam && !(kStringArr.includes(txt2) || kStringArr.includes(no2+''))){
@ -550,12 +549,12 @@ struct Index {
Row() {
Row() {
Image($rawfile('judge/signal_logoS.png')).width(120)
Text(this.time).fontColor('#CCB48F').fontSize(32).padding({ left: 10, right: 5 })
Text(this.time).fontColor('#CCB48F').fontSize(34).padding({ left: 10, right: 5 })
Image($rawfile(this.isDwztRight ? 'judge/xh_green.png' : 'judge/xh_red.png')).width(50)
}.padding({ left: 20 })
Row() {
Text(`当前项目:${this.xmmcStr || '无'} `).fontColor('#E5CCA1').fontSize(32)
Text(`当前项目:${this.xmmcStr || '无'} `).fontColor('#E5CCA1').fontSize(34)
}
}
.width('100%')
@ -729,9 +728,9 @@ struct Index {
Text(project.name) {
}
.fontColor(this.getProjectColor(this.projectsObj[project.projectCode].type))
.margin({ bottom: 3 })
.fontSize(22)
}.margin({ bottom: 3 })
.margin({ bottom: 2 })
.fontSize(24)
}.margin({ bottom: 2 })
})
}.lanes(2).margin({ left: 25 })
}
@ -1240,8 +1239,8 @@ struct Index {
scroller: Scroller = new Scroller()
//页面通用字体大小
@State wayno: number = 0
@State FONTSIZE: number = 28
@State BIGFONTSIZE: number = 28
@State FONTSIZE: number = 30
@State BIGFONTSIZE: number = 32
//结束考试弹窗
@State endPopupVisible: boolean = false
//等待弹窗(考试及格,考试不及格使用)

View File

@ -4,8 +4,6 @@ import FileLog from '../judgeSDK/utils/fileLog';
import RealTime from '../compontents/judge/RealTime';
import { GPSData, SignalData } from '../../mock';
import { SignalDataType } from '../../model';
// import { getSyncData } from '../../common/service/initable';
import common from '@ohos.app.ability.common';
@Component
export default struct SignDisplayCom {
@ -22,15 +20,10 @@ export default struct SignDisplayCom {
@State interval: number = 0
@State @Watch('outClick') outFlag: boolean = false;
@State url: string = ''
@State date: string = ''
@State time: string = ''
// @State sd: string = ''
@State param350Str: string = ''
private timer = null
private udpClient: UdpClient = null
private FileLog: FileLog
private vocObj = null;
private context = getContext(this) as common.UIAbilityContext;
constructor() {
super()
@ -173,7 +166,7 @@ export default struct SignDisplayCom {
}.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio })
Row() {
Text("后置机IP" + this.signArr[53] || '0')
Text("机IP" + this.signArr[53] || '0')
.fontColor('#FFF5E5')
.fontSize(14 * this.ratio)
.width('25%')
@ -222,11 +215,11 @@ export default struct SignDisplayCom {
.fontColor('#FFB433')
.fontSize(14 * this.ratio)
.height(18 * this.ratio)
Text('年月日:' + this.date).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('时分秒:' + this.time).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('年月日:' + this.signArr[93]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('时分秒:' + this.signArr[94]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('经度:' + this.signArr[95]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('纬度:' + this.signArr[96]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('速度:' + (Number(this.signArr[97])*1.852).toFixed(2)).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('速度:' + this.signArr[97]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
}
.backgroundColor('#1A1A1A')
.width(170 * this.ratio)
@ -353,6 +346,8 @@ export default struct SignDisplayCom {
}
onPageShow() {
console.info('SURENJUN', 123)
const getSignal = this.getSignal;
const that = this
const showBack = this.showBack;
@ -411,27 +406,14 @@ export default struct SignDisplayCom {
for (let i = 34; i <= 46; i++) {
this.sjxhColum[i].value = this.signArr[i+2]
}
// let t = 0
// for (let i = 83; i <= 97; i++) {
// if(t==14){
// }
// t++
// }
this.GPSColum[14].value = ((Number((this.signArr[97]||0))*1.852).toFixed(2)).toString()
let t = 0
for (let i = 83; i <= 97; i++) {
this.GPSColum[t].value = this.signArr[i]
t++
}
this.sjxhColum = JSON.parse(JSON.stringify((this.sjxhColum)))
that.signArr = JSON.parse(JSON.stringify((this.signArr)))
that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum)))
if(this.signArr.length) {
this.date = this.signArr[93].substr(4, 2) + this.signArr[93].substr(2, 2) + this.signArr[93].substr(0, 2)
const hours = (Number(this.signArr[94].substr(0, 2)) + 8).toString()
if (hours.length < 2) {
this.time = '0' + hours + this.signArr[93].substr(2, this.signArr[93].length)
} else {
this.time = hours + this.signArr[93].substr(2, this.signArr[93].length)
}
}
// this.sd=this.param350Str=='0'? this.signArr[97]: this.signArr[23]
}
outClick() {

View File

@ -44,7 +44,7 @@ export default struct DeductedPopup {
@State serialNumber: number = 0;
@State examSubject: number = 2;
@State markRuleListObj: MarkRule = {}
@State fontSize: number = 25
@State fontSize: number = 28
@State unselected: SEL = { fontColor: '#000000', bgColor: '#CCC4B8' }
@State selected: SEL = { fontColor: '#FFAD33', bgColor: '#26231E' }
@State currentIndex: number = 0
@ -480,7 +480,7 @@ export default struct DeductedPopup {
) {
Row() {
Row() {
}.width(36).height(36).backgroundImage($rawfile(`judge/km3/zuo_nor.png`)).margin({ left: 24, top: 4 })
}.width(40).height(36).backgroundImage($rawfile(`judge/km3/zuo_nor.png`)).margin({ left: 24, top: 4 })
Text('上一页') {
}.fontColor('#FFF').fontSize(this.fontSize)
@ -504,7 +504,7 @@ export default struct DeductedPopup {
}.fontColor('#FFF').fontSize(this.fontSize).padding({ left: 30 })
Row() {
}.width(36).height(36).backgroundImage($rawfile(`judge/km3/you_nor.png`)).margin({ left: 4, top: 4 })
}.width(40).height(36).backgroundImage($rawfile(`judge/km3/you_nor.png`)).margin({ left: 4, top: 4 })
}
.width(160)
.height(80)
@ -521,7 +521,7 @@ export default struct DeductedPopup {
Text('扣 分') {
}.fontColor('#FFF').fontSize(this.fontSize).padding({ left: 49 })
}
.width(160)
.width(180)
.height(80)
.justifyContent(FlexAlign.Start)
.alignItems(VerticalAlign.Center)
@ -572,9 +572,9 @@ export default struct DeductedPopup {
//没有扣分项目通过
this.closePopup(this.kfdmArr.length ? true : false)
// judgeTask.addTask(async () => {
// await this.endProject()
// }, { isDelay: true })
// judgeTask.addTask(async () => {
// await this.endProject()
// }, { isDelay: true })
})
}.width('100%').height('100%').position({ y: 0 }).backgroundColor('rgba(0,0,0,0.7)')

View File

@ -12,7 +12,7 @@ export default struct DeductedPopup {
super()
}
@State fontSize:number = 20
@State fontSize:number = 24
@State unselected:SEL = {fontColor:'#000000', bgColor:'#CCC4B8'}
@State selected:SEL = {fontColor:'#FFAD33', bgColor:'#26231E'}
@ -90,7 +90,7 @@ export default struct DeductedPopup {
Row(){
Text(text).fontColor(index === this.currentIndex ? this.selected.fontColor : this.unselected.fontColor).fontSize(this.fontSize).fontWeight(500)
}
.width(110).height(60)
.width(120).height(60)
.backgroundColor(index === this.currentIndex ? this.selected.bgColor: this.unselected.bgColor ).justifyContent(FlexAlign.Center).justifyContent(FlexAlign.Center)
.borderRadius({topLeft:20,topRight:20}).margin({right:10})
.onClick(()=>{
@ -113,7 +113,7 @@ export default struct DeductedPopup {
Row(){
Image($rawfile(`judge/km3/zuo_nor.png`)).height(15).margin({left:20,top:0})
Text('上一页'){}.fontColor('#FFF').fontSize(this.fontSize)
}.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}).margin({right:15})
}.width(140).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}).margin({right:15})
.onClick(()=>{this.goPage(0)})
}
@ -123,13 +123,13 @@ export default struct DeductedPopup {
Row(){
Text('下一页'){}.fontColor('#FFF').fontSize(this.fontSize).padding({left:30})
Image($rawfile(`judge/km3/you_nor.png`)).height(15).margin({right:6,top:0})
}.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}).margin({right:15})
}.width(140).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}).margin({right:15})
.onClick(()=>{this.goPage(1)})
}
Row(){
Text('扣 分'){}.fontColor('#FFF').fontSize(this.fontSize).padding({left:35})
}.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'})
}.width(140).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'})
.onClick(()=>{
this.endPopupVisible = true
})

View File

@ -12,11 +12,11 @@ export default struct EndPopup {
build(){
Column(){
Column(){
Text(this.title).fontSize(32).margin({bottom:20})
Text(this.title).fontSize(34).margin({bottom:20})
Row(){}.height(100)
Row(){
Text('取消').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(230).height(80).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).onClick(this.cancelFn)
Text('确定').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(230).height(80).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).margin({left:45}).onClick(this.confirmFn)
Text('取消').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(240).height(90).fontSize(30).fontColor('#FFF').textAlign(TextAlign.Center).onClick(this.cancelFn)
Text('确定').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(240).height(90).fontSize(30).fontColor('#FFF').textAlign(TextAlign.Center).margin({left:45}).onClick(this.confirmFn)
}
}.width('50%').height('50%').backgroundColor('#E6E3DF').borderRadius(38).position({y:'25%',x:'25%'}).justifyContent(FlexAlign.Center)

View File

@ -304,7 +304,7 @@ export default class Judge {
const {sczb,kfdm} = currentParams;
const {isExam} = this;
const judgeUI = this.judgeUI
const {projects,carType,isDdxk,ddxkTime,projectsCenterObj,ddxkKsxmArr,ddxkKfArr,passingScore} = judgeUI;
const {projects,carType,kssycs,isDdxk,ddxkTime,projectsCenterObj,ddxkKsxmArr,ddxkKfArr,passingScore} = judgeUI;
const beginInfo = {
kgid: '012',
kgxm: decodeURI(examinerName || ''),
@ -319,7 +319,7 @@ export default class Judge {
sfzmhm: judgeUI.idCard,
ksyy: '',
kscx: carType,
kkcs: 1,
kkcs: Number(kssycs) || 2 ,
sfyk: 0,
ykkkcs: 1,
wayno: judgeUI.wayno * 1,
@ -1569,7 +1569,7 @@ export default class Judge {
const bytes = await this.getMessageHeartbeat();
bytes && globalThis.judgeUdp.send(bytes)
}, 10)
}, 20)
globalThis.judgeTimer = judgeTimer;
}

View File

@ -78,7 +78,7 @@ export default class FileLog {
// 过程评判日志调数据
public setExamJudgeLogData = async (str:string) => {
const {fileUtil,folderPath} = this;
await fileUtil.editFile(`${folderPath}/judge_log_data.txt`, str);
await fileUtil.editFile(`${folderPath}/judge_log_data.txt`,str);
}
// 设置四合一画面数据

View File

@ -2,9 +2,9 @@
//考试回放开关
export const judgeConfig = {
//本地目录开关
isTrajectoryOpen: false,
isTrajectoryOpen: true,
//是否开启拍照
isPhotoOpen: true,
isPhotoOpen: false,
//扣分语音是否强制开启
kfVoiceOpen: false,
//忽略的考试项目
@ -16,11 +16,11 @@ export const judgeConfig = {
// 本地模型地址
modelPath: 'models/model_enc',
// 济南科目三
trajectoryPath: 'logs/2024_10_12/2024_10_12_10_04_59_9999138229339_510793546837625664_弓雯乐/judge_exam_data.txt',
trajectoryPath: 'logs/2024_12_05/2024_12_05_14_35_24_0000000000000_342323199501470011_测试学员1/judge_exam_data.txt',
//四合一画面配置
fourInOneScreen:{
//gps位数
gpsDigit:7
gpsDigit:6
},
//后置机类型 0=>三代机 1=>一体机 2=>二代机
rearEndUnitsType:0,