大车逻辑优化

This commit is contained in:
lixiao 2025-03-31 16:56:38 +08:00
parent f8244bd14c
commit 820234fc98

View File

@ -61,10 +61,8 @@ struct Index {
}, 1000);
//初始化数据库表
await this.initDb()
//断点续考
if (this.mode == 2) {
await this.goDdxkItems()
}
//扣分
await this.goDdxkItems()
//初始化评判
const judge = await this.initJudge();
this.judge = judge
@ -456,6 +454,7 @@ struct Index {
const nightScoreArr = examItems?.split(",").filter(item => item) || []
const ddxkKfArr = kfItems.split(";")?.[3]?.split('^').filter(item => item) || []
nightScoreArr.forEach((kf) => {
this.isDdxk = true
let xmdm = '';
let kfdm = ''
let currentKf
@ -481,26 +480,29 @@ struct Index {
kfxh: currentKf.kfxh
})
})
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
if (this.judgeConfigObj['432'] != 0) {
ddxkKfArr.forEach((kf) => {
this.isDdxk = true
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.totalScore += currentKf.markreal * 1;
})
}
this.ddxkKfArr = [...nightScoreArr, ...ddxkKfArr]
}