大车逻辑优化

This commit is contained in:
lixiao 2025-03-31 16:51:10 +08:00
parent 92cb906cee
commit f8244bd14c
2 changed files with 31 additions and 7 deletions

View File

@ -190,6 +190,8 @@ struct Index {
}
//623 考试中是否可以查看轨迹画面(0-否+1-是)
if (sys.v_no == '623') {
this.syssetParam623 = value == '1' ? true : false
}
@ -443,15 +445,17 @@ struct Index {
return judge
}
// 夜考扣分
// 扣分
async goDdxkItems() {
let currentParams: any = router.getParams();
if (!currentParams?.examItems) {
return
}
const examItems: string = currentParams?.examItems + "";
const ddxkKfArr = examItems?.split(",").filter(item => item)
ddxkKfArr.forEach((kf) => {
const kfItems: string = currentParams?.examItems?.[0] || ""
const examItems: string = currentParams?.examItems?.[1] || "";
const nightScoreArr = examItems?.split(",").filter(item => item) || []
const ddxkKfArr = kfItems.split(";")?.[3]?.split('^').filter(item => item) || []
nightScoreArr.forEach((kf) => {
let xmdm = '';
let kfdm = ''
let currentKf
@ -477,7 +481,27 @@ struct Index {
kfxh: currentKf.kfxh
})
})
this.ddxkKfArr = ddxkKfArr
ddxkKfArr.forEach((kf) => {
const [xmdm, kfdm] = kf.split(',')
const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`]
const currentProject = this.projectsObj[xmdm] || { name: '通用评判' }
if (this.projectsObj[xmdm]) {
this.projectsObj[xmdm].type = '4'
}
this.kfArr.push({
//扣分项目名称
xmmcStr: currentProject.name,
//@ts-ignore
xmdm,
desc: currentKf.markshow,
score: currentKf.markreal,
markcatalog: currentKf.markcatalog,
markserial: currentKf.markserial,
kfxh: currentKf.kfxh
})
this.totalScore += currentKf.markreal * 1;
})
this.ddxkKfArr = [...nightScoreArr, ...ddxkKfArr]
}
// 初始化mapPoint表

View File

@ -934,7 +934,7 @@ struct UserInfo {
this.stepFlag = false
this.ksksLimit = false
return
} else if(this.mode === 1 && this.currentUser.jdxx) {
} else if (this.mode === 1 && this.currentUser.jdxx) {
promptAction.showToast({
message: "当前尚未进入夜考时间,无法开始夜考!"
})
@ -947,7 +947,7 @@ struct UserInfo {
router.pushUrl({
url: 'pages/Judge',
params: {
examItems: kfxm,
examItems: [examItems?.getExaminationItemRsp?.body?.ykxx, kfxm],
sczb: Number(this.isBoardPrePareSetPopupOpen),
kfdm: this.sczbkf,
mode: this.mode,