大车逻辑优化

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); }, 1000);
//初始化数据库表 //初始化数据库表
await this.initDb() await this.initDb()
//断点续考 //扣分
if (this.mode == 2) { await this.goDdxkItems()
await this.goDdxkItems()
}
//初始化评判 //初始化评判
const judge = await this.initJudge(); const judge = await this.initJudge();
this.judge = judge this.judge = judge
@ -456,6 +454,7 @@ struct Index {
const nightScoreArr = examItems?.split(",").filter(item => item) || [] const nightScoreArr = examItems?.split(",").filter(item => item) || []
const ddxkKfArr = kfItems.split(";")?.[3]?.split('^').filter(item => item) || [] const ddxkKfArr = kfItems.split(";")?.[3]?.split('^').filter(item => item) || []
nightScoreArr.forEach((kf) => { nightScoreArr.forEach((kf) => {
this.isDdxk = true
let xmdm = ''; let xmdm = '';
let kfdm = '' let kfdm = ''
let currentKf let currentKf
@ -481,26 +480,29 @@ struct Index {
kfxh: currentKf.kfxh kfxh: currentKf.kfxh
}) })
}) })
ddxkKfArr.forEach((kf) => { if (this.judgeConfigObj['432'] != 0) {
const [xmdm, kfdm] = kf.split(',') ddxkKfArr.forEach((kf) => {
const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`] this.isDdxk = true
const currentProject = this.projectsObj[xmdm] || { name: '通用评判' } const [xmdm, kfdm] = kf.split(',')
if (this.projectsObj[xmdm]) { const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`]
this.projectsObj[xmdm].type = '4' const currentProject = this.projectsObj[xmdm] || { name: '通用评判' }
} if (this.projectsObj[xmdm]) {
this.kfArr.push({ this.projectsObj[xmdm].type = '4'
//扣分项目名称 }
xmmcStr: currentProject.name, this.kfArr.push({
//@ts-ignore //扣分项目名称
xmdm, xmmcStr: currentProject.name,
desc: currentKf.markshow, //@ts-ignore
score: currentKf.markreal, xmdm,
markcatalog: currentKf.markcatalog, desc: currentKf.markshow,
markserial: currentKf.markserial, score: currentKf.markreal,
kfxh: currentKf.kfxh markcatalog: currentKf.markcatalog,
markserial: currentKf.markserial,
kfxh: currentKf.kfxh
})
this.totalScore += currentKf.markreal * 1;
}) })
this.totalScore += currentKf.markreal * 1; }
})
this.ddxkKfArr = [...nightScoreArr, ...ddxkKfArr] this.ddxkKfArr = [...nightScoreArr, ...ddxkKfArr]
} }